mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
test for null data rather than catch and log every time
This commit is contained in:
parent
7e591f39a5
commit
6f96317e69
1 changed files with 16 additions and 13 deletions
|
@ -2456,20 +2456,23 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
private boolean loadConfig( Intent intent )
|
||||
{
|
||||
boolean success = false;
|
||||
try {
|
||||
Uri data = intent.getData();
|
||||
String path = data.getPath();
|
||||
String prefix = LocUtils.getString( m_activity, R.string.conf_prefix );
|
||||
if ( path.startsWith( prefix ) ) {
|
||||
makeConfirmThenBuilder( R.string.apply_config, Action.APPLY_CONFIG )
|
||||
.setPosButton( R.string.button_apply_config )
|
||||
.setNegButton( android.R.string.cancel )
|
||||
.setParams( data.toString() )
|
||||
.show();
|
||||
success = true;
|
||||
Uri data = intent.getData();
|
||||
if ( null != data ) {
|
||||
try {
|
||||
String path = data.getPath();
|
||||
String prefix = LocUtils.getString( m_activity, R.string.conf_prefix );
|
||||
Log.d( TAG, "loadConfig(): path: %s; prefix: %s", path, prefix );
|
||||
if ( path.startsWith( prefix ) ) {
|
||||
makeConfirmThenBuilder( R.string.apply_config, Action.APPLY_CONFIG )
|
||||
.setPosButton( R.string.button_apply_config )
|
||||
.setNegButton( android.R.string.cancel )
|
||||
.setParams( data.toString() )
|
||||
.show();
|
||||
success = true;
|
||||
}
|
||||
} catch ( Exception ex ) {
|
||||
Log.ex( TAG, ex );
|
||||
}
|
||||
} catch ( Exception ex ) {
|
||||
Log.ex( TAG, ex );
|
||||
}
|
||||
|
||||
return success;
|
||||
|
|
Loading…
Add table
Reference in a new issue