Merge "Don't wtf() for reverse profile access; make it a warning." into oc-dev

am: 5fd39fad26

Change-Id: I5b81cd880d505d8525a6210525c2b9c0c09b57a0
This commit is contained in:
Makoto Onuki
2017-04-03 23:38:55 +00:00
committed by android-build-merger
2 changed files with 2 additions and 12 deletions

View File

@@ -419,7 +419,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.");
}
}

View File

@@ -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;
}