Fix Java crash problem
- Returns the BaseSavedState.EMPTY_STATE to avoid the exception. Fixes: 312585313 Test: manual test Change-Id: If21ca5e914a5ee5aff3fbeeee9595bb77a8fc3d0
This commit is contained in:
@@ -81,7 +81,8 @@ public class SpinnerPreference extends Preference {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!(state instanceof SavedState)) {
|
if (!(state instanceof SavedState)) {
|
||||||
super.onRestoreInstanceState(state);
|
// To avoid the IllegalArgumentException, return the BaseSavedState.EMPTY_STATE.
|
||||||
|
super.onRestoreInstanceState(BaseSavedState.EMPTY_STATE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SavedState savedState = (SavedState) state;
|
SavedState savedState = (SavedState) state;
|
||||||
|
Reference in New Issue
Block a user