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

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

Fix ClipboardService device lock check for cross profile

am: 6d79675e

Change-Id: Icea573859a6d441e18665d9da855370582f2992a
parents 8150eb82 6d79675e
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -307,8 +307,14 @@ public class ClipboardService extends IClipboard.Stub {
    }

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

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