Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
20fb153c
authored
Dec 10, 2021
by
huangdarwin
Committed by
tonihei
Jan 05, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Use static asserts more often.
PiperOrigin-RevId: 415529751
parent
6cc7d058
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/AndroidTestUtil.java
libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/AndroidTestUtil.java
View file @
20fb153c
...
...
@@ -15,6 +15,7 @@
*/
package
androidx
.
media3
.
transformer
.
mh
;
import
static
androidx
.
media3
.
common
.
util
.
Assertions
.
checkState
;
import
static
com
.
google
.
common
.
truth
.
Truth
.
assertWithMessage
;
import
static
java
.
util
.
concurrent
.
TimeUnit
.
SECONDS
;
...
...
@@ -23,7 +24,6 @@ import android.net.Uri;
import
android.os.Build
;
import
androidx.annotation.Nullable
;
import
androidx.media3.common.MediaItem
;
import
androidx.media3.common.util.Assertions
;
import
androidx.media3.transformer.Transformer
;
import
androidx.test.platform.app.InstrumentationRegistry
;
import
java.io.File
;
...
...
@@ -135,9 +135,8 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
private
static
File
createExternalCacheFile
(
Context
context
,
String
fileName
)
throws
IOException
{
File
file
=
new
File
(
context
.
getExternalCacheDir
(),
fileName
);
Assertions
.
checkState
(
!
file
.
exists
()
||
file
.
delete
(),
"Could not delete file: "
+
file
.
getAbsolutePath
());
Assertions
.
checkState
(
file
.
createNewFile
(),
"Could not create file: "
+
file
.
getAbsolutePath
());
checkState
(!
file
.
exists
()
||
file
.
delete
(),
"Could not delete file: "
+
file
.
getAbsolutePath
());
checkState
(
file
.
createNewFile
(),
"Could not create file: "
+
file
.
getAbsolutePath
());
return
file
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment