Fix b/265054711: Settings crash on changing device orientation from battery usage page.
Bug: 265054711 Fix: 265054711 Test: presubmit Change-Id: I585fb054980d4536bb05d4778cb439031f34232f
This commit is contained in:
@@ -66,6 +66,9 @@ public class SpinnerPreference extends Preference {
|
||||
|
||||
@Override
|
||||
protected Parcelable onSaveInstanceState() {
|
||||
if (mSpinner == null) {
|
||||
return super.onSaveInstanceState();
|
||||
}
|
||||
Log.d(TAG, "onSaveInstanceState() spinnerPosition=" + mSpinner.getSelectedItemPosition());
|
||||
return new SavedState(super.onSaveInstanceState(), mSpinner.getSelectedItemPosition());
|
||||
}
|
||||
|
Reference in New Issue
Block a user