summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-10-01 14:37:55 -0700
committerYorke Lee <yorkelee@google.com>2013-10-01 15:28:14 -0700
commit8e5c8b11eb9516fa9b8407e0aa16c0405b5e717e (patch)
tree90a938e8b24753aa0f848a3fae0a5d38fdea4040 /src
parent05aaae3bc5541a3319b834929ca8eb41e300aa79 (diff)
Fix brief flash when making a call from search
Perform the fragment transaction to hide search in onPause. This prevents the brief flash that shows up in the time between pausing the activity and starting the in-call UI, but also ensures that we execute the transaction before onSaveInstance is called to prevent b/10953115. Bug: 10780429 Change-Id: I85b4c7e6719acede845d604087344401edc9ef3d
Diffstat (limited to 'src')
-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);