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

Commit a0abafa1 authored by Elis Elliott's avatar Elis Elliott
Browse files

Fix device admin access with permission checks.

Plus a handful of other fixes.

Fixes: 271818883

Test: btest a.d.c.LockTest -c yes
Test: btest a.d.c.WipeDataTest -c yes
Change-Id: I4a7c8c5393c5f3e9e9799684b7eccb387dc943cc
parent 5f3a9aa3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6413,7 +6413,7 @@ public class DevicePolicyManager {
    public void lockNow(@LockNowFlag int flags) {
        if (mService != null) {
            try {
                mService.lockNow(flags, mParentInstance);
                mService.lockNow(flags, mContext.getPackageName(), mParentInstance);
            } catch (RemoteException e) {
                throw e.rethrowFromSystemServer();
            }
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ interface IDevicePolicyManager {
    void setRequiredStrongAuthTimeout(in ComponentName who, String callerPackageName, long timeMs, boolean parent);
    long getRequiredStrongAuthTimeout(in ComponentName who, int userId, boolean parent);

    void lockNow(int flags, boolean parent);
    void lockNow(int flags, String callerPackageName, boolean parent);

    /**
    * @param factoryReset only applicable when `targetSdk >= U`, either tries to factoryReset/fail or removeUser/fail otherwise
+404 −304

File changed.

Preview size limit exceeded, changes collapsed.