DO NOT MERGE Add cross-user check for getDefaultSmsPackage(). am: cf1bd25a37
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14987465 Change-Id: I893fa80b782c22d87e0b7b4fefa1000290b85236
This commit is contained in:
@@ -662,6 +662,12 @@ public class RoleManagerService extends SystemService implements RoleUserState.C
|
||||
|
||||
@Override
|
||||
public String getDefaultSmsPackage(int userId) {
|
||||
userId = handleIncomingUser(userId, false, "getDefaultSmsPackage");
|
||||
if (!mUserManagerInternal.exists(userId)) {
|
||||
Slog.e(LOG_TAG, "user " + userId + " does not exist");
|
||||
return null;
|
||||
}
|
||||
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
return CollectionUtils.firstOrNull(
|
||||
|
||||
Reference in New Issue
Block a user