diff options
author | Kenny Guy <kennyguy@google.com> | 2014-05-27 16:34:59 +0100 |
---|---|---|
committer | Kenny Guy <kennyguy@google.com> | 2014-05-27 16:34:59 +0100 |
commit | c879052247b1000b9f318294024daa3c9d100621 (patch) | |
tree | cbd48ab5be45855bfb321046e0127952cdf074c7 /src | |
parent | 812bbe69741229b83f8209231b9e7b9ff705bfd8 (diff) | |
download | packages_apps_Trebuchet-c879052247b1000b9f318294024daa3c9d100621.tar.gz packages_apps_Trebuchet-c879052247b1000b9f318294024daa3c9d100621.tar.bz2 packages_apps_Trebuchet-c879052247b1000b9f318294024daa3c9d100621.zip |
Add catch for missing app icon resource.
The catch was present before moving the code into
the compat class.
Bug: 15276879
Change-Id: I81fbd49dacd813e861a2bc4f0b41dcbeccb9def2
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/compat/LauncherActivityInfoCompatV16.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/launcher3/compat/LauncherActivityInfoCompatV16.java b/src/com/android/launcher3/compat/LauncherActivityInfoCompatV16.java index 9b9384d83..052d4343e 100644 --- a/src/com/android/launcher3/compat/LauncherActivityInfoCompatV16.java +++ b/src/com/android/launcher3/compat/LauncherActivityInfoCompatV16.java @@ -61,7 +61,11 @@ public class LauncherActivityInfoCompatV16 extends LauncherActivityInfoCompat { resources = null; } if (resources != null) { - d = resources.getDrawableForDensity(mActivityInfo.getIconResource(), density); + try { + d = resources.getDrawableForDensity(mActivityInfo.getIconResource(), density); + } catch (Resources.NotFoundException e) { + // Return default icon below. + } } } if (d == null) { |