Read and return a new Parcelable from the parcel. The given class loader will be used to load any enclosed Parcelables. If it is null, the default class loader will be used. @param loader A ClassLoader from which to instantiate the Parcelable object, or null for the default class loader. @return R
(ClassLoader loader)
| 2094 | * was an error trying to instantiate the Parcelable. |
| 2095 | */ |
| 2096 | public final <T extends Parcelable> T readParcelable(ClassLoader loader) { |
| 2097 | Parcelable.Creator<T> creator = readParcelableCreator(loader); |
| 2098 | if (creator == null) { |
| 2099 | return null; |
| 2100 | } |
| 2101 | if (creator instanceof Parcelable.ClassLoaderCreator<?>) { |
| 2102 | return ((Parcelable.ClassLoaderCreator<T>)creator).createFromParcel(this, loader); |
| 2103 | } |
| 2104 | return creator.createFromParcel(this); |
| 2105 | } |
| 2106 | |
| 2107 | /** @hide */ |
| 2108 | public final <T extends Parcelable> T readCreator(Parcelable.Creator<T> creator, |
no test coverage detected