diff options
author | Andrew Lee <anwlee@google.com> | 2015-08-18 20:45:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-08-18 20:45:49 +0000 |
commit | d10691cffd3bc7a042048c7a4cb78a3f66846e67 (patch) | |
tree | f75cfbe9c0d8c9308b18101885203dc3f2793cb0 | |
parent | 8f9dcfebc49ae190238e2940eb8b7c60d203372e (diff) | |
parent | 8c024aedbcdc90e46f7fda915feb1a7ddae36e3b (diff) |
Merge "Save dialpad showing state after rotation."
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardFragment.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java index aa91cb50a..99adcccbd 100644 --- a/InCallUI/src/com/android/incallui/CallCardFragment.java +++ b/InCallUI/src/com/android/incallui/CallCardFragment.java @@ -88,6 +88,8 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } }; + private static final String IS_DIALPAD_SHOWING_KEY = "is_dialpad_showing"; + /** * The duration of time (in milliseconds) a call state label should remain visible before * resetting to its previous value. @@ -189,6 +191,10 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr R.dimen.end_call_floating_action_button_diameter); mFabSmallDiameter = getResources().getDimensionPixelOffset( R.dimen.end_call_floating_action_button_small_diameter); + + if (savedInstanceState != null) { + mIsDialpadShowing = savedInstanceState.getBoolean(IS_DIALPAD_SHOWING_KEY, false); + } } @Override @@ -201,6 +207,12 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr } @Override + public void onSaveInstanceState(Bundle outState) { + outState.putBoolean(IS_DIALPAD_SHOWING_KEY, mIsDialpadShowing); + super.onSaveInstanceState(outState); + } + + @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { Trace.beginSection(TAG + " onCreate"); |