diff options
| author | Makoto Onuki <omakoto@google.com> | 2017-10-18 12:52:45 -0700 |
|---|---|---|
| committer | Makoto Onuki <omakoto@google.com> | 2017-10-19 15:48:29 +0000 |
| commit | 40dc2114dde504287e98bb7cba05ecce646bf5da (patch) | |
| tree | aa20189ef2e704d4d59b473d07f06be5ffaeb94e | |
| parent | 377c7c2523aafdf2225f977bb432b382228ad155 (diff) | |
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.java | 3 |
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 12f490faff9e..a3585bc1f97d 100644 --- a/services/core/java/com/android/server/pm/ShortcutPackage.java +++ b/services/core/java/com/android/server/pm/ShortcutPackage.java @@ -674,7 +674,8 @@ class ShortcutPackage extends ShortcutPackageItem { } checked.add(activity); - if (!s.injectIsActivityEnabledAndExported(activity, getOwnerUserId())) { + if ((activity != null) + && !s.injectIsActivityEnabledAndExported(activity, getOwnerUserId())) { return false; } } |
