Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c275b77b authored by Siyamed Sinir's avatar Siyamed Sinir Committed by android-build-merger
Browse files

Merge "Use calling user ID when calling isDeviceLocked" into mnc-dev

am: a0c253d0

Change-Id: I9040d5dcde6228ea3f10bc03077800d2b070cbb1
parents 9c441159 a0c253d0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -307,11 +307,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);
        }