diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-05-21 13:14:12 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-05-21 13:14:12 -0700 |
commit | d1874747c281e3277980fe7318f9007643a25f60 (patch) | |
tree | f09588d179344e479a4a650a470b72a8e7713ef9 | |
parent | f84d654cf9cf7ce3694ebb6913d78edd868d49fb (diff) | |
parent | 7444e147a863b41e08815658f1bcbe426aba512b (diff) | |
download | frameworks_base-d1874747c281e3277980fe7318f9007643a25f60.zip frameworks_base-d1874747c281e3277980fe7318f9007643a25f60.tar.gz frameworks_base-d1874747c281e3277980fe7318f9007643a25f60.tar.bz2 |
Merge change 2202 into donut
* changes:
Fixes external http://code.google.com/p/android/issues/detail?id=2732. ExpandableListView is wrongly assuming that the saved state if of the correct type. A similar bug fix was made in TextView.onRestoreInstanceState() a while ago. This fix simply ensures that the state received is of the right type.
-rw-r--r-- | core/java/android/widget/ExpandableListView.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/widget/ExpandableListView.java b/core/java/android/widget/ExpandableListView.java index 0fc8f49..5360621 100644 --- a/core/java/android/widget/ExpandableListView.java +++ b/core/java/android/widget/ExpandableListView.java @@ -1083,6 +1083,11 @@ public class ExpandableListView extends ListView { @Override public void onRestoreInstanceState(Parcelable state) { + if (!(state instanceof SavedState)) { + super.onRestoreInstanceState(state); + return; + } + SavedState ss = (SavedState) state; super.onRestoreInstanceState(ss.getSuperState()); |