diff options
author | LuK1337 <priv.luk@gmail.com> | 2016-02-03 18:46:05 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-02-12 16:46:31 -0800 |
commit | cbbbdc63024c649baca974fdf0320ef6d2164695 (patch) | |
tree | 4419cfaca907ba5d777a21b7dca266eb3595dac7 /src/com/android | |
parent | 299718f279a75bbab12107b3a1f80aa9b5f5ed5c (diff) | |
download | android_packages_apps_Trebuchet-cbbbdc63024c649baca974fdf0320ef6d2164695.tar.gz android_packages_apps_Trebuchet-cbbbdc63024c649baca974fdf0320ef6d2164695.tar.bz2 android_packages_apps_Trebuchet-cbbbdc63024c649baca974fdf0320ef6d2164695.zip |
Trebuchet: Handle the NPE when user has no Google Apps installed
Change-Id: Ie04d940d56497fd5e09fd4b1c44682527b20bdc5
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index a5822dc35..eaf56874c 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -3313,8 +3313,9 @@ public class Launcher extends Activity } private boolean startActivity(View v, Intent intent, Object tag) { - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); try { + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + // Only launch using the new animation if the shortcut has not opted out (this is a // private contract between launcher and may be ignored in the future). boolean useLaunchAnimation = (v != null) && @@ -3369,7 +3370,7 @@ public class Launcher extends Activity intent.getSourceBounds(), optsBundle); } return true; - } catch (SecurityException e) { + } catch (SecurityException | NullPointerException e) { if (Utilities.ATLEAST_MARSHMALLOW && tag instanceof ItemInfo) { // Due to legacy reasons, direct call shortcuts require Launchers to have the // corresponding permission. Show the appropriate permission prompt if that |