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

Commit 817c161e authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Bug 4184736 unhide MediaPlayer.setTexture

Change-Id: I4c8456465611b717e42c0a11e3ce3b4dc0a34270
parent 0ca2fda0
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();
        }