diff options
Diffstat (limited to 'java/com')
-rw-r--r-- | java/com/android/dialer/app/DialtactsActivity.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java index 02e0896aa..08adeab7c 100644 --- a/java/com/android/dialer/app/DialtactsActivity.java +++ b/java/com/android/dialer/app/DialtactsActivity.java @@ -224,7 +224,6 @@ public class DialtactsActivity extends TransactionSafeActivity private boolean mInRegularSearch; private boolean mClearSearchOnPause; private boolean mIsDialpadShown; - private boolean mShowDialpadOnResume; /** Whether or not the device is in landscape orientation. */ private boolean mIsLandscape; /** True if the dialpad is only temporarily showing due to being in call */ @@ -374,6 +373,7 @@ public class DialtactsActivity extends TransactionSafeActivity @Override protected void onCreate(Bundle savedInstanceState) { Trace.beginSection(TAG + " onCreate"); + LogUtil.enterBlock("DialtactsActivity.onCreate"); super.onCreate(savedInstanceState); mFirstLaunch = true; @@ -438,7 +438,7 @@ public class DialtactsActivity extends TransactionSafeActivity mInNewSearch = savedInstanceState.getBoolean(KEY_IN_NEW_SEARCH_UI); mFirstLaunch = savedInstanceState.getBoolean(KEY_FIRST_LAUNCH); mWasConfigurationChange = savedInstanceState.getBoolean(KEY_WAS_CONFIGURATION_CHANGE); - mShowDialpadOnResume = savedInstanceState.getBoolean(KEY_IS_DIALPAD_SHOWN); + mIsDialpadShown = savedInstanceState.getBoolean(KEY_IS_DIALPAD_SHOWN); mFloatingActionButtonController.setVisible(savedInstanceState.getBoolean(KEY_FAB_VISIBLE)); mActionBarController.restoreInstanceState(savedInstanceState); } @@ -510,10 +510,9 @@ public class DialtactsActivity extends TransactionSafeActivity LogUtil.i("DialtactsActivity.onResume", "phone not in use, hiding dialpad fragment"); hideDialpadFragment(false, true); mInCallDialpadUp = false; - } else if (mShowDialpadOnResume) { + } else if (mIsDialpadShown) { LogUtil.i("DialtactsActivity.onResume", "showing dialpad on resume"); showDialpadFragment(false); - mShowDialpadOnResume = false; } else { PostCall.promptUserForMessageIfNecessary(this, mParentLayout); } @@ -540,7 +539,11 @@ public class DialtactsActivity extends TransactionSafeActivity if (!mWasConfigurationChange) { mDialerDatabaseHelper.startSmartDialUpdateThread(); } - mFloatingActionButtonController.align(getFabAlignment(), false /* animate */); + if (mIsDialpadShown) { + mFloatingActionButtonController.setVisible(false); + } else { + mFloatingActionButtonController.align(getFabAlignment(), false /* animate */); + } if (mFirstLaunch) { // Only process the Intent the first time onResume() is called after receiving it @@ -627,6 +630,7 @@ public class DialtactsActivity extends TransactionSafeActivity @Override protected void onSaveInstanceState(Bundle outState) { + LogUtil.enterBlock("DialtactsActivity.onSaveInstanceState"); super.onSaveInstanceState(outState); outState.putString(KEY_SEARCH_QUERY, mSearchQuery); outState.putBoolean(KEY_IN_REGULAR_SEARCH_UI, mInRegularSearch); @@ -645,12 +649,6 @@ public class DialtactsActivity extends TransactionSafeActivity LogUtil.i("DialtactsActivity.onAttachFragment", "fragment: %s", fragment); if (fragment instanceof DialpadFragment) { mDialpadFragment = (DialpadFragment) fragment; - if (!mIsDialpadShown && !mShowDialpadOnResume) { - LogUtil.i("DialtactsActivity.onAttachFragment", "hiding dialpad fragment"); - final FragmentTransaction transaction = getFragmentManager().beginTransaction(); - transaction.hide(mDialpadFragment); - transaction.commit(); - } } else if (fragment instanceof SmartDialSearchFragment) { mSmartDialSearchFragment = (SmartDialSearchFragment) fragment; mSmartDialSearchFragment.setOnPhoneNumberPickerActionListener(this); |