summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-09-10 14:09:29 -0700
committerYorke Lee <yorkelee@google.com>2013-09-10 18:05:06 -0700
commit35127cdea7f9043626ae9d0c6becb31730d0b236 (patch)
tree2fec40c60131b64602de6565e5086c2668fd1e9a /src
parent63e1155b40701b3aae0da43208b55560c7ad6f02 (diff)
Hide dialpad after call is ended
Bug: 10503894 Change-Id: Ic7a6a0a0fb54cb315a5b92f9998be9b8848c6137
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/DialtactsActivity.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index ca7a958b7..e513f92a5 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -161,6 +161,11 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
private boolean mInRegularSearch;
/**
+ * True if the dialpad is only temporarily showing due to being in call
+ */
+ private boolean mInCallDialpadUp;
+
+ /**
* True when this activity has been launched for the first time.
*/
private boolean mFirstLaunch;
@@ -312,7 +317,11 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
super.onResume();
if (mFirstLaunch) {
displayFragment(getIntent());
+ } else if (!phoneIsInUse() && mInCallDialpadUp) {
+ hideDialpadFragment(false, true);
+ mInCallDialpadUp = false;
}
+
mFirstLaunch = false;
mDialerDatabaseHelper.startSmartDialUpdateThread();
}
@@ -396,6 +405,11 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
break;
}
case R.id.dialpad_button:
+ // Reset the boolean flag that tracks whether the dialpad was up because
+ // we were in call. Regardless of whether it was true before, we want to
+ // show the dialpad because the user has explicitly clicked the dialpad
+ // button.
+ mInCallDialpadUp = false;
showDialpadFragment(true);
break;
case R.id.call_history_on_dialpad_button:
@@ -631,6 +645,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
if (mDialpadFragment != null && (phoneIsInUse() || isDialIntent(intent))) {
mDialpadFragment.setStartedFromNewIntent(true);
+ if (!mDialpadFragment.isVisible()) {
+ mInCallDialpadUp = true;
+ }
showDialpadFragment(false);
}
}