mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-11 08:48:06 +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 )
|
private boolean loadConfig( Intent intent )
|
||||||
{
|
{
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
try {
|
Uri data = intent.getData();
|
||||||
Uri data = intent.getData();
|
if ( null != data ) {
|
||||||
String path = data.getPath();
|
try {
|
||||||
String prefix = LocUtils.getString( m_activity, R.string.conf_prefix );
|
String path = data.getPath();
|
||||||
if ( path.startsWith( prefix ) ) {
|
String prefix = LocUtils.getString( m_activity, R.string.conf_prefix );
|
||||||
makeConfirmThenBuilder( R.string.apply_config, Action.APPLY_CONFIG )
|
Log.d( TAG, "loadConfig(): path: %s; prefix: %s", path, prefix );
|
||||||
.setPosButton( R.string.button_apply_config )
|
if ( path.startsWith( prefix ) ) {
|
||||||
.setNegButton( android.R.string.cancel )
|
makeConfirmThenBuilder( R.string.apply_config, Action.APPLY_CONFIG )
|
||||||
.setParams( data.toString() )
|
.setPosButton( R.string.button_apply_config )
|
||||||
.show();
|
.setNegButton( android.R.string.cancel )
|
||||||
success = true;
|
.setParams( data.toString() )
|
||||||
|
.show();
|
||||||
|
success = true;
|
||||||
|
}
|
||||||
|
} catch ( Exception ex ) {
|
||||||
|
Log.ex( TAG, ex );
|
||||||
}
|
}
|
||||||
} catch ( Exception ex ) {
|
|
||||||
Log.ex( TAG, ex );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
|
Loading…
Add table
Reference in a new issue