Loading core/java/android/widget/VideoView2.java +7 −13 Original line number Diff line number Diff line Loading @@ -112,14 +112,14 @@ public class VideoView2 extends FrameLayout { public @interface ViewType {} /** * Indicates video is rendering on SurfaceView * Indicates video is rendering on SurfaceView. * * @see #setViewType */ public static final int VIEW_TYPE_SURFACEVIEW = 1; /** * Indicates video is rendering on TextureView * Indicates video is rendering on TextureView. * * @see #setViewType */ Loading Loading @@ -188,18 +188,12 @@ public class VideoView2 extends FrameLayout { } /** * Starts rendering closed caption or subtitles if there is any. The first subtitle track will * be chosen by default if there multiple subtitle tracks exist. * Shows or hides closed caption or subtitles if there is any. * The first subtitle track will be chosen by default if there multiple subtitle tracks exist. * @param show shows closed caption or subtitles if this value is true, or hides. */ public void showSubtitle() { mProvider.showSubtitle_impl(); } /** * Stops showing closed captions or subtitles. */ public void hideSubtitle() { mProvider.hideSubtitle_impl(); public void showSubtitle(boolean show) { mProvider.showSubtitle_impl(show); } /** Loading core/res/res/values/attrs.xml +10 −0 Original line number Diff line number Diff line Loading @@ -8773,6 +8773,16 @@ <attr name="fontProviderCerts" format="reference" /> </declare-styleable> <!-- Attributes that are read when parsing a tag. --> <declare-styleable name="VideoView2"> <attr name="enableControlView" format="boolean" /> <attr name="showSubtitle" format="boolean" /> <attr name="viewType" format="enum"> <enum name="surfaceView" value="0" /> <enum name="textureView" value="1" /> </attr> </declare-styleable> <!-- @hide --> <declare-styleable name="RecyclerView"> <attr name="layoutManager" format="string" /> Loading media/java/android/media/update/VideoView2Provider.java +1 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,7 @@ public interface VideoView2Provider extends ViewProvider { void setMediaControlView2_impl(MediaControlView2 mediaControlView); MediaController getMediaController_impl(); MediaControlView2 getMediaControlView2_impl(); void showSubtitle_impl(); void hideSubtitle_impl(); void showSubtitle_impl(boolean show); // TODO: remove setSpeed_impl once MediaController2 is ready. void setSpeed_impl(float speed); void setAudioFocusRequest_impl(int focusGain); Loading Loading
core/java/android/widget/VideoView2.java +7 −13 Original line number Diff line number Diff line Loading @@ -112,14 +112,14 @@ public class VideoView2 extends FrameLayout { public @interface ViewType {} /** * Indicates video is rendering on SurfaceView * Indicates video is rendering on SurfaceView. * * @see #setViewType */ public static final int VIEW_TYPE_SURFACEVIEW = 1; /** * Indicates video is rendering on TextureView * Indicates video is rendering on TextureView. * * @see #setViewType */ Loading Loading @@ -188,18 +188,12 @@ public class VideoView2 extends FrameLayout { } /** * Starts rendering closed caption or subtitles if there is any. The first subtitle track will * be chosen by default if there multiple subtitle tracks exist. * Shows or hides closed caption or subtitles if there is any. * The first subtitle track will be chosen by default if there multiple subtitle tracks exist. * @param show shows closed caption or subtitles if this value is true, or hides. */ public void showSubtitle() { mProvider.showSubtitle_impl(); } /** * Stops showing closed captions or subtitles. */ public void hideSubtitle() { mProvider.hideSubtitle_impl(); public void showSubtitle(boolean show) { mProvider.showSubtitle_impl(show); } /** Loading
core/res/res/values/attrs.xml +10 −0 Original line number Diff line number Diff line Loading @@ -8773,6 +8773,16 @@ <attr name="fontProviderCerts" format="reference" /> </declare-styleable> <!-- Attributes that are read when parsing a tag. --> <declare-styleable name="VideoView2"> <attr name="enableControlView" format="boolean" /> <attr name="showSubtitle" format="boolean" /> <attr name="viewType" format="enum"> <enum name="surfaceView" value="0" /> <enum name="textureView" value="1" /> </attr> </declare-styleable> <!-- @hide --> <declare-styleable name="RecyclerView"> <attr name="layoutManager" format="string" /> Loading
media/java/android/media/update/VideoView2Provider.java +1 −2 Original line number Diff line number Diff line Loading @@ -47,8 +47,7 @@ public interface VideoView2Provider extends ViewProvider { void setMediaControlView2_impl(MediaControlView2 mediaControlView); MediaController getMediaController_impl(); MediaControlView2 getMediaControlView2_impl(); void showSubtitle_impl(); void hideSubtitle_impl(); void showSubtitle_impl(boolean show); // TODO: remove setSpeed_impl once MediaController2 is ready. void setSpeed_impl(float speed); void setAudioFocusRequest_impl(int focusGain); Loading