mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
3775 lines
262 KiB
HTML
3775 lines
262 KiB
HTML
<!DOCTYPE HTML>
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
|
|
<title>Util (ExoPlayer library)</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
|
|
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
|
|
<script type="text/javascript" src="../../../../../script.js"></script>
|
|
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
|
|
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
|
|
<!--[if IE]>
|
|
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
|
<![endif]-->
|
|
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
|
|
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="Util (ExoPlayer library)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":9,"i46":9,"i47":9,"i48":9,"i49":9,"i50":9,"i51":9,"i52":9,"i53":9,"i54":9,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":9,"i61":9,"i62":9,"i63":9,"i64":9,"i65":9,"i66":9,"i67":9,"i68":9,"i69":9,"i70":9,"i71":9,"i72":41,"i73":41,"i74":9,"i75":9,"i76":9,"i77":9,"i78":9,"i79":9,"i80":9,"i81":9,"i82":9,"i83":9,"i84":9,"i85":9,"i86":9,"i87":9,"i88":9,"i89":9,"i90":9,"i91":9,"i92":9,"i93":9,"i94":9,"i95":9,"i96":9,"i97":9,"i98":9,"i99":9,"i100":9,"i101":9,"i102":9,"i103":9,"i104":9,"i105":9,"i106":9,"i107":9,"i108":9,"i109":9,"i110":9,"i111":9,"i112":9,"i113":9,"i114":9,"i115":9,"i116":9,"i117":9,"i118":9,"i119":9,"i120":9,"i121":9,"i122":9,"i123":9,"i124":9,"i125":9,"i126":9};
|
|
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
var pathtoroot = "../../../../../";
|
|
var useModuleDirectories = false;
|
|
loadScripts(document, 'script');</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<header role="banner">
|
|
<nav role="navigation">
|
|
<div class="fixedNav">
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a id="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../index.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../../allclasses.html">All Classes</a></li>
|
|
</ul>
|
|
<ul class="navListSearch">
|
|
<li><label for="search">SEARCH:</label>
|
|
<input type="text" id="search" value="search" disabled="disabled">
|
|
<input type="reset" id="reset" value="reset" disabled="disabled">
|
|
</li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
</div>
|
|
<div class="navPadding"> </div>
|
|
<script type="text/javascript"><!--
|
|
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
|
//-->
|
|
</script>
|
|
</nav>
|
|
</header>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<main role="main">
|
|
<div class="header">
|
|
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">com.google.android.exoplayer2.util</a></div>
|
|
<h2 title="Class Util" class="title">Class Util</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.google.android.exoplayer2.util.Util</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<hr>
|
|
<pre>public final class <span class="typeNameLabel">Util</span>
|
|
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
|
|
<div class="block">Miscellaneous utility methods.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Field</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEVICE">DEVICE</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html#DEVICE" title="class or interface in android.os" class="externalLink" target="_top"><code>Build.DEVICE</code></a>, but in a place where it can be conveniently overridden for local
|
|
testing.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEVICE_DEBUG_INFO">DEVICE_DEBUG_INFO</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">A concise description of the device that it can be useful to log for debugging purposes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EMPTY_BYTE_ARRAY">EMPTY_BYTE_ARRAY</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">An empty byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MANUFACTURER">MANUFACTURER</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html#MANUFACTURER" title="class or interface in android.os" class="externalLink" target="_top"><code>Build.MANUFACTURER</code></a>, but in a place where it can be conveniently overridden for
|
|
local testing.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#MODEL">MODEL</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html#MODEL" title="class or interface in android.os" class="externalLink" target="_top"><code>Build.MODEL</code></a>, but in a place where it can be conveniently overridden for local
|
|
testing.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SDK_INT">SDK_INT</a></span></code></th>
|
|
<td class="colLast">
|
|
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.VERSION.html#SDK_INT" title="class or interface in android.os" class="externalLink" target="_top"><code>Build.VERSION.SDK_INT</code></a>, but in a place where it can be conveniently overridden for
|
|
local testing.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colSecond" scope="col">Method</th>
|
|
<th class="colLast" scope="col">Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addWithOverflowDefault(long,long,long)">addWithOverflowDefault</a></span>​(long x,
|
|
long y,
|
|
long overflowResult)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the sum of two arguments, or a third argument if the result overflows.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#areEqual(java.lang.Object,java.lang.Object)">areEqual</a></span>​(<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a> o1,
|
|
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a> o2)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Tests two objects for <a href="https://developer.android.com/reference/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink" target="_top"><code>Object.equals(Object)</code></a> equality, handling the case where one or
|
|
both may be null.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#binarySearchCeil(int%5B%5D,int,boolean,boolean)">binarySearchCeil</a></span>​(int[] array,
|
|
int value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the smallest element in <code>array</code> that is greater than (or optionally
|
|
equal to) a specified <code>value</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#binarySearchCeil(long%5B%5D,long,boolean,boolean)">binarySearchCeil</a></span>​(long[] array,
|
|
long value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the smallest element in <code>array</code> that is greater than (or optionally
|
|
equal to) a specified <code>value</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>static <T extends <a href="https://developer.android.com/reference/java/lang/Comparable.html" title="class or interface in java.lang" class="externalLink" target="_top">Comparable</a><? super T>><br>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#binarySearchCeil(java.util.List,T,boolean,boolean)">binarySearchCeil</a></span>​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="https://developer.android.com/reference/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">Comparable</a><? super T>> list,
|
|
T value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the smallest element in <code>list</code> that is greater than (or optionally
|
|
equal to) a specified value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#binarySearchFloor(int%5B%5D,int,boolean,boolean)">binarySearchFloor</a></span>​(int[] array,
|
|
int value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the largest element in <code>array</code> that is less than (or optionally
|
|
equal to) a specified <code>value</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#binarySearchFloor(long%5B%5D,long,boolean,boolean)">binarySearchFloor</a></span>​(long[] array,
|
|
long value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the largest element in <code>array</code> that is less than (or optionally
|
|
equal to) a specified <code>value</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#binarySearchFloor(com.google.android.exoplayer2.util.LongArray,long,boolean,boolean)">binarySearchFloor</a></span>​(<a href="LongArray.html" title="class in com.google.android.exoplayer2.util">LongArray</a> longArray,
|
|
long value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the largest element in <code>longArray</code> that is less than (or optionally
|
|
equal to) a specified <code>value</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>static <T extends <a href="https://developer.android.com/reference/java/lang/Comparable.html" title="class or interface in java.lang" class="externalLink" target="_top">Comparable</a><? super T>><br>int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#binarySearchFloor(java.util.List,T,boolean,boolean)">binarySearchFloor</a></span>​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="https://developer.android.com/reference/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">Comparable</a><? super T>> list,
|
|
T value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the largest element in <code>list</code> that is less than (or optionally equal
|
|
to) a specified <code>value</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>static <T> T</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#castNonNull(T)">castNonNull</a></span>​(T value)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Casts a nullable variable to a non-null variable without runtime null check.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>static <T> T[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#castNonNullTypeArray(T%5B%5D)">castNonNullTypeArray</a></span>​(@NullableType T[] value)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Casts a nullable type array to a non-null type array without runtime null check.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ceilDivide(int,int)">ceilDivide</a></span>​(int numerator,
|
|
int denominator)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Divides a <code>numerator</code> by a <code>denominator</code>, returning the ceiled result.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ceilDivide(long,long)">ceilDivide</a></span>​(long numerator,
|
|
long denominator)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Divides a <code>numerator</code> by a <code>denominator</code>, returning the ceiled result.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkCleartextTrafficPermitted(com.google.android.exoplayer2.MediaItem...)">checkCleartextTrafficPermitted</a></span>​(<a href="../MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>... mediaItems)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">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.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#closeQuietly(java.io.Closeable)">closeQuietly</a></span>​(<a href="https://developer.android.com/reference/java/io/Closeable.html" title="class or interface in java.io" class="externalLink" target="_top">Closeable</a> closeable)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Closes a <a href="https://developer.android.com/reference/java/io/Closeable.html" title="class or interface in java.io" class="externalLink"><code>Closeable</code></a>, suppressing any <a href="https://developer.android.com/reference/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink" target="_top"><code>IOException</code></a> that may occur.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compareLong(long,long)">compareLong</a></span>​(long left,
|
|
long right)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Compares two long values and returns the same value as <code>Long.compare(long, long)</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>static float</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#constrainValue(float,float,float)">constrainValue</a></span>​(float value,
|
|
float min,
|
|
float max)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Constrains a value to the specified bounds.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#constrainValue(int,int,int)">constrainValue</a></span>​(int value,
|
|
int min,
|
|
int max)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Constrains a value to the specified bounds.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#constrainValue(long,long,long)">constrainValue</a></span>​(long value,
|
|
long min,
|
|
long max)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Constrains a value to the specified bounds.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#contains(java.lang.Object%5B%5D,java.lang.Object)">contains</a></span>​(@NullableType <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>[] items,
|
|
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a> item)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Tests whether an <code>items</code> array contains an object equal to <code>item</code>, according to
|
|
<a href="https://developer.android.com/reference/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink" target="_top"><code>Object.equals(Object)</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#crc32(byte%5B%5D,int,int,int)">crc32</a></span>​(byte[] bytes,
|
|
int start,
|
|
int end,
|
|
int initialValue)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the result of updating a CRC-32 with the specified bytes in a "most significant bit
|
|
first" order.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#crc8(byte%5B%5D,int,int,int)">crc8</a></span>​(byte[] bytes,
|
|
int start,
|
|
int end,
|
|
int initialValue)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the result of updating a CRC-8 with the specified bytes in a "most significant bit
|
|
first" order.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createHandler(android.os.Looper,android.os.Handler.Callback)">createHandler</a></span>​(<a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top">Looper</a> looper,
|
|
@UnknownInitialization <a href="https://developer.android.com/reference/android/os/Handler.Callback.html" title="class or interface in android.os" class="externalLink" target="_top">Handler.Callback</a> callback)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> with the specified <a href="https://developer.android.com/reference/android/os/Handler.Callback.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Handler.Callback</code></a> on the specified <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createHandlerForCurrentLooper()">createHandlerForCurrentLooper</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> on the current <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createHandlerForCurrentLooper(android.os.Handler.Callback)">createHandlerForCurrentLooper</a></span>​(@UnknownInitialization <a href="https://developer.android.com/reference/android/os/Handler.Callback.html" title="class or interface in android.os" class="externalLink" target="_top">Handler.Callback</a> callback)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> with the specified <a href="https://developer.android.com/reference/android/os/Handler.Callback.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Handler.Callback</code></a> on the current <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createHandlerForCurrentOrMainLooper()">createHandlerForCurrentOrMainLooper</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> on the current <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createHandlerForCurrentOrMainLooper(android.os.Handler.Callback)">createHandlerForCurrentOrMainLooper</a></span>​(@UnknownInitialization <a href="https://developer.android.com/reference/android/os/Handler.Callback.html" title="class or interface in android.os" class="externalLink" target="_top">Handler.Callback</a> callback)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> with the specified <a href="https://developer.android.com/reference/android/os/Handler.Callback.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Handler.Callback</code></a> on the current <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink" target="_top">File</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTempDirectory(android.content.Context,java.lang.String)">createTempDirectory</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> prefix)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates an empty directory in the directory returned by <a href="https://developer.android.com/reference/android/content/Context.html#getCacheDir()" title="class or interface in android.content" class="externalLink" target="_top"><code>Context.getCacheDir()</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink" target="_top">File</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTempFile(android.content.Context,java.lang.String)">createTempFile</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> prefix)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a new empty file in the directory returned by <a href="https://developer.android.com/reference/android/content/Context.html#getCacheDir()" title="class or interface in android.content" class="externalLink" target="_top"><code>Context.getCacheDir()</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#escapeFileName(java.lang.String)">escapeFileName</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Escapes a string so that it's safe for use as a file or directory name on at least FAT32
|
|
filesystems.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fixSmoothStreamingIsmManifestUri(android.net.Uri)">fixSmoothStreamingIsmManifestUri</a></span>​(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">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).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#formatInvariant(java.lang.String,java.lang.Object...)">formatInvariant</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> format,
|
|
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>... args)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Formats a string using <a href="https://developer.android.com/reference/java/util/Locale.html#US" title="class or interface in java.util" class="externalLink" target="_top"><code>Locale.US</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i32" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fromUtf8Bytes(byte%5B%5D)">fromUtf8Bytes</a></span>​(byte[] bytes)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a new <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>String</code></a> constructed by decoding UTF-8 encoded bytes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i33" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fromUtf8Bytes(byte%5B%5D,int,int)">fromUtf8Bytes</a></span>​(byte[] bytes,
|
|
int offset,
|
|
int length)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a new <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>String</code></a> constructed by decoding UTF-8 encoded bytes in a subarray.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i34" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#generateAudioSessionIdV21(android.content.Context)">generateAudioSessionIdV21</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a newly generated audio session identifier, or <a href="https://developer.android.com/reference/android/media/AudioManager.html#ERROR" title="class or interface in android.media" class="externalLink" target="_top"><code>AudioManager.ERROR</code></a> if an error
|
|
occurred in which case audio playback may fail.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i35" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAdaptiveMimeTypeForContentType(@com.google.android.exoplayer2.C.ContentTypeint)">getAdaptiveMimeTypeForContentType</a></span>​(@com.google.android.exoplayer2.C.ContentType int contentType)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the MIME type corresponding to the given adaptive <a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2"><code>C.ContentType</code></a>, or <code>null</code>
|
|
if the content type is not adaptive.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i36" class="altColor">
|
|
<td class="colFirst"><code>static @com.google.android.exoplayer2.C.AudioContentType int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAudioContentTypeForStreamType(@com.google.android.exoplayer2.C.StreamTypeint)">getAudioContentTypeForStreamType</a></span>​(@com.google.android.exoplayer2.C.StreamType int streamType)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the <a href="../C.AudioContentType.html" title="annotation in com.google.android.exoplayer2"><code>C.AudioContentType</code></a> corresponding to the specified <a href="../C.StreamType.html" title="annotation in com.google.android.exoplayer2"><code>C.StreamType</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i37" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAudioTrackChannelConfig(int)">getAudioTrackChannelConfig</a></span>​(int channelCount)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the audio track channel configuration for the given channel count, or <a href="https://developer.android.com/reference/android/media/AudioFormat.html#CHANNEL_INVALID" title="class or interface in android.media" class="externalLink" target="_top"><code>AudioFormat.CHANNEL_INVALID</code></a> if output is not possible.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i38" class="altColor">
|
|
<td class="colFirst"><code>static @com.google.android.exoplayer2.C.AudioUsage int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAudioUsageForStreamType(@com.google.android.exoplayer2.C.StreamTypeint)">getAudioUsageForStreamType</a></span>​(@com.google.android.exoplayer2.C.StreamType int streamType)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the <a href="../C.AudioUsage.html" title="annotation in com.google.android.exoplayer2"><code>C.AudioUsage</code></a> corresponding to the specified <a href="../C.StreamType.html" title="annotation in com.google.android.exoplayer2"><code>C.StreamType</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i39" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../Player.Commands.html" title="class in com.google.android.exoplayer2">Player.Commands</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getAvailableCommands(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Commands)">getAvailableCommands</a></span>​(<a href="../Player.html" title="interface in com.google.android.exoplayer2">Player</a> player,
|
|
<a href="../Player.Commands.html" title="class in com.google.android.exoplayer2">Player.Commands</a> permanentAvailableCommands)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the <a href="../Player.Commands.html" title="class in com.google.android.exoplayer2"><code>Player.Commands</code></a> available in the <a href="../Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i40" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBigEndianInt(java.nio.ByteBuffer,int)">getBigEndianInt</a></span>​(<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a> buffer,
|
|
int index)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Absolute <i>get</i> method for reading an int value in <a href="https://developer.android.com/reference/java/nio/ByteOrder.html#BIG_ENDIAN" title="class or interface in java.nio" class="externalLink"><code>ByteOrder.BIG_ENDIAN</code></a> in a <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i41" class="rowColor">
|
|
<td class="colFirst"><code>static byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getBytesFromHexString(java.lang.String)">getBytesFromHexString</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> hexString)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a byte array containing values parsed from the hex string provided.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i42" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCodecCountOfType(java.lang.String,@com.google.android.exoplayer2.C.TrackTypeint)">getCodecCountOfType</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> codecs,
|
|
@com.google.android.exoplayer2.C.TrackType int trackType)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the number of codec strings in <code>codecs</code> whose type matches <code>trackType</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i43" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCodecsOfType(java.lang.String,@com.google.android.exoplayer2.C.TrackTypeint)">getCodecsOfType</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> codecs,
|
|
@com.google.android.exoplayer2.C.TrackType int trackType)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a copy of <code>codecs</code> without the codecs whose track type doesn't match <code>
|
|
trackType</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i44" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCommaDelimitedSimpleClassNames(java.lang.Object%5B%5D)">getCommaDelimitedSimpleClassNames</a></span>​(<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>[] objects)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a string with comma delimited simple names of each object's class.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i45" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCountryCode(android.content.Context)">getCountryCode</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">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.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i46" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/graphics/Point.html" title="class or interface in android.graphics" class="externalLink" target="_top">Point</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrentDisplayModeSize(android.content.Context)">getCurrentDisplayModeSize</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Gets the size of the current mode of the default display, in pixels.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i47" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/graphics/Point.html" title="class or interface in android.graphics" class="externalLink" target="_top">Point</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrentDisplayModeSize(android.content.Context,android.view.Display)">getCurrentDisplayModeSize</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/android/view/Display.html" title="class or interface in android.view" class="externalLink" target="_top">Display</a> display)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Gets the size of the current mode of the specified display, in pixels.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i48" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top">Looper</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCurrentOrMainLooper()">getCurrentOrMainLooper</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink"><code>Looper</code></a> associated with the current thread, or the <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> of the
|
|
application's main thread if the current thread doesn't have a <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i49" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDataUriForString(java.lang.String,java.lang.String)">getDataUriForString</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> mimeType,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> data)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a data URI with the specified MIME type and data.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i50" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/util/Locale.html" title="class or interface in java.util" class="externalLink" target="_top">Locale</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDefaultDisplayLocale()">getDefaultDisplayLocale</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the default <a href="https://developer.android.com/reference/java/util/Locale.Category.html#DISPLAY" title="class or interface in java.util" class="externalLink"><code>DISPLAY</code></a> <a href="https://developer.android.com/reference/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink" target="_top"><code>Locale</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i51" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/graphics/drawable/Drawable.html" title="class or interface in android.graphics.drawable" class="externalLink" target="_top">Drawable</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDrawable(android.content.Context,android.content.res.Resources,int)">getDrawable</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/android/content/res/Resources.html" title="class or interface in android.content.res" class="externalLink" target="_top">Resources</a> resources,
|
|
int drawableRes)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a <a href="https://developer.android.com/reference/android/graphics/drawable/Drawable.html" title="class or interface in android.graphics.drawable" class="externalLink"><code>Drawable</code></a> for the given resource or throws a <a href="https://developer.android.com/reference/android/content/res/Resources.NotFoundException.html?is-external=true" title="class or interface in android.content.res" class="externalLink" target="_top"><code>Resources.NotFoundException</code></a> if not found.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i52" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/util/UUID.html" title="class or interface in java.util" class="externalLink" target="_top">UUID</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getDrmUuid(java.lang.String)">getDrmUuid</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> drmScheme)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Derives a DRM <a href="https://developer.android.com/reference/java/util/UUID.html" title="class or interface in java.util" class="externalLink" target="_top"><code>UUID</code></a> from <code>drmScheme</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i53" class="rowColor">
|
|
<td class="colFirst"><code>static @com.google.android.exoplayer2.PlaybackException.ErrorCode int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getErrorCodeForMediaDrmErrorCode(int)">getErrorCodeForMediaDrmErrorCode</a></span>​(int mediaDrmErrorCode)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a <a href="../PlaybackException.ErrorCode.html" title="annotation in com.google.android.exoplayer2"><code>PlaybackException.ErrorCode</code></a> value that corresponds to the provided <a href="https://developer.android.com/reference/android/media/MediaDrm.ErrorCodes.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaDrm.ErrorCodes</code></a> value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i54" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getErrorCodeFromPlatformDiagnosticsInfo(java.lang.String)">getErrorCodeFromPlatformDiagnosticsInfo</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> diagnosticsInfo)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Attempts to parse an error code from a diagnostic string found in framework media exceptions.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i55" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFormatSupportString(@com.google.android.exoplayer2.C.FormatSupportint)">getFormatSupportString</a></span>​(@com.google.android.exoplayer2.C.FormatSupport int formatSupport)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns string representation of a <a href="../C.FormatSupport.html" title="annotation in com.google.android.exoplayer2"><code>C.FormatSupport</code></a> flag.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i56" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getIntegerCodeForString(java.lang.String)">getIntegerCodeForString</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> string)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the integer equal to the big-endian concatenation of the characters in <code>string</code>
|
|
as bytes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i57" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getLocaleLanguageTag(java.util.Locale)">getLocaleLanguageTag</a></span>​(<a href="https://developer.android.com/reference/java/util/Locale.html" title="class or interface in java.util" class="externalLink" target="_top">Locale</a> locale)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the language tag for a <a href="https://developer.android.com/reference/java/util/Locale.html" title="class or interface in java.util" class="externalLink" target="_top"><code>Locale</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i58" class="altColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMediaDurationForPlayoutDuration(long,float)">getMediaDurationForPlayoutDuration</a></span>​(long playoutDuration,
|
|
float speed)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the duration of media that will elapse in <code>playoutDuration</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i59" class="rowColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNowUnixTimeMs(long)">getNowUnixTimeMs</a></span>​(long elapsedRealtimeEpochOffsetMs)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the current time in milliseconds since the epoch.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i60" class="altColor">
|
|
<td class="colFirst"><code>static @com.google.android.exoplayer2.C.PcmEncoding int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPcmEncoding(int)">getPcmEncoding</a></span>​(int bitDepth)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Converts a sample bit depth to a corresponding PCM encoding constant.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i61" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPcmFormat(@com.google.android.exoplayer2.C.PcmEncodingint,int,int)">getPcmFormat</a></span>​(@com.google.android.exoplayer2.C.PcmEncoding int pcmEncoding,
|
|
int channels,
|
|
int sampleRate)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Gets a PCM <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> with the specified parameters.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i62" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPcmFrameSize(@com.google.android.exoplayer2.C.PcmEncodingint,int)">getPcmFrameSize</a></span>​(@com.google.android.exoplayer2.C.PcmEncoding int pcmEncoding,
|
|
int channelCount)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the frame size for audio with <code>channelCount</code> channels in the specified encoding.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i63" class="rowColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPlayoutDurationForMediaDuration(long,float)">getPlayoutDurationForMediaDuration</a></span>​(long mediaDuration,
|
|
float speed)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the playout duration of <code>mediaDuration</code> of media.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i64" class="altColor">
|
|
<td class="colFirst"><code>static @com.google.android.exoplayer2.C.StreamType int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStreamTypeForAudioUsage(@com.google.android.exoplayer2.C.AudioUsageint)">getStreamTypeForAudioUsage</a></span>​(@com.google.android.exoplayer2.C.AudioUsage int usage)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the <a href="../C.StreamType.html" title="annotation in com.google.android.exoplayer2"><code>C.StreamType</code></a> corresponding to the specified <a href="../C.AudioUsage.html" title="annotation in com.google.android.exoplayer2"><code>C.AudioUsage</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i65" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getStringForTime(java.lang.StringBuilder,java.util.Formatter,long)">getStringForTime</a></span>​(<a href="https://developer.android.com/reference/java/lang/StringBuilder.html" title="class or interface in java.lang" class="externalLink" target="_top">StringBuilder</a> builder,
|
|
<a href="https://developer.android.com/reference/java/util/Formatter.html" title="class or interface in java.util" class="externalLink" target="_top">Formatter</a> formatter,
|
|
long timeMs)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the specified millisecond time formatted as a string.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i66" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSystemLanguageCodes()">getSystemLanguageCodes</a></span>()</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a non-empty array of normalized IETF BCP 47 language tags for the system languages
|
|
ordered by preference.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i67" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTrackTypeString(@com.google.android.exoplayer2.C.TrackTypeint)">getTrackTypeString</a></span>​(@com.google.android.exoplayer2.C.TrackType int trackType)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a string representation of a <a href="../C.TrackType.html" title="annotation in com.google.android.exoplayer2"><code>C.TrackType</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i68" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUserAgent(android.content.Context,java.lang.String)">getUserAgent</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> applicationName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a user agent string based on the given application name and the library version.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i69" class="rowColor">
|
|
<td class="colFirst"><code>static byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUtf8Bytes(java.lang.String)">getUtf8Bytes</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> value)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a new byte array containing the code points of a <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>String</code></a> encoded using UTF-8.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i70" class="altColor">
|
|
<td class="colFirst"><code>static byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#gzip(byte%5B%5D)">gzip</a></span>​(byte[] input)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Compresses <code>input</code> using gzip and returns the result in a newly allocated byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i71" class="rowColor">
|
|
<td class="colFirst"><code>static @com.google.android.exoplayer2.C.ContentType int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inferContentType(android.net.Uri)">inferContentType</a></span>​(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Makes a best guess to infer the <a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2"><code>C.ContentType</code></a> from a <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i72" class="altColor">
|
|
<td class="colFirst"><code>static @com.google.android.exoplayer2.C.ContentType int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inferContentType(android.net.Uri,java.lang.String)">inferContentType</a></span>​(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> overrideExtension)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#inferContentTypeForExtension(java.lang.String)"><code>inferContentTypeForExtension(String)</code></a> when <code>overrideExtension</code> is
|
|
non-empty, and <a href="#inferContentType(android.net.Uri)"><code>inferContentType(Uri)</code></a> otherwise.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i73" class="rowColor">
|
|
<td class="colFirst"><code>static @com.google.android.exoplayer2.C.ContentType int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inferContentType(java.lang.String)">inferContentType</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="https://developer.android.com/reference/android/net/Uri.html#parse(java.lang.String)" title="class or interface in android.net" class="externalLink"><code>Uri.parse(String)</code></a> and <a href="#inferContentType(android.net.Uri)" target="_top"><code>inferContentType(Uri)</code></a> for full file
|
|
paths or <a href="#inferContentTypeForExtension(java.lang.String)"><code>inferContentTypeForExtension(String)</code></a> for extensions.</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i74" class="altColor">
|
|
<td class="colFirst"><code>static @com.google.android.exoplayer2.C.ContentType int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inferContentTypeForExtension(java.lang.String)">inferContentTypeForExtension</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileExtension)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Makes a best guess to infer the <a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2"><code>C.ContentType</code></a> from a file extension.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i75" class="rowColor">
|
|
<td class="colFirst"><code>static @com.google.android.exoplayer2.C.ContentType int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inferContentTypeForUriAndMimeType(android.net.Uri,java.lang.String)">inferContentTypeForUriAndMimeType</a></span>​(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> mimeType)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Makes a best guess to infer the <a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2"><code>C.ContentType</code></a> from a <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a> and optional MIME type.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i76" class="altColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#inflate(com.google.android.exoplayer2.util.ParsableByteArray,com.google.android.exoplayer2.util.ParsableByteArray,java.util.zip.Inflater)">inflate</a></span>​(<a href="ParsableByteArray.html" title="class in com.google.android.exoplayer2.util">ParsableByteArray</a> input,
|
|
<a href="ParsableByteArray.html" title="class in com.google.android.exoplayer2.util">ParsableByteArray</a> output,
|
|
<a href="https://developer.android.com/reference/java/util/zip/Inflater.html" title="class or interface in java.util.zip" class="externalLink" target="_top">Inflater</a> inflater)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Uncompresses the data in <code>input</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i77" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intToStringMaxRadix(int)">intToStringMaxRadix</a></span>​(int i)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a string representation of the integer using radix value <a href="https://developer.android.com/reference/java/lang/Character.html#MAX_RADIX" title="class or interface in java.lang" class="externalLink" target="_top"><code>Character.MAX_RADIX</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i78" class="altColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAutomotive(android.content.Context)">isAutomotive</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether the app is running on an automotive device.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i79" class="rowColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEncodingHighResolutionPcm(@com.google.android.exoplayer2.C.PcmEncodingint)">isEncodingHighResolutionPcm</a></span>​(@com.google.android.exoplayer2.C.PcmEncoding int encoding)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether <code>encoding</code> is high resolution (> 16-bit) PCM.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i80" class="altColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEncodingLinearPcm(@com.google.android.exoplayer2.C.Encodingint)">isEncodingLinearPcm</a></span>​(@com.google.android.exoplayer2.C.Encoding int encoding)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether <code>encoding</code> is one of the linear PCM encodings.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i81" class="rowColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isLinebreak(int)">isLinebreak</a></span>​(int c)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether the given character is a carriage return ('\r') or a line feed ('\n').</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i82" class="altColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isLocalFileUri(android.net.Uri)">isLocalFileUri</a></span>​(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns true if the URI is a path to a local file or a reference to a local file.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i83" class="rowColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isTv(android.content.Context)">isTv</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether the app is running on a TV device.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i84" class="altColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#linearSearch(int%5B%5D,int)">linearSearch</a></span>​(int[] array,
|
|
int value)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the first occurrence of <code>value</code> in <code>array</code>, or <a href="../C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if <code>value</code> is not contained in <code>array</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i85" class="rowColor">
|
|
<td class="colFirst"><code>static int</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#linearSearch(long%5B%5D,long)">linearSearch</a></span>​(long[] array,
|
|
long value)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the index of the first occurrence of <code>value</code> in <code>array</code>, or <a href="../C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if <code>value</code> is not contained in <code>array</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i86" class="altColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maxValue(android.util.SparseLongArray)">maxValue</a></span>​(<a href="https://developer.android.com/reference/android/util/SparseLongArray.html" title="class or interface in android.util" class="externalLink" target="_top">SparseLongArray</a> sparseLongArray)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the maximum value in the given <a href="https://developer.android.com/reference/android/util/SparseLongArray.html" title="class or interface in android.util" class="externalLink" target="_top"><code>SparseLongArray</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i87" class="rowColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maybeRequestReadExternalStoragePermission(android.app.Activity,android.net.Uri...)">maybeRequestReadExternalStoragePermission</a></span>​(<a href="https://developer.android.com/reference/android/app/Activity.html" title="class or interface in android.app" class="externalLink" target="_top">Activity</a> activity,
|
|
<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>... uris)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Checks whether it's necessary to request the <a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE" title="class or interface in android" class="externalLink" target="_top"><code>Manifest.permission.READ_EXTERNAL_STORAGE</code></a>
|
|
permission read the specified <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a>s, requesting the permission if necessary.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i88" class="altColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maybeRequestReadExternalStoragePermission(android.app.Activity,com.google.android.exoplayer2.MediaItem...)">maybeRequestReadExternalStoragePermission</a></span>​(<a href="https://developer.android.com/reference/android/app/Activity.html" title="class or interface in android.app" class="externalLink" target="_top">Activity</a> activity,
|
|
<a href="../MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>... mediaItems)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Checks whether it's necessary to request the <a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE" title="class or interface in android" class="externalLink" target="_top"><code>Manifest.permission.READ_EXTERNAL_STORAGE</code></a>
|
|
permission for the specified <a href="../MediaItem.html" title="class in com.google.android.exoplayer2"><code>media items</code></a>, requesting the permission if
|
|
necessary.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i89" class="rowColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#minValue(android.util.SparseLongArray)">minValue</a></span>​(<a href="https://developer.android.com/reference/android/util/SparseLongArray.html" title="class or interface in android.util" class="externalLink" target="_top">SparseLongArray</a> sparseLongArray)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the minimum value in the given <a href="https://developer.android.com/reference/android/util/SparseLongArray.html" title="class or interface in android.util" class="externalLink" target="_top"><code>SparseLongArray</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i90" class="altColor">
|
|
<td class="colFirst"><code>static <T> void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#moveItems(java.util.List,int,int,int)">moveItems</a></span>​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink" target="_top">List</a><T> items,
|
|
int fromIndex,
|
|
int toIndex,
|
|
int newFromIndex)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Moves the elements starting at <code>fromIndex</code> to <code>newFromIndex</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i91" class="rowColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#msToUs(long)">msToUs</a></span>​(long timeMs)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Converts a time in milliseconds to the corresponding time in microseconds, preserving <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> values and <a href="../C.html#TIME_END_OF_SOURCE"><code>C.TIME_END_OF_SOURCE</code></a> values.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i92" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/util/concurrent/ExecutorService.html" title="class or interface in java.util.concurrent" class="externalLink" target="_top">ExecutorService</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newSingleThreadExecutor(java.lang.String)">newSingleThreadExecutor</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> threadName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Instantiates a new single threaded executor whose thread has the specified name.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i93" class="rowColor">
|
|
<td class="colFirst"><code>static @PolyNull <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#normalizeLanguageCode(java.lang.String)">normalizeLanguageCode</a></span>​(@PolyNull <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> language)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a normalized IETF BCP 47 language tag for <code>language</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i94" class="altColor">
|
|
<td class="colFirst"><code>static <T> T[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nullSafeArrayAppend(T%5B%5D,T)">nullSafeArrayAppend</a></span>​(T[] original,
|
|
T newElement)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a new array containing <code>original</code> with <code>newElement</code> appended.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i95" class="rowColor">
|
|
<td class="colFirst"><code>static <T> T[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nullSafeArrayConcatenation(T%5B%5D,T%5B%5D)">nullSafeArrayConcatenation</a></span>​(T[] first,
|
|
T[] second)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Creates a new array containing the concatenation of two non-null type arrays.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i96" class="altColor">
|
|
<td class="colFirst"><code>static <T> T[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nullSafeArrayCopy(T%5B%5D,int)">nullSafeArrayCopy</a></span>​(T[] input,
|
|
int length)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Copies and optionally truncates an array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i97" class="rowColor">
|
|
<td class="colFirst"><code>static <T> T[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nullSafeArrayCopyOfRange(T%5B%5D,int,int)">nullSafeArrayCopyOfRange</a></span>​(T[] input,
|
|
int from,
|
|
int to)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Copies a subset of an array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i98" class="altColor">
|
|
<td class="colFirst"><code>static <T> void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nullSafeListToArray(java.util.List,T%5B%5D)">nullSafeListToArray</a></span>​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink" target="_top">List</a><T> list,
|
|
T[] array)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Copies the contents of <code>list</code> into <code>array</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i99" class="rowColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseXsDateTime(java.lang.String)">parseXsDateTime</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> value)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Parses an xs:dateTime attribute value, returning the parsed timestamp in milliseconds since the
|
|
epoch.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i100" class="altColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#parseXsDuration(java.lang.String)">parseXsDuration</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> value)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Parses an xs:duration attribute value, returning the parsed duration in milliseconds.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i101" class="rowColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#postOrRun(android.os.Handler,java.lang.Runnable)">postOrRun</a></span>​(<a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a> handler,
|
|
<a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top">Runnable</a> runnable)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Posts the <a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink"><code>Runnable</code></a> if the calling thread differs with the <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Looper</code></a> of the <a href="https://developer.android.com/reference/android/os/Handler.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Handler</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i102" class="altColor">
|
|
<td class="colFirst"><code>static <T> <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink">ListenableFuture</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#postOrRunWithCompletion(android.os.Handler,java.lang.Runnable,T)">postOrRunWithCompletion</a></span>​(<a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a> handler,
|
|
<a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top">Runnable</a> runnable,
|
|
T successValue)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Posts the <a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink"><code>Runnable</code></a> if the calling thread differs with the <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Looper</code></a> of the <a href="https://developer.android.com/reference/android/os/Handler.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Handler</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i103" class="rowColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#readBoolean(android.os.Parcel)">readBoolean</a></span>​(<a href="https://developer.android.com/reference/android/os/Parcel.html" title="class or interface in android.os" class="externalLink" target="_top">Parcel</a> parcel)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Reads an integer from a <a href="https://developer.android.com/reference/android/os/Parcel.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Parcel</code></a> and interprets it as a boolean, with 0 mapping to false
|
|
and all other values mapping to true.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i104" class="altColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#recursiveDelete(java.io.File)">recursiveDelete</a></span>​(<a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink" target="_top">File</a> fileOrDirectory)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Recursively deletes a directory and its content.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i105" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#registerReceiverNotExported(android.content.Context,android.content.BroadcastReceiver,android.content.IntentFilter)">registerReceiverNotExported</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/android/content/BroadcastReceiver.html" title="class or interface in android.content" class="externalLink" target="_top">BroadcastReceiver</a> receiver,
|
|
<a href="https://developer.android.com/reference/android/content/IntentFilter.html" title="class or interface in android.content" class="externalLink" target="_top">IntentFilter</a> filter)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Registers a <a href="https://developer.android.com/reference/android/content/BroadcastReceiver.html" title="class or interface in android.content" class="externalLink" target="_top"><code>BroadcastReceiver</code></a> that's not intended to receive broadcasts from other
|
|
apps.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i106" class="altColor">
|
|
<td class="colFirst"><code>static <T> void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#removeRange(java.util.List,int,int)">removeRange</a></span>​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink" target="_top">List</a><T> list,
|
|
int fromIndex,
|
|
int toIndex)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Removes an indexed range from a List.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i107" class="rowColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#scaleLargeTimestamp(long,long,long)">scaleLargeTimestamp</a></span>​(long timestamp,
|
|
long multiplier,
|
|
long divisor)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Scales a large timestamp.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i108" class="altColor">
|
|
<td class="colFirst"><code>static long[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#scaleLargeTimestamps(java.util.List,long,long)">scaleLargeTimestamps</a></span>​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><<a href="https://developer.android.com/reference/java/lang/Long.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">Long</a>> timestamps,
|
|
long multiplier,
|
|
long divisor)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Applies <a href="#scaleLargeTimestamp(long,long,long)"><code>scaleLargeTimestamp(long, long, long)</code></a> to a list of unscaled timestamps.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i109" class="rowColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#scaleLargeTimestampsInPlace(long%5B%5D,long,long)">scaleLargeTimestampsInPlace</a></span>​(long[] timestamps,
|
|
long multiplier,
|
|
long divisor)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Applies <a href="#scaleLargeTimestamp(long,long,long)"><code>scaleLargeTimestamp(long, long, long)</code></a> to an array of unscaled timestamps.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i110" class="altColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sneakyThrow(java.lang.Throwable)">sneakyThrow</a></span>​(<a href="https://developer.android.com/reference/java/lang/Throwable.html" title="class or interface in java.lang" class="externalLink" target="_top">Throwable</a> t)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">A hacky method that always throws <code>t</code> even if <code>t</code> is a checked exception, and is
|
|
not declared to be thrown.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i111" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#split(java.lang.String,java.lang.String)">split</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> value,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> regex)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Splits a string using <code>value.split(regex, -1</code>).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i112" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#splitAtFirst(java.lang.String,java.lang.String)">splitAtFirst</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> value,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> regex)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Splits the string at the first occurrence of the delimiter <code>regex</code>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i113" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#splitCodecs(java.lang.String)">splitCodecs</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> codecs)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Splits a codecs sequence string, as defined in RFC 6381, into individual codec strings.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i114" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/content/ComponentName.html" title="class or interface in android.content" class="externalLink" target="_top">ComponentName</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#startForegroundService(android.content.Context,android.content.Intent)">startForegroundService</a></span>​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a> intent)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Calls <a href="https://developer.android.com/reference/android/content/Context.html#startForegroundService(android.content.Intent)" title="class or interface in android.content" class="externalLink"><code>Context.startForegroundService(Intent)</code></a> if <a href="#SDK_INT" target="_top"><code>SDK_INT</code></a> is 26 or higher, or
|
|
<a href="https://developer.android.com/reference/android/content/Context.html#startService(android.content.Intent)" title="class or interface in android.content" class="externalLink" target="_top"><code>Context.startService(Intent)</code></a> otherwise.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i115" class="rowColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#subtractWithOverflowDefault(long,long,long)">subtractWithOverflowDefault</a></span>​(long x,
|
|
long y,
|
|
long overflowResult)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the difference between two arguments, or a third argument if the result overflows.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i116" class="altColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#sum(long...)">sum</a></span>​(long... summands)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the sum of all summands of the given array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i117" class="rowColor">
|
|
<td class="colFirst"><code>static boolean</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#tableExists(android.database.sqlite.SQLiteDatabase,java.lang.String)">tableExists</a></span>​(<a href="https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html" title="class or interface in android.database.sqlite" class="externalLink" target="_top">SQLiteDatabase</a> database,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> tableName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns whether the table exists in the database.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i118" class="altColor">
|
|
<td class="colFirst"><code>static byte[]</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toByteArray(java.io.InputStream)">toByteArray</a></span>​(<a href="https://developer.android.com/reference/java/io/InputStream.html" title="class or interface in java.io" class="externalLink" target="_top">InputStream</a> inputStream)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Converts the entirety of an <a href="https://developer.android.com/reference/java/io/InputStream.html" title="class or interface in java.io" class="externalLink" target="_top"><code>InputStream</code></a> to a byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i119" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toHexString(byte%5B%5D)">toHexString</a></span>​(byte[] bytes)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns a string containing a lower-case hex representation of the bytes provided.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i120" class="altColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toLong(int,int)">toLong</a></span>​(int mostSignificantBits,
|
|
int leastSignificantBits)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Returns the long that is composed of the bits of the 2 specified integers.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i121" class="rowColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toUnsignedLong(int)">toUnsignedLong</a></span>​(int x)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Converts an integer to a long by unsigned conversion.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i122" class="altColor">
|
|
<td class="colFirst"><code>static <T,​U><br><a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink">ListenableFuture</a><T></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#transformFutureAsync(com.google.common.util.concurrent.ListenableFuture,com.google.common.util.concurrent.AsyncFunction)">transformFutureAsync</a></span>​(<a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink">ListenableFuture</a><U> future,
|
|
<a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink">AsyncFunction</a><U,​T> transformFunction)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Asynchronously transforms the result of a <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink"><code>ListenableFuture</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i123" class="rowColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/CharSequence.html" title="class or interface in java.lang" class="externalLink" target="_top">CharSequence</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#truncateAscii(java.lang.CharSequence,int)">truncateAscii</a></span>​(<a href="https://developer.android.com/reference/java/lang/CharSequence.html" title="class or interface in java.lang" class="externalLink" target="_top">CharSequence</a> sequence,
|
|
int maxLength)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Truncates a sequence of ASCII characters to a maximum length.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i124" class="altColor">
|
|
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unescapeFileName(java.lang.String)">unescapeFileName</a></span>​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Unescapes an escaped file or directory name back to its original value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i125" class="rowColor">
|
|
<td class="colFirst"><code>static long</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#usToMs(long)">usToMs</a></span>​(long timeUs)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Converts a time in microseconds to the corresponding time in milliseconds, preserving <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> and <a href="../C.html#TIME_END_OF_SOURCE"><code>C.TIME_END_OF_SOURCE</code></a> values.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i126" class="altColor">
|
|
<td class="colFirst"><code>static void</code></td>
|
|
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#writeBoolean(android.os.Parcel,boolean)">writeBoolean</a></span>​(<a href="https://developer.android.com/reference/android/os/Parcel.html" title="class or interface in android.os" class="externalLink" target="_top">Parcel</a> parcel,
|
|
boolean value)</code></th>
|
|
<td class="colLast">
|
|
<div class="block">Writes a boolean to a <a href="https://developer.android.com/reference/android/os/Parcel.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Parcel</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
|
|
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="field.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a id="SDK_INT">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>SDK_INT</h4>
|
|
<pre>public static final int SDK_INT</pre>
|
|
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.VERSION.html#SDK_INT" title="class or interface in android.os" class="externalLink" target="_top"><code>Build.VERSION.SDK_INT</code></a>, but in a place where it can be conveniently overridden for
|
|
local testing.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="DEVICE">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEVICE</h4>
|
|
<pre>public static final <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> DEVICE</pre>
|
|
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html#DEVICE" title="class or interface in android.os" class="externalLink" target="_top"><code>Build.DEVICE</code></a>, but in a place where it can be conveniently overridden for local
|
|
testing.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="MANUFACTURER">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>MANUFACTURER</h4>
|
|
<pre>public static final <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> MANUFACTURER</pre>
|
|
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html#MANUFACTURER" title="class or interface in android.os" class="externalLink" target="_top"><code>Build.MANUFACTURER</code></a>, but in a place where it can be conveniently overridden for
|
|
local testing.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="MODEL">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>MODEL</h4>
|
|
<pre>public static final <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> MODEL</pre>
|
|
<div class="block">Like <a href="https://developer.android.com/reference/android/os/Build.html#MODEL" title="class or interface in android.os" class="externalLink" target="_top"><code>Build.MODEL</code></a>, but in a place where it can be conveniently overridden for local
|
|
testing.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="DEVICE_DEBUG_INFO">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>DEVICE_DEBUG_INFO</h4>
|
|
<pre>public static final <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> DEVICE_DEBUG_INFO</pre>
|
|
<div class="block">A concise description of the device that it can be useful to log for debugging purposes.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="EMPTY_BYTE_ARRAY">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>EMPTY_BYTE_ARRAY</h4>
|
|
<pre>public static final byte[] EMPTY_BYTE_ARRAY</pre>
|
|
<div class="block">An empty byte array.</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<section role="region">
|
|
<ul class="blockList">
|
|
<li class="blockList"><a id="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a id="toByteArray(java.io.InputStream)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>toByteArray</h4>
|
|
<pre class="methodSignature">public static byte[] toByteArray​(<a href="https://developer.android.com/reference/java/io/InputStream.html" title="class or interface in java.io" class="externalLink" target="_top">InputStream</a> inputStream)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Converts the entirety of an <a href="https://developer.android.com/reference/java/io/InputStream.html" title="class or interface in java.io" class="externalLink" target="_top"><code>InputStream</code></a> to a byte array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>inputStream</code> - the <a href="https://developer.android.com/reference/java/io/InputStream.html" title="class or interface in java.io" class="externalLink" target="_top"><code>InputStream</code></a> to be read. The input stream is not closed by this
|
|
method.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a byte array containing all of the inputStream's bytes.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code> - if an error occurs reading from the stream.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="registerReceiverNotExported(android.content.Context,android.content.BroadcastReceiver,android.content.IntentFilter)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>registerReceiverNotExported</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
public static <a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink">Intent</a> registerReceiverNotExported​(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
@Nullable
|
|
<a href="https://developer.android.com/reference/android/content/BroadcastReceiver.html" title="class or interface in android.content" class="externalLink" target="_top">BroadcastReceiver</a> receiver,
|
|
<a href="https://developer.android.com/reference/android/content/IntentFilter.html" title="class or interface in android.content" class="externalLink" target="_top">IntentFilter</a> filter)</pre>
|
|
<div class="block">Registers a <a href="https://developer.android.com/reference/android/content/BroadcastReceiver.html" title="class or interface in android.content" class="externalLink" target="_top"><code>BroadcastReceiver</code></a> that's not intended to receive broadcasts from other
|
|
apps. This will be enforced by specifying <a href="https://developer.android.com/reference/android/content/Context.html#RECEIVER_NOT_EXPORTED" title="class or interface in android.content" class="externalLink"><code>Context.RECEIVER_NOT_EXPORTED</code></a> if <a href="#SDK_INT" target="_top"><code>SDK_INT</code></a> is 33 or above.
|
|
|
|
<p>Do not use this method if registering a receiver for a <a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/res/AndroidManifest.xml">protected
|
|
system broadcast</a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>context</code> - The context on which <a href="https://developer.android.com/reference/android/content/Context.html#registerReceiver(android.content.BroadcastReceiver,android.content.IntentFilter)" title="class or interface in android.content" class="externalLink" target="_top"><code>Context.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)</code></a> will be called.</dd>
|
|
<dd><code>receiver</code> - The <a href="https://developer.android.com/reference/android/content/BroadcastReceiver.html" title="class or interface in android.content" class="externalLink" target="_top"><code>BroadcastReceiver</code></a> to register. This value may be null.</dd>
|
|
<dd><code>filter</code> - Selects the Intent broadcasts to be received.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The first sticky intent found that matches <code>filter</code>, or null if there are none.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="startForegroundService(android.content.Context,android.content.Intent)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>startForegroundService</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
public static <a href="https://developer.android.com/reference/android/content/ComponentName.html" title="class or interface in android.content" class="externalLink">ComponentName</a> startForegroundService​(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/android/content/Intent.html" title="class or interface in android.content" class="externalLink" target="_top">Intent</a> intent)</pre>
|
|
<div class="block">Calls <a href="https://developer.android.com/reference/android/content/Context.html#startForegroundService(android.content.Intent)" title="class or interface in android.content" class="externalLink"><code>Context.startForegroundService(Intent)</code></a> if <a href="#SDK_INT" target="_top"><code>SDK_INT</code></a> is 26 or higher, or
|
|
<a href="https://developer.android.com/reference/android/content/Context.html#startService(android.content.Intent)" title="class or interface in android.content" class="externalLink" target="_top"><code>Context.startService(Intent)</code></a> otherwise.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>context</code> - The context to call.</dd>
|
|
<dd><code>intent</code> - The intent to pass to the called method.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The result of the called method.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="maybeRequestReadExternalStoragePermission(android.app.Activity,android.net.Uri...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>maybeRequestReadExternalStoragePermission</h4>
|
|
<pre class="methodSignature">public static boolean maybeRequestReadExternalStoragePermission​(<a href="https://developer.android.com/reference/android/app/Activity.html" title="class or interface in android.app" class="externalLink" target="_top">Activity</a> activity,
|
|
<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>... uris)</pre>
|
|
<div class="block">Checks whether it's necessary to request the <a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE" title="class or interface in android" class="externalLink" target="_top"><code>Manifest.permission.READ_EXTERNAL_STORAGE</code></a>
|
|
permission read the specified <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a>s, requesting the permission if necessary.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>activity</code> - The host activity for checking and requesting the permission.</dd>
|
|
<dd><code>uris</code> - <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink"><code>Uri</code></a>s that may require <a href="https://developer.android.com/reference/android/Manifest.permission.html?is-external=true#READ_EXTERNAL_STORAGE" title="class or interface in android" class="externalLink" target="_top"><code>Manifest.permission.READ_EXTERNAL_STORAGE</code></a> to read.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether a permission request was made.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="maybeRequestReadExternalStoragePermission(android.app.Activity,com.google.android.exoplayer2.MediaItem...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>maybeRequestReadExternalStoragePermission</h4>
|
|
<pre class="methodSignature">public static boolean maybeRequestReadExternalStoragePermission​(<a href="https://developer.android.com/reference/android/app/Activity.html" title="class or interface in android.app" class="externalLink" target="_top">Activity</a> activity,
|
|
<a href="../MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>... mediaItems)</pre>
|
|
<div class="block">Checks whether it's necessary to request the <a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE" title="class or interface in android" class="externalLink" target="_top"><code>Manifest.permission.READ_EXTERNAL_STORAGE</code></a>
|
|
permission for the specified <a href="../MediaItem.html" title="class in com.google.android.exoplayer2"><code>media items</code></a>, requesting the permission if
|
|
necessary.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>activity</code> - The host activity for checking and requesting the permission.</dd>
|
|
<dd><code>mediaItems</code> - <a href="../MediaItem.html" title="class in com.google.android.exoplayer2"><code>Media items</code></a>s that may require <a href="https://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE" title="class or interface in android" class="externalLink" target="_top"><code>Manifest.permission.READ_EXTERNAL_STORAGE</code></a> to read.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether a permission request was made.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="checkCleartextTrafficPermitted(com.google.android.exoplayer2.MediaItem...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>checkCleartextTrafficPermitted</h4>
|
|
<pre class="methodSignature">public static boolean checkCleartextTrafficPermitted​(<a href="../MediaItem.html" title="class in com.google.android.exoplayer2">MediaItem</a>... mediaItems)</pre>
|
|
<div class="block">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.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>mediaItems</code> - A list of <a href="../MediaItem.html" title="class in com.google.android.exoplayer2"><code>media items</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether it may be possible to load the URIs of the given media items.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="isLocalFileUri(android.net.Uri)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isLocalFileUri</h4>
|
|
<pre class="methodSignature">public static boolean isLocalFileUri​(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)</pre>
|
|
<div class="block">Returns true if the URI is a path to a local file or a reference to a local file.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>uri</code> - The uri to test.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="areEqual(java.lang.Object,java.lang.Object)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>areEqual</h4>
|
|
<pre class="methodSignature">public static boolean areEqual​(@Nullable
|
|
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a> o1,
|
|
@Nullable
|
|
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a> o2)</pre>
|
|
<div class="block">Tests two objects for <a href="https://developer.android.com/reference/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink" target="_top"><code>Object.equals(Object)</code></a> equality, handling the case where one or
|
|
both may be null.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>o1</code> - The first object.</dd>
|
|
<dd><code>o2</code> - The second object.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd><code>o1 == null ? o2 == null : o1.equals(o2)</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="contains(java.lang.Object[],java.lang.Object)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>contains</h4>
|
|
<pre class="methodSignature">public static boolean contains​(@NullableType <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>[] items,
|
|
@Nullable
|
|
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a> item)</pre>
|
|
<div class="block">Tests whether an <code>items</code> array contains an object equal to <code>item</code>, according to
|
|
<a href="https://developer.android.com/reference/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink" target="_top"><code>Object.equals(Object)</code></a>.
|
|
|
|
<p>If <code>item</code> is null then true is returned if and only if <code>items</code> contains null.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>items</code> - The array of items to search.</dd>
|
|
<dd><code>item</code> - The item to search for.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>True if the array contains an object equal to the item being searched for.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="removeRange(java.util.List,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeRange</h4>
|
|
<pre class="methodSignature">public static <T> void removeRange​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink" target="_top">List</a><T> list,
|
|
int fromIndex,
|
|
int toIndex)</pre>
|
|
<div class="block">Removes an indexed range from a List.
|
|
|
|
<p>Does nothing if the provided range is valid and <code>fromIndex == toIndex</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>list</code> - The List to remove the range from.</dd>
|
|
<dd><code>fromIndex</code> - The first index to be removed (inclusive).</dd>
|
|
<dd><code>toIndex</code> - The last index to be removed (exclusive).</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="externalLink" target="_top">IllegalArgumentException</a></code> - If <code>fromIndex</code> < 0, <code>toIndex</code> > <code>
|
|
list.size()</code>, or <code>fromIndex</code> > <code>toIndex</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="castNonNull(java.lang.Object)">
|
|
<!-- -->
|
|
</a><a id="castNonNull(T)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>castNonNull</h4>
|
|
<pre class="methodSignature">@EnsuresNonNull("#1")
|
|
public static <T> T castNonNull​(@Nullable
|
|
T value)</pre>
|
|
<div class="block">Casts a nullable variable to a non-null variable without runtime null check.
|
|
|
|
<p>Use <a href="Assertions.html#checkNotNull(T)"><code>Assertions.checkNotNull(Object)</code></a> to throw if the value is null.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="castNonNullTypeArray(java.lang.Object[])">
|
|
<!-- -->
|
|
</a><a id="castNonNullTypeArray(T[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>castNonNullTypeArray</h4>
|
|
<pre class="methodSignature">@EnsuresNonNull("#1")
|
|
public static <T> T[] castNonNullTypeArray​(@NullableType T[] value)</pre>
|
|
<div class="block">Casts a nullable type array to a non-null type array without runtime null check.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="nullSafeArrayCopy(java.lang.Object[],int)">
|
|
<!-- -->
|
|
</a><a id="nullSafeArrayCopy(T[],int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nullSafeArrayCopy</h4>
|
|
<pre class="methodSignature">public static <T> T[] nullSafeArrayCopy​(T[] input,
|
|
int length)</pre>
|
|
<div class="block">Copies and optionally truncates an array. Prevents null array elements created by <a href="https://developer.android.com/reference/java/util/Arrays.html#copyOf(T%5B%5D,int)" title="class or interface in java.util" class="externalLink" target="_top"><code>Arrays.copyOf(Object[], int)</code></a> by ensuring the new length does not exceed the current length.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>input</code> - The input array.</dd>
|
|
<dd><code>length</code> - The output array length. Must be less or equal to the length of the input array.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The copied array.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="nullSafeArrayCopyOfRange(java.lang.Object[],int,int)">
|
|
<!-- -->
|
|
</a><a id="nullSafeArrayCopyOfRange(T[],int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nullSafeArrayCopyOfRange</h4>
|
|
<pre class="methodSignature">public static <T> T[] nullSafeArrayCopyOfRange​(T[] input,
|
|
int from,
|
|
int to)</pre>
|
|
<div class="block">Copies a subset of an array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>input</code> - The input array.</dd>
|
|
<dd><code>from</code> - The start the range to be copied, inclusive</dd>
|
|
<dd><code>to</code> - The end of the range to be copied, exclusive.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The copied array.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="nullSafeArrayAppend(java.lang.Object[],java.lang.Object)">
|
|
<!-- -->
|
|
</a><a id="nullSafeArrayAppend(T[],T)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nullSafeArrayAppend</h4>
|
|
<pre class="methodSignature">public static <T> T[] nullSafeArrayAppend​(T[] original,
|
|
T newElement)</pre>
|
|
<div class="block">Creates a new array containing <code>original</code> with <code>newElement</code> appended.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>original</code> - The input array.</dd>
|
|
<dd><code>newElement</code> - The element to append.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The new array.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="nullSafeArrayConcatenation(java.lang.Object[],java.lang.Object[])">
|
|
<!-- -->
|
|
</a><a id="nullSafeArrayConcatenation(T[],T[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nullSafeArrayConcatenation</h4>
|
|
<pre class="methodSignature">public static <T> T[] nullSafeArrayConcatenation​(T[] first,
|
|
T[] second)</pre>
|
|
<div class="block">Creates a new array containing the concatenation of two non-null type arrays.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>first</code> - The first array.</dd>
|
|
<dd><code>second</code> - The second array.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The concatenated result.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="nullSafeListToArray(java.util.List,java.lang.Object[])">
|
|
<!-- -->
|
|
</a><a id="nullSafeListToArray(java.util.List,T[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nullSafeListToArray</h4>
|
|
<pre class="methodSignature">public static <T> void nullSafeListToArray​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink" target="_top">List</a><T> list,
|
|
T[] array)</pre>
|
|
<div class="block">Copies the contents of <code>list</code> into <code>array</code>.
|
|
|
|
<p><code>list.size()</code> must be the same as <code>array.length</code> to ensure the contents can be
|
|
copied into <code>array</code> without leaving any nulls at the end.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>list</code> - The list to copy items from.</dd>
|
|
<dd><code>array</code> - The array to copy items to.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="createHandlerForCurrentLooper()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createHandlerForCurrentLooper</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a> createHandlerForCurrentLooper()</pre>
|
|
<div class="block">Creates a <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> on the current <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink">IllegalStateException</a></code> - If the current thread doesn't have a <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="createHandlerForCurrentLooper(android.os.Handler.Callback)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createHandlerForCurrentLooper</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a> createHandlerForCurrentLooper​(@Nullable
|
|
@UnknownInitialization <a href="https://developer.android.com/reference/android/os/Handler.Callback.html" title="class or interface in android.os" class="externalLink" target="_top">Handler.Callback</a> callback)</pre>
|
|
<div class="block">Creates a <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> with the specified <a href="https://developer.android.com/reference/android/os/Handler.Callback.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Handler.Callback</code></a> on the current <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.
|
|
|
|
<p>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.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>callback</code> - A <a href="https://developer.android.com/reference/android/os/Handler.Callback.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Handler.Callback</code></a>. May be a partially initialized class, or null if no
|
|
callback is required.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> with the specified callback on the current <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="externalLink">IllegalStateException</a></code> - If the current thread doesn't have a <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="createHandlerForCurrentOrMainLooper()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createHandlerForCurrentOrMainLooper</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a> createHandlerForCurrentOrMainLooper()</pre>
|
|
<div class="block">Creates a <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> on the current <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.
|
|
|
|
<p>If the current thread doesn't have a <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink"><code>Looper</code></a>, the application's main thread <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> is used.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="createHandlerForCurrentOrMainLooper(android.os.Handler.Callback)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createHandlerForCurrentOrMainLooper</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a> createHandlerForCurrentOrMainLooper​(@Nullable
|
|
@UnknownInitialization <a href="https://developer.android.com/reference/android/os/Handler.Callback.html" title="class or interface in android.os" class="externalLink" target="_top">Handler.Callback</a> callback)</pre>
|
|
<div class="block">Creates a <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> with the specified <a href="https://developer.android.com/reference/android/os/Handler.Callback.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Handler.Callback</code></a> on the current <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.
|
|
|
|
<p>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.
|
|
|
|
<p>If the current thread doesn't have a <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink"><code>Looper</code></a>, the application's main thread <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> is used.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>callback</code> - A <a href="https://developer.android.com/reference/android/os/Handler.Callback.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Handler.Callback</code></a>. May be a partially initialized class, or null if no
|
|
callback is required.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> with the specified callback on the current <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="createHandler(android.os.Looper,android.os.Handler.Callback)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createHandler</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink">Handler</a> createHandler​(<a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top">Looper</a> looper,
|
|
@Nullable
|
|
@UnknownInitialization <a href="https://developer.android.com/reference/android/os/Handler.Callback.html" title="class or interface in android.os" class="externalLink" target="_top">Handler.Callback</a> callback)</pre>
|
|
<div class="block">Creates a <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> with the specified <a href="https://developer.android.com/reference/android/os/Handler.Callback.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Handler.Callback</code></a> on the specified <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.
|
|
|
|
<p>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.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>looper</code> - A <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> to run the callback on.</dd>
|
|
<dd><code>callback</code> - A <a href="https://developer.android.com/reference/android/os/Handler.Callback.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Handler.Callback</code></a>. May be a partially initialized class, or null if no
|
|
callback is required.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A <a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink"><code>Handler</code></a> with the specified callback on the current <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> thread.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="postOrRun(android.os.Handler,java.lang.Runnable)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>postOrRun</h4>
|
|
<pre class="methodSignature">public static boolean postOrRun​(<a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a> handler,
|
|
<a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top">Runnable</a> runnable)</pre>
|
|
<div class="block">Posts the <a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink"><code>Runnable</code></a> if the calling thread differs with the <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Looper</code></a> of the <a href="https://developer.android.com/reference/android/os/Handler.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Handler</code></a>. Otherwise, runs the <a href="https://developer.android.com/reference/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top"><code>Runnable</code></a> directly.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>handler</code> - The handler to which the <a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>Runnable</code></a> will be posted.</dd>
|
|
<dd><code>runnable</code> - The runnable to either post or run.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd><code>true</code> if the <a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink"><code>Runnable</code></a> was successfully posted to the <a href="https://developer.android.com/reference/android/os/Handler.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Handler</code></a> or
|
|
run. <code>false</code> otherwise.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="postOrRunWithCompletion(android.os.Handler,java.lang.Runnable,java.lang.Object)">
|
|
<!-- -->
|
|
</a><a id="postOrRunWithCompletion(android.os.Handler,java.lang.Runnable,T)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>postOrRunWithCompletion</h4>
|
|
<pre class="methodSignature">public static <T> <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink">ListenableFuture</a><T> postOrRunWithCompletion​(<a href="https://developer.android.com/reference/android/os/Handler.html" title="class or interface in android.os" class="externalLink" target="_top">Handler</a> handler,
|
|
<a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top">Runnable</a> runnable,
|
|
T successValue)</pre>
|
|
<div class="block">Posts the <a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink"><code>Runnable</code></a> if the calling thread differs with the <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Looper</code></a> of the <a href="https://developer.android.com/reference/android/os/Handler.html?is-external=true" title="class or interface in android.os" class="externalLink"><code>Handler</code></a>. Otherwise, runs the <a href="https://developer.android.com/reference/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Runnable</code></a> directly. Also returns a <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink"><code>ListenableFuture</code></a> for when the <a href="https://developer.android.com/reference/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top"><code>Runnable</code></a> has run.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Type Parameters:</span></dt>
|
|
<dd><code>T</code> - The type of <code>successValue</code>.</dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>handler</code> - The handler to which the <a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>Runnable</code></a> will be posted.</dd>
|
|
<dd><code>runnable</code> - The runnable to either post or run.</dd>
|
|
<dd><code>successValue</code> - The value to set in the <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink"><code>ListenableFuture</code></a> once the runnable
|
|
completes.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink"><code>ListenableFuture</code></a> for when the <a href="https://developer.android.com/reference/java/lang/Runnable.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>Runnable</code></a> has run.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="transformFutureAsync(com.google.common.util.concurrent.ListenableFuture,com.google.common.util.concurrent.AsyncFunction)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>transformFutureAsync</h4>
|
|
<pre class="methodSignature">public static <T,​U> <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink">ListenableFuture</a><T> transformFutureAsync​(<a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink">ListenableFuture</a><U> future,
|
|
<a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/AsyncFunction.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink">AsyncFunction</a><U,​T> transformFunction)</pre>
|
|
<div class="block">Asynchronously transforms the result of a <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink"><code>ListenableFuture</code></a>.
|
|
|
|
<p>The transformation function is called using a <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/MoreExecutors.html?is-external=true#directExecutor()" title="class or interface in com.google.common.util.concurrent" class="externalLink">direct executor</a>.
|
|
|
|
<p>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.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Type Parameters:</span></dt>
|
|
<dd><code>T</code> - The result type of the input future.</dd>
|
|
<dd><code>U</code> - The result type of the transformation function.</dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>future</code> - The input <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink"><code>ListenableFuture</code></a>.</dd>
|
|
<dd><code>transformFunction</code> - The function transforming the result of the input future.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true" title="class or interface in com.google.common.util.concurrent" class="externalLink"><code>ListenableFuture</code></a> for the transformed result.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getCurrentOrMainLooper()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCurrentOrMainLooper</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top">Looper</a> getCurrentOrMainLooper()</pre>
|
|
<div class="block">Returns the <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink"><code>Looper</code></a> associated with the current thread, or the <a href="https://developer.android.com/reference/android/os/Looper.html?is-external=true" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> of the
|
|
application's main thread if the current thread doesn't have a <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a>.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="newSingleThreadExecutor(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>newSingleThreadExecutor</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/util/concurrent/ExecutorService.html" title="class or interface in java.util.concurrent" class="externalLink">ExecutorService</a> newSingleThreadExecutor​(<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a> threadName)</pre>
|
|
<div class="block">Instantiates a new single threaded executor whose thread has the specified name.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>threadName</code> - The name of the thread.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The executor.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="closeQuietly(java.io.Closeable)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>closeQuietly</h4>
|
|
<pre class="methodSignature">public static void closeQuietly​(@Nullable
|
|
<a href="https://developer.android.com/reference/java/io/Closeable.html" title="class or interface in java.io" class="externalLink" target="_top">Closeable</a> closeable)</pre>
|
|
<div class="block">Closes a <a href="https://developer.android.com/reference/java/io/Closeable.html" title="class or interface in java.io" class="externalLink"><code>Closeable</code></a>, suppressing any <a href="https://developer.android.com/reference/java/io/IOException.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>IOException</code></a> that may occur. Both <a href="https://developer.android.com/reference/java/io/OutputStream.html?is-external=true" title="class or interface in java.io" class="externalLink"><code>OutputStream</code></a> and <a href="https://developer.android.com/reference/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink" target="_top"><code>InputStream</code></a> are <code>Closeable</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>closeable</code> - The <a href="https://developer.android.com/reference/java/io/Closeable.html" title="class or interface in java.io" class="externalLink" target="_top"><code>Closeable</code></a> to close.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="readBoolean(android.os.Parcel)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>readBoolean</h4>
|
|
<pre class="methodSignature">public static boolean readBoolean​(<a href="https://developer.android.com/reference/android/os/Parcel.html" title="class or interface in android.os" class="externalLink" target="_top">Parcel</a> parcel)</pre>
|
|
<div class="block">Reads an integer from a <a href="https://developer.android.com/reference/android/os/Parcel.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Parcel</code></a> and interprets it as a boolean, with 0 mapping to false
|
|
and all other values mapping to true.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>parcel</code> - The <a href="https://developer.android.com/reference/android/os/Parcel.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Parcel</code></a> to read from.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The read value.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="writeBoolean(android.os.Parcel,boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>writeBoolean</h4>
|
|
<pre class="methodSignature">public static void writeBoolean​(<a href="https://developer.android.com/reference/android/os/Parcel.html" title="class or interface in android.os" class="externalLink" target="_top">Parcel</a> parcel,
|
|
boolean value)</pre>
|
|
<div class="block">Writes a boolean to a <a href="https://developer.android.com/reference/android/os/Parcel.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Parcel</code></a>. The boolean is written as an integer with value 1 (true)
|
|
or 0 (false).</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>parcel</code> - The <a href="https://developer.android.com/reference/android/os/Parcel.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Parcel</code></a> to write to.</dd>
|
|
<dd><code>value</code> - The value to write.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getLocaleLanguageTag(java.util.Locale)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getLocaleLanguageTag</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> getLocaleLanguageTag​(<a href="https://developer.android.com/reference/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink" target="_top">Locale</a> locale)</pre>
|
|
<div class="block">Returns the language tag for a <a href="https://developer.android.com/reference/java/util/Locale.html" title="class or interface in java.util" class="externalLink" target="_top"><code>Locale</code></a>.
|
|
|
|
<p>For API levels ≥ 21, this tag is IETF BCP 47 compliant. Use <a href="#normalizeLanguageCode(java.lang.String)"><code>normalizeLanguageCode(String)</code></a> to retrieve a normalized IETF BCP 47 language tag for all API
|
|
levels if needed.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>locale</code> - A <a href="https://developer.android.com/reference/java/util/Locale.html" title="class or interface in java.util" class="externalLink" target="_top"><code>Locale</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The language tag.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="normalizeLanguageCode(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>normalizeLanguageCode</h4>
|
|
<pre class="methodSignature">public static @PolyNull <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> normalizeLanguageCode​(@PolyNull <a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a> language)</pre>
|
|
<div class="block">Returns a normalized IETF BCP 47 language tag for <code>language</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>language</code> - A case-insensitive language code supported by <a href="https://developer.android.com/reference/java/util/Locale.html#forLanguageTag(java.lang.String)" title="class or interface in java.util" class="externalLink" target="_top"><code>Locale.forLanguageTag(String)</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The all-lowercase normalized code, or null if the input was null, or <code>
|
|
language.toLowerCase()</code> if the language could not be normalized.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="fromUtf8Bytes(byte[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fromUtf8Bytes</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fromUtf8Bytes​(byte[] bytes)</pre>
|
|
<div class="block">Returns a new <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>String</code></a> constructed by decoding UTF-8 encoded bytes.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bytes</code> - The UTF-8 encoded bytes to decode.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The string.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="fromUtf8Bytes(byte[],int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fromUtf8Bytes</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fromUtf8Bytes​(byte[] bytes,
|
|
int offset,
|
|
int length)</pre>
|
|
<div class="block">Returns a new <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>String</code></a> constructed by decoding UTF-8 encoded bytes in a subarray.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bytes</code> - The UTF-8 encoded bytes to decode.</dd>
|
|
<dd><code>offset</code> - The index of the first byte to decode.</dd>
|
|
<dd><code>length</code> - The number of bytes to decode.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The string.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getUtf8Bytes(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getUtf8Bytes</h4>
|
|
<pre class="methodSignature">public static byte[] getUtf8Bytes​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> value)</pre>
|
|
<div class="block">Returns a new byte array containing the code points of a <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>String</code></a> encoded using UTF-8.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>value</code> - The <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top"><code>String</code></a> whose bytes should be obtained.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The code points encoding using UTF-8.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="split(java.lang.String,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>split</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a>[] split​(<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a> value,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> regex)</pre>
|
|
<div class="block">Splits a string using <code>value.split(regex, -1</code>). Note: this is is similar to <a href="https://developer.android.com/reference/java/lang/String.html#split(java.lang.String)" title="class or interface in java.lang" class="externalLink" target="_top"><code>String.split(String)</code></a> but empty matches at the end of the string will not be omitted from the
|
|
returned array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>value</code> - The string to split.</dd>
|
|
<dd><code>regex</code> - A delimiting regular expression.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The array of strings resulting from splitting the string.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="splitAtFirst(java.lang.String,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>splitAtFirst</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a>[] splitAtFirst​(<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a> value,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> regex)</pre>
|
|
<div class="block">Splits the string at the first occurrence of the delimiter <code>regex</code>. 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.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>value</code> - The string.</dd>
|
|
<dd><code>regex</code> - A delimiting regular expression.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The string split by the first occurrence of the delimiter.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="isLinebreak(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isLinebreak</h4>
|
|
<pre class="methodSignature">public static boolean isLinebreak​(int c)</pre>
|
|
<div class="block">Returns whether the given character is a carriage return ('\r') or a line feed ('\n').</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>c</code> - The character.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether the given character is a linebreak.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="formatInvariant(java.lang.String,java.lang.Object...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>formatInvariant</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> formatInvariant​(<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a> format,
|
|
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>... args)</pre>
|
|
<div class="block">Formats a string using <a href="https://developer.android.com/reference/java/util/Locale.html#US" title="class or interface in java.util" class="externalLink" target="_top"><code>Locale.US</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="https://developer.android.com/reference/java/lang/String.html#format(java.lang.String,java.lang.Object...)" title="class or interface in java.lang" class="externalLink" target="_top"><code>String.format(String, Object...)</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ceilDivide(int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ceilDivide</h4>
|
|
<pre class="methodSignature">public static int ceilDivide​(int numerator,
|
|
int denominator)</pre>
|
|
<div class="block">Divides a <code>numerator</code> by a <code>denominator</code>, returning the ceiled result.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>numerator</code> - The numerator to divide.</dd>
|
|
<dd><code>denominator</code> - The denominator to divide by.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The ceiled result of the division.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="ceilDivide(long,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>ceilDivide</h4>
|
|
<pre class="methodSignature">public static long ceilDivide​(long numerator,
|
|
long denominator)</pre>
|
|
<div class="block">Divides a <code>numerator</code> by a <code>denominator</code>, returning the ceiled result.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>numerator</code> - The numerator to divide.</dd>
|
|
<dd><code>denominator</code> - The denominator to divide by.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The ceiled result of the division.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="constrainValue(int,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>constrainValue</h4>
|
|
<pre class="methodSignature">public static int constrainValue​(int value,
|
|
int min,
|
|
int max)</pre>
|
|
<div class="block">Constrains a value to the specified bounds.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>value</code> - The value to constrain.</dd>
|
|
<dd><code>min</code> - The lower bound.</dd>
|
|
<dd><code>max</code> - The upper bound.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The constrained value <code>Math.max(min, Math.min(value, max))</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="constrainValue(long,long,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>constrainValue</h4>
|
|
<pre class="methodSignature">public static long constrainValue​(long value,
|
|
long min,
|
|
long max)</pre>
|
|
<div class="block">Constrains a value to the specified bounds.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>value</code> - The value to constrain.</dd>
|
|
<dd><code>min</code> - The lower bound.</dd>
|
|
<dd><code>max</code> - The upper bound.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The constrained value <code>Math.max(min, Math.min(value, max))</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="constrainValue(float,float,float)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>constrainValue</h4>
|
|
<pre class="methodSignature">public static float constrainValue​(float value,
|
|
float min,
|
|
float max)</pre>
|
|
<div class="block">Constrains a value to the specified bounds.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>value</code> - The value to constrain.</dd>
|
|
<dd><code>min</code> - The lower bound.</dd>
|
|
<dd><code>max</code> - The upper bound.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The constrained value <code>Math.max(min, Math.min(value, max))</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="addWithOverflowDefault(long,long,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addWithOverflowDefault</h4>
|
|
<pre class="methodSignature">public static long addWithOverflowDefault​(long x,
|
|
long y,
|
|
long overflowResult)</pre>
|
|
<div class="block">Returns the sum of two arguments, or a third argument if the result overflows.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - The first value.</dd>
|
|
<dd><code>y</code> - The second value.</dd>
|
|
<dd><code>overflowResult</code> - The return value if <code>x + y</code> overflows.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd><code>x + y</code>, or <code>overflowResult</code> if the result overflows.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="subtractWithOverflowDefault(long,long,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>subtractWithOverflowDefault</h4>
|
|
<pre class="methodSignature">public static long subtractWithOverflowDefault​(long x,
|
|
long y,
|
|
long overflowResult)</pre>
|
|
<div class="block">Returns the difference between two arguments, or a third argument if the result overflows.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - The first value.</dd>
|
|
<dd><code>y</code> - The second value.</dd>
|
|
<dd><code>overflowResult</code> - The return value if <code>x - y</code> overflows.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd><code>x - y</code>, or <code>overflowResult</code> if the result overflows.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="linearSearch(int[],int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>linearSearch</h4>
|
|
<pre class="methodSignature">public static int linearSearch​(int[] array,
|
|
int value)</pre>
|
|
<div class="block">Returns the index of the first occurrence of <code>value</code> in <code>array</code>, or <a href="../C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if <code>value</code> is not contained in <code>array</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>array</code> - The array to search.</dd>
|
|
<dd><code>value</code> - The value to search for.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The index of the first occurrence of value in <code>array</code>, or <a href="../C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a>
|
|
if <code>value</code> is not contained in <code>array</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="linearSearch(long[],long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>linearSearch</h4>
|
|
<pre class="methodSignature">public static int linearSearch​(long[] array,
|
|
long value)</pre>
|
|
<div class="block">Returns the index of the first occurrence of <code>value</code> in <code>array</code>, or <a href="../C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a> if <code>value</code> is not contained in <code>array</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>array</code> - The array to search.</dd>
|
|
<dd><code>value</code> - The value to search for.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The index of the first occurrence of value in <code>array</code>, or <a href="../C.html#INDEX_UNSET"><code>C.INDEX_UNSET</code></a>
|
|
if <code>value</code> is not contained in <code>array</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="binarySearchFloor(int[],int,boolean,boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>binarySearchFloor</h4>
|
|
<pre class="methodSignature">public static int binarySearchFloor​(int[] array,
|
|
int value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</pre>
|
|
<div class="block">Returns the index of the largest element in <code>array</code> that is less than (or optionally
|
|
equal to) a specified <code>value</code>.
|
|
|
|
<p>The search is performed using a binary search algorithm, so the array must be sorted. If the
|
|
array contains multiple elements equal to <code>value</code> and <code>inclusive</code> is true, the
|
|
index of the first one will be returned.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>array</code> - The array to search.</dd>
|
|
<dd><code>value</code> - The value being searched for.</dd>
|
|
<dd><code>inclusive</code> - 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.</dd>
|
|
<dd><code>stayInBounds</code> - 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.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The index of the largest element in <code>array</code> that is less than (or optionally
|
|
equal to) <code>value</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="binarySearchFloor(long[],long,boolean,boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>binarySearchFloor</h4>
|
|
<pre class="methodSignature">public static int binarySearchFloor​(long[] array,
|
|
long value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</pre>
|
|
<div class="block">Returns the index of the largest element in <code>array</code> that is less than (or optionally
|
|
equal to) a specified <code>value</code>.
|
|
|
|
<p>The search is performed using a binary search algorithm, so the array must be sorted. If the
|
|
array contains multiple elements equal to <code>value</code> and <code>inclusive</code> is true, the
|
|
index of the first one will be returned.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>array</code> - The array to search.</dd>
|
|
<dd><code>value</code> - The value being searched for.</dd>
|
|
<dd><code>inclusive</code> - 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.</dd>
|
|
<dd><code>stayInBounds</code> - 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.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The index of the largest element in <code>array</code> that is less than (or optionally
|
|
equal to) <code>value</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="binarySearchFloor(java.util.List,java.lang.Comparable,boolean,boolean)">
|
|
<!-- -->
|
|
</a><a id="binarySearchFloor(java.util.List,T,boolean,boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>binarySearchFloor</h4>
|
|
<pre class="methodSignature">public static <T extends <a href="https://developer.android.com/reference/java/lang/Comparable.html" title="class or interface in java.lang" class="externalLink">Comparable</a><? super T>> int binarySearchFloor​(<a href="https://developer.android.com/reference/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="https://developer.android.com/reference/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">Comparable</a><? super T>> list,
|
|
T value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</pre>
|
|
<div class="block">Returns the index of the largest element in <code>list</code> that is less than (or optionally equal
|
|
to) a specified <code>value</code>.
|
|
|
|
<p>The search is performed using a binary search algorithm, so the list must be sorted. If the
|
|
list contains multiple elements equal to <code>value</code> and <code>inclusive</code> is true, the index
|
|
of the first one will be returned.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Type Parameters:</span></dt>
|
|
<dd><code>T</code> - The type of values being searched.</dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>list</code> - The list to search.</dd>
|
|
<dd><code>value</code> - The value being searched for.</dd>
|
|
<dd><code>inclusive</code> - 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.</dd>
|
|
<dd><code>stayInBounds</code> - 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.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The index of the largest element in <code>list</code> that is less than (or optionally equal
|
|
to) <code>value</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="binarySearchFloor(com.google.android.exoplayer2.util.LongArray,long,boolean,boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>binarySearchFloor</h4>
|
|
<pre class="methodSignature">public static int binarySearchFloor​(<a href="LongArray.html" title="class in com.google.android.exoplayer2.util">LongArray</a> longArray,
|
|
long value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</pre>
|
|
<div class="block">Returns the index of the largest element in <code>longArray</code> that is less than (or optionally
|
|
equal to) a specified <code>value</code>.
|
|
|
|
<p>The search is performed using a binary search algorithm, so the array must be sorted. If the
|
|
array contains multiple elements equal to <code>value</code> and <code>inclusive</code> is true, the
|
|
index of the first one will be returned.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>longArray</code> - The array to search.</dd>
|
|
<dd><code>value</code> - The value being searched for.</dd>
|
|
<dd><code>inclusive</code> - 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.</dd>
|
|
<dd><code>stayInBounds</code> - 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.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The index of the largest element in <code>array</code> that is less than (or optionally
|
|
equal to) <code>value</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="binarySearchCeil(int[],int,boolean,boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>binarySearchCeil</h4>
|
|
<pre class="methodSignature">public static int binarySearchCeil​(int[] array,
|
|
int value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</pre>
|
|
<div class="block">Returns the index of the smallest element in <code>array</code> that is greater than (or optionally
|
|
equal to) a specified <code>value</code>.
|
|
|
|
<p>The search is performed using a binary search algorithm, so the array must be sorted. If the
|
|
array contains multiple elements equal to <code>value</code> and <code>inclusive</code> is true, the
|
|
index of the last one will be returned.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>array</code> - The array to search.</dd>
|
|
<dd><code>value</code> - The value being searched for.</dd>
|
|
<dd><code>inclusive</code> - 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.</dd>
|
|
<dd><code>stayInBounds</code> - If true, then <code>(a.length - 1)</code> will be returned in the case that the
|
|
value is greater than the largest element in the array. If false then <code>a.length</code> will
|
|
be returned.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The index of the smallest element in <code>array</code> that is greater than (or optionally
|
|
equal to) <code>value</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="binarySearchCeil(long[],long,boolean,boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>binarySearchCeil</h4>
|
|
<pre class="methodSignature">public static int binarySearchCeil​(long[] array,
|
|
long value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</pre>
|
|
<div class="block">Returns the index of the smallest element in <code>array</code> that is greater than (or optionally
|
|
equal to) a specified <code>value</code>.
|
|
|
|
<p>The search is performed using a binary search algorithm, so the array must be sorted. If the
|
|
array contains multiple elements equal to <code>value</code> and <code>inclusive</code> is true, the
|
|
index of the last one will be returned.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>array</code> - The array to search.</dd>
|
|
<dd><code>value</code> - The value being searched for.</dd>
|
|
<dd><code>inclusive</code> - 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.</dd>
|
|
<dd><code>stayInBounds</code> - If true, then <code>(a.length - 1)</code> will be returned in the case that the
|
|
value is greater than the largest element in the array. If false then <code>a.length</code> will
|
|
be returned.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The index of the smallest element in <code>array</code> that is greater than (or optionally
|
|
equal to) <code>value</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="binarySearchCeil(java.util.List,java.lang.Comparable,boolean,boolean)">
|
|
<!-- -->
|
|
</a><a id="binarySearchCeil(java.util.List,T,boolean,boolean)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>binarySearchCeil</h4>
|
|
<pre class="methodSignature">public static <T extends <a href="https://developer.android.com/reference/java/lang/Comparable.html" title="class or interface in java.lang" class="externalLink">Comparable</a><? super T>> int binarySearchCeil​(<a href="https://developer.android.com/reference/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a><? extends <a href="https://developer.android.com/reference/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">Comparable</a><? super T>> list,
|
|
T value,
|
|
boolean inclusive,
|
|
boolean stayInBounds)</pre>
|
|
<div class="block">Returns the index of the smallest element in <code>list</code> that is greater than (or optionally
|
|
equal to) a specified value.
|
|
|
|
<p>The search is performed using a binary search algorithm, so the list must be sorted. If the
|
|
list contains multiple elements equal to <code>value</code> and <code>inclusive</code> is true, the index
|
|
of the last one will be returned.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Type Parameters:</span></dt>
|
|
<dd><code>T</code> - The type of values being searched.</dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>list</code> - The list to search.</dd>
|
|
<dd><code>value</code> - The value being searched for.</dd>
|
|
<dd><code>inclusive</code> - 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.</dd>
|
|
<dd><code>stayInBounds</code> - If true, then <code>(list.size() - 1)</code> will be returned in the case that
|
|
the value is greater than the largest element in the list. If false then <code>
|
|
list.size()</code> will be returned.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The index of the smallest element in <code>list</code> that is greater than (or optionally
|
|
equal to) <code>value</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="compareLong(long,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>compareLong</h4>
|
|
<pre class="methodSignature">public static int compareLong​(long left,
|
|
long right)</pre>
|
|
<div class="block">Compares two long values and returns the same value as <code>Long.compare(long, long)</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>left</code> - The left operand.</dd>
|
|
<dd><code>right</code> - The right operand.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>0, if left == right, a negative value if left < right, or a positive value if left
|
|
> right.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="minValue(android.util.SparseLongArray)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>minValue</h4>
|
|
<pre class="methodSignature">@RequiresApi(18)
|
|
public static long minValue​(<a href="https://developer.android.com/reference/android/util/SparseLongArray.html" title="class or interface in android.util" class="externalLink" target="_top">SparseLongArray</a> sparseLongArray)</pre>
|
|
<div class="block">Returns the minimum value in the given <a href="https://developer.android.com/reference/android/util/SparseLongArray.html" title="class or interface in android.util" class="externalLink" target="_top"><code>SparseLongArray</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>sparseLongArray</code> - The <a href="https://developer.android.com/reference/android/util/SparseLongArray.html" title="class or interface in android.util" class="externalLink" target="_top"><code>SparseLongArray</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The minimum value.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/util/NoSuchElementException.html" title="class or interface in java.util" class="externalLink" target="_top">NoSuchElementException</a></code> - If the array is empty.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="maxValue(android.util.SparseLongArray)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>maxValue</h4>
|
|
<pre class="methodSignature">@RequiresApi(18)
|
|
public static long maxValue​(<a href="https://developer.android.com/reference/android/util/SparseLongArray.html" title="class or interface in android.util" class="externalLink" target="_top">SparseLongArray</a> sparseLongArray)</pre>
|
|
<div class="block">Returns the maximum value in the given <a href="https://developer.android.com/reference/android/util/SparseLongArray.html" title="class or interface in android.util" class="externalLink" target="_top"><code>SparseLongArray</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>sparseLongArray</code> - The <a href="https://developer.android.com/reference/android/util/SparseLongArray.html" title="class or interface in android.util" class="externalLink" target="_top"><code>SparseLongArray</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The maximum value.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/util/NoSuchElementException.html" title="class or interface in java.util" class="externalLink" target="_top">NoSuchElementException</a></code> - If the array is empty.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="usToMs(long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>usToMs</h4>
|
|
<pre class="methodSignature">public static long usToMs​(long timeUs)</pre>
|
|
<div class="block">Converts a time in microseconds to the corresponding time in milliseconds, preserving <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> and <a href="../C.html#TIME_END_OF_SOURCE"><code>C.TIME_END_OF_SOURCE</code></a> values.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>timeUs</code> - The time in microseconds.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The corresponding time in milliseconds.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="msToUs(long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>msToUs</h4>
|
|
<pre class="methodSignature">public static long msToUs​(long timeMs)</pre>
|
|
<div class="block">Converts a time in milliseconds to the corresponding time in microseconds, preserving <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> values and <a href="../C.html#TIME_END_OF_SOURCE"><code>C.TIME_END_OF_SOURCE</code></a> values.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>timeMs</code> - The time in milliseconds.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The corresponding time in microseconds.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="parseXsDuration(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>parseXsDuration</h4>
|
|
<pre class="methodSignature">public static long parseXsDuration​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> value)</pre>
|
|
<div class="block">Parses an xs:duration attribute value, returning the parsed duration in milliseconds.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>value</code> - The attribute value to decode.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The parsed duration in milliseconds.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="parseXsDateTime(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>parseXsDateTime</h4>
|
|
<pre class="methodSignature">public static long parseXsDateTime​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> value)
|
|
throws <a href="../ParserException.html" title="class in com.google.android.exoplayer2">ParserException</a></pre>
|
|
<div class="block">Parses an xs:dateTime attribute value, returning the parsed timestamp in milliseconds since the
|
|
epoch.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>value</code> - The attribute value to decode.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The parsed timestamp in milliseconds since the epoch.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../ParserException.html" title="class in com.google.android.exoplayer2">ParserException</a></code> - if an error occurs parsing the dateTime attribute value.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="scaleLargeTimestamp(long,long,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>scaleLargeTimestamp</h4>
|
|
<pre class="methodSignature">public static long scaleLargeTimestamp​(long timestamp,
|
|
long multiplier,
|
|
long divisor)</pre>
|
|
<div class="block">Scales a large timestamp.
|
|
|
|
<p>Logically, scaling consists of a multiplication followed by a division. The actual
|
|
operations performed are designed to minimize the probability of overflow.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>timestamp</code> - The timestamp to scale.</dd>
|
|
<dd><code>multiplier</code> - The multiplier.</dd>
|
|
<dd><code>divisor</code> - The divisor.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The scaled timestamp.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="scaleLargeTimestamps(java.util.List,long,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>scaleLargeTimestamps</h4>
|
|
<pre class="methodSignature">public static long[] scaleLargeTimestamps​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink">List</a><<a href="https://developer.android.com/reference/java/lang/Long.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">Long</a>> timestamps,
|
|
long multiplier,
|
|
long divisor)</pre>
|
|
<div class="block">Applies <a href="#scaleLargeTimestamp(long,long,long)"><code>scaleLargeTimestamp(long, long, long)</code></a> to a list of unscaled timestamps.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>timestamps</code> - The timestamps to scale.</dd>
|
|
<dd><code>multiplier</code> - The multiplier.</dd>
|
|
<dd><code>divisor</code> - The divisor.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The scaled timestamps.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="scaleLargeTimestampsInPlace(long[],long,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>scaleLargeTimestampsInPlace</h4>
|
|
<pre class="methodSignature">public static void scaleLargeTimestampsInPlace​(long[] timestamps,
|
|
long multiplier,
|
|
long divisor)</pre>
|
|
<div class="block">Applies <a href="#scaleLargeTimestamp(long,long,long)"><code>scaleLargeTimestamp(long, long, long)</code></a> to an array of unscaled timestamps.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>timestamps</code> - The timestamps to scale.</dd>
|
|
<dd><code>multiplier</code> - The multiplier.</dd>
|
|
<dd><code>divisor</code> - The divisor.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getMediaDurationForPlayoutDuration(long,float)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getMediaDurationForPlayoutDuration</h4>
|
|
<pre class="methodSignature">public static long getMediaDurationForPlayoutDuration​(long playoutDuration,
|
|
float speed)</pre>
|
|
<div class="block">Returns the duration of media that will elapse in <code>playoutDuration</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>playoutDuration</code> - The duration to scale.</dd>
|
|
<dd><code>speed</code> - The factor by which playback is sped up.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The scaled duration, in the same units as <code>playoutDuration</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getPlayoutDurationForMediaDuration(long,float)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPlayoutDurationForMediaDuration</h4>
|
|
<pre class="methodSignature">public static long getPlayoutDurationForMediaDuration​(long mediaDuration,
|
|
float speed)</pre>
|
|
<div class="block">Returns the playout duration of <code>mediaDuration</code> of media.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>mediaDuration</code> - The duration to scale.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The scaled duration, in the same units as <code>mediaDuration</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getIntegerCodeForString(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getIntegerCodeForString</h4>
|
|
<pre class="methodSignature">public static int getIntegerCodeForString​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> string)</pre>
|
|
<div class="block">Returns the integer equal to the big-endian concatenation of the characters in <code>string</code>
|
|
as bytes. The string must be no more than four characters long.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>string</code> - A string no more than four characters long.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="toUnsignedLong(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>toUnsignedLong</h4>
|
|
<pre class="methodSignature">public static long toUnsignedLong​(int x)</pre>
|
|
<div class="block">Converts an integer to a long by unsigned conversion.
|
|
|
|
<p>This method is equivalent to <a href="https://developer.android.com/reference/java/lang/Integer.html#toUnsignedLong(int)" title="class or interface in java.lang" class="externalLink" target="_top"><code>Integer.toUnsignedLong(int)</code></a> for API 26+.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="toLong(int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>toLong</h4>
|
|
<pre class="methodSignature">public static long toLong​(int mostSignificantBits,
|
|
int leastSignificantBits)</pre>
|
|
<div class="block">Returns the long that is composed of the bits of the 2 specified integers.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>mostSignificantBits</code> - The 32 most significant bits of the long to return.</dd>
|
|
<dd><code>leastSignificantBits</code> - The 32 least significant bits of the long to return.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>a long where its 32 most significant bits are <code>mostSignificantBits</code> bits and its
|
|
32 least significant bits are <code>leastSignificantBits</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="truncateAscii(java.lang.CharSequence,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>truncateAscii</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/CharSequence.html" title="class or interface in java.lang" class="externalLink">CharSequence</a> truncateAscii​(<a href="https://developer.android.com/reference/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">CharSequence</a> sequence,
|
|
int maxLength)</pre>
|
|
<div class="block">Truncates a sequence of ASCII characters to a maximum length.
|
|
|
|
<p>This preserves span styling in the <a href="https://developer.android.com/reference/java/lang/CharSequence.html" title="class or interface in java.lang" class="externalLink"><code>CharSequence</code></a>. If that's not important, use <a href="https://guava.dev/releases/31.0.1-android/api/docs/com/google/common/base/Ascii.html?is-external=true#truncate(java.lang.CharSequence,int,java.lang.String)" title="class or interface in com.google.common.base" class="externalLink" target="_top"><code>Ascii.truncate(CharSequence, int, String)</code></a>.
|
|
|
|
<p><b>Note:</b> This is not safe to use in general on Unicode text because it may separate
|
|
characters from combining characters or split up surrogate pairs.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>sequence</code> - The character sequence to truncate.</dd>
|
|
<dd><code>maxLength</code> - The max length to truncate to.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd><code>sequence</code> directly if <code>sequence.length() <= maxLength</code>, otherwise <code>
|
|
sequence.subsequence(0, maxLength</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getBytesFromHexString(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getBytesFromHexString</h4>
|
|
<pre class="methodSignature">public static byte[] getBytesFromHexString​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> hexString)</pre>
|
|
<div class="block">Returns a byte array containing values parsed from the hex string provided.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>hexString</code> - The hex string to convert to bytes.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A byte array containing values parsed from the hex string provided.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="toHexString(byte[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>toHexString</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> toHexString​(byte[] bytes)</pre>
|
|
<div class="block">Returns a string containing a lower-case hex representation of the bytes provided.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bytes</code> - The byte data to convert to hex.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A String containing the hex representation of <code>bytes</code>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getCommaDelimitedSimpleClassNames(java.lang.Object[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCommaDelimitedSimpleClassNames</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> getCommaDelimitedSimpleClassNames​(<a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>[] objects)</pre>
|
|
<div class="block">Returns a string with comma delimited simple names of each object's class.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>objects</code> - The objects whose simple class names should be comma delimited and returned.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A string with comma delimited simple names of each object's class.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getUserAgent(android.content.Context,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getUserAgent</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> getUserAgent​(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> applicationName)</pre>
|
|
<div class="block">Returns a user agent string based on the given application name and the library version.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>context</code> - A valid context of the calling application.</dd>
|
|
<dd><code>applicationName</code> - String that will be prefix'ed to the generated user agent.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A user agent string generated using the applicationName and the library version.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getCodecCountOfType(java.lang.String,@com.google.android.exoplayer2.C.TrackTypeint)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCodecCountOfType</h4>
|
|
<pre class="methodSignature">public static int getCodecCountOfType​(@Nullable
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> codecs,
|
|
@com.google.android.exoplayer2.C.TrackType int trackType)</pre>
|
|
<div class="block">Returns the number of codec strings in <code>codecs</code> whose type matches <code>trackType</code>.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getCodecsOfType(java.lang.String,@com.google.android.exoplayer2.C.TrackTypeint)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCodecsOfType</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> getCodecsOfType​(@Nullable
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> codecs,
|
|
@com.google.android.exoplayer2.C.TrackType int trackType)</pre>
|
|
<div class="block">Returns a copy of <code>codecs</code> without the codecs whose track type doesn't match <code>
|
|
trackType</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>codecs</code> - A codec sequence string, as defined in RFC 6381.</dd>
|
|
<dd><code>trackType</code> - The <a href="../C.TrackType.html" title="annotation in com.google.android.exoplayer2"><code>track type</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A copy of <code>codecs</code> without the codecs whose track type doesn't match <code>
|
|
trackType</code>. If this ends up empty, or <code>codecs</code> is null, returns null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="splitCodecs(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>splitCodecs</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>[] splitCodecs​(@Nullable
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> codecs)</pre>
|
|
<div class="block">Splits a codecs sequence string, as defined in RFC 6381, into individual codec strings.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>codecs</code> - A codec sequence string, as defined in RFC 6381.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The split codecs, or an array of length zero if the input was empty or null.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getPcmFormat(@com.google.android.exoplayer2.C.PcmEncodingint,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPcmFormat</h4>
|
|
<pre class="methodSignature">public static <a href="../Format.html" title="class in com.google.android.exoplayer2">Format</a> getPcmFormat​(@com.google.android.exoplayer2.C.PcmEncoding int pcmEncoding,
|
|
int channels,
|
|
int sampleRate)</pre>
|
|
<div class="block">Gets a PCM <a href="../Format.html" title="class in com.google.android.exoplayer2"><code>Format</code></a> with the specified parameters.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pcmEncoding</code> - The <a href="../C.PcmEncoding.html" title="annotation in com.google.android.exoplayer2"><code>C.PcmEncoding</code></a>.</dd>
|
|
<dd><code>channels</code> - The number of channels, or <a href="../Format.html#NO_VALUE"><code>Format.NO_VALUE</code></a> if unknown.</dd>
|
|
<dd><code>sampleRate</code> - The sample rate in Hz, or <a href="../Format.html#NO_VALUE"><code>Format.NO_VALUE</code></a> if unknown.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The PCM format.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getPcmEncoding(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPcmEncoding</h4>
|
|
<pre class="methodSignature">public static @com.google.android.exoplayer2.C.PcmEncoding int getPcmEncoding​(int bitDepth)</pre>
|
|
<div class="block">Converts a sample bit depth to a corresponding PCM encoding constant.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bitDepth</code> - The bit depth. Supported values are 8, 16, 24 and 32.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The corresponding encoding. One of <a href="../C.html#ENCODING_PCM_8BIT"><code>C.ENCODING_PCM_8BIT</code></a>, <a href="../C.html#ENCODING_PCM_16BIT"><code>C.ENCODING_PCM_16BIT</code></a>, <a href="../C.html#ENCODING_PCM_24BIT"><code>C.ENCODING_PCM_24BIT</code></a> and <a href="../C.html#ENCODING_PCM_32BIT"><code>C.ENCODING_PCM_32BIT</code></a>. If
|
|
the bit depth is unsupported then <a href="../C.html#ENCODING_INVALID"><code>C.ENCODING_INVALID</code></a> is returned.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="isEncodingLinearPcm(@com.google.android.exoplayer2.C.Encodingint)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isEncodingLinearPcm</h4>
|
|
<pre class="methodSignature">public static boolean isEncodingLinearPcm​(@com.google.android.exoplayer2.C.Encoding int encoding)</pre>
|
|
<div class="block">Returns whether <code>encoding</code> is one of the linear PCM encodings.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>encoding</code> - The encoding of the audio data.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether the encoding is one of the PCM encodings.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="isEncodingHighResolutionPcm(@com.google.android.exoplayer2.C.PcmEncodingint)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isEncodingHighResolutionPcm</h4>
|
|
<pre class="methodSignature">public static boolean isEncodingHighResolutionPcm​(@com.google.android.exoplayer2.C.PcmEncoding int encoding)</pre>
|
|
<div class="block">Returns whether <code>encoding</code> is high resolution (> 16-bit) PCM.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>encoding</code> - The encoding of the audio data.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether the encoding is high resolution PCM.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getAudioTrackChannelConfig(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAudioTrackChannelConfig</h4>
|
|
<pre class="methodSignature">public static int getAudioTrackChannelConfig​(int channelCount)</pre>
|
|
<div class="block">Returns the audio track channel configuration for the given channel count, or <a href="https://developer.android.com/reference/android/media/AudioFormat.html#CHANNEL_INVALID" title="class or interface in android.media" class="externalLink" target="_top"><code>AudioFormat.CHANNEL_INVALID</code></a> if output is not possible.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>channelCount</code> - The number of channels in the input audio.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The channel configuration or <a href="https://developer.android.com/reference/android/media/AudioFormat.html#CHANNEL_INVALID" title="class or interface in android.media" class="externalLink" target="_top"><code>AudioFormat.CHANNEL_INVALID</code></a> if output is not
|
|
possible.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getPcmFrameSize(@com.google.android.exoplayer2.C.PcmEncodingint,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPcmFrameSize</h4>
|
|
<pre class="methodSignature">public static int getPcmFrameSize​(@com.google.android.exoplayer2.C.PcmEncoding int pcmEncoding,
|
|
int channelCount)</pre>
|
|
<div class="block">Returns the frame size for audio with <code>channelCount</code> channels in the specified encoding.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>pcmEncoding</code> - The encoding of the audio data.</dd>
|
|
<dd><code>channelCount</code> - The channel count.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The size of one audio frame in bytes.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getAudioUsageForStreamType(@com.google.android.exoplayer2.C.StreamTypeint)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAudioUsageForStreamType</h4>
|
|
<pre class="methodSignature"><a href="../C.AudioUsage.html" title="annotation in com.google.android.exoplayer2">@AudioUsage</a>
|
|
public static @com.google.android.exoplayer2.C.AudioUsage int getAudioUsageForStreamType​(<a href="../C.StreamType.html" title="annotation in com.google.android.exoplayer2">@StreamType</a>
|
|
@com.google.android.exoplayer2.C.StreamType int streamType)</pre>
|
|
<div class="block">Returns the <a href="../C.AudioUsage.html" title="annotation in com.google.android.exoplayer2"><code>C.AudioUsage</code></a> corresponding to the specified <a href="../C.StreamType.html" title="annotation in com.google.android.exoplayer2"><code>C.StreamType</code></a>.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getAudioContentTypeForStreamType(@com.google.android.exoplayer2.C.StreamTypeint)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAudioContentTypeForStreamType</h4>
|
|
<pre class="methodSignature"><a href="../C.AudioContentType.html" title="annotation in com.google.android.exoplayer2">@AudioContentType</a>
|
|
public static @com.google.android.exoplayer2.C.AudioContentType int getAudioContentTypeForStreamType​(<a href="../C.StreamType.html" title="annotation in com.google.android.exoplayer2">@StreamType</a>
|
|
@com.google.android.exoplayer2.C.StreamType int streamType)</pre>
|
|
<div class="block">Returns the <a href="../C.AudioContentType.html" title="annotation in com.google.android.exoplayer2"><code>C.AudioContentType</code></a> corresponding to the specified <a href="../C.StreamType.html" title="annotation in com.google.android.exoplayer2"><code>C.StreamType</code></a>.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getStreamTypeForAudioUsage(@com.google.android.exoplayer2.C.AudioUsageint)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getStreamTypeForAudioUsage</h4>
|
|
<pre class="methodSignature"><a href="../C.StreamType.html" title="annotation in com.google.android.exoplayer2">@StreamType</a>
|
|
public static @com.google.android.exoplayer2.C.StreamType int getStreamTypeForAudioUsage​(<a href="../C.AudioUsage.html" title="annotation in com.google.android.exoplayer2">@AudioUsage</a>
|
|
@com.google.android.exoplayer2.C.AudioUsage int usage)</pre>
|
|
<div class="block">Returns the <a href="../C.StreamType.html" title="annotation in com.google.android.exoplayer2"><code>C.StreamType</code></a> corresponding to the specified <a href="../C.AudioUsage.html" title="annotation in com.google.android.exoplayer2"><code>C.AudioUsage</code></a>.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="generateAudioSessionIdV21(android.content.Context)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>generateAudioSessionIdV21</h4>
|
|
<pre class="methodSignature">@RequiresApi(21)
|
|
public static int generateAudioSessionIdV21​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context)</pre>
|
|
<div class="block">Returns a newly generated audio session identifier, or <a href="https://developer.android.com/reference/android/media/AudioManager.html#ERROR" title="class or interface in android.media" class="externalLink" target="_top"><code>AudioManager.ERROR</code></a> if an error
|
|
occurred in which case audio playback may fail.</div>
|
|
<dl>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="https://developer.android.com/reference/android/media/AudioManager.html#generateAudioSessionId()" title="class or interface in android.media" class="externalLink" target="_top"><code>AudioManager.generateAudioSessionId()</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getDrmUuid(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDrmUuid</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
public static <a href="https://developer.android.com/reference/java/util/UUID.html" title="class or interface in java.util" class="externalLink">UUID</a> getDrmUuid​(<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a> drmScheme)</pre>
|
|
<div class="block">Derives a DRM <a href="https://developer.android.com/reference/java/util/UUID.html" title="class or interface in java.util" class="externalLink" target="_top"><code>UUID</code></a> from <code>drmScheme</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>drmScheme</code> - A UUID string, or <code>"widevine"</code>, <code>"playready"</code> or <code>
|
|
"clearkey"</code>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The derived <a href="https://developer.android.com/reference/java/util/UUID.html" title="class or interface in java.util" class="externalLink" target="_top"><code>UUID</code></a>, or <code>null</code> if one could not be derived.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getErrorCodeForMediaDrmErrorCode(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getErrorCodeForMediaDrmErrorCode</h4>
|
|
<pre class="methodSignature"><a href="../PlaybackException.ErrorCode.html" title="annotation in com.google.android.exoplayer2">@ErrorCode</a>
|
|
public static @com.google.android.exoplayer2.PlaybackException.ErrorCode int getErrorCodeForMediaDrmErrorCode​(int mediaDrmErrorCode)</pre>
|
|
<div class="block">Returns a <a href="../PlaybackException.ErrorCode.html" title="annotation in com.google.android.exoplayer2"><code>PlaybackException.ErrorCode</code></a> value that corresponds to the provided <a href="https://developer.android.com/reference/android/media/MediaDrm.ErrorCodes.html" title="class or interface in android.media" class="externalLink"><code>MediaDrm.ErrorCodes</code></a> value. Returns <a href="../PlaybackException.html#ERROR_CODE_DRM_SYSTEM_ERROR" target="_top"><code>PlaybackException.ERROR_CODE_DRM_SYSTEM_ERROR</code></a> if
|
|
the provided error code isn't recognised.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="inferContentType(android.net.Uri,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>inferContentType</h4>
|
|
<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
|
|
<a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2">@ContentType</a>
|
|
public static @com.google.android.exoplayer2.C.ContentType int inferContentType​(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri,
|
|
@Nullable
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> overrideExtension)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="#inferContentTypeForExtension(java.lang.String)"><code>inferContentTypeForExtension(String)</code></a> when <code>overrideExtension</code> is
|
|
non-empty, and <a href="#inferContentType(android.net.Uri)"><code>inferContentType(Uri)</code></a> otherwise.</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a id="inferContentType(android.net.Uri)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>inferContentType</h4>
|
|
<pre class="methodSignature"><a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2">@ContentType</a>
|
|
public static @com.google.android.exoplayer2.C.ContentType int inferContentType​(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)</pre>
|
|
<div class="block">Makes a best guess to infer the <a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2"><code>C.ContentType</code></a> from a <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>uri</code> - The <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The content type.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="inferContentType(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>inferContentType</h4>
|
|
<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
|
|
<a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2">@ContentType</a>
|
|
public static @com.google.android.exoplayer2.C.ContentType int inferContentType​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)</pre>
|
|
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
|
|
<div class="deprecationComment">Use <a href="https://developer.android.com/reference/android/net/Uri.html#parse(java.lang.String)" title="class or interface in android.net" class="externalLink"><code>Uri.parse(String)</code></a> and <a href="#inferContentType(android.net.Uri)" target="_top"><code>inferContentType(Uri)</code></a> for full file
|
|
paths or <a href="#inferContentTypeForExtension(java.lang.String)"><code>inferContentTypeForExtension(String)</code></a> for extensions.</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
<a id="inferContentTypeForExtension(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>inferContentTypeForExtension</h4>
|
|
<pre class="methodSignature"><a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2">@ContentType</a>
|
|
public static @com.google.android.exoplayer2.C.ContentType int inferContentTypeForExtension​(<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileExtension)</pre>
|
|
<div class="block">Makes a best guess to infer the <a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2"><code>C.ContentType</code></a> from a file extension.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>fileExtension</code> - The extension of the file (excluding the '.').</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The content type.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="inferContentTypeForUriAndMimeType(android.net.Uri,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>inferContentTypeForUriAndMimeType</h4>
|
|
<pre class="methodSignature"><a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2">@ContentType</a>
|
|
public static @com.google.android.exoplayer2.C.ContentType int inferContentTypeForUriAndMimeType​(<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri,
|
|
@Nullable
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> mimeType)</pre>
|
|
<div class="block">Makes a best guess to infer the <a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2"><code>C.ContentType</code></a> from a <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a> and optional MIME type.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>uri</code> - The <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a>.</dd>
|
|
<dd><code>mimeType</code> - If MIME type, or <code>null</code>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The content type.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getAdaptiveMimeTypeForContentType(@com.google.android.exoplayer2.C.ContentTypeint)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAdaptiveMimeTypeForContentType</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> getAdaptiveMimeTypeForContentType​(<a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2" target="_top">@ContentType</a>
|
|
@com.google.android.exoplayer2.C.ContentType int contentType)</pre>
|
|
<div class="block">Returns the MIME type corresponding to the given adaptive <a href="../C.ContentType.html" title="annotation in com.google.android.exoplayer2"><code>C.ContentType</code></a>, or <code>null</code>
|
|
if the content type is not adaptive.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="fixSmoothStreamingIsmManifestUri(android.net.Uri)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>fixSmoothStreamingIsmManifestUri</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink">Uri</a> fixSmoothStreamingIsmManifestUri​(<a href="https://developer.android.com/reference/android/net/Uri.html?is-external=true" title="class or interface in android.net" class="externalLink" target="_top">Uri</a> uri)</pre>
|
|
<div class="block">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.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>uri</code> - The original URI.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The fixed URI.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getStringForTime(java.lang.StringBuilder,java.util.Formatter,long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getStringForTime</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> getStringForTime​(<a href="https://developer.android.com/reference/java/lang/StringBuilder.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">StringBuilder</a> builder,
|
|
<a href="https://developer.android.com/reference/java/util/Formatter.html" title="class or interface in java.util" class="externalLink" target="_top">Formatter</a> formatter,
|
|
long timeMs)</pre>
|
|
<div class="block">Returns the specified millisecond time formatted as a string.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>builder</code> - The builder that <code>formatter</code> will write to.</dd>
|
|
<dd><code>formatter</code> - The formatter.</dd>
|
|
<dd><code>timeMs</code> - The time to format as a string, in milliseconds.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The time formatted as a string.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="escapeFileName(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>escapeFileName</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> escapeFileName​(<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)</pre>
|
|
<div class="block">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.
|
|
|
|
<p>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 <a href="#unescapeFileName(java.lang.String)"><code>unescapeFileName(String)</code></a> can be used to retrieve the original file name.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>fileName</code> - File name to be escaped.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>An escaped file name which will be safe for use on at least FAT32 filesystems.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="unescapeFileName(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>unescapeFileName</h4>
|
|
<pre class="methodSignature">@Nullable
|
|
public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> unescapeFileName​(<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a> fileName)</pre>
|
|
<div class="block">Unescapes an escaped file or directory name back to its original value.
|
|
|
|
<p>See <a href="#escapeFileName(java.lang.String)"><code>escapeFileName(String)</code></a> for more information.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>fileName</code> - File name to be unescaped.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The original value of the file name before it was escaped, or null if the escaped
|
|
fileName seems invalid.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getDataUriForString(java.lang.String,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDataUriForString</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink">Uri</a> getDataUriForString​(<a href="https://developer.android.com/reference/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink" target="_top">String</a> mimeType,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> data)</pre>
|
|
<div class="block">Returns a data URI with the specified MIME type and data.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="sneakyThrow(java.lang.Throwable)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>sneakyThrow</h4>
|
|
<pre class="methodSignature">public static void sneakyThrow​(<a href="https://developer.android.com/reference/java/lang/Throwable.html" title="class or interface in java.lang" class="externalLink" target="_top">Throwable</a> t)</pre>
|
|
<div class="block">A hacky method that always throws <code>t</code> even if <code>t</code> is a checked exception, and is
|
|
not declared to be thrown.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="recursiveDelete(java.io.File)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>recursiveDelete</h4>
|
|
<pre class="methodSignature">public static void recursiveDelete​(<a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink" target="_top">File</a> fileOrDirectory)</pre>
|
|
<div class="block">Recursively deletes a directory and its content.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="createTempDirectory(android.content.Context,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createTempDirectory</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink">File</a> createTempDirectory​(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> prefix)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Creates an empty directory in the directory returned by <a href="https://developer.android.com/reference/android/content/Context.html#getCacheDir()" title="class or interface in android.content" class="externalLink" target="_top"><code>Context.getCacheDir()</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="createTempFile(android.content.Context,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>createTempFile</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/io/File.html" title="class or interface in java.io" class="externalLink">File</a> createTempFile​(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> prefix)
|
|
throws <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></pre>
|
|
<div class="block">Creates a new empty file in the directory returned by <a href="https://developer.android.com/reference/android/content/Context.html#getCacheDir()" title="class or interface in android.content" class="externalLink" target="_top"><code>Context.getCacheDir()</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a></code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="crc32(byte[],int,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>crc32</h4>
|
|
<pre class="methodSignature">public static int crc32​(byte[] bytes,
|
|
int start,
|
|
int end,
|
|
int initialValue)</pre>
|
|
<div class="block">Returns the result of updating a CRC-32 with the specified bytes in a "most significant bit
|
|
first" order.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bytes</code> - Array containing the bytes to update the crc value with.</dd>
|
|
<dd><code>start</code> - The index to the first byte in the byte range to update the crc with.</dd>
|
|
<dd><code>end</code> - The index after the last byte in the byte range to update the crc with.</dd>
|
|
<dd><code>initialValue</code> - The initial value for the crc calculation.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The result of updating the initial value with the specified bytes.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="crc8(byte[],int,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>crc8</h4>
|
|
<pre class="methodSignature">public static int crc8​(byte[] bytes,
|
|
int start,
|
|
int end,
|
|
int initialValue)</pre>
|
|
<div class="block">Returns the result of updating a CRC-8 with the specified bytes in a "most significant bit
|
|
first" order.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>bytes</code> - Array containing the bytes to update the crc value with.</dd>
|
|
<dd><code>start</code> - The index to the first byte in the byte range to update the crc with.</dd>
|
|
<dd><code>end</code> - The index after the last byte in the byte range to update the crc with.</dd>
|
|
<dd><code>initialValue</code> - The initial value for the crc calculation.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The result of updating the initial value with the specified bytes.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="gzip(byte[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>gzip</h4>
|
|
<pre class="methodSignature">public static byte[] gzip​(byte[] input)</pre>
|
|
<div class="block">Compresses <code>input</code> using gzip and returns the result in a newly allocated byte array.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getBigEndianInt(java.nio.ByteBuffer,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getBigEndianInt</h4>
|
|
<pre class="methodSignature">public static int getBigEndianInt​(<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">ByteBuffer</a> buffer,
|
|
int index)</pre>
|
|
<div class="block">Absolute <i>get</i> method for reading an int value in <a href="https://developer.android.com/reference/java/nio/ByteOrder.html#BIG_ENDIAN" title="class or interface in java.nio" class="externalLink"><code>ByteOrder.BIG_ENDIAN</code></a> in a <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio" class="externalLink"><code>ByteBuffer</code></a>. Same as <a href="https://developer.android.com/reference/java/nio/ByteBuffer.html?is-external=true#getInt(int)" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteBuffer.getInt(int)</code></a> except the buffer's order as returned by
|
|
<a href="https://developer.android.com/reference/java/nio/ByteBuffer.html#order()" title="class or interface in java.nio" class="externalLink"><code>ByteBuffer.order()</code></a> is ignored and <a href="https://developer.android.com/reference/java/nio/ByteOrder.html?is-external=true#BIG_ENDIAN" title="class or interface in java.nio" class="externalLink" target="_top"><code>ByteOrder.BIG_ENDIAN</code></a> is used instead.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>buffer</code> - The buffer from which to read an int in big endian.</dd>
|
|
<dd><code>index</code> - The index from which the bytes will be read.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The int value at the given index with the buffer bytes ordered most significant to
|
|
least significant.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getCountryCode(android.content.Context)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCountryCode</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> getCountryCode​(@Nullable
|
|
<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context)</pre>
|
|
<div class="block">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.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>context</code> - A context to access the telephony service. If null, only the Locale can be used.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The upper-case ISO 3166-1 alpha-2 country code, or an empty String if unavailable.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getSystemLanguageCodes()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getSystemLanguageCodes</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>[] getSystemLanguageCodes()</pre>
|
|
<div class="block">Returns a non-empty array of normalized IETF BCP 47 language tags for the system languages
|
|
ordered by preference.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getDefaultDisplayLocale()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDefaultDisplayLocale</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/util/Locale.html" title="class or interface in java.util" class="externalLink" target="_top">Locale</a> getDefaultDisplayLocale()</pre>
|
|
<div class="block">Returns the default <a href="https://developer.android.com/reference/java/util/Locale.Category.html#DISPLAY" title="class or interface in java.util" class="externalLink"><code>DISPLAY</code></a> <a href="https://developer.android.com/reference/java/util/Locale.html?is-external=true" title="class or interface in java.util" class="externalLink" target="_top"><code>Locale</code></a>.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="inflate(com.google.android.exoplayer2.util.ParsableByteArray,com.google.android.exoplayer2.util.ParsableByteArray,java.util.zip.Inflater)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>inflate</h4>
|
|
<pre class="methodSignature">public static boolean inflate​(<a href="ParsableByteArray.html" title="class in com.google.android.exoplayer2.util">ParsableByteArray</a> input,
|
|
<a href="ParsableByteArray.html" title="class in com.google.android.exoplayer2.util">ParsableByteArray</a> output,
|
|
@Nullable
|
|
<a href="https://developer.android.com/reference/java/util/zip/Inflater.html" title="class or interface in java.util.zip" class="externalLink" target="_top">Inflater</a> inflater)</pre>
|
|
<div class="block">Uncompresses the data in <code>input</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>input</code> - Wraps the compressed input data.</dd>
|
|
<dd><code>output</code> - Wraps an output buffer to be used to store the uncompressed data. If <code>
|
|
output.data</code> isn't big enough to hold the uncompressed data, a new array is created. If
|
|
<code>true</code> 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.</dd>
|
|
<dd><code>inflater</code> - If not null, used to uncompressed the input. Otherwise a new <a href="https://developer.android.com/reference/java/util/zip/Inflater.html" title="class or interface in java.util.zip" class="externalLink" target="_top"><code>Inflater</code></a>
|
|
is created.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether the input is uncompressed successfully.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="isTv(android.content.Context)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isTv</h4>
|
|
<pre class="methodSignature">public static boolean isTv​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context)</pre>
|
|
<div class="block">Returns whether the app is running on a TV device.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>context</code> - Any context.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether the app is running on a TV device.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="isAutomotive(android.content.Context)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isAutomotive</h4>
|
|
<pre class="methodSignature">public static boolean isAutomotive​(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context)</pre>
|
|
<div class="block">Returns whether the app is running on an automotive device.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>context</code> - Any context.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>Whether the app is running on an automotive device.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getCurrentDisplayModeSize(android.content.Context)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCurrentDisplayModeSize</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/graphics/Point.html" title="class or interface in android.graphics" class="externalLink">Point</a> getCurrentDisplayModeSize​(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context)</pre>
|
|
<div class="block">Gets the size of the current mode of the default display, in pixels.
|
|
|
|
<p>Note that due to application UI scaling, the number of pixels made available to applications
|
|
(as reported by <a href="https://developer.android.com/reference/android/view/Display.html#getSize(android.graphics.Point)" title="class or interface in android.view" class="externalLink" target="_top"><code>Display.getSize(Point)</code></a> 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 <a href="https://developer.android.com/reference/android/view/SurfaceView.html" title="class or interface in android.view" class="externalLink" target="_top"><code>SurfaceView</code></a> using full size buffers.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>context</code> - Any context.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The size of the current mode, in pixels.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getCurrentDisplayModeSize(android.content.Context,android.view.Display)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getCurrentDisplayModeSize</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/graphics/Point.html" title="class or interface in android.graphics" class="externalLink">Point</a> getCurrentDisplayModeSize​(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/android/view/Display.html" title="class or interface in android.view" class="externalLink" target="_top">Display</a> display)</pre>
|
|
<div class="block">Gets the size of the current mode of the specified display, in pixels.
|
|
|
|
<p>Note that due to application UI scaling, the number of pixels made available to applications
|
|
(as reported by <a href="https://developer.android.com/reference/android/view/Display.html#getSize(android.graphics.Point)" title="class or interface in android.view" class="externalLink" target="_top"><code>Display.getSize(Point)</code></a> 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 <a href="https://developer.android.com/reference/android/view/SurfaceView.html" title="class or interface in android.view" class="externalLink" target="_top"><code>SurfaceView</code></a> using full size buffers.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>context</code> - Any context.</dd>
|
|
<dd><code>display</code> - The display whose size is to be returned.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The size of the current mode, in pixels.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getTrackTypeString(@com.google.android.exoplayer2.C.TrackTypeint)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getTrackTypeString</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> getTrackTypeString​(@com.google.android.exoplayer2.C.TrackType int trackType)</pre>
|
|
<div class="block">Returns a string representation of a <a href="../C.TrackType.html" title="annotation in com.google.android.exoplayer2"><code>C.TrackType</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>trackType</code> - A <a href="../C.TrackType.html" title="annotation in com.google.android.exoplayer2"><code>C.TrackType</code></a> constant,</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A string representation of this constant.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getNowUnixTimeMs(long)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getNowUnixTimeMs</h4>
|
|
<pre class="methodSignature">public static long getNowUnixTimeMs​(long elapsedRealtimeEpochOffsetMs)</pre>
|
|
<div class="block">Returns the current time in milliseconds since the epoch.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>elapsedRealtimeEpochOffsetMs</code> - The offset between <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime()" title="class or interface in android.os" class="externalLink" target="_top"><code>SystemClock.elapsedRealtime()</code></a>
|
|
and the time since the Unix epoch, or <a href="../C.html#TIME_UNSET"><code>C.TIME_UNSET</code></a> if unknown.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The Unix time in milliseconds since the epoch.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="moveItems(java.util.List,int,int,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>moveItems</h4>
|
|
<pre class="methodSignature">public static <T> void moveItems​(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink" target="_top">List</a><T> items,
|
|
int fromIndex,
|
|
int toIndex,
|
|
int newFromIndex)</pre>
|
|
<div class="block">Moves the elements starting at <code>fromIndex</code> to <code>newFromIndex</code>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>items</code> - The list of which to move elements.</dd>
|
|
<dd><code>fromIndex</code> - The index at which the items to move start.</dd>
|
|
<dd><code>toIndex</code> - The index up to which elements should be moved (exclusive).</dd>
|
|
<dd><code>newFromIndex</code> - The new from index.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="tableExists(android.database.sqlite.SQLiteDatabase,java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>tableExists</h4>
|
|
<pre class="methodSignature">public static boolean tableExists​(<a href="https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html" title="class or interface in android.database.sqlite" class="externalLink" target="_top">SQLiteDatabase</a> database,
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> tableName)</pre>
|
|
<div class="block">Returns whether the table exists in the database.</div>
|
|
</li>
|
|
</ul>
|
|
<a id="getErrorCodeFromPlatformDiagnosticsInfo(java.lang.String)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getErrorCodeFromPlatformDiagnosticsInfo</h4>
|
|
<pre class="methodSignature">public static int getErrorCodeFromPlatformDiagnosticsInfo​(@Nullable
|
|
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> diagnosticsInfo)</pre>
|
|
<div class="block">Attempts to parse an error code from a diagnostic string found in framework media exceptions.
|
|
|
|
<p>For example: android.media.MediaCodec.error_1 or android.media.MediaDrm.error_neg_2.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>diagnosticsInfo</code> - A string from which to parse the error code.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The parser error code, or 0 if an error code could not be parsed.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getFormatSupportString(@com.google.android.exoplayer2.C.FormatSupportint)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getFormatSupportString</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink">String</a> getFormatSupportString​(<a href="../C.FormatSupport.html" title="annotation in com.google.android.exoplayer2" target="_top">@FormatSupport</a>
|
|
@com.google.android.exoplayer2.C.FormatSupport int formatSupport)</pre>
|
|
<div class="block">Returns string representation of a <a href="../C.FormatSupport.html" title="annotation in com.google.android.exoplayer2"><code>C.FormatSupport</code></a> flag.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>formatSupport</code> - A <a href="../C.FormatSupport.html" title="annotation in com.google.android.exoplayer2"><code>C.FormatSupport</code></a> flag.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>A string representation of the flag.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getAvailableCommands(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.Player.Commands)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getAvailableCommands</h4>
|
|
<pre class="methodSignature">public static <a href="../Player.Commands.html" title="class in com.google.android.exoplayer2">Player.Commands</a> getAvailableCommands​(<a href="../Player.html" title="interface in com.google.android.exoplayer2">Player</a> player,
|
|
<a href="../Player.Commands.html" title="class in com.google.android.exoplayer2">Player.Commands</a> permanentAvailableCommands)</pre>
|
|
<div class="block">Returns the <a href="../Player.Commands.html" title="class in com.google.android.exoplayer2"><code>Player.Commands</code></a> available in the <a href="../Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>player</code> - The <a href="../Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a>.</dd>
|
|
<dd><code>permanentAvailableCommands</code> - The commands permanently available in the player.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The available <a href="../Player.Commands.html" title="class in com.google.android.exoplayer2"><code>Player.Commands</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="sum(long...)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>sum</h4>
|
|
<pre class="methodSignature">public static long sum​(long... summands)</pre>
|
|
<div class="block">Returns the sum of all summands of the given array.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>summands</code> - The summands to calculate the sum from.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The sum of all summands.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="getDrawable(android.content.Context,android.content.res.Resources,int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDrawable</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/android/graphics/drawable/Drawable.html" title="class or interface in android.graphics.drawable" class="externalLink">Drawable</a> getDrawable​(<a href="https://developer.android.com/reference/android/content/Context.html?is-external=true" title="class or interface in android.content" class="externalLink" target="_top">Context</a> context,
|
|
<a href="https://developer.android.com/reference/android/content/res/Resources.html" title="class or interface in android.content.res" class="externalLink" target="_top">Resources</a> resources,
|
|
@DrawableRes
|
|
int drawableRes)</pre>
|
|
<div class="block">Returns a <a href="https://developer.android.com/reference/android/graphics/drawable/Drawable.html" title="class or interface in android.graphics.drawable" class="externalLink"><code>Drawable</code></a> for the given resource or throws a <a href="https://developer.android.com/reference/android/content/res/Resources.NotFoundException.html?is-external=true" title="class or interface in android.content.res" class="externalLink" target="_top"><code>Resources.NotFoundException</code></a> if not found.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>context</code> - The context to get the theme from starting with API 21.</dd>
|
|
<dd><code>resources</code> - The resources to load the drawable from.</dd>
|
|
<dd><code>drawableRes</code> - The drawable resource int.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>The loaded <a href="https://developer.android.com/reference/android/graphics/drawable/Drawable.html" title="class or interface in android.graphics.drawable" class="externalLink" target="_top"><code>Drawable</code></a>.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a id="intToStringMaxRadix(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>intToStringMaxRadix</h4>
|
|
<pre class="methodSignature">public static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> intToStringMaxRadix​(int i)</pre>
|
|
<div class="block">Returns a string representation of the integer using radix value <a href="https://developer.android.com/reference/java/lang/Character.html#MAX_RADIX" title="class or interface in java.lang" class="externalLink" target="_top"><code>Character.MAX_RADIX</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>i</code> - An integer to be converted to String.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<footer role="contentinfo">
|
|
<nav role="navigation">
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a id="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a id="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../../index.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../../allclasses.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a id="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
</nav>
|
|
</footer>
|
|
</body>
|
|
</html>
|