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

Commit d2546117 authored by Jae Seo's avatar Jae Seo
Browse files

TIF: Update Java doc for notifyVideoAvailable/notifyVideoUnavailable

TV input services are now required to call these methods to
unblock/block the screen.

Bug: 17364845
Change-Id: Ifb435900d7f61785198dba2e255a2d24dbf44dc6
parent 68c936f7
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
@@ -389,8 +389,11 @@ public abstract class TvInputService extends Service {
        }

        /**
         * Informs the application that video is available and the playback of the TV stream has
         * been started.
         * Informs the application that the video is now available for watching. This is primarily
         * used to signal the application to unblock the screen. The TV input service must call this
         * method as soon as the content rendered onto its surface gets ready for viewing.
         *
         * @see #notifyVideoUnavailable
         */
        public void notifyVideoAvailable() {
            runOnMainThread(new Runnable() {
@@ -407,16 +410,18 @@ public abstract class TvInputService extends Service {
        }

        /**
         * Informs the application that video is not available, so the TV input cannot continue
         * playing the TV stream.
         * Informs the application that the video became unavailable for some reason. This is
         * primarily used to signal the application to block the screen not to show any intermittent
         * video artifacts.
         *
         * @param reason The reason that the TV input stopped the playback:
         * @param reason The reason why the video became unavailable:
         *            <ul>
         *            <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_UNKNOWN}
         *            <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_TUNING}
         *            <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_WEAK_SIGNAL}
         *            <li>{@link TvInputManager#VIDEO_UNAVAILABLE_REASON_BUFFERING}
         *            </ul>
         * @see #notifyVideoAvailable
         */
        public void notifyVideoUnavailable(final int reason) {
            if (reason < TvInputManager.VIDEO_UNAVAILABLE_REASON_START