Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(android): media/file APIs to use scoped storage #12143

Merged
merged 16 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public String getSeparator()
@Kroll.getProperty
public String getLineEnding()
{
return System.getProperty("line.separator");
return System.lineSeparator();
}

@Kroll.method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -581,15 +581,10 @@ public boolean onError(MediaPlayer mp, int framework_err, int impl_err)
if (mMediaController != null) {
mMediaController.hide();
}
if (mp != null) {
mp.release();
}

/* If an error handler has been supplied, use it and finish. */
if (mOnErrorListener != null) {
if (mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err)) {
return true;
}
mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err);
}

return true;
Expand Down Expand Up @@ -694,7 +689,6 @@ public void surfaceDestroyed(SurfaceHolder holder)
public void release(boolean cleartargetstate)
{
if (mMediaPlayer != null) {
mMediaPlayer.reset();
mMediaPlayer.release();
mMediaPlayer = null;
mCurrentState = STATE_IDLE;
Expand Down