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 void
ensureClassLoader(Bundle bundle)
Deprecated.Sets the application class loader to the givenBundle
if no class loader is present.static <T extends Bundleable>
ImmutableList<T>fromBundleList(Bundleable.Creator<T> creator, List<Bundle> bundleList)
Deprecated.Converts a list ofBundle
to a list ofBundleable
.static <T extends Bundleable>
SparseArray<T>fromBundleSparseArray(Bundleable.Creator<T> creator, SparseArray<Bundle> bundleSparseArray)
Deprecated.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 ofBundleable
to anArrayList
ofBundle
so that the returned list can be put toBundle
usingBundle.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 ofBundleable
to a listBundle
.static <T extends Bundleable>
ImmutableList<Bundle>toBundleList(List<T> bundleableList, Function<T,Bundle> customToBundleFunc)
Deprecated.Converts a list ofBundleable
to a listBundle
static <T extends Bundleable>
SparseArray<Bundle>toBundleSparseArray(SparseArray<T> bundleableSparseArray)
Deprecated.Converts aSparseArray
ofBundleable
to anSparseArray
ofBundle
so that the returnedSparseArray
can be put toBundle
usingBundle.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 ofBundleable
to a listBundle
.
-
toBundleList
public static <T extends Bundleable> ImmutableList<Bundle> toBundleList(List<T> bundleableList, Function<T,Bundle> customToBundleFunc)
Deprecated.Converts a list ofBundleable
to 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 ofBundle
to a list ofBundleable
.
-
toBundleArrayList
public static <T extends Bundleable> ArrayList<Bundle> toBundleArrayList(Collection<T> bundleables)
Deprecated.Converts a collection ofBundleable
to anArrayList
ofBundle
so that the returned list can be put toBundle
usingBundle.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 aSparseArray
ofBundleable
to anSparseArray
ofBundle
so that the returnedSparseArray
can be put toBundle
usingBundle.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.
-
-