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

Commit c1bb5f37 authored by Eric Biggers's avatar Eric Biggers
Browse files

Remove checks of private space flags from LockSettingsService

All three of the private space related flags being checked in
LockSettingsService have been launched since AP3A, so they've been
eligible for removal for the last 6 months.  As a small step towards
removing these, remove the flag checks from LockSettingsService.

Bug: 406891344
Test: presubmit
Flag: EXEMPT removing a flag
Change-Id: I32f6e6d0c4679149d42581e54829e1273fd1b16b
parent 73b1354b
Loading
Loading
Loading
Loading
+13 −25
Original line number Diff line number Diff line
@@ -844,14 +844,10 @@ public class LockSettingsService extends ILockSettings.Stub {
        // TODO(b/319142556): It might make more sense to reset the strong auth flags when CE
        // storage is locked, instead of when the user is stopped.  This would ensure the flags get
        // reset if CE storage is locked later for a user that allows delayed locking.
        if (android.os.Flags.allowPrivateProfile()
                && android.multiuser.Flags.enableBiometricsToUnlockPrivateSpace()
                && android.multiuser.Flags.enablePrivateSpaceFeatures()) {
        UserProperties userProperties = getUserProperties(userId);
        if (userProperties != null && userProperties.getAllowStoppingUserWithDelayedLocking()) {
            return;
        }
        }
        int strongAuthRequired = LockPatternUtils.StrongAuthTracker.getDefaultFlags(mContext);
        requireStrongAuth(strongAuthRequired, userId);

@@ -944,21 +940,14 @@ public class LockSettingsService extends ILockSettings.Stub {
        mStorage.prefetchUser(UserHandle.USER_SYSTEM);
        mBiometricDeferredQueue.systemReady(mInjector.getFingerprintManager(),
                mInjector.getFaceManager(), mInjector.getBiometricManager());
        if (android.os.Flags.allowPrivateProfile()
                && android.multiuser.Flags.enablePrivateSpaceFeatures()
                && android.multiuser.Flags.enableBiometricsToUnlockPrivateSpace()) {
        mStorageManagerInternal.registerStorageLockEventListener(mCeStorageLockEventListener);
    }
    }

    private final ICeStorageLockEventListener mCeStorageLockEventListener =
            new ICeStorageLockEventListener() {
                @Override
                public void onStorageLocked(int userId) {
                    Slog.i(TAG, "Storage lock event received for " + userId);
                    if (android.os.Flags.allowPrivateProfile()
                            && android.multiuser.Flags.enablePrivateSpaceFeatures()
                            && android.multiuser.Flags.enableBiometricsToUnlockPrivateSpace()) {
                    mHandler.post(() -> {
                        UserProperties userProperties = getUserProperties(userId);
                        if (userProperties != null && userProperties
@@ -968,7 +957,6 @@ public class LockSettingsService extends ILockSettings.Stub {
                            requireStrongAuth(strongAuthRequired, userId);
                        }
                    });
                    }
                }};

    private void loadEscrowData() {