OSDN Git Service

Follow-up to I61640146 Remove duplicate check.
authorMakoto Onuki <omakoto@google.com>
Mon, 13 Feb 2017 22:32:41 +0000 (14:32 -0800)
committerMakoto Onuki <omakoto@google.com>
Mon, 13 Feb 2017 22:32:41 +0000 (14:32 -0800)
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests
Change-Id: I0af448186c90e548542160d1902bc462545bb03e

services/core/java/com/android/server/pm/LauncherAppsService.java

index 179f310..96a2577 100644 (file)
@@ -515,9 +515,6 @@ public class LauncherAppsService extends SystemService {
             if (!canAccessProfile(callingPackage, targetUserId, "Cannot start activity")) {
                 return false;
             }
-            if (!canAccessProfile(callingPackage, targetUserId, "Cannot access shortcuts")) {
-                return false;
-            }
             if (!isUserEnabled(targetUserId)) {
                 throw new IllegalStateException("Cannot start a shortcut for disabled profile "
                         + targetUserId);