Class BundleableUtil
- java.lang.Object
-
- com.google.android.exoplayer2.util.BundleableUtil
-
@Deprecated public final class BundleableUtil extends Object
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 forBundleable.
-
-
Method Summary
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 voidensureClassLoader(Bundle bundle)Deprecated.Sets the application class loader to the givenBundleif no class loader is present.static <T extends Bundleable>
ImmutableList<T>fromBundleList(Bundleable.Creator<T> creator, List<Bundle> bundleList)Deprecated.Converts a list ofBundleto a list ofBundleable.static <T extends Bundleable>
SparseArray<T>fromBundleSparseArray(Bundleable.Creator<T> creator, SparseArray<Bundle> bundleSparseArray)Deprecated.static BundlegetBundleWithDefault(Bundle bundle, String field, Bundle defaultValue)Deprecated.static ArrayList<Integer>getIntegerArrayListWithDefault(Bundle bundle, String field, ArrayList<Integer> defaultValue)Deprecated.static BundlestringMapToBundle(Map<String,String> bundleableMap)Deprecated.static <T extends Bundleable>
ArrayList<Bundle>toBundleArrayList(Collection<T> bundleables)Deprecated.Converts a collection ofBundleableto anArrayListofBundleso that the returned list can be put toBundleusingBundle.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 ofBundleableto a listBundle.static <T extends Bundleable>
ImmutableList<Bundle>toBundleList(List<T> bundleableList, Function<T,Bundle> customToBundleFunc)Deprecated.Converts a list ofBundleableto a listBundlestatic <T extends Bundleable>
SparseArray<Bundle>toBundleSparseArray(SparseArray<T> bundleableSparseArray)Deprecated.Converts aSparseArrayofBundleableto anSparseArrayofBundleso that the returnedSparseArraycan be put toBundleusingBundle.putSparseParcelableArray(java.lang.String, android.util.SparseArray<? extends android.os.Parcelable>)conveniently.
-
-
-
Method Detail
-
toBundleList
public static <T extends Bundleable> ImmutableList<Bundle> toBundleList(List<T> bundleableList)
Deprecated.Converts a list ofBundleableto a listBundle.
-
toBundleList
public static <T extends Bundleable> ImmutableList<Bundle> toBundleList(List<T> bundleableList, Function<T,Bundle> customToBundleFunc)
Deprecated.Converts a list ofBundleableto a listBundle- Parameters:
bundleableList- list of Bundleable items to be convertedcustomToBundleFunc- function that specifies how to bundle up eachBundleable
-
fromBundleList
public static <T extends Bundleable> ImmutableList<T> fromBundleList(Bundleable.Creator<T> creator, List<Bundle> bundleList)
Deprecated.Converts a list ofBundleto a list ofBundleable.
-
toBundleArrayList
public static <T extends Bundleable> ArrayList<Bundle> toBundleArrayList(Collection<T> bundleables)
Deprecated.Converts a collection ofBundleableto anArrayListofBundleso that the returned list can be put toBundleusingBundle.putParcelableArrayList(java.lang.String, java.util.ArrayList<? extends android.os.Parcelable>)conveniently.
-
fromBundleSparseArray
public static <T extends Bundleable> SparseArray<T> fromBundleSparseArray(Bundleable.Creator<T> creator, SparseArray<Bundle> bundleSparseArray)
Deprecated.
-
toBundleSparseArray
public static <T extends Bundleable> SparseArray<Bundle> toBundleSparseArray(SparseArray<T> bundleableSparseArray)
Deprecated.Converts aSparseArrayofBundleableto anSparseArrayofBundleso that the returnedSparseArraycan be put toBundleusingBundle.putSparseParcelableArray(java.lang.String, android.util.SparseArray<? extends android.os.Parcelable>)conveniently.
-
stringMapToBundle
public static Bundle stringMapToBundle(Map<String,String> bundleableMap)
Deprecated.
-
bundleToStringHashMap
public static HashMap<String,String> bundleToStringHashMap(Bundle bundle)
Deprecated.
-
bundleToStringImmutableMap
public static ImmutableMap<String,String> bundleToStringImmutableMap(Bundle bundle)
Deprecated.
-
getBundleWithDefault
public static Bundle getBundleWithDefault(Bundle bundle, String field, Bundle defaultValue)
Deprecated.
-
getIntegerArrayListWithDefault
public static ArrayList<Integer> getIntegerArrayListWithDefault(Bundle bundle, String field, ArrayList<Integer> defaultValue)
Deprecated.
-
-