diff --git a/api/current.txt b/api/current.txt
index cc3b085..b2e063a 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -40826,6 +40826,7 @@
   public abstract class AbsSavedState implements android.os.Parcelable {
     ctor protected AbsSavedState(android.os.Parcelable);
     ctor protected AbsSavedState(android.os.Parcel);
+    ctor protected AbsSavedState(android.os.Parcel, java.lang.ClassLoader);
     method public int describeContents();
     method public final android.os.Parcelable getSuperState();
     method public void writeToParcel(android.os.Parcel, int);
@@ -42942,6 +42943,7 @@
 
   public static class View.BaseSavedState extends android.view.AbsSavedState {
     ctor public View.BaseSavedState(android.os.Parcel);
+    ctor public View.BaseSavedState(android.os.Parcel, java.lang.ClassLoader);
     ctor public View.BaseSavedState(android.os.Parcelable);
     field public static final android.os.Parcelable.Creator<android.view.View.BaseSavedState> CREATOR;
   }
diff --git a/api/system-current.txt b/api/system-current.txt
index 7a71672..374acfe 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -43773,6 +43773,7 @@
   public abstract class AbsSavedState implements android.os.Parcelable {
     ctor protected AbsSavedState(android.os.Parcelable);
     ctor protected AbsSavedState(android.os.Parcel);
+    ctor protected AbsSavedState(android.os.Parcel, java.lang.ClassLoader);
     method public int describeContents();
     method public final android.os.Parcelable getSuperState();
     method public void writeToParcel(android.os.Parcel, int);
@@ -45889,6 +45890,7 @@
 
   public static class View.BaseSavedState extends android.view.AbsSavedState {
     ctor public View.BaseSavedState(android.os.Parcel);
+    ctor public View.BaseSavedState(android.os.Parcel, java.lang.ClassLoader);
     ctor public View.BaseSavedState(android.os.Parcelable);
     field public static final android.os.Parcelable.Creator<android.view.View.BaseSavedState> CREATOR;
   }
diff --git a/api/test-current.txt b/api/test-current.txt
index 39d69f3..90f8e99 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -40903,6 +40903,7 @@
   public abstract class AbsSavedState implements android.os.Parcelable {
     ctor protected AbsSavedState(android.os.Parcelable);
     ctor protected AbsSavedState(android.os.Parcel);
+    ctor protected AbsSavedState(android.os.Parcel, java.lang.ClassLoader);
     method public int describeContents();
     method public final android.os.Parcelable getSuperState();
     method public void writeToParcel(android.os.Parcel, int);
@@ -43019,6 +43020,7 @@
 
   public static class View.BaseSavedState extends android.view.AbsSavedState {
     ctor public View.BaseSavedState(android.os.Parcel);
+    ctor public View.BaseSavedState(android.os.Parcel, java.lang.ClassLoader);
     ctor public View.BaseSavedState(android.os.Parcelable);
     field public static final android.os.Parcelable.Creator<android.view.View.BaseSavedState> CREATOR;
   }
diff --git a/core/java/android/view/AbsSavedState.java b/core/java/android/view/AbsSavedState.java
index 6ad33dd..6b616c0 100644
--- a/core/java/android/view/AbsSavedState.java
+++ b/core/java/android/view/AbsSavedState.java
@@ -37,7 +37,7 @@
 
     /**
      * Constructor called by derived classes when creating their SavedState objects
-     * 
+     *
      * @param superState The state of the superclass of this view
      */
     protected AbsSavedState(Parcelable superState) {
@@ -49,13 +49,22 @@
 
     /**
      * Constructor used when reading from a parcel. Reads the state of the superclass.
-     * 
-     * @param source
+     *
+     * @param source parcel to read from
      */
     protected AbsSavedState(Parcel source) {
-        // FIXME need class loader
-        Parcelable superState = source.readParcelable(null);
-         
+        this(source, null);
+    }
+
+    /**
+     * Constructor used when reading from a parcel using a given class loader.
+     * Reads the state of the superclass.
+     *
+     * @param source parcel to read from
+     * @param loader ClassLoader to use for reading
+     */
+    protected AbsSavedState(Parcel source, ClassLoader loader) {
+        Parcelable superState = source.readParcelable(loader);
         mSuperState = superState != null ? superState : EMPTY_STATE;
     }
 
@@ -68,20 +77,27 @@
     }
 
     public void writeToParcel(Parcel dest, int flags) {
-         dest.writeParcelable(mSuperState, flags);
+        dest.writeParcelable(mSuperState, flags);
     }
 
-    public static final Parcelable.Creator<AbsSavedState> CREATOR 
-        = new Parcelable.Creator<AbsSavedState>() {
-        
+    public static final Parcelable.Creator<AbsSavedState> CREATOR
+            = new Parcelable.ClassLoaderCreator<AbsSavedState>() {
+
+        @Override
         public AbsSavedState createFromParcel(Parcel in) {
-            Parcelable superState = in.readParcelable(null);
+            return createFromParcel(in, null);
+        }
+
+        @Override
+        public AbsSavedState createFromParcel(Parcel in, ClassLoader loader) {
+            Parcelable superState = in.readParcelable(loader);
             if (superState != null) {
                 throw new IllegalStateException("superState must be null");
             }
             return EMPTY_STATE;
         }
 
+        @Override
         public AbsSavedState[] newArray(int size) {
             return new AbsSavedState[size];
         }
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 1781d9d..81310c4 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -22571,10 +22571,21 @@
         /**
          * Constructor used when reading from a parcel. Reads the state of the superclass.
          *
-         * @param source
+         * @param source parcel to read from
          */
         public BaseSavedState(Parcel source) {
-            super(source);
+            this(source, null);
+        }
+
+        /**
+         * Constructor used when reading from a parcel using a given class loader.
+         * Reads the state of the superclass.
+         *
+         * @param source parcel to read from
+         * @param loader ClassLoader to use for reading
+         */
+        public BaseSavedState(Parcel source, ClassLoader loader) {
+            super(source, loader);
             mStartActivityRequestWhoSaved = source.readString();
         }
 
@@ -22593,12 +22604,19 @@
             out.writeString(mStartActivityRequestWhoSaved);
         }
 
-        public static final Parcelable.Creator<BaseSavedState> CREATOR =
-                new Parcelable.Creator<BaseSavedState>() {
+        public static final Parcelable.Creator<BaseSavedState> CREATOR
+                = new Parcelable.ClassLoaderCreator<BaseSavedState>() {
+            @Override
             public BaseSavedState createFromParcel(Parcel in) {
                 return new BaseSavedState(in);
             }
 
+            @Override
+            public BaseSavedState createFromParcel(Parcel in, ClassLoader loader) {
+                return new BaseSavedState(in, loader);
+            }
+
+            @Override
             public BaseSavedState[] newArray(int size) {
                 return new BaseSavedState[size];
             }
