Relax isUserRunning() when asking about self.
When a caller is asking about locked state of themselves, don't require the INTERACT_ACROSS_USERS permission. Bug: 26178790 Change-Id: I0f02ebfed87b2e1cddc1cb044a9f04272f85483b
This commit is contained in:
@@ -20453,8 +20453,8 @@ public final class ActivityManagerService extends ActivityManagerNative
|
||||
|
||||
@Override
|
||||
public boolean isUserRunning(int userId, int flags) {
|
||||
if (checkCallingPermission(INTERACT_ACROSS_USERS)
|
||||
!= PackageManager.PERMISSION_GRANTED) {
|
||||
if (userId != UserHandle.getCallingUserId() && checkCallingPermission(
|
||||
INTERACT_ACROSS_USERS) != PackageManager.PERMISSION_GRANTED) {
|
||||
String msg = "Permission Denial: isUserRunning() from pid="
|
||||
+ Binder.getCallingPid()
|
||||
+ ", uid=" + Binder.getCallingUid()
|
||||
|
||||
Reference in New Issue
Block a user