diff options
-rw-r--r-- | java/com/android/dialer/app/DialtactsActivity.java | 3 | ||||
-rw-r--r-- | java/com/android/dialer/callcomposer/CallComposerActivity.java | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java index 0b2f37505..588f9d77e 100644 --- a/java/com/android/dialer/app/DialtactsActivity.java +++ b/java/com/android/dialer/app/DialtactsActivity.java @@ -1291,6 +1291,9 @@ public class DialtactsActivity extends TransactionSafeActivity } if (mIsDialpadShown) { hideDialpadFragment(true, false); + if (TextUtils.isEmpty(mDialpadQuery)) { + exitSearchUi(); + } } else if (isInSearchUi()) { if (mIsKeyboardOpen) { DialerUtils.hideInputMethod(mParentLayout); 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 |