summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-10-02 09:37:49 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-02 09:37:49 -0700
commit46d36598a85db64766f1fc41c5503aeb1218b7f2 (patch)
tree2e4e4c8fb51e2fa1ae2b2337aee0e93f2094735b
parent7b5a41eabe581546887a19fb8a2f558cfa16da97 (diff)
parentd3d28097c7400dd3736ce0b877154cc7fb40b6ec (diff)
am d3d28097: am 8e5c8b11: Fix brief flash when making a call from search
* commit 'd3d28097c7400dd3736ce0b877154cc7fb40b6ec': Fix brief flash when making a call from search
-rw-r--r--src/com/android/dialer/DialtactsActivity.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 12a0f2bd9..42cbbf4c1 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -147,6 +147,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
private boolean mInDialpadSearch;
private boolean mInRegularSearch;
+ private boolean mClearSearchOnPause;
/**
* True if the dialpad is only temporarily showing due to being in call
@@ -192,14 +193,14 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
// CallLog screen (search UI will be automatically exited).
PhoneNumberInteraction.startInteractionForPhoneCall(
DialtactsActivity.this, dataUri, getCallOrigin());
- hideDialpadAndSearchUi();
+ mClearSearchOnPause = true;
}
@Override
public void onCallNumberDirectly(String phoneNumber) {
Intent intent = CallUtil.getCallIntent(phoneNumber, getCallOrigin());
startActivity(intent);
- hideDialpadAndSearchUi();
+ mClearSearchOnPause = true;
}
@Override
@@ -329,6 +330,15 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
}
@Override
+ protected void onPause() {
+ if (mClearSearchOnPause) {
+ hideDialpadAndSearchUi();
+ mClearSearchOnPause = false;
+ }
+ super.onPause();
+ }
+
+ @Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putString(KEY_SEARCH_QUERY, mSearchQuery);