summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-03-19 15:02:26 -0700
committerYorke Lee <yorkelee@google.com>2015-03-19 15:04:20 -0700
commitd06de8235438ac3b45af381dbf93b83f0fb8460e (patch)
tree5666fea87a15725542bb7b6cc37d142d8aa7e53e /InCallUI
parenta1715bc255437b07828cdb42c285cf4e321ea82b (diff)
Don't add multiple instances of CircularRevealFragment
Certain calls can propagate state changes immediately after the call is made, causing InCallActivity.internalResolveIntent to be called twice in succession. If multiple animations are run the UI is left in an inconsistent state. Bug: 19842284 Change-Id: Ie6060a37d2bd7775731e0e82019bb8baf0ffd834
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/CircularRevealFragment.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/InCallUI/src/com/android/incallui/CircularRevealFragment.java b/InCallUI/src/com/android/incallui/CircularRevealFragment.java
index c2821792b..f8cc424fe 100644
--- a/InCallUI/src/com/android/incallui/CircularRevealFragment.java
+++ b/InCallUI/src/com/android/incallui/CircularRevealFragment.java
@@ -48,8 +48,13 @@ public class CircularRevealFragment extends Fragment {
public static void startCircularReveal(FragmentManager fm, Point touchPoint,
OnCircularRevealCompleteListener listener) {
- fm.beginTransaction().add(R.id.main, new CircularRevealFragment(touchPoint, listener), TAG)
- .commitAllowingStateLoss();
+ if (fm.findFragmentByTag(TAG) == null) {
+ fm.beginTransaction().add(R.id.main,
+ new CircularRevealFragment(touchPoint, listener), TAG)
+ .commitAllowingStateLoss();
+ } else {
+ Log.w(TAG, "An instance of CircularRevealFragment already exists");
+ }
}
public static void endCircularReveal(FragmentManager fm) {