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

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

Fix ClipboardService device lock check for cross profile

am: 0595b5a9

Change-Id: I6aeaaef43a8e8c5ede049ae9e97fbf6d0129bac4
parents f2b59272 0595b5a9
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -307,10 +307,15 @@ public class ClipboardService extends IClipboard.Stub {
    }

    private boolean isDeviceLocked() {
        final long token = Binder.clearCallingIdentity();
        try {
            final KeyguardManager keyguardManager = (KeyguardManager) mContext.getSystemService(
                        Context.KEYGUARD_SERVICE);
            return keyguardManager != null && keyguardManager.isKeyguardLocked()
                    && keyguardManager.isKeyguardSecure();
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }

    private final void checkUriOwnerLocked(Uri uri, int uid) {