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

Commit 0b1853f9 authored by Adrian Roos's avatar Adrian Roos
Browse files

KeyguardManager: Fix user resolution of isDeviceSecure/Locked

Fixes isDeviceSecure and isDeviceLocked APIs to use
the user id of the app that executes the code rather
than that of any incoming binder call.

Change-Id: Ib7772b60c35a3ebf96830f9b013c539021e1f063
Fixes: 34592592
Test: manual
parent c8544152
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -322,7 +322,7 @@ public class KeyguardManager {
     * password.
     */
    public boolean isDeviceLocked() {
        return isDeviceLocked(UserHandle.getCallingUserId());
        return isDeviceLocked(UserHandle.myUserId());
    }

    /**
@@ -347,7 +347,7 @@ public class KeyguardManager {
     * @return true if a PIN, pattern or password was set.
     */
    public boolean isDeviceSecure() {
        return isDeviceSecure(UserHandle.getCallingUserId());
        return isDeviceSecure(UserHandle.myUserId());
    }

    /**