Merge "Fix b/265054711: Settings crash on changing device orientation from battery usage page."
This commit is contained in:
committed by
Android (Google) Code Review
commit
b8a4577914
@@ -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