Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38e9a0a9 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Update internal ViewPager's SavedState to match Support Library version" into mnc-dev

parents 5a28e533 187964ac
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.Log;
import android.util.MathUtils;
import android.view.AbsSavedState;
import android.view.FocusFinder;
import android.view.Gravity;
import android.view.KeyEvent;
@@ -1214,15 +1215,11 @@ public class ViewPager extends ViewGroup {
     * state, in which case it should implement a subclass of this which
     * contains that state.
     */
    public static class SavedState extends BaseSavedState {
    public static class SavedState extends AbsSavedState {
        int position;
        Parcelable adapterState;
        ClassLoader loader;

        public SavedState(Parcel source) {
            super(source);
        }

        public SavedState(Parcelable superState) {
            super(superState);
        }
@@ -1241,10 +1238,15 @@ public class ViewPager extends ViewGroup {
                    + " position=" + position + "}";
        }

        public static final Creator<SavedState> CREATOR = new Creator<SavedState>() {
        public static final Creator<SavedState> CREATOR = new ClassLoaderCreator<SavedState>() {
            @Override
            public SavedState createFromParcel(Parcel in, ClassLoader loader) {
                return new SavedState(in, loader);
            }

            @Override
            public SavedState createFromParcel(Parcel in) {
                return new SavedState(in);
                return new SavedState(in, null);
            }
            @Override
            public SavedState[] newArray(int size) {
@@ -1253,7 +1255,7 @@ public class ViewPager extends ViewGroup {
        };

        SavedState(Parcel in, ClassLoader loader) {
            super(in);
            super(in, loader);
            if (loader == null) {
                loader = getClass().getClassLoader();
            }