Merge "Use calling user ID when calling isDeviceLocked" into mnc-dev am: a0c253d07a am: c275b77b03 am: 1f8536653b am: bc56010856 am: eeb90235bf am: eb863a6b2e am: b353fbcb7a

am: 9422f6e991

Change-Id: I0097c1c1780c285adfd17c9faf277acbcaf9803d
This commit is contained in:
Siyamed Sinir
2017-10-31 17:59:25 +00:00
committed by android-build-merger

View File

@@ -315,11 +315,12 @@ public class ClipboardService extends IClipboard.Stub {
}
private boolean isDeviceLocked() {
int callingUserId = UserHandle.getCallingUserId();
final long token = Binder.clearCallingIdentity();
try {
final KeyguardManager keyguardManager = mContext.getSystemService(
KeyguardManager.class);
return keyguardManager != null && keyguardManager.isDeviceLocked();
return keyguardManager != null && keyguardManager.isDeviceLocked(callingUserId);
} finally {
Binder.restoreCallingIdentity(token);
}