Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +11 −10 Original line number Original line Diff line number Diff line Loading @@ -369,10 +369,12 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp private void releaseBiometricWakeLock() { private void releaseBiometricWakeLock() { if (mWakeLock != null) { if (mWakeLock != null) { Trace.beginSection("release wake-and-unlock"); mHandler.removeCallbacks(mReleaseBiometricWakeLockRunnable); mHandler.removeCallbacks(mReleaseBiometricWakeLockRunnable); mLogger.i("releasing biometric wakelock"); mLogger.i("releasing biometric wakelock"); mWakeLock.release(); mWakeLock.release(); mWakeLock = null; mWakeLock = null; Trace.endSection(); } } } } Loading @@ -398,7 +400,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp } } mWakeLock = mPowerManager.newWakeLock( mWakeLock = mPowerManager.newWakeLock( PowerManager.PARTIAL_WAKE_LOCK, BIOMETRIC_WAKE_LOCK_NAME); PowerManager.PARTIAL_WAKE_LOCK, BIOMETRIC_WAKE_LOCK_NAME); Trace.beginSection("acquiring wake-and-unlock"); Trace.beginSection("acquire wake-and-unlock"); mWakeLock.acquire(); mWakeLock.acquire(); Trace.endSection(); Trace.endSection(); mLogger.i("biometric acquired, grabbing biometric wakelock"); mLogger.i("biometric acquired, grabbing biometric wakelock"); Loading @@ -412,15 +414,14 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp public void onBiometricDetected(int userId, BiometricSourceType biometricSourceType, public void onBiometricDetected(int userId, BiometricSourceType biometricSourceType, boolean isStrongBiometric) { boolean isStrongBiometric) { Trace.beginSection("BiometricUnlockController#onBiometricDetected"); Trace.beginSection("BiometricUnlockController#onBiometricDetected"); if (mUpdateMonitor.isGoingToSleep()) { if (!mUpdateMonitor.isGoingToSleep()) { Trace.endSection(); return; } startWakeAndUnlock( startWakeAndUnlock( MODE_SHOW_BOUNCER, MODE_SHOW_BOUNCER, BiometricUnlockSource.Companion.fromBiometricSourceType(biometricSourceType) BiometricUnlockSource.Companion.fromBiometricSourceType(biometricSourceType) ); ); } } Trace.endSection(); } @Override @Override public void onBiometricAuthenticated(int userId, BiometricSourceType biometricSourceType, public void onBiometricAuthenticated(int userId, BiometricSourceType biometricSourceType, Loading Loading @@ -451,6 +452,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp } else { } else { mLogger.d("onBiometricUnlocked aborted by bypass controller"); mLogger.d("onBiometricUnlocked aborted by bypass controller"); } } Trace.endSection(); } } /** /** Loading Loading @@ -479,6 +481,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp @WakeAndUnlockMode int mode, @WakeAndUnlockMode int mode, BiometricUnlockSource biometricUnlockSource BiometricUnlockSource biometricUnlockSource ) { ) { Trace.beginSection("BiometricUnlockController#startWakeAndUnlock"); mLogger.logStartWakeAndUnlock(mode); mLogger.logStartWakeAndUnlock(mode); boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive(); boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive(); mMode = mode; mMode = mode; Loading @@ -501,9 +504,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp "android.policy:BIOMETRIC" "android.policy:BIOMETRIC" ); ); } } Trace.beginSection("release wake-and-unlock"); releaseBiometricWakeLock(); releaseBiometricWakeLock(); Trace.endSection(); }; }; final boolean wakeInKeyguard = mMode == MODE_WAKE_AND_UNLOCK_FROM_DREAM final boolean wakeInKeyguard = mMode == MODE_WAKE_AND_UNLOCK_FROM_DREAM Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +11 −10 Original line number Original line Diff line number Diff line Loading @@ -369,10 +369,12 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp private void releaseBiometricWakeLock() { private void releaseBiometricWakeLock() { if (mWakeLock != null) { if (mWakeLock != null) { Trace.beginSection("release wake-and-unlock"); mHandler.removeCallbacks(mReleaseBiometricWakeLockRunnable); mHandler.removeCallbacks(mReleaseBiometricWakeLockRunnable); mLogger.i("releasing biometric wakelock"); mLogger.i("releasing biometric wakelock"); mWakeLock.release(); mWakeLock.release(); mWakeLock = null; mWakeLock = null; Trace.endSection(); } } } } Loading @@ -398,7 +400,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp } } mWakeLock = mPowerManager.newWakeLock( mWakeLock = mPowerManager.newWakeLock( PowerManager.PARTIAL_WAKE_LOCK, BIOMETRIC_WAKE_LOCK_NAME); PowerManager.PARTIAL_WAKE_LOCK, BIOMETRIC_WAKE_LOCK_NAME); Trace.beginSection("acquiring wake-and-unlock"); Trace.beginSection("acquire wake-and-unlock"); mWakeLock.acquire(); mWakeLock.acquire(); Trace.endSection(); Trace.endSection(); mLogger.i("biometric acquired, grabbing biometric wakelock"); mLogger.i("biometric acquired, grabbing biometric wakelock"); Loading @@ -412,15 +414,14 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp public void onBiometricDetected(int userId, BiometricSourceType biometricSourceType, public void onBiometricDetected(int userId, BiometricSourceType biometricSourceType, boolean isStrongBiometric) { boolean isStrongBiometric) { Trace.beginSection("BiometricUnlockController#onBiometricDetected"); Trace.beginSection("BiometricUnlockController#onBiometricDetected"); if (mUpdateMonitor.isGoingToSleep()) { if (!mUpdateMonitor.isGoingToSleep()) { Trace.endSection(); return; } startWakeAndUnlock( startWakeAndUnlock( MODE_SHOW_BOUNCER, MODE_SHOW_BOUNCER, BiometricUnlockSource.Companion.fromBiometricSourceType(biometricSourceType) BiometricUnlockSource.Companion.fromBiometricSourceType(biometricSourceType) ); ); } } Trace.endSection(); } @Override @Override public void onBiometricAuthenticated(int userId, BiometricSourceType biometricSourceType, public void onBiometricAuthenticated(int userId, BiometricSourceType biometricSourceType, Loading Loading @@ -451,6 +452,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp } else { } else { mLogger.d("onBiometricUnlocked aborted by bypass controller"); mLogger.d("onBiometricUnlocked aborted by bypass controller"); } } Trace.endSection(); } } /** /** Loading Loading @@ -479,6 +481,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp @WakeAndUnlockMode int mode, @WakeAndUnlockMode int mode, BiometricUnlockSource biometricUnlockSource BiometricUnlockSource biometricUnlockSource ) { ) { Trace.beginSection("BiometricUnlockController#startWakeAndUnlock"); mLogger.logStartWakeAndUnlock(mode); mLogger.logStartWakeAndUnlock(mode); boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive(); boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive(); mMode = mode; mMode = mode; Loading @@ -501,9 +504,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp "android.policy:BIOMETRIC" "android.policy:BIOMETRIC" ); ); } } Trace.beginSection("release wake-and-unlock"); releaseBiometricWakeLock(); releaseBiometricWakeLock(); Trace.endSection(); }; }; final boolean wakeInKeyguard = mMode == MODE_WAKE_AND_UNLOCK_FROM_DREAM final boolean wakeInKeyguard = mMode == MODE_WAKE_AND_UNLOCK_FROM_DREAM Loading