summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Makoto Onuki <omakoto@google.com> 2017-10-18 12:52:45 -0700
committer Makoto Onuki <omakoto@google.com> 2017-10-18 22:33:22 +0000
commitc401bac0d7b381c20ebdef9b881fb16dd7a61d84 (patch)
tree68951761a191b062a20fd8e714f380c0925e97bb
parent859f8c4a21204c53d4085e28572275d0efd880da (diff)
DO NOT MERGE getPinnedShortcuts() shouldn't crash with shortcuts with...
... no activities. Bug 67931644 Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests Test: adb shell am instrument -w -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsShortcutManagerTestCases Change-Id: Icea651cf7880c5389467285e9cae3a52c4993669
-rw-r--r--services/core/java/com/android/server/pm/ShortcutPackage.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/ShortcutPackage.java b/services/core/java/com/android/server/pm/ShortcutPackage.java
index 6f70f4c89ad2..a0fd43640e61 100644
--- a/services/core/java/com/android/server/pm/ShortcutPackage.java
+++ b/services/core/java/com/android/server/pm/ShortcutPackage.java
@@ -611,7 +611,8 @@ class ShortcutPackage extends ShortcutPackageItem {
}
checked.add(activity);
- if (!s.injectIsActivityEnabledAndExported(activity, getOwnerUserId())) {
+ if ((activity != null)
+ && !s.injectIsActivityEnabledAndExported(activity, getOwnerUserId())) {
return false;
}
}