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

Commit 31bcb225 authored by Siyamed Sinir's avatar Siyamed Sinir Committed by Android (Google) Code Review
Browse files

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

parents 66ca42d5 66bde671
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -435,11 +435,12 @@ public class ClipboardService extends SystemService {
    }

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