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

Commit c5e6a511 authored by Haining Chen's avatar Haining Chen Committed by Android (Google) Code Review
Browse files

Merge "Do not turn off screen before locking out device" into main

parents 2d40d217 ba267751
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@ import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.SystemClock;
import android.util.Log;
import android.util.Slog;
@@ -73,7 +72,6 @@ public class AdaptiveAuthService extends SystemService {
    private final LockSettingsInternal mLockSettings;
    private final BiometricManager mBiometricManager;
    private final KeyguardManager mKeyguardManager;
    private final PowerManager mPowerManager;
    private final WindowManagerInternal mWindowManager;
    private final UserManagerInternal mUserManager;
    @VisibleForTesting
@@ -93,7 +91,6 @@ public class AdaptiveAuthService extends SystemService {
        mBiometricManager = Objects.requireNonNull(
                context.getSystemService(BiometricManager.class));
        mKeyguardManager = Objects.requireNonNull(context.getSystemService(KeyguardManager.class));
        mPowerManager = Objects.requireNonNull(context.getSystemService(PowerManager.class));
        mWindowManager = Objects.requireNonNull(
                LocalServices.getService(WindowManagerInternal.class));
        mUserManager = Objects.requireNonNull(LocalServices.getService(UserManagerInternal.class));
@@ -290,9 +287,6 @@ public class AdaptiveAuthService extends SystemService {
                    parentUserId);
        }

        // Power off the display
        mPowerManager.goToSleep(SystemClock.uptimeMillis());

        // Lock the device
        mWindowManager.lockNow();