Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 850ae9ac authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Bug 4184736 unhide MediaPlayer.setTexture"

parents cbc38e74 817c161e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10058,6 +10058,7 @@ package android.media {
    method public void setOnSeekCompleteListener(android.media.MediaPlayer.OnSeekCompleteListener);
    method public void setOnVideoSizeChangedListener(android.media.MediaPlayer.OnVideoSizeChangedListener);
    method public void setScreenOnWhilePlaying(boolean);
    method public void setTexture(android.graphics.SurfaceTexture);
    method public void setVolume(float, float);
    method public void setWakeMode(android.content.Context, int);
    method public void start() throws java.lang.IllegalStateException;
+6 −1
Original line number Diff line number Diff line
@@ -628,9 +628,11 @@ public class MediaPlayer
     * and cannot be directly compared between different media sources or different
     * instances of the same media source, or across multiple runs of the same
     * program.
     * @hide
     */
    public void setTexture(SurfaceTexture st) {
        if (mScreenOnWhilePlaying && st != null && mSurfaceTexture == null) {
            Log.w(TAG, "setScreenOnWhilePlaying(true) is ineffective for SurfaceTexture");
        }
        mSurfaceHolder = null;
        mSurface = null;
        mSurfaceTexture = st;
@@ -960,6 +962,9 @@ public class MediaPlayer
     */
    public void setScreenOnWhilePlaying(boolean screenOn) {
        if (mScreenOnWhilePlaying != screenOn) {
            if (screenOn && mSurfaceTexture != null) {
                Log.w(TAG, "setScreenOnWhilePlaying(true) is ineffective for SurfaceTexture");
            }
            mScreenOnWhilePlaying = screenOn;
            updateSurfaceScreenOn();
        }