summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2011-07-17 12:36:39 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-17 12:36:39 -0700
commit7f4db239592d852267845ecd54aaafe38124226c (patch)
tree3b9adfe27fc391f52000d3de1b23aa3e7f1c0fc9 /src
parentabc95ee82295b82ad0475a8b4c55a5196a5f014a (diff)
parent07d6fd2c0111c64d4a6721fd2a5a1fbe5102ff0b (diff)
downloadpackages_apps_settings-7f4db239592d852267845ecd54aaafe38124226c.zip
packages_apps_settings-7f4db239592d852267845ecd54aaafe38124226c.tar.gz
packages_apps_settings-7f4db239592d852267845ecd54aaafe38124226c.tar.bz2
Merge "Fix NPE in MasterClear"
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/MasterClear.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/settings/MasterClear.java b/src/com/android/settings/MasterClear.java
index 1b045ea..29a92b1 100644
--- a/src/com/android/settings/MasterClear.java
+++ b/src/com/android/settings/MasterClear.java
@@ -196,13 +196,14 @@ public class MasterClear extends Fragment {
+ " type=" + account.type);
continue;
}
- Drawable icon;
+ Drawable icon = null;
try {
- Context authContext = context.createPackageContext(desc.packageName, 0);
- icon = authContext.getResources().getDrawable(desc.iconId);
+ if (desc.iconId != 0) {
+ Context authContext = context.createPackageContext(desc.packageName, 0);
+ icon = authContext.getResources().getDrawable(desc.iconId);
+ }
} catch (PackageManager.NameNotFoundException e) {
Log.w(TAG, "No icon for account type " + desc.type);
- icon = null;
}
TextView child = (TextView)inflater.inflate(R.layout.master_clear_account,