Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cc7cd1c authored by Makoto Onuki's avatar Makoto Onuki
Browse files

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
parent a906fb7b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.");
        }
    }

+1 −11
Original line number Diff line number Diff line
@@ -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;
                }