From 3cc7cd1c18f5d5b2df0f8aebb22fdb3feb23ecd0 Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Mon, 3 Apr 2017 12:48:42 -0700 Subject: [PATCH] Don't wtf() for reverse profile access; make it a warning. Bug:36003688 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: I6d6a73e1d9281dc0b92186dd0666865b0f6b3f1c --- core/java/android/content/pm/LauncherApps.java | 2 +- .../com/android/server/pm/LauncherAppsService.java | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java index abdef084aaccc..1b6efb7c52391 100644 --- a/core/java/android/content/pm/LauncherApps.java +++ b/core/java/android/content/pm/LauncherApps.java @@ -428,7 +428,7 @@ public class LauncherApps { */ private void logErrorForInvalidProfileAccess(@NonNull UserHandle target) { if (UserHandle.myUserId() != target.getIdentifier() && mUserManager.isManagedProfile()) { - Log.e(TAG, "Accessing other profiles/users from managed profile is no longer allowed."); + Log.w(TAG, "Accessing other profiles/users from managed profile is no longer allowed."); } } diff --git a/services/core/java/com/android/server/pm/LauncherAppsService.java b/services/core/java/com/android/server/pm/LauncherAppsService.java index e1426fdcf3efb..3db660b29ff2c 100644 --- a/services/core/java/com/android/server/pm/LauncherAppsService.java +++ b/services/core/java/com/android/server/pm/LauncherAppsService.java @@ -242,18 +242,8 @@ public class LauncherAppsService extends SystemService { try { UserInfo callingUserInfo = mUm.getUserInfo(callingUserId); if (callingUserInfo.isManagedProfile()) { - - // STOPSHIP Remove the whitelist. - if ("com.google.android.talk".equals(callingPackage) - || "com.google.android.quicksearchbox".equals(callingPackage) - || "com.google.android.googlequicksearchbox".equals(callingPackage) - ) { - return false; - } - // STOPSHIP Change it to 'e'. - Slog.wtfStack(TAG, message + " by " + callingPackage + " for another profile " + Slog.w(TAG, message + " by " + callingPackage + " for another profile " + targetUserId + " from " + callingUserId); - return false; }