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
d6157412
authored
Feb 14, 2022
by
andrewlewis
Committed by
Ian Baker
Feb 21, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix debug frame showing through player on old devices
PiperOrigin-RevId: 428524300
parent
0fba5e72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/TransformerActivity.java
demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/TransformerActivity.java
View file @
d6157412
...
...
@@ -103,6 +103,7 @@ public final class TransformerActivity extends AppCompatActivity {
checkNotNull
(
playerView
);
checkNotNull
(
debugTextView
);
checkNotNull
(
progressViewGroup
);
checkNotNull
(
debugFrame
);
startTransformation
();
playerView
.
onResume
();
...
...
@@ -131,6 +132,7 @@ public final class TransformerActivity extends AppCompatActivity {
"progressIndicator"
,
"transformationStopwatch"
,
"progressViewGroup"
,
"debugFrame"
,
})
private
void
startTransformation
()
{
requestTransformerPermission
();
...
...
@@ -188,6 +190,7 @@ public final class TransformerActivity extends AppCompatActivity {
"informationTextView"
,
"transformationStopwatch"
,
"progressViewGroup"
,
"debugFrame"
,
})
private
Transformer
createTransformer
(
@Nullable
Bundle
bundle
,
String
filePath
)
{
Transformer
.
Builder
transformerBuilder
=
new
Transformer
.
Builder
(
/* context= */
this
);
...
...
@@ -261,12 +264,14 @@ public final class TransformerActivity extends AppCompatActivity {
@RequiresNonNull
({
"informationTextView"
,
"progressViewGroup"
,
"debugFrame"
,
"transformationStopwatch"
,
})
private
void
onTransformationError
(
TransformationException
exception
)
{
transformationStopwatch
.
stop
();
informationTextView
.
setText
(
R
.
string
.
transformation_error
);
progressViewGroup
.
setVisibility
(
View
.
GONE
);
debugFrame
.
removeAllViews
();
Toast
.
makeText
(
TransformerActivity
.
this
,
"Transformation error: "
+
exception
,
Toast
.
LENGTH_LONG
)
.
show
();
...
...
@@ -278,6 +283,7 @@ public final class TransformerActivity extends AppCompatActivity {
"debugTextView"
,
"informationTextView"
,
"progressViewGroup"
,
"debugFrame"
,
"transformationStopwatch"
,
})
private
void
onTransformationCompleted
(
String
filePath
)
{
...
...
@@ -286,6 +292,7 @@ public final class TransformerActivity extends AppCompatActivity {
getString
(
R
.
string
.
transformation_completed
,
transformationStopwatch
.
elapsed
(
TimeUnit
.
SECONDS
)));
progressViewGroup
.
setVisibility
(
View
.
GONE
);
debugFrame
.
removeAllViews
();
playerView
.
setVisibility
(
View
.
VISIBLE
);
playMediaItem
(
MediaItem
.
fromUri
(
"file://"
+
filePath
));
Log
.
d
(
TAG
,
"Output file path: file://"
+
filePath
);
...
...
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