Merge "Use calling user ID when calling isDeviceLocked" into mnc-dev
diff --git a/services/core/java/com/android/server/clipboard/ClipboardService.java b/services/core/java/com/android/server/clipboard/ClipboardService.java
index 28028ce..57f68f2 100644
--- a/services/core/java/com/android/server/clipboard/ClipboardService.java
+++ b/services/core/java/com/android/server/clipboard/ClipboardService.java
@@ -307,11 +307,12 @@
}
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);
}