diff options
author | Yorke Lee <yorkelee@google.com> | 2013-08-06 12:03:32 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2013-08-06 12:15:43 -0700 |
commit | 98702de246d42c844fabdb8a1f3407bf1747d379 (patch) | |
tree | 8f1220d1a4d9b01c33496a42a8d8e823a83c2c9b | |
parent | 0b6008a35a523cf8a4c4386ee4a336734acb0d15 (diff) |
Properly show dialpad fragment on first launch if needed
Bug: 10205058
Change-Id: If7eb79b77357a81b17bdff719939debd71544bc4
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index a0153ea8b..8cac17eb3 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -155,6 +155,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O * {@link PhoneNumberPickerFragment}). */ private boolean mInSearchUi; + private boolean mFirstLaunch; private View mSearchViewContainer; private View mSearchViewCloseButton; private View mVoiceSearchButton; @@ -234,6 +235,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + mFirstLaunch = true; + final Intent intent = getIntent(); fixIntent(intent); @@ -265,8 +268,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O mBottomPaddingView = findViewById(R.id.dialtacts_bottom_padding); prepareSearchView(); - displayFragment(intent); - if (UI.FILTER_CONTACTS_ACTION.equals(intent.getAction()) && savedInstanceState == null) { setupFilterText(intent); @@ -295,6 +296,11 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O TAG_SHOW_ALL_CONTACTS_FRAGMENT); mShowAllContactsFragment.setOnPhoneNumberPickerActionListener( mPhoneNumberPickerActionListener); + + if (mFirstLaunch) { + displayFragment(getIntent()); + } + mFirstLaunch = false; } @Override @@ -605,8 +611,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O return; } - if ((mDialpadFragment != null && phoneIsInUse()) - || isDialIntent(intent)) { + if (mDialpadFragment != null && (phoneIsInUse() || isDialIntent(intent))) { mDialpadFragment.setStartedFromNewIntent(true); // TODO krelease: This should use showDialpadFragment(false) to avoid animating // the dialpad in. Need to fix the onPreDrawListener in NewDialpadFragment first. |