Fix FingerprintDialogView when show is called before animation is complete

If handleShowDialog is called before the animation is finished, the window
will still be attached despite the mDialogShowing variable == false. We
need a new variable to track the dismiss animation state; if the dialog
is dismissing and handleShowDialog is called again, cancel the animation
and remove the window. Then show the dialog without an entry animation.
This lets us show the dialog without a "bouncy" animation when the device
rotates, etc..

Fixes: 77877888

Test: Manual test with modified settings APK
Change-Id: Iae878ca10099d9755c27284d6df04a73fd5a37f7
diff --git a/packages/SystemUI/src/com/android/systemui/fingerprint/FingerprintDialogImpl.java b/packages/SystemUI/src/com/android/systemui/fingerprint/FingerprintDialogImpl.java
index c238e54..a81043e 100644
--- a/packages/SystemUI/src/com/android/systemui/fingerprint/FingerprintDialogImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/fingerprint/FingerprintDialogImpl.java
@@ -134,8 +134,11 @@
     }
 
     private void handleShowDialog(SomeArgs args) {
-        if (DEBUG) Log.d(TAG, "handleShowDialog");
-        if (mDialogShowing) {
+        if (DEBUG) Log.d(TAG, "handleShowDialog, isAnimatingAway: "
+                + mDialogView.isAnimatingAway());
+        if (mDialogView.isAnimatingAway()) {
+            mDialogView.forceRemove();
+        } else if (mDialogShowing) {
             Log.w(TAG, "Dialog already showing");
             return;
         }
@@ -168,7 +171,7 @@
     }
 
     private void handleHideDialog(boolean userCanceled) {
-        if (DEBUG) Log.d(TAG, "handleHideDialog");
+        if (DEBUG) Log.d(TAG, "handleHideDialog, userCanceled: " + userCanceled);
         if (!mDialogShowing) {
             // This can happen if there's a race and we get called from both
             // onAuthenticated and onError, etc.