# Util

Artifact: [androidx.media3:media3-common](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/common/util/Util.java+class:androidx.media3.common.util.Util)

*** ** * ** ***


```
class Util
```

<br />

*** ** * ** ***

Miscellaneous utility methods.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#DEVICE()` **This property is deprecated.** Use `https://developer.android.com/reference/android/os/Build.html#DEVICE` instead. <br /> |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#DEVICE_DEBUG_INFO()` A concise description of the device that it can be useful to log for debugging purposes. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#EMPTY_BYTE_ARRAY()` An empty byte array. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#EMPTY_LONG_ARRAY()` An empty long array. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#MANUFACTURER()` **This property is deprecated.** Use `https://developer.android.com/reference/android/os/Build.html#MANUFACTURER` instead. <br /> |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#MODEL()` **This property is deprecated.** Use `https://developer.android.com/reference/android/os/Build.html#MODEL` instead. <br /> |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#SDK_INT()` **This property is deprecated.** Use `https://developer.android.com/reference/android/os/Build.VERSION.html#SDK_INT` instead. <br /> |

| ### Public functions |
|---|---|
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#addWithOverflowDefault(long,long,long)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, overflowResult: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Returns the sum of two arguments, or a third argument if the result overflows. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/com/google/errorprone/annotations/InlineMe.html(replacement = "Objects.equals(o1, o2)", imports = [""java.util.Objects""]) [areEqual](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#areEqual(java.lang.Object,java.lang.Object))(o1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, o2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` **This function is deprecated.** Use `https://developer.android.com/reference/java/util/Objects.html#equals(java.lang.Object, java.lang.Object)` instead. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#binarySearchCeil(int[],int,boolean,boolean)( array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Returns the index of the smallest element in `array` that is greater than (or optionally equal to) a specified `value`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#binarySearchCeil(long[],long,boolean,boolean)( array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Returns the index of the smallest element in `array` that is greater than (or optionally equal to) a specified `value`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<T!>?> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#binarySearchCeil(java.util.List<? extends java.lang.Comparable<? super T>>,T,boolean,boolean)( list: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<T!>!>!, value: T!, inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Returns the index of the smallest element in `list` that is greater than (or optionally equal to) a specified value. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#binarySearchFloor(int[],int,boolean,boolean)( array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Returns the index of the largest element in `array` that is less than (or optionally equal to) a specified `value`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#binarySearchFloor(long[],long,boolean,boolean)( array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Returns the index of the largest element in `array` that is less than (or optionally equal to) a specified `value`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<T!>?> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#binarySearchFloor(java.util.List<? extends java.lang.Comparable<? super T>>,T,boolean,boolean)( list: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<T!>!>!, value: T!, inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Returns the index of the largest element in `list` that is less than (or optionally equal to) a specified `value`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#binarySearchFloor(androidx.media3.common.util.LongArray,long,boolean,boolean)( longArray: https://developer.android.com/reference/kotlin/androidx/media3/common/util/LongArray!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Returns the index of the largest element in `longArray` that is less than (or optionally equal to) a specified `value`. |
| `java-static T!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/EnsuresNonNull.html(value = "#1") <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#castNonNull(T)(value: T?)` Casts a nullable variable to a non-null variable without runtime null check. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/EnsuresNonNull.html(value = "#1") <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#castNonNullTypeArray(T[])(@https://developer.android.com/reference/kotlin/androidx/media3/common/util/NullableType value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<@https://developer.android.com/reference/kotlin/androidx/media3/common/util/NullableType T!>!)` Casts a nullable type array to a non-null type array without runtime null check. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#ceilDivide(int,int)(numerator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, denominator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Divides a `numerator` by a `denominator`, returning the ceiled result. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#ceilDivide(long,long)(numerator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, denominator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Divides a `numerator` by a `denominator`, returning the ceiled result. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#checkCleartextTrafficPermitted(androidx.media3.common.MediaItem...)(mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem!>!)` Returns whether it may be possible to load the URIs of the given media items based on the network security policy's cleartext traffic permissions. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#closeQuietly(java.io.Closeable)(closeable: https://developer.android.com/reference/java/io/Closeable.html?)` Closes a `https://developer.android.com/reference/java/io/Closeable.html`, suppressing any `https://developer.android.com/reference/java/io/IOException.html` that may occur. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/com/google/errorprone/annotations/InlineMe.html(replacement = "Long.compare(left, right)") [compareLong](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#compareLong(long,long))(left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` **This function is deprecated.** Use `https://developer.android.com/reference/java/lang/Long.html#compare(long, long)`. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#constrainValue(double,double,double)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html, min: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html, max: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)` Constrains a value to the specified bounds. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#constrainValue(float,float,float)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, min: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, max: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Constrains a value to the specified bounds. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#constrainValue(int,int,int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, min: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, max: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Constrains a value to the specified bounds. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#constrainValue(long,long,long)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, min: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, max: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Constrains a value to the specified bounds. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#contains(java.lang.Object[],java.lang.Object)(@https://developer.android.com/reference/kotlin/androidx/media3/common/util/NullableType items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>!, item: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Tests whether an `items` array contains an object equal to `item`, according to `https://developer.android.com/reference/java/lang/Object.html#equals(java.lang.Object)`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#contains(android.util.SparseArray<T>,int)(sparseArray: https://developer.android.com/reference/android/util/SparseArray.html<T!>!, key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Tests whether a `https://developer.android.com/reference/android/util/SparseArray.html` contains a given `key`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#contains(android.util.SparseBooleanArray,int)(sparseArray: https://developer.android.com/reference/android/util/SparseBooleanArray.html!, key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns whether the given `https://developer.android.com/reference/android/util/SparseBooleanArray.html` contains the given key. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#contains(android.util.SparseIntArray,int)(sparseArray: https://developer.android.com/reference/android/util/SparseIntArray.html!, key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns whether the given `https://developer.android.com/reference/android/util/SparseIntArray.html` contains the given key. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#contentEquals(android.util.SparseArray<T>,android.util.SparseArray<T>)( sparseArray1: https://developer.android.com/reference/android/util/SparseArray.html<T!>?, sparseArray2: https://developer.android.com/reference/android/util/SparseArray.html<T!>? )` Tests two `https://developer.android.com/reference/android/util/SparseArray.html` instances for content equality, handling the case where one or both may be `null`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#contentHashCode(android.util.SparseArray<T>)(sparseArray: https://developer.android.com/reference/android/util/SparseArray.html<T!>!)` Returns a hash code value for the contents of this `https://developer.android.com/reference/android/util/SparseArray.html`, combining the `https://developer.android.com/reference/java/util/Objects.html#hashCode(java.lang.Object)` result of all its keys and values. |
| `java-static https://developer.android.com/reference/android/os/Bundle.html?` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CheckReturnValue.html @https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#convertToNullIfInvalid(android.os.Bundle)(bundle: https://developer.android.com/reference/android/os/Bundle.html?)` Converts the provided `https://developer.android.com/reference/android/os/Bundle.html` to `null` if it is invalid. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#crc16(byte[],int,int,int)(bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!, start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, initialValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the result of updating a CRC-16 with the specified bytes in a "most significant bit first" order. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#crc32(byte[],int,int,int)(bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!, start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, initialValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the result of updating a CRC-32 with the specified bytes in a "most significant bit first" order. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#crc8(byte[],int,int,int)(bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!, start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, initialValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the result of updating a CRC-8 with the specified bytes in a "most significant bit first" order. |
| `java-static https://developer.android.com/reference/android/os/Handler.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#createHandler(android.os.Looper,android.os.Handler.Callback)( looper: https://developer.android.com/reference/android/os/Looper.html!, callback: @https://checkerframework.org/api/org/checkerframework/checker/initialization/qual/UnknownInitialization.html https://developer.android.com/reference/android/os/Handler.Callback.html? )` Creates a `https://developer.android.com/reference/android/os/Handler.html` with the specified `https://developer.android.com/reference/android/os/Handler.Callback.html` on the specified `https://developer.android.com/reference/android/os/Looper.html` thread. |
| `java-static https://developer.android.com/reference/android/os/Handler.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#createHandlerForCurrentLooper()()` Creates a `https://developer.android.com/reference/android/os/Handler.html` on the current `https://developer.android.com/reference/android/os/Looper.html` thread. |
| `java-static https://developer.android.com/reference/android/os/Handler.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#createHandlerForCurrentLooper(android.os.Handler.Callback)( callback: @https://checkerframework.org/api/org/checkerframework/checker/initialization/qual/UnknownInitialization.html https://developer.android.com/reference/android/os/Handler.Callback.html? )` Creates a `https://developer.android.com/reference/android/os/Handler.html` with the specified `https://developer.android.com/reference/android/os/Handler.Callback.html` on the current `https://developer.android.com/reference/android/os/Looper.html` thread. |
| `java-static https://developer.android.com/reference/android/os/Handler.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#createHandlerForCurrentOrMainLooper()()` Creates a `https://developer.android.com/reference/android/os/Handler.html` on the current `https://developer.android.com/reference/android/os/Looper.html` thread. |
| `java-static https://developer.android.com/reference/android/os/Handler.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#createHandlerForCurrentOrMainLooper(android.os.Handler.Callback)( callback: @https://checkerframework.org/api/org/checkerframework/checker/initialization/qual/UnknownInitialization.html https://developer.android.com/reference/android/os/Handler.Callback.html? )` Creates a `https://developer.android.com/reference/android/os/Handler.html` with the specified `https://developer.android.com/reference/android/os/Handler.Callback.html` on the current `https://developer.android.com/reference/android/os/Looper.html` thread. |
| `java-static https://developer.android.com/reference/java/nio/ByteBuffer.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#createReadOnlyByteBuffer(java.nio.ByteBuffer)(byteBuffer: https://developer.android.com/reference/java/nio/ByteBuffer.html!)` Returns a read-only view of the given `https://developer.android.com/reference/java/nio/ByteBuffer.html`. |
| `java-static https://developer.android.com/reference/java/io/File.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#createTempDirectory(android.content.Context,java.lang.String)(context: https://developer.android.com/reference/android/content/Context.html!, prefix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Creates an empty directory in the directory returned by `https://developer.android.com/reference/android/content/Context.html#getCacheDir()`. |
| `java-static https://developer.android.com/reference/java/io/File.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#createTempFile(android.content.Context,java.lang.String)(context: https://developer.android.com/reference/android/content/Context.html!, prefix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Creates a new empty file in the directory returned by `https://developer.android.com/reference/android/content/Context.html#getCacheDir()`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#durationUsToSampleCount(long,int)(durationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, sampleRate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the number of samples required to represent `durationUs` of media at ` sampleRate`, assuming all samples are equal duration except the last one which may be shorter. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#ensureNotificationChannel(android.app.NotificationManager,java.lang.String,java.lang.String)( notificationManager: https://developer.android.com/reference/android/app/NotificationManager.html!, channelId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, channelName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html! )` Ensure that the `https://developer.android.com/reference/android/app/NotificationChannel.html` with the given channel ID exists. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#escapeFileName(java.lang.String)(fileName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Escapes a string so that it's safe for use as a file or directory name on at least FAT32 filesystems. |
| `java-static https://developer.android.com/reference/android/net/Uri.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#fixSmoothStreamingIsmManifestUri(android.net.Uri)(uri: https://developer.android.com/reference/android/net/Uri.html!)` If the provided URI is an ISM Presentation URI, returns the URI with "Manifest" appended to its path (i.e., the corresponding default manifest URI). |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#formatInvariant(java.lang.String,java.lang.Object...)(format: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, args: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>!)` Formats a string using `https://developer.android.com/reference/java/util/Locale.html#US`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#fromUtf8Bytes(byte[])(bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!)` Returns a new `https://developer.android.com/reference/java/lang/String.html` constructed by decoding UTF-8 encoded bytes. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#fromUtf8Bytes(byte[],int,int)(bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!, offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a new `https://developer.android.com/reference/java/lang/String.html` constructed by decoding UTF-8 encoded bytes in a subarray. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#generateAudioSessionId(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html!)` Returns a newly generated audio session identifier, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#AUDIO_SESSION_ID_UNSET()` if failed to generate an identifier and in which case audio playback may fail. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/com/google/errorprone/annotations/InlineMe.html(replacement = "Util.generateAudioSessionId(context)", imports = "androidx.media3.common.util.Util") [generateAudioSessionIdV21](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#generateAudioSessionIdV21(android.content.Context))(context: https://developer.android.com/reference/android/content/Context.html!)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#generateAudioSessionId(android.content.Context)` instead. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getAdaptiveMimeTypeForContentType(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType contentType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the MIME type corresponding to the given adaptive `https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType`, or `null` if the content type is not adaptive. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getApiLevelThatAudioFormatIntroducedAudioEncoding(int)(encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Retrieves the API Level that `https://developer.android.com/reference/android/media/AudioFormat.html` introduced an encoding. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/C.AudioContentType [getAudioContentTypeForStreamType](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getAudioContentTypeForStreamType(int))(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.StreamType streamType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** This method is no longer used by the media3 library, it does not work well and should be avoided. <br /> |
| `java-static https://developer.android.com/reference/android/media/AudioFormat.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getAudioFormat(int,int,int)(sampleRate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, channelConfig: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Creates `https://developer.android.com/reference/android/media/AudioFormat.html` with given sampleRate, channelConfig, and encoding. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getAudioTrackChannelConfig(int)(channelCount: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the audio track channel configuration for the given channel count, or `https://developer.android.com/reference/android/media/AudioFormat.html#CHANNEL_INVALID` if output is not possible. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getAudioTrackChannelConfig(androidx.media3.common.Format)(format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!)` Returns the audio track channel configuration for the given `https://developer.android.com/reference/kotlin/androidx/media3/common/Format`, or `https://developer.android.com/reference/android/media/AudioFormat.html#CHANNEL_INVALID` if output is not possible. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/C.AudioUsage https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getAudioUsageForStreamType(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.StreamType streamType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.AudioUsage` corresponding to the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/C.StreamType`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getAuxiliaryTrackTypeString(int)( @https://developer.android.com/reference/kotlin/androidx/media3/common/C.AuxiliaryTrackType auxiliaryTrackType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Returns a string representation of the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.AuxiliaryTrackType`. |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getAvailableCommands(androidx.media3.common.Player,androidx.media3.common.Player.Commands)( player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player!, permanentAvailableCommands: https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands! )` Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands` available in the `https://developer.android.com/reference/kotlin/androidx/media3/common/Player`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getBigEndianInt(java.nio.ByteBuffer,int)(buffer: https://developer.android.com/reference/java/nio/ByteBuffer.html!, index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Absolute *get* method for reading an int value in `https://developer.android.com/reference/java/nio/ByteOrder.html#BIG_ENDIAN` in a `https://developer.android.com/reference/java/nio/ByteBuffer.html`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/C.BufferFlags https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getBufferFlagsFromMediaCodecFlags(int)(mediaCodecFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns `https://developer.android.com/reference/kotlin/androidx/media3/common/C.BufferFlags` corresponding to `https://developer.android.com/reference/android/media/MediaCodec.html` flags. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getByteDepth(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding pcmEncoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the byte depth for audio with the specified encoding. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getBytesFromHexString(java.lang.String)(hexString: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns a byte array containing values parsed from the hex string provided. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getCodecCountOfType(java.lang.String,int)(codecs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, @https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType trackType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the number of codec strings in `codecs` whose type matches `trackType`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getCodecsOfType(java.lang.String,int)(codecs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, @https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType trackType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a copy of `codecs` without the codecs whose track type doesn't match ` trackType`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getCodecsWithoutType(java.lang.String,int)(codecs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, @https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType trackType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a copy of `codecs` without the codecs whose track type matches `trackType`. |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/common/ColorInfo?` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getColorInfoForDolbyVision(java.lang.String,java.lang.String,java.lang.String)( codecs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, supplementalCodecs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, supplementalProfiles: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html? )` Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/ColorInfo` for specific Dolby Vision codecs and profiles. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getCountryCode(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html?)` Returns the upper-case ISO 3166-1 alpha-2 country code of the current registered operator's MCC (Mobile Country Code), or the country code of the default Locale if not available. |
| `java-static https://developer.android.com/reference/android/graphics/Point.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getCurrentDisplayModeSize(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html!)` Gets the size of the current mode of the default display, in pixels. |
| `java-static https://developer.android.com/reference/android/graphics/Point.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getCurrentDisplayModeSize(android.content.Context,android.view.Display)(context: https://developer.android.com/reference/android/content/Context.html!, display: https://developer.android.com/reference/android/view/Display.html!)` Gets the size of the current mode of the specified display, in pixels. |
| `java-static https://developer.android.com/reference/android/os/Looper.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getCurrentOrMainLooper()()` Returns the `https://developer.android.com/reference/android/os/Looper.html` associated with the current thread, or the `https://developer.android.com/reference/android/os/Looper.html` of the application's main thread if the current thread doesn't have a `https://developer.android.com/reference/android/os/Looper.html`. |
| `java-static https://developer.android.com/reference/android/net/Uri.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getDataUriForString(java.lang.String,java.lang.String)(mimeType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, data: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns a data URI with the specified MIME type and data. |
| `java-static https://developer.android.com/reference/java/util/Locale.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/com/google/errorprone/annotations/InlineMe.html(replacement = "Locale.getDefault(Locale.Category.DISPLAY)", imports = [""java.util.Locale""]) [getDefaultDisplayLocale](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getDefaultDisplayLocale())()` **This function is deprecated.** Use `https://developer.android.com/reference/java/util/Locale.html#getDefault(java.util.Locale.Category)` with `https://developer.android.com/reference/java/util/Locale.Category.html#DISPLAY` instead. <br /> |
| `java-static https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getDrawable(android.content.Context,android.content.res.Resources,int)( context: https://developer.android.com/reference/android/content/Context.html!, resources: https://developer.android.com/reference/android/content/res/Resources.html!, drawableRes: @https://developer.android.com/reference/kotlin/androidx/annotation/DrawableRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Returns a `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` for the given resource or throws a `https://developer.android.com/reference/android/content/res/Resources.NotFoundException.html` if not found. |
| `java-static https://developer.android.com/reference/java/util/UUID.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getDrmUuid(java.lang.String)(drmScheme: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Derives a DRM `https://developer.android.com/reference/java/util/UUID.html` from `drmScheme`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getEncodingString(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.Encoding encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a user-readable string representation of the given `https://developer.android.com/reference/kotlin/androidx/media3/common/C.Encoding`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackException.ErrorCode https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getErrorCodeForMediaDrmErrorCode(int)(mediaDrmErrorCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a `https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackException.ErrorCode` value that corresponds to the provided `https://developer.android.com/reference/android/media/MediaDrm.ErrorCodes.html` value. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getErrorCodeFromPlatformDiagnosticsInfo(java.lang.String)(diagnosticsInfo: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Attempts to parse an error code from a diagnostic string found in framework media exceptions. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getFloatPcmEncoding(int)(bitDepth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Converts a sample bit depth to a corresponding little-endian float PCM encoding constant. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getFloatPcmEncoding(int,java.nio.ByteOrder)(bitDepth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, byteOrder: https://developer.android.com/reference/java/nio/ByteOrder.html!)` Converts a sample bit depth and byte order to a corresponding float PCM encoding constant. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getFormatSupportString(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.FormatSupport formatSupport: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns string representation of a `https://developer.android.com/reference/kotlin/androidx/media3/common/C.FormatSupport` flag. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getInt24(java.nio.ByteBuffer,int)(buffer: https://developer.android.com/reference/java/nio/ByteBuffer.html!, index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the sign-extended 24-bit integer value at `index`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getIntegerCodeForString(java.lang.String)(string: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns the integer equal to the big-endian concatenation of the characters in `string` as bytes. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/com/google/errorprone/annotations/InlineMe.html(replacement = "locale.toLanguageTag()") [getLocaleLanguageTag](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getLocaleLanguageTag(java.util.Locale))(locale: https://developer.android.com/reference/java/util/Locale.html!)` **This function is deprecated.** Use `https://developer.android.com/reference/java/util/Locale.html#toLanguageTag()` instead. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getMaxPendingFramesCountForMediaCodecDecoders(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html!)` Returns the number of maximum pending output frames that are allowed on a `https://developer.android.com/reference/android/media/MediaCodec.html` decoder. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getMediaDurationForPlayoutDuration(long,float)(playoutDuration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, speed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns the duration of media that will elapse in `playoutDuration`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getNowUnixTimeMs(long)(elapsedRealtimeEpochOffsetMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Returns the current time in milliseconds since the epoch. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getPcmEncoding(int)(bitDepth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Converts a sample bit depth to a corresponding little-endian integer PCM encoding constant. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getPcmEncoding(int,java.nio.ByteOrder)(bitDepth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, byteOrder: https://developer.android.com/reference/java/nio/ByteOrder.html!)` Converts a sample bit depth and byte order to a corresponding integer PCM encoding constant. |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getPcmFormat(androidx.media3.common.audio.AudioProcessor.AudioFormat)(audioFormat: https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat!)` Gets a PCM `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` based on the `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat`. |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getPcmFormat(int,int,int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding pcmEncoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, channels: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, sampleRate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Gets a PCM `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` with the specified parameters. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/org/checkerframework/dataflow/qual/Pure.html https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getPcmFrameSize(int,int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding pcmEncoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, channelCount: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the frame size for audio with `channelCount` channels in the specified encoding. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getPlayoutDurationForMediaDuration(long,float)(mediaDuration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, speed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Returns the playout duration of `mediaDuration` of media. |
| `java-static (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getRoleFlagStrings(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags roleFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a list of strings representing the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags` values present in ` roleFlags`. |
| `java-static (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getSelectionFlagStrings(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.SelectionFlags selectionFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a list of strings representing the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.SelectionFlags` values present in ` selectionFlags`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/C.StreamType [getStreamTypeForAudioUsage](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getStreamTypeForAudioUsage(int))(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.AudioUsage usage: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/common/AudioAttributes#getStreamType()` instead. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getStringForTime(long)(timeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Returns the specified millisecond time formatted as a string. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getStringForTime(java.lang.StringBuilder,java.util.Formatter,long)( builder: https://developer.android.com/reference/java/lang/StringBuilder.html!, formatter: https://developer.android.com/reference/java/util/Formatter.html!, timeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Returns the specified millisecond time formatted as a string. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getSystemLanguageCodes()()` Returns a non-empty array of normalized IETF BCP 47 language tags for the system languages ordered by preference. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getSystemProperty(java.lang.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns the value of the given system property, or `null` if the property cannot be read or is not set. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getTrackTypeString(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType trackType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a string representation of a `https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getUserAgent(android.content.Context,java.lang.String)(context: https://developer.android.com/reference/android/content/Context.html!, applicationName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns a user agent string based on the given application name and the library version. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getUtf8Bytes(java.lang.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns a new byte array containing the code points of a `https://developer.android.com/reference/java/lang/String.html` encoded using UTF-8. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/C.VideoCodecFlags https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getVideoCodecFlagForMime(java.lang.String)(mimeType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.VideoCodecFlags` corresponding to the provided MIME type. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#gzip(byte[])(input: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!)` Compresses `input` using gzip and returns the result in a newly allocated byte array. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#handlePauseButtonAction(androidx.media3.common.Player)(player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?)` Updates the player to handle an interaction with a pause button. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#handlePlayButtonAction(androidx.media3.common.Player)(player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?)` Updates the player to handle an interaction with a play button. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#handlePlayPauseButtonAction(androidx.media3.common.Player)(player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?)` Updates the player to handle an interaction with a play or pause button. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#handlePlayPauseButtonAction(androidx.media3.common.Player,boolean)(player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?, playIfSuppressed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Updates the player to handle an interaction with a play or pause button. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#ignoreFuture(java.util.concurrent.Future<T>)(unused: https://developer.android.com/reference/java/util/concurrent/Future.html<T!>!)` Ignores the future to avoid static code analysis tools to complain. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType [inferContentType](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentType(java.lang.String))(fileName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` **This function is deprecated.** Use `https://developer.android.com/reference/android/net/Uri.html#parse(java.lang.String)` and `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentType(android.net.Uri)` for full file paths or `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentTypeForExtension(java.lang.String)` for extensions. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentType(android.net.Uri)(uri: https://developer.android.com/reference/android/net/Uri.html!)` Makes a best guess to infer the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType` from a `https://developer.android.com/reference/android/net/Uri.html`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType [inferContentType](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentType(android.net.Uri,java.lang.String))(uri: https://developer.android.com/reference/android/net/Uri.html!, overrideExtension: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentTypeForExtension(java.lang.String)` when `overrideExtension` is non-empty, and `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentType(android.net.Uri)` otherwise. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentTypeForExtension(java.lang.String)(fileExtension: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Makes a best guess to infer the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType` from a file extension. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentTypeForUriAndMimeType(android.net.Uri,java.lang.String)(uri: https://developer.android.com/reference/android/net/Uri.html!, mimeType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Makes a best guess to infer the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType` from a `https://developer.android.com/reference/android/net/Uri.html` and optional MIME type. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inflate(androidx.media3.common.util.ParsableByteArray,androidx.media3.common.util.ParsableByteArray,java.util.zip.Inflater)( input: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!, output: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!, inflater: https://developer.android.com/reference/java/util/zip/Inflater.html? )` Uncompresses the data in `input`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#intToStringMaxRadix(int)(i: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a string representation of the integer using radix value `https://developer.android.com/reference/java/lang/Character.html#MAX_RADIX`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isAutomotive(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html!)` Returns whether the app is running on an automotive device. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isBitmapFactorySupportedMimeType(java.lang.String)(mimeType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns the image MIME types that can be decoded and loaded by `https://developer.android.com/reference/android/graphics/BitmapFactory.html` that Media3 aims to support. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isEncodingHighResolutionPcm(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns whether `encoding` is high resolution (\> 16-bit) PCM. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isEncodingLinearPcm(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.Encoding encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns whether `encoding` is one of the linear PCM encodings. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isFloatPcmEncoding(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns whether `encoding` is a floating-point PCM encoding. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isFrameDropAllowedOnSurfaceInput(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html!)` |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isLinebreak(int)(c: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns whether the given character is a carriage return ('\\r') or a line feed ('\\n'). |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isLocalFileUri(android.net.Uri)(uri: https://developer.android.com/reference/android/net/Uri.html!)` Returns true if the URI is a path to a local file or a reference to a local file. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isPcmEncodingBigEndian(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns whether `encoding` is a big-endian PCM encoding. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isRunningOnEmulator()()` Returns true if the code path is currently running on an emulator. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isSorted(long[])(values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!)` Returns whether `values` is sorted in ascending order. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isTv(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html!)` Returns whether the app is running on a TV device. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#isWear(android.content.Context)(context: https://developer.android.com/reference/android/content/Context.html!)` Returns whether the app is running on a Wear OS device. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#linearSearch(int[],int)(array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the index of the first occurrence of `value` in `array`, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if `value` is not contained in `array`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#linearSearch(long[],long)(array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Returns the index of the first occurrence of `value` in `array`, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if `value` is not contained in `array`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#loadAsset(android.content.Context,java.lang.String)(context: https://developer.android.com/reference/android/content/Context.html!, assetPath: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Loads a file from the assets folder. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#loadRawResource(android.content.Context,int)(context: https://developer.android.com/reference/android/content/Context.html!, resId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Loads a file from a raw resource. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#maxValue(android.util.SparseLongArray)(sparseLongArray: https://developer.android.com/reference/android/util/SparseLongArray.html!)` Returns the maximum value in the given `https://developer.android.com/reference/android/util/SparseLongArray.html`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#maybeInflate(androidx.media3.common.util.ParsableByteArray,androidx.media3.common.util.ParsableByteArray,java.util.zip.Inflater)( input: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!, output: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!, inflater: https://developer.android.com/reference/java/util/zip/Inflater.html? )` Uncompresses the data in `input` if it starts with the zlib marker `0x78`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `[maybeRequestReadExternalStoragePermission](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#maybeRequestReadExternalStoragePermission(android.app.Activity,androidx.media3.common.MediaItem...))( activity: https://developer.android.com/reference/android/app/Activity.html!, mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem!>! )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#maybeRequestReadStoragePermission(android.app.Activity,androidx.media3.common.MediaItem...)` instead. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `[maybeRequestReadExternalStoragePermission](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#maybeRequestReadExternalStoragePermission(android.app.Activity,android.net.Uri...))( activity: https://developer.android.com/reference/android/app/Activity.html!, uris: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/android/net/Uri.html!>! )` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#maybeRequestReadStoragePermission(android.app.Activity,androidx.media3.common.MediaItem...)` instead. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#maybeRequestReadStoragePermission(android.app.Activity,androidx.media3.common.MediaItem...)( activity: https://developer.android.com/reference/android/app/Activity.html!, mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem!>! )` Checks whether it's necessary to request storage reading permissions for the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`, requesting the permissions if necessary. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#minValue(android.util.SparseLongArray)(sparseLongArray: https://developer.android.com/reference/android/util/SparseLongArray.html!)` Returns the minimum value in the given `https://developer.android.com/reference/android/util/SparseLongArray.html`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#moveItems(java.util.List<T>,int,int,int)( items: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T!>!, fromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, toIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, newFromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Moves the elements starting at `fromIndex` to `newFromIndex`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#msToUs(long)(timeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Converts a time in milliseconds to the corresponding time in microseconds, preserving `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` values and `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_END_OF_SOURCE()` values. |
| `java-static https://developer.android.com/reference/java/util/concurrent/ExecutorService.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#newSingleThreadExecutor(java.lang.String)(threadName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Instantiates a new single threaded executor whose thread has the specified name. |
| `java-static https://developer.android.com/reference/java/util/concurrent/ScheduledExecutorService.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#newSingleThreadScheduledExecutor(java.lang.String)(threadName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Instantiates a new single threaded scheduled executor whose thread has the specified name. |
| `java-static @https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/PolyNull.html https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/PolyNull.html https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#normalizeLanguageCode(java.lang.String)(@https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/PolyNull.html language: @https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/PolyNull.html https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns a normalized IETF BCP 47 language tag for `language`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#nsToMs(long)(timeNs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Converts a time in nanoseconds to the corresponding time in milliseconds, preserving `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` and `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_END_OF_SOURCE()` values. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#nullSafeArrayAppend(T[],T)(original: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!, newElement: T!)` Creates a new array containing `original` with `newElement` appended. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#nullSafeArrayConcatenation(T[],T[])(first: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!, second: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!)` Creates a new array containing the concatenation of two non-null type arrays. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#nullSafeArrayCopy(T[],int)(input: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!, length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Copies and optionally truncates an array. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#nullSafeArrayCopyOfRange(T[],int,int)(input: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!, from: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, to: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Copies a subset of an array. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#nullSafeListToArray(java.util.List<T>,T[])(list: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T!>!, array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!)` Copies the contents of `list` into `array`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#parseXsDateTime(java.lang.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Parses an xs:dateTime attribute value, returning the parsed timestamp in milliseconds since the epoch. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#parseXsDuration(java.lang.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Parses an xs:duration attribute value, returning the parsed duration in milliseconds. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#percentFloat(long,long)(numerator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, denominator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Returns the floating point percentage of `numerator` divided by `denominator`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#percentInt(long,long)(numerator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, denominator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Returns the integer percentage of `numerator` divided by `denominator`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#postOrRun(android.os.Handler,java.lang.Runnable)(handler: https://developer.android.com/reference/android/os/Handler.html!, runnable: https://developer.android.com/reference/java/lang/Runnable.html!)` Posts the `https://developer.android.com/reference/java/lang/Runnable.html` if the calling thread differs with the `https://developer.android.com/reference/android/os/Looper.html` of the `https://developer.android.com/reference/android/os/Handler.html`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#postOrRun(androidx.media3.common.util.HandlerWrapper,java.lang.Runnable)(handler: https://developer.android.com/reference/kotlin/androidx/media3/common/util/HandlerWrapper!, runnable: https://developer.android.com/reference/java/lang/Runnable.html!)` Posts the `https://developer.android.com/reference/java/lang/Runnable.html` if the calling thread differs with the `https://developer.android.com/reference/android/os/Looper.html` of the `https://developer.android.com/reference/kotlin/androidx/media3/common/util/HandlerWrapper`. |
| `java-static https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<T!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#postOrRunWithCompletion(android.os.Handler,java.lang.Runnable,T)( handler: https://developer.android.com/reference/android/os/Handler.html!, runnable: https://developer.android.com/reference/java/lang/Runnable.html!, successValue: T! )` Posts the `https://developer.android.com/reference/java/lang/Runnable.html` if the calling thread differs with the `https://developer.android.com/reference/android/os/Looper.html` of the `https://developer.android.com/reference/android/os/Handler.html`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#putInt24(java.nio.ByteBuffer,int)(buffer: https://developer.android.com/reference/java/nio/ByteBuffer.html!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Writes a 24-bit integer value to a buffer at its current `https://developer.android.com/reference/java/nio/Buffer.html#position()`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#readBoolean(android.os.Parcel)(parcel: https://developer.android.com/reference/android/os/Parcel.html!)` Reads an integer from a `https://developer.android.com/reference/android/os/Parcel.html` and interprets it as a boolean, with 0 mapping to false and all other values mapping to true. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#recursiveDelete(java.io.File)(fileOrDirectory: https://developer.android.com/reference/java/io/File.html!)` Recursively deletes a directory and its content. |
| `java-static https://developer.android.com/reference/android/content/Intent.html?` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#registerReceiverNotExported(android.content.Context,android.content.BroadcastReceiver,android.content.IntentFilter)( context: https://developer.android.com/reference/android/content/Context.html!, receiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?, filter: https://developer.android.com/reference/android/content/IntentFilter.html! )` Registers a `https://developer.android.com/reference/android/content/BroadcastReceiver.html` that's not intended to receive broadcasts from other apps. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#removeRange(java.util.List<T>,int,int)(list: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T!>!, fromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, toIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Removes an indexed range from a List. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/org/checkerframework/dataflow/qual/Pure.html https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#sampleCountToDurationUs(long,int)(sampleCount: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, sampleRate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the total duration (in microseconds) of `sampleCount` samples of equal duration at `sampleRate`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeTimestamp(long,long,long)(timestamp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Scales a large timestamp. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeTimestamps(java.util.List<java.lang.Long>,long,long)( timestamps: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html!>!, multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Applies `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeTimestamp(long,long,long)` to a list of unscaled timestamps. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeTimestampsInPlace(long[],long,long)( timestamps: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!, multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Applies `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeTimestamp(long,long,long)` to an array of unscaled timestamps. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeValue(long,long,long,java.math.RoundingMode)( value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, roundingMode: https://developer.android.com/reference/java/math/RoundingMode.html! )` Scales a large value by a multiplier and a divisor. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeValues(java.util.List<java.lang.Long>,long,long,java.math.RoundingMode)( values: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html!>!, multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, roundingMode: https://developer.android.com/reference/java/math/RoundingMode.html! )` Applies `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeValue(long,long,long,java.math.RoundingMode)` to a list of unscaled values. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeValuesInPlace(long[],long,long,java.math.RoundingMode)( values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!, multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, roundingMode: https://developer.android.com/reference/java/math/RoundingMode.html! )` Applies `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeValue(long,long,long,java.math.RoundingMode)` to an array of unscaled values. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#setForegroundServiceNotification(android.app.Service,int,android.app.Notification,int,java.lang.String)( service: https://developer.android.com/reference/android/app/Service.html!, notificationId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, notification: https://developer.android.com/reference/android/app/Notification.html!, foregroundServiceType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, foregroundServiceManifestType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html! )` Sets the notification required for a foreground service. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/EnsuresNonNullIf.html(result = true, expression = "#1") @https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#shouldEnablePlayPauseButton(androidx.media3.common.Player)(player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?)` Returns whether a play-pause button should be enabled or not. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/EnsuresNonNullIf.html(result = false, expression = "#1") https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#shouldShowPlayButton(androidx.media3.common.Player)(player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?)` Returns whether a play button should be presented on a UI element for playback control. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/EnsuresNonNullIf.html(result = false, expression = "#1") https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#shouldShowPlayButton(androidx.media3.common.Player,boolean)(player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?, shouldShowPlayIfSuppressed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Returns whether a play button should be presented on a UI element for playback control. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#sneakyThrow(java.lang.Throwable)(t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` A hacky method that always throws `t` even if `t` is a checked exception, and is not declared to be thrown. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#split(java.lang.String,java.lang.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, regex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Splits a string using `value.split(regex, -1`). |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#splitAtFirst(java.lang.String,java.lang.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, regex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Splits the string at the first occurrence of the delimiter `regex`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#splitCodecs(java.lang.String)(codecs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Splits a codecs sequence string, as defined in RFC 6381, into individual codec strings. |
| `java-static https://developer.android.com/reference/android/content/ComponentName.html?` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#startForegroundService(android.content.Context,android.content.Intent)(context: https://developer.android.com/reference/android/content/Context.html!, intent: https://developer.android.com/reference/android/content/Intent.html!)` Calls `https://developer.android.com/reference/android/content/Context.html#startForegroundService(android.content.Intent)` if `https://developer.android.com/reference/android/os/Build.VERSION.html#SDK_INT` is 26 or higher, or `https://developer.android.com/reference/android/content/Context.html#startService(android.content.Intent)` otherwise. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/com/google/errorprone/annotations/InlineMe.html(replacement = "service.stopForeground(removeNotification ? STOP_FOREGROUND_REMOVE :" + " STOP_FOREGROUND_DETACH)", staticImports = [""android.app.Service.STOP_FOREGROUND_DETACH"", ""android.app.Service.STOP_FOREGROUND_REMOVE""]) [stopForeground](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#stopForeground(android.app.Service,boolean))(service: https://developer.android.com/reference/android/app/Service.html!, removeNotification: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` **This function is deprecated.** Use `https://developer.android.com/reference/android/app/Service.html#stopForeground(int)` instead. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#subtractWithOverflowDefault(long,long,long)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, overflowResult: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Returns the difference between two arguments, or a third argument if the result overflows. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#sum(long...)(summands: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!)` Returns the sum of all summands of the given array. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#tableExists(android.database.sqlite.SQLiteDatabase,java.lang.String)(database: https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html!, tableName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns whether the table exists in the database. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi [toByteArray](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#toByteArray(java.io.InputStream))(inputStream: https://developer.android.com/reference/java/io/InputStream.html!)` **This function is deprecated.** Use Guava's `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/io/ByteStreams.html#toByteArray(java.io.InputStream)` instead. <br /> |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#toByteArray(float)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Converts a float into an equivalent byte array. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#toByteArray(int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Converts a single integer into an equivalent 4-byte array in big-endian order. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#toByteArray(int...)(values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!)` Converts an array of integers into an equivalent byte array. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#toFourccString(int)(fourcc: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#toHexString(byte[])(bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!)` Returns a string containing a lower-case hex representation of the bytes provided. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#toHexString(byte[],int,int)(bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!, offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a string containing a lower-case hex representation of the bytes provided. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#toLong(int,int)(mostSignificantBits: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, leastSignificantBits: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the long that is composed of the bits of the 2 specified integers. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#toUnsignedInt(long)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Converts a long to an int, checking that the long value fits within the range of an unsigned 32-bit integer. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#toUnsignedLong(int)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Converts an integer to a long by unsigned conversion. |
| `java-static https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<T!>!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi <T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, U : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#transformFutureAsync(com.google.common.util.concurrent.ListenableFuture<U>,com.google.common.util.concurrent.AsyncFunction<U,T>)( future: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<U!>!, transformFunction: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html<U!, T!>! )` Asynchronously transforms the result of a `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#unescapeFileName(java.lang.String)(fileName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Unescapes an escaped file or directory name back to its original value. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#usToMs(long)(timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Converts a time in microseconds to the corresponding time in milliseconds, preserving `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` and `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_END_OF_SOURCE()` values. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#writeBoolean(android.os.Parcel,boolean)(parcel: https://developer.android.com/reference/android/os/Parcel.html!, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Writes a boolean to a `https://developer.android.com/reference/android/os/Parcel.html`. |

## Constants

### DEVICE

```
@UnstableApi
const val DEVICE: String!
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developer.android.com/reference/android/os/Build.html#DEVICE` instead.

### DEVICE_DEBUG_INFO

```
@UnstableApi
const val DEVICE_DEBUG_INFO: String!
```

A concise description of the device that it can be useful to log for debugging purposes.

### EMPTY_BYTE_ARRAY

```
@UnstableApi
const val EMPTY_BYTE_ARRAY: Array<Byte>!
```

An empty byte array.

### EMPTY_LONG_ARRAY

```
@UnstableApi
const val EMPTY_LONG_ARRAY: Array<Long>!
```

An empty long array.

### MANUFACTURER

```
@UnstableApi
const val MANUFACTURER: String!
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developer.android.com/reference/android/os/Build.html#MANUFACTURER` instead.

### MODEL

```
@UnstableApi
const val MODEL: String!
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developer.android.com/reference/android/os/Build.html#MODEL` instead.

### SDK_INT

```
@UnstableApi
const val SDK_INT: Int
```

> [!CAUTION]
> **This property is deprecated.**   
>
> Use `https://developer.android.com/reference/android/os/Build.VERSION.html#SDK_INT` instead.

## Public functions

### addWithOverflowDefault

```
@UnstableApi
java-static fun addWithOverflowDefault(x: Long, y: Long, overflowResult: Long): Long
```

Returns the sum of two arguments, or a third argument if the result overflows.

| Parameters |
|---|---|
| `x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The first value. |
| `y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The second value. |
| `overflowResult: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The return value if `x + y` overflows. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `x + y`, or `overflowResult` if the result overflows. |

### areEqual

```
@UnstableApi
@InlineMe(replacement = "Objects.equals(o1, o2)", imports = [""java.util.Objects""])
java-static fun [areEqual](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#areEqual(java.lang.Object,java.lang.Object))(o1: Any?, o2: Any?): Boolean
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/java/util/Objects.html#equals(java.lang.Object, java.lang.Object)` instead.

### binarySearchCeil

```
@UnstableApi
java-static fun binarySearchCeil(
    array: IntArray<Int>!,
    value: Int,
    inclusive: Boolean,
    stayInBounds: Boolean
): Int
```

Returns the index of the smallest element in `array` that is greater than (or optionally equal to) a specified `value`.

The search is performed using a binary search algorithm, so the array must be sorted. If the array contains multiple elements equal to `value` and `inclusive` is true, the index of the last one will be returned.

| Parameters |
|---|---|
| `array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!` | The array to search. |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The value being searched for. |
| `inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If the value is present in the array, whether to return the corresponding index. If false then the returned index corresponds to the smallest element strictly greater than the value. |
| `stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If true, then `(a.length - 1)` will be returned in the case that the value is greater than the largest element in the array. If false then `a.length` will be returned. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the smallest element in `array` that is greater than (or optionally equal to) `value`. |

### binarySearchCeil

```
@UnstableApi
java-static fun binarySearchCeil(
    array: LongArray<Long>!,
    value: Long,
    inclusive: Boolean,
    stayInBounds: Boolean
): Int
```

Returns the index of the smallest element in `array` that is greater than (or optionally equal to) a specified `value`.

The search is performed using a binary search algorithm, so the array must be sorted. If the array contains multiple elements equal to `value` and `inclusive` is true, the index of the last one will be returned.

| Parameters |
|---|---|
| `array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!` | The array to search. |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The value being searched for. |
| `inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If the value is present in the array, whether to return the corresponding index. If false then the returned index corresponds to the smallest element strictly greater than the value. |
| `stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If true, then `(a.length - 1)` will be returned in the case that the value is greater than the largest element in the array. If false then `a.length` will be returned. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the smallest element in `array` that is greater than (or optionally equal to) `value`. |

### binarySearchCeil

```
@UnstableApi
java-static fun <T : Comparable<T!>?> binarySearchCeil(
    list: (Mutable)List<Comparable<T!>!>!,
    value: T!,
    inclusive: Boolean,
    stayInBounds: Boolean
): Int
```

Returns the index of the smallest element in `list` that is greater than (or optionally equal to) a specified value.

The search is performed using a binary search algorithm, so the list must be sorted. If the list contains multiple elements equal to `value` and `inclusive` is true, the index of the last one will be returned.

| Parameters |
|---|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<T!>?>` | The type of values being searched. |
| `list: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<T!>!>!` | The list to search. |
| `value: T!` | The value being searched for. |
| `inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If the value is present in the list, whether to return the corresponding index. If false then the returned index corresponds to the smallest element strictly greater than the value. |
| `stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If true, then `(list.size() - 1)` will be returned in the case that the value is greater than the largest element in the list. If false then ` list.size()` will be returned. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the smallest element in `list` that is greater than (or optionally equal to) `value`. |

### binarySearchFloor

```
@UnstableApi
java-static fun binarySearchFloor(
    array: IntArray<Int>!,
    value: Int,
    inclusive: Boolean,
    stayInBounds: Boolean
): Int
```

Returns the index of the largest element in `array` that is less than (or optionally equal to) a specified `value`.

The search is performed using a binary search algorithm, so the array must be sorted. If the array contains multiple elements equal to `value` and `inclusive` is true, the index of the first one will be returned.

| Parameters |
|---|---|
| `array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!` | The array to search. |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The value being searched for. |
| `inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If the value is present in the array, whether to return the corresponding index. If false then the returned index corresponds to the largest element strictly less than the value. |
| `stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If true, then 0 will be returned in the case that the value is smaller than the smallest element in the array. If false then -1 will be returned. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the largest element in `array` that is less than (or optionally equal to) `value`. |

### binarySearchFloor

```
@UnstableApi
java-static fun binarySearchFloor(
    array: LongArray<Long>!,
    value: Long,
    inclusive: Boolean,
    stayInBounds: Boolean
): Int
```

Returns the index of the largest element in `array` that is less than (or optionally equal to) a specified `value`.

The search is performed using a binary search algorithm, so the array must be sorted. If the array contains multiple elements equal to `value` and `inclusive` is true, the index of the first one will be returned.

| Parameters |
|---|---|
| `array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!` | The array to search. |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The value being searched for. |
| `inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If the value is present in the array, whether to return the corresponding index. If false then the returned index corresponds to the largest element strictly less than the value. |
| `stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If true, then 0 will be returned in the case that the value is smaller than the smallest element in the array. If false then -1 will be returned. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the largest element in `array` that is less than (or optionally equal to) `value`. |

### binarySearchFloor

```
@UnstableApi
java-static fun <T : Comparable<T!>?> binarySearchFloor(
    list: (Mutable)List<Comparable<T!>!>!,
    value: T!,
    inclusive: Boolean,
    stayInBounds: Boolean
): Int
```

Returns the index of the largest element in `list` that is less than (or optionally equal to) a specified `value`.

The search is performed using a binary search algorithm, so the list must be sorted. If the list contains multiple elements equal to `value` and `inclusive` is true, the index of the first one will be returned.

| Parameters |
|---|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<T!>?>` | The type of values being searched. |
| `list: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-comparable/index.html<T!>!>!` | The list to search. |
| `value: T!` | The value being searched for. |
| `inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If the value is present in the list, whether to return the corresponding index. If false then the returned index corresponds to the largest element strictly less than the value. |
| `stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If true, then 0 will be returned in the case that the value is smaller than the smallest element in the list. If false then -1 will be returned. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the largest element in `list` that is less than (or optionally equal to) `value`. |

### binarySearchFloor

```
@UnstableApi
java-static fun binarySearchFloor(
    longArray: LongArray!,
    value: Long,
    inclusive: Boolean,
    stayInBounds: Boolean
): Int
```

Returns the index of the largest element in `longArray` that is less than (or optionally equal to) a specified `value`.

The search is performed using a binary search algorithm, so the array must be sorted. If the array contains multiple elements equal to `value` and `inclusive` is true, the index of the first one will be returned.

| Parameters |
|---|---|
| `longArray: https://developer.android.com/reference/kotlin/androidx/media3/common/util/LongArray!` | The array to search. |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The value being searched for. |
| `inclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If the value is present in the array, whether to return the corresponding index. If false then the returned index corresponds to the largest element strictly less than the value. |
| `stayInBounds: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | If true, then 0 will be returned in the case that the value is smaller than the smallest element in the array. If false then -1 will be returned. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the largest element in `array` that is less than (or optionally equal to) `value`. |

### castNonNull

```
@UnstableApi
@EnsuresNonNull(value = "#1")
java-static fun <T> castNonNull(value: T?): T!
```

Casts a nullable variable to a non-null variable without runtime null check.

Use `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/base/Preconditions.html#checkNotNull(T)` to throw if the value is null.

### castNonNullTypeArray

```
@UnstableApi
@EnsuresNonNull(value = "#1")
java-static fun <T> castNonNullTypeArray(@NullableType value: Array<@NullableType T!>!): Array<T!>!
```

Casts a nullable type array to a non-null type array without runtime null check.

### ceilDivide

```
@UnstableApi
java-static fun ceilDivide(numerator: Int, denominator: Int): Int
```

Divides a `numerator` by a `denominator`, returning the ceiled result.

| Parameters |
|---|---|
| `numerator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The numerator to divide. |
| `denominator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The denominator to divide by. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The ceiled result of the division. |

### ceilDivide

```
@UnstableApi
java-static fun ceilDivide(numerator: Long, denominator: Long): Long
```

Divides a `numerator` by a `denominator`, returning the ceiled result.

| Parameters |
|---|---|
| `numerator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The numerator to divide. |
| `denominator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The denominator to divide by. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The ceiled result of the division. |

### checkCleartextTrafficPermitted

```
java-static fun checkCleartextTrafficPermitted(mediaItems: Array<MediaItem!>!): Boolean
```

Returns whether it may be possible to load the URIs of the given media items based on the network security policy's cleartext traffic permissions.

| Parameters |
|---|---|
| `mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem!>!` | A list of `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether it may be possible to load the URIs of the given media items. |

### closeQuietly

```
@UnstableApi
java-static fun closeQuietly(closeable: Closeable?): Unit
```

Closes a `https://developer.android.com/reference/java/io/Closeable.html`, suppressing any `https://developer.android.com/reference/java/io/IOException.html` that may occur. Both `https://developer.android.com/reference/java/io/OutputStream.html` and `https://developer.android.com/reference/java/io/InputStream.html` are `Closeable`.

| Parameters |
|---|---|
| `closeable: https://developer.android.com/reference/java/io/Closeable.html?` | The `https://developer.android.com/reference/java/io/Closeable.html` to close. |

### compareLong

```
@UnstableApi
@InlineMe(replacement = "Long.compare(left, right)")
java-static fun [compareLong](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#compareLong(long,long))(left: Long, right: Long): Int
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/java/lang/Long.html#compare(long, long)`.

### constrainValue

```
@UnstableApi
java-static fun constrainValue(value: Double, min: Double, max: Double): Double
```

Constrains a value to the specified bounds.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | The value to constrain. |
| `min: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | The lower bound. |
| `max: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | The upper bound. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | The constrained value `Math.max(min, Math.min(value, max))`. |

### constrainValue

```
@UnstableApi
java-static fun constrainValue(value: Float, min: Float, max: Float): Float
```

Constrains a value to the specified bounds.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The value to constrain. |
| `min: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The lower bound. |
| `max: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The upper bound. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The constrained value `Math.max(min, Math.min(value, max))`. |

### constrainValue

```
@UnstableApi
java-static fun constrainValue(value: Int, min: Int, max: Int): Int
```

Constrains a value to the specified bounds.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The value to constrain. |
| `min: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The lower bound. |
| `max: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The upper bound. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The constrained value `Math.max(min, Math.min(value, max))`. |

### constrainValue

```
@UnstableApi
java-static fun constrainValue(value: Long, min: Long, max: Long): Long
```

Constrains a value to the specified bounds.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The value to constrain. |
| `min: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The lower bound. |
| `max: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The upper bound. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The constrained value `Math.max(min, Math.min(value, max))`. |

### contains

```
@UnstableApi
java-static fun contains(@NullableType items: Array<Any!>!, item: Any?): Boolean
```

Tests whether an `items` array contains an object equal to `item`, according to `https://developer.android.com/reference/java/lang/Object.html#equals(java.lang.Object)`.

If `item` is null then true is returned if and only if `items` contains null.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/NullableType items: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>!` | The array of items to search. |
| `item: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | The item to search for. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if the array contains an object equal to the item being searched for. |

### contains

```
@UnstableApi
java-static fun <T> contains(sparseArray: SparseArray<T!>!, key: Int): Boolean
```

Tests whether a `https://developer.android.com/reference/android/util/SparseArray.html` contains a given `key`.

This implements `SparseArray#contains` for lower API versions.

### contains

```
@UnstableApi
java-static fun contains(sparseArray: SparseBooleanArray!, key: Int): Boolean
```

Returns whether the given `https://developer.android.com/reference/android/util/SparseBooleanArray.html` contains the given key.

| Parameters |
|---|---|
| `sparseArray: https://developer.android.com/reference/android/util/SparseBooleanArray.html!` | The `https://developer.android.com/reference/android/util/SparseBooleanArray.html`. |
| `key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The key. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the `https://developer.android.com/reference/android/util/SparseBooleanArray.html` contains the key. |

### contains

```
@UnstableApi
java-static fun contains(sparseArray: SparseIntArray!, key: Int): Boolean
```

Returns whether the given `https://developer.android.com/reference/android/util/SparseIntArray.html` contains the given key.

| Parameters |
|---|---|
| `sparseArray: https://developer.android.com/reference/android/util/SparseIntArray.html!` | The `https://developer.android.com/reference/android/util/SparseIntArray.html`. |
| `key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The key. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the `https://developer.android.com/reference/android/util/SparseIntArray.html` contains the key. |

### contentEquals

```
@UnstableApi
java-static fun <T> contentEquals(
    sparseArray1: SparseArray<T!>?,
    sparseArray2: SparseArray<T!>?
): Boolean
```

Tests two `https://developer.android.com/reference/android/util/SparseArray.html` instances for content equality, handling the case where one or both may be `null`.

| Parameters |
|---|---|
| `sparseArray1: https://developer.android.com/reference/android/util/SparseArray.html<T!>?` | The first `https://developer.android.com/reference/android/util/SparseArray.html` instance. |
| `sparseArray2: https://developer.android.com/reference/android/util/SparseArray.html<T!>?` | The second `https://developer.android.com/reference/android/util/SparseArray.html` instance. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if the two `https://developer.android.com/reference/android/util/SparseArray.html` instances are equal in contents. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/util/SparseArray.html#contentEquals(android.util.SparseArray&lt;?&gt;)` |   |

### contentHashCode

```
@UnstableApi
java-static fun <T> contentHashCode(sparseArray: SparseArray<T!>!): Int
```

Returns a hash code value for the contents of this `https://developer.android.com/reference/android/util/SparseArray.html`, combining the `https://developer.android.com/reference/java/util/Objects.html#hashCode(java.lang.Object)` result of all its keys and values.

| Parameters |
|---|---|
| `sparseArray: https://developer.android.com/reference/android/util/SparseArray.html<T!>!` | The `https://developer.android.com/reference/android/util/SparseArray.html` instance. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The hash code. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/util/SparseArray.html#contentHashCode()` |   |

### convertToNullIfInvalid

```
@CheckReturnValue
@UnstableApi
java-static fun convertToNullIfInvalid(bundle: Bundle?): Bundle?
```

Converts the provided `https://developer.android.com/reference/android/os/Bundle.html` to `null` if it is invalid.

Typical reasons for why the validation may fail are `https://developer.android.com/reference/android/os/Parcelable.html` classes in this bundle that are not part of the app class loader or a corrupt internal state caused by concurrent writes.

| Parameters |
|---|---|
| `bundle: https://developer.android.com/reference/android/os/Bundle.html?` | The `https://developer.android.com/reference/android/os/Bundle.html` to verify, or null. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/os/Bundle.html?` | The same `https://developer.android.com/reference/android/os/Bundle.html`, or null if the verification failed or the parameter is null. |

### crc16

```
@UnstableApi
java-static fun crc16(bytes: ByteArray<Byte>!, start: Int, end: Int, initialValue: Int): Int
```

Returns the result of updating a CRC-16 with the specified bytes in a "most significant bit first" order.

| Parameters |
|---|---|
| `bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | Array containing the bytes to update the crc value with. |
| `start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The start index (inclusive) of the byte range to update the crc with. |
| `end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The end index (exclusive) of the byte range to update the crc with. |
| `initialValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The initial value for the crc calculation. The lower 16 bits of this 32-bit integer are used for the CRC computation. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The result of updating the initial value with the specified bytes. |

### crc32

```
@UnstableApi
java-static fun crc32(bytes: ByteArray<Byte>!, start: Int, end: Int, initialValue: Int): Int
```

Returns the result of updating a CRC-32 with the specified bytes in a "most significant bit first" order.

| Parameters |
|---|---|
| `bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | Array containing the bytes to update the crc value with. |
| `start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index to the first byte in the byte range to update the crc with. |
| `end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index after the last byte in the byte range to update the crc with. |
| `initialValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The initial value for the crc calculation. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The result of updating the initial value with the specified bytes. |

### crc8

```
@UnstableApi
java-static fun crc8(bytes: ByteArray<Byte>!, start: Int, end: Int, initialValue: Int): Int
```

Returns the result of updating a CRC-8 with the specified bytes in a "most significant bit first" order.

| Parameters |
|---|---|
| `bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | Array containing the bytes to update the crc value with. |
| `start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index to the first byte in the byte range to update the crc with. |
| `end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index after the last byte in the byte range to update the crc with. |
| `initialValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The initial value for the crc calculation. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The result of updating the initial value with the specified bytes. |

### createHandler

```
@UnstableApi
java-static fun createHandler(
    looper: Looper!,
    callback: @UnknownInitialization Handler.Callback?
): Handler!
```

Creates a `https://developer.android.com/reference/android/os/Handler.html` with the specified `https://developer.android.com/reference/android/os/Handler.Callback.html` on the specified `https://developer.android.com/reference/android/os/Looper.html` thread.

The method accepts partially initialized objects as callback under the assumption that the Handler won't be used to send messages until the callback is fully initialized.

| Parameters |
|---|---|
| `looper: https://developer.android.com/reference/android/os/Looper.html!` | A `https://developer.android.com/reference/android/os/Looper.html` to run the callback on. |
| `callback: @https://checkerframework.org/api/org/checkerframework/checker/initialization/qual/UnknownInitialization.html https://developer.android.com/reference/android/os/Handler.Callback.html?` | A `https://developer.android.com/reference/android/os/Handler.Callback.html`. May be a partially initialized class, or null if no callback is required. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/os/Handler.html!` | A `https://developer.android.com/reference/android/os/Handler.html` with the specified callback on the current `https://developer.android.com/reference/android/os/Looper.html` thread. |

### createHandlerForCurrentLooper

```
@UnstableApi
java-static fun createHandlerForCurrentLooper(): Handler!
```

Creates a `https://developer.android.com/reference/android/os/Handler.html` on the current `https://developer.android.com/reference/android/os/Looper.html` thread.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | If the current thread doesn't have a `https://developer.android.com/reference/android/os/Looper.html`. |

### createHandlerForCurrentLooper

```
@UnstableApi
java-static fun createHandlerForCurrentLooper(
    callback: @UnknownInitialization Handler.Callback?
): Handler!
```

Creates a `https://developer.android.com/reference/android/os/Handler.html` with the specified `https://developer.android.com/reference/android/os/Handler.Callback.html` on the current `https://developer.android.com/reference/android/os/Looper.html` thread.

The method accepts partially initialized objects as callback under the assumption that the Handler won't be used to send messages until the callback is fully initialized.

| Parameters |
|---|---|
| `callback: @https://checkerframework.org/api/org/checkerframework/checker/initialization/qual/UnknownInitialization.html https://developer.android.com/reference/android/os/Handler.Callback.html?` | A `https://developer.android.com/reference/android/os/Handler.Callback.html`. May be a partially initialized class, or null if no callback is required. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/os/Handler.html!` | A `https://developer.android.com/reference/android/os/Handler.html` with the specified callback on the current `https://developer.android.com/reference/android/os/Looper.html` thread. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | If the current thread doesn't have a `https://developer.android.com/reference/android/os/Looper.html`. |

### createHandlerForCurrentOrMainLooper

```
@UnstableApi
java-static fun createHandlerForCurrentOrMainLooper(): Handler!
```

Creates a `https://developer.android.com/reference/android/os/Handler.html` on the current `https://developer.android.com/reference/android/os/Looper.html` thread.

If the current thread doesn't have a `https://developer.android.com/reference/android/os/Looper.html`, the application's main thread `https://developer.android.com/reference/android/os/Looper.html` is used.

### createHandlerForCurrentOrMainLooper

```
@UnstableApi
java-static fun createHandlerForCurrentOrMainLooper(
    callback: @UnknownInitialization Handler.Callback?
): Handler!
```

Creates a `https://developer.android.com/reference/android/os/Handler.html` with the specified `https://developer.android.com/reference/android/os/Handler.Callback.html` on the current `https://developer.android.com/reference/android/os/Looper.html` thread.

The method accepts partially initialized objects as callback under the assumption that the Handler won't be used to send messages until the callback is fully initialized.

If the current thread doesn't have a `https://developer.android.com/reference/android/os/Looper.html`, the application's main thread `https://developer.android.com/reference/android/os/Looper.html` is used.

| Parameters |
|---|---|
| `callback: @https://checkerframework.org/api/org/checkerframework/checker/initialization/qual/UnknownInitialization.html https://developer.android.com/reference/android/os/Handler.Callback.html?` | A `https://developer.android.com/reference/android/os/Handler.Callback.html`. May be a partially initialized class, or null if no callback is required. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/os/Handler.html!` | A `https://developer.android.com/reference/android/os/Handler.html` with the specified callback on the current `https://developer.android.com/reference/android/os/Looper.html` thread. |

### createReadOnlyByteBuffer

```
@UnstableApi
java-static fun createReadOnlyByteBuffer(byteBuffer: ByteBuffer!): ByteBuffer!
```

Returns a read-only view of the given `https://developer.android.com/reference/java/nio/ByteBuffer.html`.

This behaves the same as `https://developer.android.com/reference/java/nio/ByteBuffer.html#asReadOnlyBuffer()` whilst preserving the `https://developer.android.com/reference/java/nio/ByteOrder.html` of the original buffer.

### createTempDirectory

```
@UnstableApi
java-static fun createTempDirectory(context: Context!, prefix: String!): File!
```

Creates an empty directory in the directory returned by `https://developer.android.com/reference/android/content/Context.html#getCacheDir()`.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` |   |

### createTempFile

```
@UnstableApi
java-static fun createTempFile(context: Context!, prefix: String!): File!
```

Creates a new empty file in the directory returned by `https://developer.android.com/reference/android/content/Context.html#getCacheDir()`.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` |   |

### durationUsToSampleCount

```
@UnstableApi
java-static fun durationUsToSampleCount(durationUs: Long, sampleRate: Int): Long
```

Returns the number of samples required to represent `durationUs` of media at `
sampleRate`, assuming all samples are equal duration except the last one which may be shorter.

The result of this method **cannot** be generally reversed to the original duration with `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#sampleCountToDurationUs(long,int)`, due to information lost when rounding to a whole number of samples.

| Parameters |
|---|---|
| `durationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration in microseconds. |
| `sampleRate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The sample rate in samples per second. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The number of samples required to represent `durationUs`. |

### ensureNotificationChannel

```
@UnstableApi
java-static fun ensureNotificationChannel(
    notificationManager: NotificationManager!,
    channelId: String!,
    channelName: String!
): Unit
```

Ensure that the `https://developer.android.com/reference/android/app/NotificationChannel.html` with the given channel ID exists. If not existing, the channel is created.

| Parameters |
|---|---|
| `notificationManager: https://developer.android.com/reference/android/app/NotificationManager.html!` | The `https://developer.android.com/reference/android/app/NotificationManager.html` to create the channel with. |
| `channelId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The channel ID. |
| `channelName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The channel name. |

### escapeFileName

```
@UnstableApi
java-static fun escapeFileName(fileName: String!): String!
```

Escapes a string so that it's safe for use as a file or directory name on at least FAT32 filesystems. FAT32 is the most restrictive of all filesystems still commonly used today.

For simplicity, this only handles common characters known to be illegal on FAT32: \<, \>, :, ", /, \\, \|, ?, and \*. % is also escaped since it is used as the escape character. Escaping is performed in a consistent way so that no collisions occur and `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#unescapeFileName(java.lang.String)` can be used to retrieve the original file name.

| Parameters |
|---|---|
| `fileName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | File name to be escaped. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | An escaped file name which will be safe for use on at least FAT32 filesystems. |

### fixSmoothStreamingIsmManifestUri

```
@UnstableApi
java-static fun fixSmoothStreamingIsmManifestUri(uri: Uri!): Uri!
```

If the provided URI is an ISM Presentation URI, returns the URI with "Manifest" appended to its path (i.e., the corresponding default manifest URI). Else returns the provided URI without modification. See \[MS-SSTR\] v20180912, section 2.2.1.

| Parameters |
|---|---|
| `uri: https://developer.android.com/reference/android/net/Uri.html!` | The original URI. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/net/Uri.html!` | The fixed URI. |

### formatInvariant

```
@UnstableApi
java-static fun formatInvariant(format: String!, args: Array<Any!>!): String!
```

Formats a string using `https://developer.android.com/reference/java/util/Locale.html#US`.

| See also |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html#format(java.lang.String, java.lang.Object...)` |   |

### fromUtf8Bytes

```
@UnstableApi
java-static fun fromUtf8Bytes(bytes: ByteArray<Byte>!): String!
```

Returns a new `https://developer.android.com/reference/java/lang/String.html` constructed by decoding UTF-8 encoded bytes.

| Parameters |
|---|---|
| `bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | The UTF-8 encoded bytes to decode. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The string. |

### fromUtf8Bytes

```
@UnstableApi
java-static fun fromUtf8Bytes(bytes: ByteArray<Byte>!, offset: Int, length: Int): String!
```

Returns a new `https://developer.android.com/reference/java/lang/String.html` constructed by decoding UTF-8 encoded bytes in a subarray.

| Parameters |
|---|---|
| `bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | The UTF-8 encoded bytes to decode. |
| `offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the first byte to decode. |
| `length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of bytes to decode. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The string. |

### generateAudioSessionId

```
@UnstableApi
java-static fun generateAudioSessionId(context: Context!): Int
```

Returns a newly generated audio session identifier, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#AUDIO_SESSION_ID_UNSET()` if failed to generate an identifier and in which case audio playback may fail.

| See also |
|---|---|
| `https://developer.android.com/reference/android/media/AudioManager.html#generateAudioSessionId()` |   |

### generateAudioSessionIdV21

```
@UnstableApi
@InlineMe(replacement = "Util.generateAudioSessionId(context)", imports = "androidx.media3.common.util.Util")
java-static fun [generateAudioSessionIdV21](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#generateAudioSessionIdV21(android.content.Context))(context: Context!): Int
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#generateAudioSessionId(android.content.Context)` instead.

### getAdaptiveMimeTypeForContentType

```
java-static fun getAdaptiveMimeTypeForContentType(@C.ContentType contentType: Int): String?
```

Returns the MIME type corresponding to the given adaptive `https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType`, or `null` if the content type is not adaptive.

### getApiLevelThatAudioFormatIntroducedAudioEncoding

```
@UnstableApi
java-static fun getApiLevelThatAudioFormatIntroducedAudioEncoding(encoding: Int): Int
```

Retrieves the API Level that `https://developer.android.com/reference/android/media/AudioFormat.html` introduced an encoding.

Method returns `https://developer.android.com/reference/java/lang/Integer.html#MAX_VALUE` if the encoding is unknown.

| Parameters |
|---|---|
| `encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | for which to get the API level. |

### getAudioContentTypeForStreamType

```
@UnstableApi
@C.AudioContentType
java-static fun [getAudioContentTypeForStreamType](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getAudioContentTypeForStreamType(int))(@C.StreamType streamType: Int): Int
```

> [!CAUTION]
> **This function is deprecated.**   
>
> This method is no longer used by the media3 library, it does not work well and should be avoided. There is no direct replacement.

### getAudioFormat

```
@UnstableApi
java-static fun getAudioFormat(sampleRate: Int, channelConfig: Int, encoding: Int): AudioFormat!
```

Creates `https://developer.android.com/reference/android/media/AudioFormat.html` with given sampleRate, channelConfig, and encoding.

### getAudioTrackChannelConfig

```
@UnstableApi
java-static fun getAudioTrackChannelConfig(channelCount: Int): Int
```

Returns the audio track channel configuration for the given channel count, or `https://developer.android.com/reference/android/media/AudioFormat.html#CHANNEL_INVALID` if output is not possible.

| Parameters |
|---|---|
| `channelCount: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of channels in the input audio. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The channel configuration or `https://developer.android.com/reference/android/media/AudioFormat.html#CHANNEL_INVALID` if output is not possible. |

### getAudioTrackChannelConfig

```
@UnstableApi
java-static fun getAudioTrackChannelConfig(format: Format!): Int
```

Returns the audio track channel configuration for the given `https://developer.android.com/reference/kotlin/androidx/media3/common/Format`, or `https://developer.android.com/reference/android/media/AudioFormat.html#CHANNEL_INVALID` if output is not possible.

| Parameters |
|---|---|
| `format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` of the input audio. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The channel configuration or `https://developer.android.com/reference/android/media/AudioFormat.html#CHANNEL_INVALID` if output is not possible. |

### getAudioUsageForStreamType

```
@UnstableApi
@C.AudioUsage
java-static fun getAudioUsageForStreamType(@C.StreamType streamType: Int): Int
```

Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.AudioUsage` corresponding to the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/C.StreamType`.

### getAuxiliaryTrackTypeString

```
@UnstableApi
java-static fun getAuxiliaryTrackTypeString(
    @C.AuxiliaryTrackType auxiliaryTrackType: Int
): String!
```

Returns a string representation of the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.AuxiliaryTrackType`.

### getAvailableCommands

```
@UnstableApi
java-static fun getAvailableCommands(
    player: Player!,
    permanentAvailableCommands: Player.Commands!
): Player.Commands!
```

Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands` available in the `https://developer.android.com/reference/kotlin/androidx/media3/common/Player`.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player`. |
| `permanentAvailableCommands: https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands!` | The commands permanently available in the player. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands!` | The available `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands`. |

### getBigEndianInt

```
@UnstableApi
java-static fun getBigEndianInt(buffer: ByteBuffer!, index: Int): Int
```

Absolute *get* method for reading an int value in `https://developer.android.com/reference/java/nio/ByteOrder.html#BIG_ENDIAN` in a `https://developer.android.com/reference/java/nio/ByteBuffer.html`. Same as `https://developer.android.com/reference/java/nio/ByteBuffer.html#getInt(int)` except the buffer's order as returned by `https://developer.android.com/reference/java/nio/ByteBuffer.html#order()` is ignored and `https://developer.android.com/reference/java/nio/ByteOrder.html#BIG_ENDIAN` is used instead.

| Parameters |
|---|---|
| `buffer: https://developer.android.com/reference/java/nio/ByteBuffer.html!` | The buffer from which to read an int in big endian. |
| `index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index from which the bytes will be read. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The int value at the given index with the buffer bytes ordered most significant to least significant. |

### getBufferFlagsFromMediaCodecFlags

```
@UnstableApi
@C.BufferFlags
java-static fun getBufferFlagsFromMediaCodecFlags(mediaCodecFlags: Int): Int
```

Returns `https://developer.android.com/reference/kotlin/androidx/media3/common/C.BufferFlags` corresponding to `https://developer.android.com/reference/android/media/MediaCodec.html` flags.

### getByteDepth

```
@UnstableApi
java-static fun getByteDepth(@C.PcmEncoding pcmEncoding: Int): Int
```

Returns the byte depth for audio with the specified encoding.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding pcmEncoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The encoding of the audio data. Value is one of the following: - `Format.NO_VALUE` <br /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The byte depth of the audio. |

### getBytesFromHexString

```
@UnstableApi
java-static fun getBytesFromHexString(hexString: String!): Array<Byte>!
```

Returns a byte array containing values parsed from the hex string provided.

| Parameters |
|---|---|
| `hexString: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The hex string to convert to bytes. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | A byte array containing values parsed from the hex string provided. |

### getCodecCountOfType

```
@UnstableApi
java-static fun getCodecCountOfType(codecs: String?, @C.TrackType trackType: Int): Int
```

Returns the number of codec strings in `codecs` whose type matches `trackType`.

### getCodecsOfType

```
@UnstableApi
java-static fun getCodecsOfType(codecs: String?, @C.TrackType trackType: Int): String?
```

Returns a copy of `codecs` without the codecs whose track type doesn't match `
trackType`.

| Parameters |
|---|---|
| `codecs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | A codec sequence string, as defined in RFC 6381. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType trackType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType`. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | A copy of `codecs` without the codecs whose track type doesn't match ` trackType`. If this ends up empty, or `codecs` is null, returns null. |

### getCodecsWithoutType

```
@UnstableApi
java-static fun getCodecsWithoutType(codecs: String?, @C.TrackType trackType: Int): String?
```

Returns a copy of `codecs` without the codecs whose track type matches `trackType`.

| Parameters |
|---|---|
| `codecs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | A codec sequence string, as defined in RFC 6381. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType trackType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType`. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | A copy of `codecs` without the codecs whose track type matches `trackType`. If this ends up empty, or `codecs` is null, returns null. |

### getColorInfoForDolbyVision

```
@UnstableApi
java-static fun getColorInfoForDolbyVision(
    codecs: String?,
    supplementalCodecs: String?,
    supplementalProfiles: String?
): ColorInfo?
```

Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/ColorInfo` for specific Dolby Vision codecs and profiles.

This method only supports providing `https://developer.android.com/reference/kotlin/androidx/media3/common/ColorInfo` for the following Dolby Vision codecs and profiles:

- Dolby Vision profiles 5, 10.0, and 20.0
- Dolby Vision profiles 8.1 and 8.4 when providing supplemental profile values

| Parameters |
|---|---|
| `codecs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | A codec sequence string, as defined in RFC 6381. |
| `supplementalCodecs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | An optional RFC 6381 codecs string for supplemental codecs. |
| `supplementalProfiles: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | Optional supplemental profile info. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/ColorInfo?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/ColorInfo` for specific Dolby Vision codecs and profiles and otherwise null. |

### getCountryCode

```
@UnstableApi
java-static fun getCountryCode(context: Context?): String!
```

Returns the upper-case ISO 3166-1 alpha-2 country code of the current registered operator's MCC (Mobile Country Code), or the country code of the default Locale if not available.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html?` | A context to access the telephony service. If null, only the Locale can be used. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The upper-case ISO 3166-1 alpha-2 country code, or an empty String if unavailable. |

### getCurrentDisplayModeSize

```
@UnstableApi
java-static fun getCurrentDisplayModeSize(context: Context!): Point!
```

Gets the size of the current mode of the default display, in pixels.

Note that due to application UI scaling, the number of pixels made available to applications (as reported by `https://developer.android.com/reference/android/view/Display.html#getSize(android.graphics.Point)` may differ from the mode's actual resolution (as reported by this function). For example, applications running on a display configured with a 4K mode may have their UI laid out and rendered in 1080p and then scaled up. Applications can take advantage of the full mode resolution through a `https://developer.android.com/reference/android/view/SurfaceView.html` using full size buffers.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html!` | Any context. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/graphics/Point.html!` | The size of the current mode, in pixels. |

### getCurrentDisplayModeSize

```
@UnstableApi
java-static fun getCurrentDisplayModeSize(context: Context!, display: Display!): Point!
```

Gets the size of the current mode of the specified display, in pixels.

Note that due to application UI scaling, the number of pixels made available to applications (as reported by `https://developer.android.com/reference/android/view/Display.html#getSize(android.graphics.Point)` may differ from the mode's actual resolution (as reported by this function). For example, applications running on a display configured with a 4K mode may have their UI laid out and rendered in 1080p and then scaled up. Applications can take advantage of the full mode resolution through a `https://developer.android.com/reference/android/view/SurfaceView.html` using full size buffers.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html!` | Any context. |
| `display: https://developer.android.com/reference/android/view/Display.html!` | The display whose size is to be returned. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/graphics/Point.html!` | The size of the current mode, in pixels. |

### getCurrentOrMainLooper

```
@UnstableApi
java-static fun getCurrentOrMainLooper(): Looper!
```

Returns the `https://developer.android.com/reference/android/os/Looper.html` associated with the current thread, or the `https://developer.android.com/reference/android/os/Looper.html` of the application's main thread if the current thread doesn't have a `https://developer.android.com/reference/android/os/Looper.html`.

### getDataUriForString

```
@UnstableApi
java-static fun getDataUriForString(mimeType: String!, data: String!): Uri!
```

Returns a data URI with the specified MIME type and data.

### getDefaultDisplayLocale

```
@UnstableApi
@InlineMe(replacement = "Locale.getDefault(Locale.Category.DISPLAY)", imports = [""java.util.Locale""])
java-static fun [getDefaultDisplayLocale](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getDefaultDisplayLocale())(): Locale!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/java/util/Locale.html#getDefault(java.util.Locale.Category)` with `https://developer.android.com/reference/java/util/Locale.Category.html#DISPLAY` instead.

### getDrawable

```
@UnstableApi
java-static fun getDrawable(
    context: Context!,
    resources: Resources!,
    drawableRes: @DrawableRes Int
): Drawable!
```

Returns a `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` for the given resource or throws a `https://developer.android.com/reference/android/content/res/Resources.NotFoundException.html` if not found.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html!` | The context to get the theme from. |
| `resources: https://developer.android.com/reference/android/content/res/Resources.html!` | The resources to load the drawable from. |
| `drawableRes: @https://developer.android.com/reference/kotlin/androidx/annotation/DrawableRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The drawable resource int. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` | The loaded `https://developer.android.com/reference/android/graphics/drawable/Drawable.html`. |

### getDrmUuid

```
java-static fun getDrmUuid(drmScheme: String!): UUID?
```

Derives a DRM `https://developer.android.com/reference/java/util/UUID.html` from `drmScheme`.

| Parameters |
|---|---|
| `drmScheme: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | A UUID string, or `"widevine"`, `"playready"` or ` "clearkey"`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/java/util/UUID.html?` | The derived `https://developer.android.com/reference/java/util/UUID.html`, or `null` if one could not be derived. |

### getEncodingString

```
@UnstableApi
java-static fun getEncodingString(@C.Encoding encoding: Int): String!
```

Returns a user-readable string representation of the given `https://developer.android.com/reference/kotlin/androidx/media3/common/C.Encoding`.

This method is intended for testing and debugging purposes only. The returned string format is not guaranteed to be stable.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.Encoding encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/C.Encoding` value. Value is one of the following: - `Format.NO_VALUE` <br /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | A string representation of the encoding. |

### getErrorCodeForMediaDrmErrorCode

```
@UnstableApi
@PlaybackException.ErrorCode
java-static fun getErrorCodeForMediaDrmErrorCode(mediaDrmErrorCode: Int): Int
```

Returns a `https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackException.ErrorCode` value that corresponds to the provided `https://developer.android.com/reference/android/media/MediaDrm.ErrorCodes.html` value. Returns `https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackException#ERROR_CODE_DRM_SYSTEM_ERROR()` if the provided error code isn't recognised.

### getErrorCodeFromPlatformDiagnosticsInfo

```
@UnstableApi
java-static fun getErrorCodeFromPlatformDiagnosticsInfo(diagnosticsInfo: String?): Int
```

Attempts to parse an error code from a diagnostic string found in framework media exceptions.

For example: android.media.MediaCodec.error_1 or android.media.MediaDrm.error_neg_2.

| Parameters |
|---|---|
| `diagnosticsInfo: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | A string from which to parse the error code. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The parsed error code, or 0 if an error code could not be parsed. |

### getFloatPcmEncoding

```
@UnstableApi
@C.PcmEncoding
java-static fun getFloatPcmEncoding(bitDepth: Int): Int
```

Converts a sample bit depth to a corresponding little-endian float PCM encoding constant.

Value is one of the following:

- `Format.NO_VALUE`

<br />

| Parameters |
|---|---|
| `bitDepth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The bit depth. Supported values are 32 and 64. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The corresponding float PCM encoding. If the bit depth is unsupported then `https://developer.android.com/reference/kotlin/androidx/media3/common/C#ENCODING_INVALID()` is returned. |

### getFloatPcmEncoding

```
@UnstableApi
@C.PcmEncoding
java-static fun getFloatPcmEncoding(bitDepth: Int, byteOrder: ByteOrder!): Int
```

Converts a sample bit depth and byte order to a corresponding float PCM encoding constant.

Value is one of the following:

- `Format.NO_VALUE`

<br />

| Parameters |
|---|---|
| `bitDepth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The bit depth. Supported values are 32 and 64. |
| `byteOrder: https://developer.android.com/reference/java/nio/ByteOrder.html!` | The byte order. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The corresponding float PCM encoding. If the bit depth is unsupported then `https://developer.android.com/reference/kotlin/androidx/media3/common/C#ENCODING_INVALID()` is returned. |

### getFormatSupportString

```
@UnstableApi
java-static fun getFormatSupportString(@C.FormatSupport formatSupport: Int): String!
```

Returns string representation of a `https://developer.android.com/reference/kotlin/androidx/media3/common/C.FormatSupport` flag.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.FormatSupport formatSupport: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | A `https://developer.android.com/reference/kotlin/androidx/media3/common/C.FormatSupport` flag. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | A string representation of the flag. |

### getInt24

```
@UnstableApi
java-static fun getInt24(buffer: ByteBuffer!, index: Int): Int
```

Returns the sign-extended 24-bit integer value at `index`.

| Parameters |
|---|---|
| `buffer: https://developer.android.com/reference/java/nio/ByteBuffer.html!` | The buffer from which to read the 24-bit integer. |
| `index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the 24-bit integer. |

### getIntegerCodeForString

```
@UnstableApi
java-static fun getIntegerCodeForString(string: String!): Int
```

Returns the integer equal to the big-endian concatenation of the characters in `string` as bytes. The string must be no more than four characters long.

| Parameters |
|---|---|
| `string: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | A string no more than four characters long. |

### getLocaleLanguageTag

```
@UnstableApi
@InlineMe(replacement = "locale.toLanguageTag()")
java-static fun [getLocaleLanguageTag](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getLocaleLanguageTag(java.util.Locale))(locale: Locale!): String!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/java/util/Locale.html#toLanguageTag()` instead.

### getMaxPendingFramesCountForMediaCodecDecoders

```
@UnstableApi
java-static fun getMaxPendingFramesCountForMediaCodecDecoders(context: Context!): Int
```

Returns the number of maximum pending output frames that are allowed on a `https://developer.android.com/reference/android/media/MediaCodec.html` decoder.

### getMediaDurationForPlayoutDuration

```
@UnstableApi
java-static fun getMediaDurationForPlayoutDuration(playoutDuration: Long, speed: Float): Long
```

Returns the duration of media that will elapse in `playoutDuration`.

| Parameters |
|---|---|
| `playoutDuration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration to scale. |
| `speed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The factor by which playback is sped up. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The scaled duration, in the same units as `playoutDuration`. |

### getNowUnixTimeMs

```
@UnstableApi
java-static fun getNowUnixTimeMs(elapsedRealtimeEpochOffsetMs: Long): Long
```

Returns the current time in milliseconds since the epoch.

| Parameters |
|---|---|
| `elapsedRealtimeEpochOffsetMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The offset between `https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime()` and the time since the Unix epoch, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unknown. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The Unix time in milliseconds since the epoch. |

### getPcmEncoding

```
@UnstableApi
@C.PcmEncoding
java-static fun getPcmEncoding(bitDepth: Int): Int
```

Converts a sample bit depth to a corresponding little-endian integer PCM encoding constant.

Value is one of the following:

- `Format.NO_VALUE`

<br />

| Parameters |
|---|---|
| `bitDepth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The bit depth. Supported values are 8, 16, 24 and 32. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The corresponding encoding. One of `https://developer.android.com/reference/kotlin/androidx/media3/common/C#ENCODING_PCM_8BIT()`, `https://developer.android.com/reference/kotlin/androidx/media3/common/C#ENCODING_PCM_16BIT()`, `https://developer.android.com/reference/kotlin/androidx/media3/common/C#ENCODING_PCM_24BIT()` and `https://developer.android.com/reference/kotlin/androidx/media3/common/C#ENCODING_PCM_32BIT()`. If the bit depth is unsupported then `https://developer.android.com/reference/kotlin/androidx/media3/common/C#ENCODING_INVALID()` is returned. |

### getPcmEncoding

```
@UnstableApi
@C.PcmEncoding
java-static fun getPcmEncoding(bitDepth: Int, byteOrder: ByteOrder!): Int
```

Converts a sample bit depth and byte order to a corresponding integer PCM encoding constant.

Value is one of the following:

- `Format.NO_VALUE`

<br />

| Parameters |
|---|---|
| `bitDepth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The bit depth. Supported values are 8, 16, 24 and 32. |
| `byteOrder: https://developer.android.com/reference/java/nio/ByteOrder.html!` | The byte order. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The corresponding integer PCM encoding. If the bit depth is unsupported then `https://developer.android.com/reference/kotlin/androidx/media3/common/C#ENCODING_INVALID()` is returned. |

### getPcmFormat

```
@UnstableApi
java-static fun getPcmFormat(audioFormat: AudioProcessor.AudioFormat!): Format!
```

Gets a PCM `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` based on the `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat`.

### getPcmFormat

```
@UnstableApi
java-static fun getPcmFormat(@C.PcmEncoding pcmEncoding: Int, channels: Int, sampleRate: Int): Format!
```

Gets a PCM `https://developer.android.com/reference/kotlin/androidx/media3/common/Format` with the specified parameters.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding pcmEncoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding`. Value is one of the following: - `Format.NO_VALUE` <br /> |
| `channels: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of channels, or `https://developer.android.com/reference/kotlin/androidx/media3/common/Format#NO_VALUE()` if unknown. |
| `sampleRate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The sample rate in Hz, or `https://developer.android.com/reference/kotlin/androidx/media3/common/Format#NO_VALUE()` if unknown. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Format!` | The PCM format. |

### getPcmFrameSize

```
@UnstableApi
@Pure
java-static fun getPcmFrameSize(@C.PcmEncoding pcmEncoding: Int, channelCount: Int): Int
```

Returns the frame size for audio with `channelCount` channels in the specified encoding.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding pcmEncoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The encoding of the audio data. Value is one of the following: - `Format.NO_VALUE` <br /> |
| `channelCount: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The channel count. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The size of one audio frame in bytes. |

### getPlayoutDurationForMediaDuration

```
@UnstableApi
java-static fun getPlayoutDurationForMediaDuration(mediaDuration: Long, speed: Float): Long
```

Returns the playout duration of `mediaDuration` of media.

| Parameters |
|---|---|
| `mediaDuration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration to scale. |
| `speed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The factor by which playback is sped up. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The scaled duration, in the same units as `mediaDuration`. |

### getRoleFlagStrings

```
@UnstableApi
java-static fun getRoleFlagStrings(@C.RoleFlags roleFlags: Int): (Mutable)List<String!>!
```

Returns a list of strings representing the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.RoleFlags` values present in `
roleFlags`.

### getSelectionFlagStrings

```
@UnstableApi
java-static fun getSelectionFlagStrings(@C.SelectionFlags selectionFlags: Int): (Mutable)List<String!>!
```

Returns a list of strings representing the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.SelectionFlags` values present in `
selectionFlags`.

### getStreamTypeForAudioUsage

```
@UnstableApi
@C.StreamType
java-static fun [getStreamTypeForAudioUsage](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#getStreamTypeForAudioUsage(int))(@C.AudioUsage usage: Int): Int
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/common/AudioAttributes#getStreamType()` instead.

### getStringForTime

```
@UnstableApi
java-static fun getStringForTime(timeMs: Long): String!
```

Returns the specified millisecond time formatted as a string.

| Parameters |
|---|---|
| `timeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The time to format as a string, in milliseconds. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The time formatted as a string. |

### getStringForTime

```
@UnstableApi
java-static fun getStringForTime(
    builder: StringBuilder!,
    formatter: Formatter!,
    timeMs: Long
): String!
```

Returns the specified millisecond time formatted as a string.

| Parameters |
|---|---|
| `builder: https://developer.android.com/reference/java/lang/StringBuilder.html!` | The builder that `formatter` will write to. |
| `formatter: https://developer.android.com/reference/java/util/Formatter.html!` | The formatter. |
| `timeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The time to format as a string, in milliseconds. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The time formatted as a string. |

### getSystemLanguageCodes

```
@UnstableApi
java-static fun getSystemLanguageCodes(): Array<String!>!
```

Returns a non-empty array of normalized IETF BCP 47 language tags for the system languages ordered by preference.

### getSystemProperty

```
@UnstableApi
java-static fun getSystemProperty(name: String!): String?
```

Returns the value of the given system property, or `null` if the property cannot be read or is not set.

| Parameters |
|---|---|
| `name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The name of the system property. |

### getTrackTypeString

```
@UnstableApi
java-static fun getTrackTypeString(@C.TrackType trackType: Int): String!
```

Returns a string representation of a `https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType trackType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | A `https://developer.android.com/reference/kotlin/androidx/media3/common/C.TrackType` constant, |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | A string representation of this constant. |

### getUserAgent

```
java-static fun getUserAgent(context: Context!, applicationName: String!): String!
```

Returns a user agent string based on the given application name and the library version.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html!` | A valid context of the calling application. |
| `applicationName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | String that will be prefix'ed to the generated user agent. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | A user agent string generated using the applicationName and the library version. |

### getUtf8Bytes

```
@UnstableApi
java-static fun getUtf8Bytes(value: String!): Array<Byte>!
```

Returns a new byte array containing the code points of a `https://developer.android.com/reference/java/lang/String.html` encoded using UTF-8.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The `https://developer.android.com/reference/java/lang/String.html` whose bytes should be obtained. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | The code points encoding using UTF-8. |

### getVideoCodecFlagForMime

```
@UnstableApi
@C.VideoCodecFlags
java-static fun getVideoCodecFlagForMime(mimeType: String!): Int
```

Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.VideoCodecFlags` corresponding to the provided MIME type.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | If `mimeType` is not a recognized video codec. |

### gzip

```
@UnstableApi
java-static fun gzip(input: ByteArray<Byte>!): Array<Byte>!
```

Compresses `input` using gzip and returns the result in a newly allocated byte array.

### handlePauseButtonAction

```
java-static fun handlePauseButtonAction(player: Player?): Boolean
```

Updates the player to handle an interaction with a pause button.

This method assumes the pause button is enabled if `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#shouldShowPlayButton(androidx.media3.common.Player)` returns `false`.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player`. May be `null`. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether a player method was triggered to handle this action. |

### handlePlayButtonAction

```
java-static fun handlePlayButtonAction(player: Player?): Boolean
```

Updates the player to handle an interaction with a play button.

This method assumes the play button is enabled if `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#shouldShowPlayButton(androidx.media3.common.Player)` returns `true`.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player`. May be `null`. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether a player method was triggered to handle this action. |

### handlePlayPauseButtonAction

```
java-static fun handlePlayPauseButtonAction(player: Player?): Boolean
```

Updates the player to handle an interaction with a play or pause button.

This method assumes that the UI element enables a play button if `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#shouldShowPlayButton(androidx.media3.common.Player)` returns `true` and a pause button otherwise.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player`. May be `null`. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether a player method was triggered to handle this action. |

### handlePlayPauseButtonAction

```
@UnstableApi
java-static fun handlePlayPauseButtonAction(player: Player?, playIfSuppressed: Boolean): Boolean
```

Updates the player to handle an interaction with a play or pause button.

This method assumes that the UI element enables a play button if `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#shouldShowPlayButton(androidx.media3.common.Player,boolean)` returns `true` and a pause button otherwise.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player`. May be `null`. |
| `playIfSuppressed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether to trigger a play action if playback is `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getPlaybackSuppressionReason()`. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether a player method was triggered to handle this action. |

### ignoreFuture

```
@UnstableApi
java-static fun <T> ignoreFuture(unused: Future<T!>!): Unit
```

Ignores the future to avoid static code analysis tools to complain.

### inferContentType

```
@UnstableApi
@C.ContentType
java-static fun [inferContentType](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentType(java.lang.String))(fileName: String!): Int
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/android/net/Uri.html#parse(java.lang.String)` and `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentType(android.net.Uri)` for full file paths or `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentTypeForExtension(java.lang.String)` for extensions.

### inferContentType

```
@C.ContentType
java-static fun inferContentType(uri: Uri!): Int
```

Makes a best guess to infer the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType` from a `https://developer.android.com/reference/android/net/Uri.html`.

| Parameters |
|---|---|
| `uri: https://developer.android.com/reference/android/net/Uri.html!` | The `https://developer.android.com/reference/android/net/Uri.html`. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The content type. |

### inferContentType

```
@UnstableApi
@C.ContentType
java-static fun [inferContentType](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentType(android.net.Uri,java.lang.String))(uri: Uri!, overrideExtension: String?): Int
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentTypeForExtension(java.lang.String)` when `overrideExtension` is non-empty, and `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#inferContentType(android.net.Uri)` otherwise.

### inferContentTypeForExtension

```
@C.ContentType
java-static fun inferContentTypeForExtension(fileExtension: String!): Int
```

Makes a best guess to infer the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType` from a file extension.

| Parameters |
|---|---|
| `fileExtension: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The extension of the file (excluding the '.'). |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The content type. |

### inferContentTypeForUriAndMimeType

```
@C.ContentType
java-static fun inferContentTypeForUriAndMimeType(uri: Uri!, mimeType: String?): Int
```

Makes a best guess to infer the `https://developer.android.com/reference/kotlin/androidx/media3/common/C.ContentType` from a `https://developer.android.com/reference/android/net/Uri.html` and optional MIME type.

| Parameters |
|---|---|
| `uri: https://developer.android.com/reference/android/net/Uri.html!` | The `https://developer.android.com/reference/android/net/Uri.html`. |
| `mimeType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | If MIME type, or `null`. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The content type. |

### inflate

```
@UnstableApi
java-static fun inflate(
    input: ParsableByteArray!,
    output: ParsableByteArray!,
    inflater: Inflater?
): Boolean
```

Uncompresses the data in `input`.

| Parameters |
|---|---|
| `input: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!` | Wraps the compressed input data. |
| `output: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!` | Wraps an output buffer to be used to store the uncompressed data. If ` output.data` isn't big enough to hold the uncompressed data, a new array is created. If `true` is returned then the output's position will be set to 0 and its limit will be set to the length of the uncompressed data. |
| `inflater: https://developer.android.com/reference/java/util/zip/Inflater.html?` | If not null, used to uncompressed the input. Otherwise a new `https://developer.android.com/reference/java/util/zip/Inflater.html` is created. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the input is uncompressed successfully. |

### intToStringMaxRadix

```
@UnstableApi
java-static fun intToStringMaxRadix(i: Int): String!
```

Returns a string representation of the integer using radix value `https://developer.android.com/reference/java/lang/Character.html#MAX_RADIX`.

| Parameters |
|---|---|
| `i: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | An integer to be converted to String. |

### isAutomotive

```
@UnstableApi
java-static fun isAutomotive(context: Context!): Boolean
```

Returns whether the app is running on an automotive device.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html!` | Any context. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the app is running on an automotive device. |

### isBitmapFactorySupportedMimeType

```
@UnstableApi
java-static fun isBitmapFactorySupportedMimeType(mimeType: String!): Boolean
```

Returns the image MIME types that can be decoded and loaded by `https://developer.android.com/reference/android/graphics/BitmapFactory.html` that Media3 aims to support.

### isEncodingHighResolutionPcm

```
@UnstableApi
java-static fun isEncodingHighResolutionPcm(@C.PcmEncoding encoding: Int): Boolean
```

Returns whether `encoding` is high resolution (\> 16-bit) PCM.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The encoding of the audio data. Value is one of the following: - `Format.NO_VALUE` <br /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the encoding is high resolution PCM. |

### isEncodingLinearPcm

```
@UnstableApi
java-static fun isEncodingLinearPcm(@C.Encoding encoding: Int): Boolean
```

Returns whether `encoding` is one of the linear PCM encodings.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.Encoding encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The encoding of the audio data. Value is one of the following: - `Format.NO_VALUE` <br /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the encoding is one of the PCM encodings. |

### isFloatPcmEncoding

```
@UnstableApi
java-static fun isFloatPcmEncoding(@C.PcmEncoding encoding: Int): Boolean
```

Returns whether `encoding` is a floating-point PCM encoding.

### isFrameDropAllowedOnSurfaceInput

```
@UnstableApi
java-static fun isFrameDropAllowedOnSurfaceInput(context: Context!): Boolean
```

### isLinebreak

```
@UnstableApi
java-static fun isLinebreak(c: Int): Boolean
```

Returns whether the given character is a carriage return ('\\r') or a line feed ('\\n').

| Parameters |
|---|---|
| `c: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The character. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the given character is a linebreak. |

### isLocalFileUri

```
@UnstableApi
java-static fun isLocalFileUri(uri: Uri!): Boolean
```

Returns true if the URI is a path to a local file or a reference to a local file.

| Parameters |
|---|---|
| `uri: https://developer.android.com/reference/android/net/Uri.html!` | The uri to test. |

### isPcmEncodingBigEndian

```
@UnstableApi
java-static fun isPcmEncodingBigEndian(@C.PcmEncoding encoding: Int): Boolean
```

Returns whether `encoding` is a big-endian PCM encoding.

### isRunningOnEmulator

```
@UnstableApi
java-static fun isRunningOnEmulator(): Boolean
```

Returns true if the code path is currently running on an emulator.

### isSorted

```
@UnstableApi
java-static fun isSorted(values: LongArray<Long>!): Boolean
```

Returns whether `values` is sorted in ascending order.

### isTv

```
@UnstableApi
java-static fun isTv(context: Context!): Boolean
```

Returns whether the app is running on a TV device.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html!` | Any context. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the app is running on a TV device. |

### isWear

```
@UnstableApi
java-static fun isWear(context: Context!): Boolean
```

Returns whether the app is running on a Wear OS device.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html!` | Any context. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the app is running on a Wear OS device. |

### linearSearch

```
@UnstableApi
java-static fun linearSearch(array: IntArray<Int>!, value: Int): Int
```

Returns the index of the first occurrence of `value` in `array`, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if `value` is not contained in `array`.

| Parameters |
|---|---|
| `array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!` | The array to search. |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The value to search for. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the first occurrence of value in `array`, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if `value` is not contained in `array`. |

### linearSearch

```
@UnstableApi
java-static fun linearSearch(array: LongArray<Long>!, value: Long): Int
```

Returns the index of the first occurrence of `value` in `array`, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if `value` is not contained in `array`.

| Parameters |
|---|---|
| `array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!` | The array to search. |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The value to search for. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the first occurrence of value in `array`, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if `value` is not contained in `array`. |

### loadAsset

```
@UnstableApi
java-static fun loadAsset(context: Context!, assetPath: String!): String!
```

Loads a file from the assets folder.

This should only be used for known-small files. Generally, loading assets should be done with `AssetDataSource`.

The file is assumed to be encoded in UTF-8.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html!` | The `https://developer.android.com/reference/android/content/Context.html`. |
| `assetPath: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The path to the file to load, from the assets folder. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The content of the file to load. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` | If the file couldn't be read. |

### loadRawResource

```
@UnstableApi
java-static fun loadRawResource(context: Context!, resId: Int): String!
```

Loads a file from a raw resource.

This should only be used for known-small files.

The file is assumed to be encoded in UTF-8.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html!` | The `https://developer.android.com/reference/android/content/Context.html`. |
| `resId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The resource ID of the file to load. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The content of the file to load. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` | If the file couldn't be read. |

### maxValue

```
@UnstableApi
java-static fun maxValue(sparseLongArray: SparseLongArray!): Long
```

Returns the maximum value in the given `https://developer.android.com/reference/android/util/SparseLongArray.html`.

| Parameters |
|---|---|
| `sparseLongArray: https://developer.android.com/reference/android/util/SparseLongArray.html!` | The `https://developer.android.com/reference/android/util/SparseLongArray.html`. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The maximum value. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/util/NoSuchElementException.html` | If the array is empty. |

### maybeInflate

```
@UnstableApi
java-static fun maybeInflate(
    input: ParsableByteArray!,
    output: ParsableByteArray!,
    inflater: Inflater?
): Boolean
```

Uncompresses the data in `input` if it starts with the zlib marker `0x78`.

| Parameters |
|---|---|
| `input: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!` | Wraps the compressed input data. |
| `output: https://developer.android.com/reference/kotlin/androidx/media3/common/util/ParsableByteArray!` | Wraps an output buffer to be used to store the uncompressed data. If ` output.data` isn't big enough to hold the uncompressed data, a new array is created. If `true` is returned then the output's position will be set to 0 and its limit will be set to the length of the uncompressed data. |
| `inflater: https://developer.android.com/reference/java/util/zip/Inflater.html?` | If not null, used to uncompress the input. Otherwise a new `https://developer.android.com/reference/java/util/zip/Inflater.html` is created. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the input is uncompressed successfully. |

### maybeRequestReadExternalStoragePermission

```
java-static fun [maybeRequestReadExternalStoragePermission](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#maybeRequestReadExternalStoragePermission(android.app.Activity,androidx.media3.common.MediaItem...))(
    activity: Activity!,
    mediaItems: Array<MediaItem!>!
): Boolean
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#maybeRequestReadStoragePermission(android.app.Activity,androidx.media3.common.MediaItem...)` instead.

### maybeRequestReadExternalStoragePermission

```
java-static fun [maybeRequestReadExternalStoragePermission](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#maybeRequestReadExternalStoragePermission(android.app.Activity,android.net.Uri...))(
    activity: Activity!,
    uris: Array<Uri!>!
): Boolean
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#maybeRequestReadStoragePermission(android.app.Activity,androidx.media3.common.MediaItem...)` instead.

### maybeRequestReadStoragePermission

```
java-static fun maybeRequestReadStoragePermission(
    activity: Activity!,
    mediaItems: Array<MediaItem!>!
): Boolean
```

Checks whether it's necessary to request storage reading permissions for the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`, requesting the permissions if necessary.

| Parameters |
|---|---|
| `activity: https://developer.android.com/reference/android/app/Activity.html!` | The host activity for checking and requesting the permission. |
| `mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`s that may require storage reading permissions to read. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether a permission request was made. |

### minValue

```
@UnstableApi
java-static fun minValue(sparseLongArray: SparseLongArray!): Long
```

Returns the minimum value in the given `https://developer.android.com/reference/android/util/SparseLongArray.html`.

| Parameters |
|---|---|
| `sparseLongArray: https://developer.android.com/reference/android/util/SparseLongArray.html!` | The `https://developer.android.com/reference/android/util/SparseLongArray.html`. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The minimum value. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/util/NoSuchElementException.html` | If the array is empty. |

### moveItems

```
@UnstableApi
java-static fun <T : Any?> moveItems(
    items: (Mutable)List<T!>!,
    fromIndex: Int,
    toIndex: Int,
    newFromIndex: Int
): Unit
```

Moves the elements starting at `fromIndex` to `newFromIndex`.

| Parameters |
|---|---|
| `items: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T!>!` | The list of which to move elements. |
| `fromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index at which the items to move start. |
| `toIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index up to which elements should be moved (exclusive). |
| `newFromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The new from index. |

### msToUs

```
@UnstableApi
java-static fun msToUs(timeMs: Long): Long
```

Converts a time in milliseconds to the corresponding time in microseconds, preserving `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` values and `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_END_OF_SOURCE()` values.

| Parameters |
|---|---|
| `timeMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The time in milliseconds. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The corresponding time in microseconds. |

### newSingleThreadExecutor

```
@UnstableApi
java-static fun newSingleThreadExecutor(threadName: String!): ExecutorService!
```

Instantiates a new single threaded executor whose thread has the specified name.

| Parameters |
|---|---|
| `threadName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The name of the thread. |

| Returns |
|---|---|
| `https://developer.android.com/reference/java/util/concurrent/ExecutorService.html!` | The executor. |

### newSingleThreadScheduledExecutor

```
@UnstableApi
java-static fun newSingleThreadScheduledExecutor(threadName: String!): ScheduledExecutorService!
```

Instantiates a new single threaded scheduled executor whose thread has the specified name.

| Parameters |
|---|---|
| `threadName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The name of the thread. |

| Returns |
|---|---|
| `https://developer.android.com/reference/java/util/concurrent/ScheduledExecutorService.html!` | The executor. |

### normalizeLanguageCode

```
@UnstableApi
@PolyNull
java-static fun normalizeLanguageCode(@PolyNull language: @PolyNull String!): @PolyNull String!
```

Returns a normalized IETF BCP 47 language tag for `language`.

| Parameters |
|---|---|
| `@https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/PolyNull.html language: @https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/PolyNull.html https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | A case-insensitive language code supported by `https://developer.android.com/reference/java/util/Locale.html#forLanguageTag(java.lang.String)`. |

| Returns |
|---|---|
| `@https://checkerframework.org/api/org/checkerframework/checker/nullness/qual/PolyNull.html https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The all-lowercase normalized code, or null if the input was null, or ` language.toLowerCase()` if the language could not be normalized. |

### nsToMs

```
@UnstableApi
java-static fun nsToMs(timeNs: Long): Long
```

Converts a time in nanoseconds to the corresponding time in milliseconds, preserving `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` and `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_END_OF_SOURCE()` values.

| Parameters |
|---|---|
| `timeNs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The time in nanoseconds. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The corresponding time in milliseconds. |

### nullSafeArrayAppend

```
@UnstableApi
java-static fun <T> nullSafeArrayAppend(original: Array<T!>!, newElement: T!): Array<T!>!
```

Creates a new array containing `original` with `newElement` appended.

| Parameters |
|---|---|
| `original: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | The input array. |
| `newElement: T!` | The element to append. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | The new array. |

### nullSafeArrayConcatenation

```
@UnstableApi
java-static fun <T> nullSafeArrayConcatenation(first: Array<T!>!, second: Array<T!>!): Array<T!>!
```

Creates a new array containing the concatenation of two non-null type arrays.

| Parameters |
|---|---|
| `first: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | The first array. |
| `second: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | The second array. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | The concatenated result. |

### nullSafeArrayCopy

```
@UnstableApi
java-static fun <T> nullSafeArrayCopy(input: Array<T!>!, length: Int): Array<T!>!
```

Copies and optionally truncates an array. Prevents null array elements created by `https://developer.android.com/reference/java/util/Arrays.html#copyOf(T[], int)` by ensuring the new length does not exceed the current length.

| Parameters |
|---|---|
| `input: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | The input array. |
| `length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The output array length. Must be less or equal to the length of the input array. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | The copied array. |

### nullSafeArrayCopyOfRange

```
@UnstableApi
java-static fun <T> nullSafeArrayCopyOfRange(input: Array<T!>!, from: Int, to: Int): Array<T!>!
```

Copies a subset of an array.

| Parameters |
|---|---|
| `input: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | The input array. |
| `from: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The start the range to be copied, inclusive |
| `to: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The end of the range to be copied, exclusive. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | The copied array. |

### nullSafeListToArray

```
@UnstableApi
java-static fun <T> nullSafeListToArray(list: (Mutable)List<T!>!, array: Array<T!>!): Unit
```

Copies the contents of `list` into `array`.

`list.size()` must be the same as `array.length` to ensure the contents can be copied into `array` without leaving any nulls at the end.

| Parameters |
|---|---|
| `list: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T!>!` | The list to copy items from. |
| `array: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<T!>!` | The array to copy items to. |

### parseXsDateTime

```
@UnstableApi
java-static fun parseXsDateTime(value: String!): Long
```

Parses an xs:dateTime attribute value, returning the parsed timestamp in milliseconds since the epoch.

The parsing implemented here is deliberately more tolerant than the [XML spec](https://www.w3.org/TR/xmlschema-2/#dateTime) allows, as this method is also used to parse ISO 8601 and RFC 3339 date-time strings.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The attribute value to decode. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The parsed timestamp in milliseconds since the epoch. |

| Throws |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/ParserException` | if an error occurs parsing the dateTime attribute value. |

### parseXsDuration

```
@UnstableApi
java-static fun parseXsDuration(value: String!): Long
```

Parses an xs:duration attribute value, returning the parsed duration in milliseconds.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The attribute value to decode. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The parsed duration in milliseconds. |

### percentFloat

```
@UnstableApi
java-static fun percentFloat(numerator: Long, denominator: Long): Float
```

Returns the floating point percentage of `numerator` divided by `denominator`. Note that this may return `https://developer.android.com/reference/java/lang/Float.html#POSITIVE_INFINITY`, `https://developer.android.com/reference/java/lang/Float.html#NEGATIVE_INFINITY` or `https://developer.android.com/reference/java/lang/Float.html#NaN` if the denominator is zero.

### percentInt

```
@UnstableApi
java-static fun percentInt(numerator: Long, denominator: Long): Int
```

Returns the integer percentage of `numerator` divided by `denominator`. This uses integer arithmetic (round down).

The result is cast from `long` to `int` following the rules of `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/primitives/Ints.html#saturatedCast(long)`.

### postOrRun

```
@UnstableApi
java-static fun postOrRun(handler: Handler!, runnable: Runnable!): Boolean
```

Posts the `https://developer.android.com/reference/java/lang/Runnable.html` if the calling thread differs with the `https://developer.android.com/reference/android/os/Looper.html` of the `https://developer.android.com/reference/android/os/Handler.html`. Otherwise, runs the `https://developer.android.com/reference/java/lang/Runnable.html` directly.

| Parameters |
|---|---|
| `handler: https://developer.android.com/reference/android/os/Handler.html!` | The handler to which the `https://developer.android.com/reference/java/lang/Runnable.html` will be posted. |
| `runnable: https://developer.android.com/reference/java/lang/Runnable.html!` | The runnable to either post or run. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/java/lang/Runnable.html` was successfully posted to the `https://developer.android.com/reference/android/os/Handler.html` or run. `false` otherwise. |

### postOrRun

```
@UnstableApi
java-static fun postOrRun(handler: HandlerWrapper!, runnable: Runnable!): Boolean
```

Posts the `https://developer.android.com/reference/java/lang/Runnable.html` if the calling thread differs with the `https://developer.android.com/reference/android/os/Looper.html` of the `https://developer.android.com/reference/kotlin/androidx/media3/common/util/HandlerWrapper`. Otherwise, runs the `https://developer.android.com/reference/java/lang/Runnable.html` directly.

| Parameters |
|---|---|
| `handler: https://developer.android.com/reference/kotlin/androidx/media3/common/util/HandlerWrapper!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/util/HandlerWrapper` to which the `https://developer.android.com/reference/java/lang/Runnable.html` will be posted. |
| `runnable: https://developer.android.com/reference/java/lang/Runnable.html!` | The runnable to either post or run. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if the `https://developer.android.com/reference/java/lang/Runnable.html` was successfully posted to the `https://developer.android.com/reference/kotlin/androidx/media3/common/util/HandlerWrapper` or run. `false` otherwise. |

### postOrRunWithCompletion

```
@UnstableApi
java-static fun <T> postOrRunWithCompletion(
    handler: Handler!,
    runnable: Runnable!,
    successValue: T!
): ListenableFuture<T!>!
```

Posts the `https://developer.android.com/reference/java/lang/Runnable.html` if the calling thread differs with the `https://developer.android.com/reference/android/os/Looper.html` of the `https://developer.android.com/reference/android/os/Handler.html`. Otherwise, runs the `https://developer.android.com/reference/java/lang/Runnable.html` directly. Also returns a `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` for when the `https://developer.android.com/reference/java/lang/Runnable.html` has run.

| Parameters |
|---|---|
| `<T>` | The type of `successValue`. |
| `handler: https://developer.android.com/reference/android/os/Handler.html!` | The handler to which the `https://developer.android.com/reference/java/lang/Runnable.html` will be posted. |
| `runnable: https://developer.android.com/reference/java/lang/Runnable.html!` | The runnable to either post or run. |
| `successValue: T!` | The value to set in the `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` once the runnable completes. |

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<T!>!` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` for when the `https://developer.android.com/reference/java/lang/Runnable.html` has run. |

### putInt24

```
@UnstableApi
java-static fun putInt24(buffer: ByteBuffer!, value: Int): Unit
```

Writes a 24-bit integer value to a buffer at its current `https://developer.android.com/reference/java/nio/Buffer.html#position()`.

This is a relative operation that affects the buffer's position.

| Parameters |
|---|---|
| `buffer: https://developer.android.com/reference/java/nio/ByteBuffer.html!` | The buffer on which to write the integer. |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The integer value to write. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | If `value` is out of range for a 24-bit integer. |

### readBoolean

```
@UnstableApi
java-static fun readBoolean(parcel: Parcel!): Boolean
```

Reads an integer from a `https://developer.android.com/reference/android/os/Parcel.html` and interprets it as a boolean, with 0 mapping to false and all other values mapping to true.

| Parameters |
|---|---|
| `parcel: https://developer.android.com/reference/android/os/Parcel.html!` | The `https://developer.android.com/reference/android/os/Parcel.html` to read from. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | The read value. |

### recursiveDelete

```
@UnstableApi
java-static fun recursiveDelete(fileOrDirectory: File!): Unit
```

Recursively deletes a directory and its content.

### registerReceiverNotExported

```
@UnstableApi
java-static fun registerReceiverNotExported(
    context: Context!,
    receiver: BroadcastReceiver?,
    filter: IntentFilter!
): Intent?
```

Registers a `https://developer.android.com/reference/android/content/BroadcastReceiver.html` that's not intended to receive broadcasts from other apps. This will be enforced by specifying `https://developer.android.com/reference/android/content/Context.html#RECEIVER_NOT_EXPORTED` if `https://developer.android.com/reference/android/os/Build.VERSION.html#SDK_INT` is 33 or above.

Do not use this method if registering a receiver for a [protected system broadcast](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/AndroidManifest.xml).

| Parameters |
|---|---|
| `receiver: https://developer.android.com/reference/android/content/BroadcastReceiver.html?` | The `https://developer.android.com/reference/android/content/BroadcastReceiver.html` to register. This value may be null. |
| `context: https://developer.android.com/reference/android/content/Context.html!` | The context on which `https://developer.android.com/reference/android/content/Context.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)` will be called. |
| `filter: https://developer.android.com/reference/android/content/IntentFilter.html!` | Selects the Intent broadcasts to be received. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/content/Intent.html?` | The first sticky intent found that matches `filter`, or null if there are none. |

### removeRange

```
@UnstableApi
java-static fun <T> removeRange(list: (Mutable)List<T!>!, fromIndex: Int, toIndex: Int): Unit
```

Removes an indexed range from a List.

Does nothing if the provided range is valid and `fromIndex == toIndex`.

| Parameters |
|---|---|
| `list: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<T!>!` | The List to remove the range from. |
| `fromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The first index to be removed (inclusive). |
| `toIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The last index to be removed (exclusive). |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | If `fromIndex`\<0, `toIndex`\>` list.size()`, or `fromIndex`\>`toIndex`. |

### sampleCountToDurationUs

```
@UnstableApi
@Pure
java-static fun sampleCountToDurationUs(sampleCount: Long, sampleRate: Int): Long
```

Returns the total duration (in microseconds) of `sampleCount` samples of equal duration at `sampleRate`.

If `sampleRate` is less than `https://developer.android.com/reference/kotlin/androidx/media3/common/C#MICROS_PER_SECOND()`, the duration produced by this method can be reversed to the original sample count using `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#durationUsToSampleCount(long,int)`.

| Parameters |
|---|---|
| `sampleCount: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The number of samples. |
| `sampleRate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The sample rate, in samples per second. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The total duration, in microseconds, of `sampleCount` samples. |

### scaleLargeTimestamp

```
@UnstableApi
java-static fun scaleLargeTimestamp(timestamp: Long, multiplier: Long, divisor: Long): Long
```

Scales a large timestamp.

Equivalent to `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeValue(long,long,long,java.math.RoundingMode)` with `https://developer.android.com/reference/java/math/RoundingMode.html#DOWN`.

| Parameters |
|---|---|
| `timestamp: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The timestamp to scale. |
| `multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The multiplier. |
| `divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The divisor. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The scaled timestamp. |

### scaleLargeTimestamps

```
@UnstableApi
java-static fun scaleLargeTimestamps(
    timestamps: (Mutable)List<Long!>!,
    multiplier: Long,
    divisor: Long
): Array<Long>!
```

Applies `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeTimestamp(long,long,long)` to a list of unscaled timestamps.

| Parameters |
|---|---|
| `timestamps: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html!>!` | The timestamps to scale. |
| `multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The multiplier. |
| `divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The divisor. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!` | The scaled timestamps. |

### scaleLargeTimestampsInPlace

```
@UnstableApi
java-static fun scaleLargeTimestampsInPlace(
    timestamps: LongArray<Long>!,
    multiplier: Long,
    divisor: Long
): Unit
```

Applies `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeTimestamp(long,long,long)` to an array of unscaled timestamps.

| Parameters |
|---|---|
| `timestamps: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!` | The timestamps to scale. |
| `multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The multiplier. |
| `divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The divisor. |

### scaleLargeValue

```
@UnstableApi
java-static fun scaleLargeValue(
    value: Long,
    multiplier: Long,
    divisor: Long,
    roundingMode: RoundingMode!
): Long
```

Scales a large value by a multiplier and a divisor.

The order of operations in this implementation is designed to minimize the probability of overflow. The implementation tries to stay in integer arithmetic as long as possible, but falls through to floating-point arithmetic if the values can't be combined without overflowing signed 64-bit longs.

If the mathematical result would overflow or underflow a 64-bit long, the result will be either `https://developer.android.com/reference/java/lang/Long.html#MAX_VALUE` or `https://developer.android.com/reference/java/lang/Long.html#MIN_VALUE`, respectively.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The value to scale. |
| `multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The multiplier. |
| `divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The divisor. |
| `roundingMode: https://developer.android.com/reference/java/math/RoundingMode.html!` | The rounding mode to use if the result of the division is not an integer. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The scaled value. |

### scaleLargeValues

```
@UnstableApi
java-static fun scaleLargeValues(
    values: (Mutable)List<Long!>!,
    multiplier: Long,
    divisor: Long,
    roundingMode: RoundingMode!
): Array<Long>!
```

Applies `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeValue(long,long,long,java.math.RoundingMode)` to a list of unscaled values.

| Parameters |
|---|---|
| `values: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html!>!` | The values to scale. |
| `multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The multiplier. |
| `divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The divisor. |
| `roundingMode: https://developer.android.com/reference/java/math/RoundingMode.html!` | The rounding mode to use if the result of the division is not an integer. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!` | The scaled values. |

### scaleLargeValuesInPlace

```
@UnstableApi
java-static fun scaleLargeValuesInPlace(
    values: LongArray<Long>!,
    multiplier: Long,
    divisor: Long,
    roundingMode: RoundingMode!
): Unit
```

Applies `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#scaleLargeValue(long,long,long,java.math.RoundingMode)` to an array of unscaled values.

| Parameters |
|---|---|
| `values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!` | The values to scale. |
| `multiplier: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The multiplier. |
| `divisor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The divisor. |
| `roundingMode: https://developer.android.com/reference/java/math/RoundingMode.html!` | The rounding mode to use if the result of the division is not an integer. |

### setForegroundServiceNotification

```
@UnstableApi
java-static fun setForegroundServiceNotification(
    service: Service!,
    notificationId: Int,
    notification: Notification!,
    foregroundServiceType: Int,
    foregroundServiceManifestType: String!
): Unit
```

Sets the notification required for a foreground service.

| Parameters |
|---|---|
| `service: https://developer.android.com/reference/android/app/Service.html!` | The foreground `https://developer.android.com/reference/android/app/Service.html`. |
| `notificationId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The notification id. |
| `notification: https://developer.android.com/reference/android/app/Notification.html!` | The `https://developer.android.com/reference/android/app/Notification.html`. |
| `foregroundServiceType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The foreground service type defined in `https://developer.android.com/reference/android/content/pm/ServiceInfo.html`. |
| `foregroundServiceManifestType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The required foreground service type string for the ` <service>` element in the manifest. |

### shouldEnablePlayPauseButton

```
@EnsuresNonNullIf(result = true, expression = "#1")
@UnstableApi
java-static fun shouldEnablePlayPauseButton(player: Player?): Boolean
```

Returns whether a play-pause button should be enabled or not.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player`. May be `null`. |

### shouldShowPlayButton

```
@EnsuresNonNullIf(result = false, expression = "#1")
java-static fun shouldShowPlayButton(player: Player?): Boolean
```

Returns whether a play button should be presented on a UI element for playback control. If `false`, a pause button should be shown instead.

Use `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#handlePlayPauseButtonAction(androidx.media3.common.Player)`, `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#handlePlayButtonAction(androidx.media3.common.Player)` or `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#handlePauseButtonAction(androidx.media3.common.Player)` to handle the interaction with the play or pause button UI element.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player`. May be `null`. |

### shouldShowPlayButton

```
@UnstableApi
@EnsuresNonNullIf(result = false, expression = "#1")
java-static fun shouldShowPlayButton(player: Player?, shouldShowPlayIfSuppressed: Boolean): Boolean
```

Returns whether a play button should be presented on a UI element for playback control. If `false`, a pause button should be shown instead.

Use `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#handlePlayPauseButtonAction(androidx.media3.common.Player)`, `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#handlePlayButtonAction(androidx.media3.common.Player)` or `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#handlePauseButtonAction(androidx.media3.common.Player)` to handle the interaction with the play or pause button UI element.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player`. May be `null`. |
| `shouldShowPlayIfSuppressed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether to show a play button if playback is `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getPlaybackSuppressionReason()`. |

### sneakyThrow

```
@UnstableApi
java-static fun sneakyThrow(t: Throwable!): Unit
```

A hacky method that always throws `t` even if `t` is a checked exception, and is not declared to be thrown.

### split

```
@UnstableApi
java-static fun split(value: String!, regex: String!): Array<String!>!
```

Splits a string using `value.split(regex, -1`). Note: this is similar to `https://developer.android.com/reference/java/lang/String.html#split(java.lang.String)` but empty matches at the end of the string will not be omitted from the returned array.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The string to split. |
| `regex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | A delimiting regular expression. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | The array of strings resulting from splitting the string. |

### splitAtFirst

```
@UnstableApi
java-static fun splitAtFirst(value: String!, regex: String!): Array<String!>!
```

Splits the string at the first occurrence of the delimiter `regex`. If the delimiter does not match, returns an array with one element which is the input string. If the delimiter does match, returns an array with the portion of the string before the delimiter and the rest of the string.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The string. |
| `regex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | A delimiting regular expression. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | The string split by the first occurrence of the delimiter. |

### splitCodecs

```
@UnstableApi
java-static fun splitCodecs(codecs: String?): Array<String!>!
```

Splits a codecs sequence string, as defined in RFC 6381, into individual codec strings.

| Parameters |
|---|---|
| `codecs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | A codec sequence string, as defined in RFC 6381. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | The split codecs, or an array of length zero if the input was empty or null. |

### startForegroundService

```
@UnstableApi
java-static fun startForegroundService(context: Context!, intent: Intent!): ComponentName?
```

Calls `https://developer.android.com/reference/android/content/Context.html#startForegroundService(android.content.Intent)` if `https://developer.android.com/reference/android/os/Build.VERSION.html#SDK_INT` is 26 or higher, or `https://developer.android.com/reference/android/content/Context.html#startService(android.content.Intent)` otherwise.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html!` | The context to call. |
| `intent: https://developer.android.com/reference/android/content/Intent.html!` | The intent to pass to the called method. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/content/ComponentName.html?` | The result of the called method. |

### stopForeground

```
@UnstableApi
@InlineMe(replacement = "service.stopForeground(removeNotification ? STOP_FOREGROUND_REMOVE :"
              + " STOP_FOREGROUND_DETACH)", staticImports = [""android.app.Service.STOP_FOREGROUND_DETACH"", ""android.app.Service.STOP_FOREGROUND_REMOVE""])
java-static fun [stopForeground](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#stopForeground(android.app.Service,boolean))(service: Service!, removeNotification: Boolean): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/android/app/Service.html#stopForeground(int)` instead.

### subtractWithOverflowDefault

```
@UnstableApi
java-static fun subtractWithOverflowDefault(x: Long, y: Long, overflowResult: Long): Long
```

Returns the difference between two arguments, or a third argument if the result overflows.

| Parameters |
|---|---|
| `x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The first value. |
| `y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The second value. |
| `overflowResult: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The return value if `x - y` overflows. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `x - y`, or `overflowResult` if the result overflows. |

### sum

```
@UnstableApi
java-static fun sum(summands: LongArray<Long>!): Long
```

Returns the sum of all summands of the given array.

| Parameters |
|---|---|
| `summands: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>!` | The summands to calculate the sum from. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The sum of all summands. |

### tableExists

```
@UnstableApi
java-static fun tableExists(database: SQLiteDatabase!, tableName: String!): Boolean
```

Returns whether the table exists in the database.

### toByteArray

```
@UnstableApi
java-static fun [toByteArray](https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#toByteArray(java.io.InputStream))(inputStream: InputStream!): Array<Byte>!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use Guava's `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/io/ByteStreams.html#toByteArray(java.io.InputStream)` instead.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` |   |

### toByteArray

```
@UnstableApi
java-static fun toByteArray(value: Float): Array<Byte>!
```

Converts a float into an equivalent byte array.

### toByteArray

```
@UnstableApi
java-static fun toByteArray(value: Int): Array<Byte>!
```

Converts a single integer into an equivalent 4-byte array in big-endian order.

### toByteArray

```
@UnstableApi
java-static fun toByteArray(values: IntArray<Int>!): Array<Byte>!
```

Converts an array of integers into an equivalent byte array.

Each integer is converted into 4 sequential bytes.

For a single integer, prefer Guava's `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/primitives/Ints.html#toByteArray(int)` implementation.

### toFourccString

```
@UnstableApi
java-static fun toFourccString(fourcc: Int): String!
```

### toHexString

```
@UnstableApi
java-static fun toHexString(bytes: ByteArray<Byte>!): String!
```

Returns a string containing a lower-case hex representation of the bytes provided.

| Parameters |
|---|---|
| `bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | The byte data to convert to hex. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | A String containing the hex representation of `bytes`. |

### toHexString

```
@UnstableApi
java-static fun toHexString(bytes: ByteArray<Byte>!, offset: Int, length: Int): String!
```

Returns a string containing a lower-case hex representation of the bytes provided.

| Parameters |
|---|---|
| `bytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>!` | The byte data to convert to hex. |
| `offset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The offset into data to read from. |
| `length: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The number of bytes to read from data. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | A String containing the hex representation of `bytes` (considering `offset` and `length`). |

### toLong

```
@UnstableApi
java-static fun toLong(mostSignificantBits: Int, leastSignificantBits: Int): Long
```

Returns the long that is composed of the bits of the 2 specified integers.

| Parameters |
|---|---|
| `mostSignificantBits: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The 32 most significant bits of the long to return. |
| `leastSignificantBits: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The 32 least significant bits of the long to return. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | a long where its 32 most significant bits are `mostSignificantBits` bits and its 32 least significant bits are `leastSignificantBits`. |

### toUnsignedInt

```
@UnstableApi
java-static fun toUnsignedInt(x: Long): Int
```

Converts a long to an int, checking that the long value fits within the range of an unsigned 32-bit integer.

| Parameters |
|---|---|
| `x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The long value to convert. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The integer result. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException.html` | if `x` is greater than the maximum value of an unsigned 32-bit integer (2\^32 - 1). |

### toUnsignedLong

```
@UnstableApi
java-static fun toUnsignedLong(x: Int): Long
```

Converts an integer to a long by unsigned conversion.

This method is equivalent to `https://developer.android.com/reference/java/lang/Integer.html#toUnsignedLong(int)` for API 26+.

### transformFutureAsync

```
@UnstableApi
java-static fun <T : Any?, U : Any?> transformFutureAsync(
    future: ListenableFuture<U!>!,
    transformFunction: AsyncFunction<U!, T!>!
): ListenableFuture<T!>!
```

Asynchronously transforms the result of a `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html`.

The transformation function is called using a `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/MoreExecutors.html#directExecutor()`.

The returned Future attempts to keep its cancellation state in sync with that of the input future and that of the future returned by the transform function. That is, if the returned Future is cancelled, it will attempt to cancel the other two, and if either of the other two is cancelled, the returned Future will also be cancelled. All forwarded cancellations will not attempt to interrupt.

| Parameters |
|---|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?>` | The result type of the input future. |
| `<U : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?>` | The result type of the transformation function. |
| `future: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<U!>!` | The input `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html`. |
| `transformFunction: https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html<U!, T!>!` | The function transforming the result of the input future. |

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<T!>!` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` for the transformed result. |

### unescapeFileName

```
@UnstableApi
java-static fun unescapeFileName(fileName: String!): String?
```

Unescapes an escaped file or directory name back to its original value.

See `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Util#escapeFileName(java.lang.String)` for more information.

| Parameters |
|---|---|
| `fileName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | File name to be unescaped. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | The original value of the file name before it was escaped, or null if the escaped fileName seems invalid. |

### usToMs

```
@UnstableApi
java-static fun usToMs(timeUs: Long): Long
```

Converts a time in microseconds to the corresponding time in milliseconds, preserving `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` and `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_END_OF_SOURCE()` values.

| Parameters |
|---|---|
| `timeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The time in microseconds. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The corresponding time in milliseconds. |

### writeBoolean

```
@UnstableApi
java-static fun writeBoolean(parcel: Parcel!, value: Boolean): Unit
```

Writes a boolean to a `https://developer.android.com/reference/android/os/Parcel.html`. The boolean is written as an integer with value 1 (true) or 0 (false).

| Parameters |
|---|---|
| `parcel: https://developer.android.com/reference/android/os/Parcel.html!` | The `https://developer.android.com/reference/android/os/Parcel.html` to write to. |
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | The value to write. |