summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-08-18 12:44:55 -0700
committerAndrew Lee <anwlee@google.com>2015-08-18 12:44:55 -0700
commit8c024aedbcdc90e46f7fda915feb1a7ddae36e3b (patch)
tree6ac977e90f22316de8b956490ecdba0430437e78
parent95d29a40ba7d1b3aafb14b054b64a54e1c33fbb9 (diff)
Save dialpad showing state after rotation.
After rotation with the dialpad up, the FAB was resizing incorrectly to the large width, because the dialpad up/down state was not saved and restored. Bug: 23218944 Change-Id: I1c664aa663c1744d1d37e73154f6401930fd53bc
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java12
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 c2b969c98..922c1e62d 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");