Merge "Catch a resource not found exception" into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
541f0e447f
@@ -29,6 +29,7 @@ import android.content.SharedPreferences;
|
|||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.PackageManager.NameNotFoundException;
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
|
import android.content.res.Resources;
|
||||||
import android.content.res.Resources.Theme;
|
import android.content.res.Resources.Theme;
|
||||||
import android.graphics.drawable.Icon;
|
import android.graphics.drawable.Icon;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
@@ -471,6 +472,9 @@ public class SettingsActivity extends SettingsBaseActivity
|
|||||||
return;
|
return;
|
||||||
} catch (NameNotFoundException e) {
|
} catch (NameNotFoundException e) {
|
||||||
Log.w(LOG_TAG, "Could not find package" + initialTitleResPackageName);
|
Log.w(LOG_TAG, "Could not find package" + initialTitleResPackageName);
|
||||||
|
} catch (Resources.NotFoundException resourceNotFound) {
|
||||||
|
Log.w(LOG_TAG,
|
||||||
|
"Could not find title resource in " + initialTitleResPackageName);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setTitle(mInitialTitleResId);
|
setTitle(mInitialTitleResId);
|
||||||
|
Reference in New Issue
Block a user