Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +7 −8 Original line number Diff line number Diff line Loading @@ -121,11 +121,15 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, } private class BiometricOrientationEventListener extends OrientationEventListener { @Surface.Rotation private int mLastRotation; @Surface.Rotation private int mLastRotation = ORIENTATION_UNKNOWN; BiometricOrientationEventListener(Context context) { super(context); mLastRotation = context.getDisplay().getRotation(); final Display display = context.getDisplay(); if (display != null) { mLastRotation = display.getRotation(); } } @Override Loading Loading @@ -200,7 +204,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, Log.w(TAG, "ACTION_CLOSE_SYSTEM_DIALOGS received"); mCurrentDialog.dismissWithoutCallback(true /* animate */); mCurrentDialog = null; mOrientationListener.disable(); try { if (mReceiver != null) { Loading Loading @@ -229,7 +232,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, Log.w(TAG, "Evicting client due to: " + topPackage); mCurrentDialog.dismissWithoutCallback(true /* animate */); mCurrentDialog = null; mOrientationListener.disable(); if (mReceiver != null) { mReceiver.onDialogDismissed( Loading Loading @@ -469,6 +471,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, mSidefpsControllerFactory = sidefpsControllerFactory; mWindowManager = windowManager; mOrientationListener = new BiometricOrientationEventListener(context); mOrientationListener.enable(); mFaceProps = mFaceManager != null ? mFaceManager.getSensorPropertiesInternal() : null; Loading Loading @@ -663,7 +666,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, // BiometricService will have already sent the callback to the client in this case. // This avoids a round trip to SystemUI. So, just dismiss the dialog and we're done. mCurrentDialog = null; mOrientationListener.disable(); } /** Loading Loading @@ -735,7 +737,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, mReceiver = (IBiometricSysuiReceiver) args.arg2; mCurrentDialog = newDialog; mCurrentDialog.show(mWindowManager, savedState); mOrientationListener.enable(); } private void onDialogDismissed(@DismissedReason int reason) { Loading @@ -745,7 +746,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, } mReceiver = null; mCurrentDialog = null; mOrientationListener.disable(); } @Override Loading @@ -758,7 +758,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, mCurrentDialog.onSaveState(savedState); mCurrentDialog.dismissWithoutCallback(false /* animate */); mCurrentDialog = null; mOrientationListener.disable(); // Only show the dialog if necessary. If it was animating out, the dialog is supposed // to send its pending callback immediately. Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +7 −8 Original line number Diff line number Diff line Loading @@ -121,11 +121,15 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, } private class BiometricOrientationEventListener extends OrientationEventListener { @Surface.Rotation private int mLastRotation; @Surface.Rotation private int mLastRotation = ORIENTATION_UNKNOWN; BiometricOrientationEventListener(Context context) { super(context); mLastRotation = context.getDisplay().getRotation(); final Display display = context.getDisplay(); if (display != null) { mLastRotation = display.getRotation(); } } @Override Loading Loading @@ -200,7 +204,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, Log.w(TAG, "ACTION_CLOSE_SYSTEM_DIALOGS received"); mCurrentDialog.dismissWithoutCallback(true /* animate */); mCurrentDialog = null; mOrientationListener.disable(); try { if (mReceiver != null) { Loading Loading @@ -229,7 +232,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, Log.w(TAG, "Evicting client due to: " + topPackage); mCurrentDialog.dismissWithoutCallback(true /* animate */); mCurrentDialog = null; mOrientationListener.disable(); if (mReceiver != null) { mReceiver.onDialogDismissed( Loading Loading @@ -469,6 +471,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, mSidefpsControllerFactory = sidefpsControllerFactory; mWindowManager = windowManager; mOrientationListener = new BiometricOrientationEventListener(context); mOrientationListener.enable(); mFaceProps = mFaceManager != null ? mFaceManager.getSensorPropertiesInternal() : null; Loading Loading @@ -663,7 +666,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, // BiometricService will have already sent the callback to the client in this case. // This avoids a round trip to SystemUI. So, just dismiss the dialog and we're done. mCurrentDialog = null; mOrientationListener.disable(); } /** Loading Loading @@ -735,7 +737,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, mReceiver = (IBiometricSysuiReceiver) args.arg2; mCurrentDialog = newDialog; mCurrentDialog.show(mWindowManager, savedState); mOrientationListener.enable(); } private void onDialogDismissed(@DismissedReason int reason) { Loading @@ -745,7 +746,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, } mReceiver = null; mCurrentDialog = null; mOrientationListener.disable(); } @Override Loading @@ -758,7 +758,6 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks, mCurrentDialog.onSaveState(savedState); mCurrentDialog.dismissWithoutCallback(false /* animate */); mCurrentDialog = null; mOrientationListener.disable(); // Only show the dialog if necessary. If it was animating out, the dialog is supposed // to send its pending callback immediately. Loading