summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-05-21 13:14:12 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-05-21 13:14:12 -0700
commitd1874747c281e3277980fe7318f9007643a25f60 (patch)
treef09588d179344e479a4a650a470b72a8e7713ef9
parentf84d654cf9cf7ce3694ebb6913d78edd868d49fb (diff)
parent7444e147a863b41e08815658f1bcbe426aba512b (diff)
downloadframeworks_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.java5
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());