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

Commit eea8aea4 authored by Shawn Willden's avatar Shawn Willden Committed by Android (Google) Code Review
Browse files

Merge "Don't wait for init done in isFrpActive()" into main

parents d3f718cc c9db4e1b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -656,8 +656,10 @@ public class PersistentDataBlockService extends SystemService {

    @VisibleForTesting
    boolean isFrpActive() {
        waitForInitDoneSignal();
        synchronized (mLock) {
            // mFrpActive is initialized and automatic deactivation done (if possible) before the
            // service is published, so there's no chance that callers could ask for the state
            // before it has settled.
            return mFrpActive;
        }
    }
@@ -1253,6 +1255,7 @@ public class PersistentDataBlockService extends SystemService {

    private void enforceFactoryResetProtectionInactive() {
        if (mFrpEnforced && isFrpActive()) {
            Slog.w(TAG, "Attempt to update PDB was blocked because FRP is active.");
            throw new SecurityException("FRP is active");
        }
    }