summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2016-02-03 18:46:05 +0100
committerTom Powell <zifnab@zifnab06.net>2017-03-26 16:16:27 -0700
commitc7f9f17ed0e90b6037b6ffb8a4ef0a4438914005 (patch)
treed91d25b8670f411084ded7f444f2bd464f98d6aa
parentf0f1368fafe794b5e30db90b64bff9e94dffa9aa (diff)
downloadandroid_packages_apps_Trebuchet-c7f9f17ed0e90b6037b6ffb8a4ef0a4438914005.zip
android_packages_apps_Trebuchet-c7f9f17ed0e90b6037b6ffb8a4ef0a4438914005.tar.gz
android_packages_apps_Trebuchet-c7f9f17ed0e90b6037b6ffb8a4ef0a4438914005.tar.bz2
Trebuchet: Handle the NPE when user has no Google Apps installed
Change-Id: Ie04d940d56497fd5e09fd4b1c44682527b20bdc5
-rw-r--r--src/com/android/launcher3/Launcher.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a9f5790..00a2717 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3263,8 +3263,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) &&
@@ -3319,7 +3320,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