diff options
author | Martijn Coenen <maco@google.com> | 2011-11-04 08:53:22 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-04 08:53:22 -0700 |
commit | 304a7304fe4aeab2b915024a531238f1c3f246a8 (patch) | |
tree | 9e446ce942586fb45bf2b81e8f0b33ff47cd49a7 | |
parent | 8896c444232ebb209bc99c0dbc0c767a3897b4b9 (diff) | |
parent | 4e0ab3174beafb4915388d8c11286a48e362ed7c (diff) | |
download | packages_apps_nfc-304a7304fe4aeab2b915024a531238f1c3f246a8.zip packages_apps_nfc-304a7304fe4aeab2b915024a531238f1c3f246a8.tar.gz packages_apps_nfc-304a7304fe4aeab2b915024a531238f1c3f246a8.tar.bz2 |
Merge "Don't finish Beam animation again." into ics-mr1
-rw-r--r-- | src/com/android/nfc/P2pEventManager.java | 4 | ||||
-rw-r--r-- | src/com/android/nfc/SendUi.java | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/nfc/P2pEventManager.java b/src/com/android/nfc/P2pEventManager.java index 18ec8ae..9273afa 100644 --- a/src/com/android/nfc/P2pEventManager.java +++ b/src/com/android/nfc/P2pEventManager.java @@ -110,7 +110,9 @@ public class P2pEventManager implements P2pEventListener, SendUi.Callback { playSound(mErrorSound); mSending = false; } - mSendUi.finish(SendUi.FINISH_SCALE_UP); + if (!mNdefSent && !mNdefReceived) { + mSendUi.finish(SendUi.FINISH_SCALE_UP); + } } @Override diff --git a/src/com/android/nfc/SendUi.java b/src/com/android/nfc/SendUi.java index 37c8cfc..1d2230a 100644 --- a/src/com/android/nfc/SendUi.java +++ b/src/com/android/nfc/SendUi.java @@ -356,6 +356,9 @@ public class SendUi implements Animator.AnimatorListener, View.OnTouchListener, if (!mAttached) { return; } + // Immediately set to false, to prevent .cancel() calls + // below from immediately calling into dismiss() again. + mAttached = false; mPreAnimator.cancel(); mSlowSendAnimator.cancel(); mFastCloneAnimator.cancel(); @@ -363,7 +366,6 @@ public class SendUi implements Animator.AnimatorListener, View.OnTouchListener, mScaleUpAnimator.cancel(); mWindowManager.removeView(mScreenshotLayout); mStatusBarManager.disable(StatusBarManager.DISABLE_NONE); - mAttached = false; releaseScreenshot(); } |