Merge "Use calling user ID when calling isDeviceLocked" into mnc-dev am: a0c253d07a am: c275b77b03 am: 1f8536653b am: bc56010856 am: eeb90235bf
am: eb863a6b2e
Change-Id: Iacb16edfcc470e3f030324ee75e6eb623ee2c91c
This commit is contained in:
@@ -315,11 +315,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