summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2017-09-16 21:35:49 -0700
committerEric Erfanian <erfanian@google.com>2017-09-18 07:57:01 -0700
commite92471f48c639337aea39a2c61073905ad7b8f0f (patch)
tree25206e687f6e45b583b6372c810f0c84d0062134 /java
parentecb04568c80667ef052f76794f432c003ece13ab (diff)
Fixed crash when users press back twice in call composer.
Bug: 65686665 Test: manual PiperOrigin-RevId: 168983351 Change-Id: I6443a05c8435e777c52ed3586dfc228a0fb0f51f
Diffstat (limited to 'java')
-rw-r--r--java/com/android/dialer/callcomposer/CallComposerActivity.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/com/android/dialer/callcomposer/CallComposerActivity.java b/java/com/android/dialer/callcomposer/CallComposerActivity.java
index 4a6cdbbd8..b02e32543 100644
--- a/java/com/android/dialer/callcomposer/CallComposerActivity.java
+++ b/java/com/android/dialer/callcomposer/CallComposerActivity.java
@@ -157,6 +157,7 @@ public class CallComposerActivity extends AppCompatActivity
private boolean inFullscreenMode;
private boolean isSendAndCallHidingOrHidden = true;
private boolean sendAndCallReady;
+ private boolean runningExitAnimation;
private int currentIndex;
public static Intent newIntent(Context context, DialerContact contact) {
@@ -529,7 +530,7 @@ public class CallComposerActivity extends AppCompatActivity
public void onBackPressed() {
if (!isSendAndCallHidingOrHidden) {
((CallComposerFragment) adapter.instantiateItem(pager, currentIndex)).clearComposer();
- } else {
+ } else if (!runningExitAnimation) {
// Unregister first to avoid receiving a callback when the session closes
getEnrichedCallManager().unregisterStateChangedListener(this);
getEnrichedCallManager().endCallComposerSession(sessionId);
@@ -676,6 +677,7 @@ public class CallComposerActivity extends AppCompatActivity
} else {
contentAnimation.start();
}
+ runningExitAnimation = true;
}
@Override