docs/doc/reference/com/google/android/exoplayer2/util/BundleableUtil.html
Package com.google.android.exoplayer2.util
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classBundleableUtilextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Utilities for Bundleable.
All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static HashMap<String,String> | bundleToStringHashMap(Bundle bundle) |
Deprecated.
|
| static ImmutableMap<String,String> | bundleToStringImmutableMap(Bundle bundle) |
Deprecated.
|
| static void | ensureClassLoader(Bundle bundle) |
Deprecated.
Sets the application class loader to the given Bundle if no class loader is present.
|
| static <T extends Bundleable>ImmutableList<T> | fromBundleList(Bundleable.Creator<T> creator, List<Bundle> bundleList) |
Deprecated.
Converts a list of Bundle to a list of Bundleable.
|
| static <T extends Bundleable>SparseArray<T> | fromBundleSparseArray(Bundleable.Creator<T> creator, SparseArray<Bundle> bundleSparseArray) |
Deprecated.
Converts a SparseArray of Bundle to a SparseArray of Bundleable.
|
| static Bundle | getBundleWithDefault(Bundle bundle, String field, Bundle defaultValue) |
Deprecated.
|
| static ArrayList<Integer> | getIntegerArrayListWithDefault(Bundle bundle, String field, ArrayList<Integer> defaultValue) |
Deprecated.
|
| static Bundle | stringMapToBundle(Map<String,String> bundleableMap) |
Deprecated.
|
| static <T extends Bundleable>ArrayList<Bundle> | toBundleArrayList(Collection<T> bundleables) |
Deprecated.
Converts a collection of Bundleable to an ArrayList of Bundle so that the returned list can be put to Bundle using Bundle.putParcelableArrayList(java.lang.String, java.util.ArrayList<? extends android.os.Parcelable>) conveniently.
|
| static <T extends Bundleable>ImmutableList<Bundle> | toBundleList(List<T> bundleableList) |
Deprecated.
Converts a list of Bundleable to a list Bundle.
|
| static <T extends Bundleable>ImmutableList<Bundle> | toBundleList(List<T> bundleableList, Function<T,Bundle> customToBundleFunc) |
Deprecated.
Converts a list of Bundleable to a list Bundle
|
| static <T extends Bundleable>SparseArray<Bundle> | toBundleSparseArray(SparseArray<T> bundleableSparseArray) |
Deprecated.
Converts a SparseArray of Bundleable to an SparseArray of Bundle so that the returned SparseArray can be put to Bundle using Bundle.putSparseParcelableArray(java.lang.String, android.util.SparseArray<? extends android.os.Parcelable>) conveniently.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static <T extends[Bundleable](../Bundleable.html "interface in com.google.android.exoplayer2")>[ImmutableList](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true "class or interface in com.google.common.collect")<[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")> toBundleList([List](https://developer.android.com/reference/java/util/List.html?is-external=true "class or interface in java.util")<T> bundleableList)
Deprecated.
Converts a list of Bundleable to a list Bundle.
-
public static <T extends[Bundleable](../Bundleable.html "interface in com.google.android.exoplayer2")>[ImmutableList](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true "class or interface in com.google.common.collect")<[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")> toBundleList([List](https://developer.android.com/reference/java/util/List.html?is-external=true "class or interface in java.util")<T> bundleableList,[Function](https://guava.dev/releases/31.1-android/api/docs/com/google/common/base/Function.html?is-external=true "class or interface in com.google.common.base")<T,[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")> customToBundleFunc)
Deprecated.
Converts a list of Bundleable to a list Bundle
Parameters:bundleableList - list of Bundleable items to be convertedcustomToBundleFunc - function that specifies how to bundle up each Bundleable
-
public static <T extends[Bundleable](../Bundleable.html "interface in com.google.android.exoplayer2")>[ImmutableList](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true "class or interface in com.google.common.collect")<T> fromBundleList([Bundleable.Creator](../Bundleable.Creator.html "interface in com.google.android.exoplayer2")<T> creator,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Bundle](https://developer.android.com/reference/android/os/Bundle.html?is-external=true "class or interface in android.os")> bundleList)
Deprecated.
Converts a list of Bundle to a list of Bundleable.
-
public static <T extends[Bundleable](../Bundleable.html "interface in com.google.android.exoplayer2")>[ArrayList](https://developer.android.com/reference/java/util/ArrayList.html "class or interface in java.util")<[Bundle](https://developer.android.com/reference/android/os/Bundle.html?is-external=true "class or interface in android.os")> toBundleArrayList([Collection](https://developer.android.com/reference/java/util/Collection.html?is-external=true "class or interface in java.util")<T> bundleables)
Deprecated.
Converts a collection of Bundleable to an ArrayList of Bundle so that the returned list can be put to Bundle using Bundle.putParcelableArrayList(java.lang.String, java.util.ArrayList<? extends android.os.Parcelable>) conveniently.
-
public static <T extends[Bundleable](../Bundleable.html "interface in com.google.android.exoplayer2")>[SparseArray](https://developer.android.com/reference/android/util/SparseArray.html "class or interface in android.util")<T> fromBundleSparseArray([Bundleable.Creator](../Bundleable.Creator.html "interface in com.google.android.exoplayer2")<T> creator,[SparseArray](https://developer.android.com/reference/android/util/SparseArray.html "class or interface in android.util")<[Bundle](https://developer.android.com/reference/android/os/Bundle.html?is-external=true "class or interface in android.os")> bundleSparseArray)
Deprecated.
Converts a SparseArray of Bundle to a SparseArray of Bundleable.
-
public static <T extends[Bundleable](../Bundleable.html "interface in com.google.android.exoplayer2")>[SparseArray](https://developer.android.com/reference/android/util/SparseArray.html "class or interface in android.util")<[Bundle](https://developer.android.com/reference/android/os/Bundle.html?is-external=true "class or interface in android.os")> toBundleSparseArray([SparseArray](https://developer.android.com/reference/android/util/SparseArray.html?is-external=true "class or interface in android.util")<T> bundleableSparseArray)
Deprecated.
Converts a SparseArray of Bundleable to an SparseArray of Bundle so that the returned SparseArray can be put to Bundle using Bundle.putSparseParcelableArray(java.lang.String, android.util.SparseArray<? extends android.os.Parcelable>) conveniently.
-
public static[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")stringMapToBundle([Map](https://developer.android.com/reference/java/util/Map.html?is-external=true "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> bundleableMap)
Deprecated.
-
public static[HashMap](https://developer.android.com/reference/java/util/HashMap.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> bundleToStringHashMap([Bundle](https://developer.android.com/reference/android/os/Bundle.html?is-external=true "class or interface in android.os")bundle)
Deprecated.
-
public static[ImmutableMap](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableMap.html?is-external=true "class or interface in com.google.common.collect")<[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang"),[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> bundleToStringImmutableMap([Bundle](https://developer.android.com/reference/android/os/Bundle.html?is-external=true "class or interface in android.os")bundle)
Deprecated.
-
public static[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")getBundleWithDefault([Bundle](https://developer.android.com/reference/android/os/Bundle.html?is-external=true "class or interface in android.os")bundle,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")field,[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")defaultValue)
Deprecated.
-
public static[ArrayList](https://developer.android.com/reference/java/util/ArrayList.html "class or interface in java.util")<[Integer](https://developer.android.com/reference/java/lang/Integer.html?is-external=true "class or interface in java.lang")> getIntegerArrayListWithDefault([Bundle](https://developer.android.com/reference/android/os/Bundle.html?is-external=true "class or interface in android.os")bundle,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")field,[ArrayList](https://developer.android.com/reference/java/util/ArrayList.html "class or interface in java.util")<[Integer](https://developer.android.com/reference/java/lang/Integer.html?is-external=true "class or interface in java.lang")> defaultValue)
Deprecated.
-
public static void ensureClassLoader(@Nullable[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")bundle)
Deprecated.
Sets the application class loader to the given Bundle if no class loader is present.
This assumes that all classes unparceled from bundle are sharing the class loader of BundleableUtils.