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

Commit c87d1628 authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Run isKeyguardSecure under system privileges

In certain cases, isKeyguardSecure calls UserManager.getProfileParent, which
requires MANAGE_USERS permission.
Now the check is done under system privileges.

Bug:18765066
Change-Id: I6b23aedee06403d36523af5fee9c7db9659284b3
parent 84c5e8eb
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -5379,7 +5379,12 @@ public class WindowManagerService extends IWindowManager.Stub

    @Override
    public boolean isKeyguardSecure() {
        long origId = Binder.clearCallingIdentity();
        try {
            return mPolicy.isKeyguardSecure();
        } finally {
            Binder.restoreCallingIdentity(origId);
        }
    }

    @Override