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

Commit 5164246d authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix setting of class loader.

Also add Bundle API to retrieve its class loader because...  well,
why not.

Change-Id: Ie939f6a2ae13974e5a05eb5bd3b28f350d8a8565
parent 00d319e0
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -134781,6 +134781,17 @@
<parameter name="key" type="java.lang.String">
</parameter>
</method>
<method name="getClassLoader"
 return="java.lang.ClassLoader"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getDouble"
 return="double"
 abstract="false"
+4 −0
Original line number Diff line number Diff line
@@ -84,6 +84,10 @@ final class FragmentState implements Parcelable {
            return mInstance;
        }
        
        if (mArguments != null) {
            mArguments.setClassLoader(activity.getClassLoader());
        }
        
        mInstance = Fragment.instantiate(activity, mClassName, mArguments);
        
        if (mSavedFragmentState != null) {
+1 −0
Original line number Diff line number Diff line
@@ -1200,6 +1200,7 @@ final class FragmentManagerImpl implements FragmentManager {
                f.mInLayout = false;
                f.mAdded = false;
                if (fs.mSavedFragmentState != null) {
                    fs.mSavedFragmentState.setClassLoader(mActivity.getClassLoader());
                    f.mSavedViewState = fs.mSavedFragmentState.getSparseParcelableArray(
                            FragmentManagerImpl.VIEW_STATE_TAG);
                }
+7 −0
Original line number Diff line number Diff line
@@ -180,6 +180,13 @@ public final class Bundle implements Parcelable, Cloneable {
        mClassLoader = loader;
    }

    /**
     * Return the ClassLoader currently associated with this Bundle.
     */
    public ClassLoader getClassLoader() {
        return mClassLoader;
    }
    
    /**
     * Clones the current Bundle. The internal map is cloned, but the keys and
     * values to which it refers are copied by reference.