Merge "Use calling user ID when calling isDeviceLocked" into mnc-dev am: a0c253d07a
am: c275b77b03
Change-Id: Ia2887869c4ac6cdcd1a66372b991b9f78edf7679
This commit is contained in:
@@ -307,11 +307,12 @@ public class ClipboardService extends IClipboard.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isDeviceLocked() {
|
private boolean isDeviceLocked() {
|
||||||
|
int callingUserId = UserHandle.getCallingUserId();
|
||||||
final long token = Binder.clearCallingIdentity();
|
final long token = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
final KeyguardManager keyguardManager = mContext.getSystemService(
|
final KeyguardManager keyguardManager = mContext.getSystemService(
|
||||||
KeyguardManager.class);
|
KeyguardManager.class);
|
||||||
return keyguardManager != null && keyguardManager.isDeviceLocked();
|
return keyguardManager != null && keyguardManager.isDeviceLocked(callingUserId);
|
||||||
} finally {
|
} finally {
|
||||||
Binder.restoreCallingIdentity(token);
|
Binder.restoreCallingIdentity(token);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user