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: I043d6f9c5b0c46ad7c926542003aa3caa1e574ee
This commit is contained in:
@@ -662,6 +662,12 @@ public class RoleManagerService extends SystemService implements RoleUserState.C
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDefaultSmsPackage(int userId) {
|
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();
|
long identity = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
return CollectionUtils.firstOrNull(
|
return CollectionUtils.firstOrNull(
|
||||||
|
|||||||
Reference in New Issue
Block a user