summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-09-11 07:13:41 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-11 07:13:41 -0700
commit1c6f666ada54192b364948f5aac7d6d42e9d6b59 (patch)
tree23af85fac15d325be396c36dec0fac1d2680a269
parent34b21bf00a32e0706253095ca201cc42d36b5c2d (diff)
parent7f6c4a7da2fb0193760c24e8f9909f1a6abb0b21 (diff)
am 7f6c4a7d: Merge "Hide dialpad after call is ended" into klp-dev
* commit '7f6c4a7da2fb0193760c24e8f9909f1a6abb0b21': Hide dialpad after call is ended
-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 63b0cb839..52ee530e6 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:
@@ -632,6 +646,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);
}
}