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

Commit 1f6d4b5c authored by Conrad Chen's avatar Conrad Chen
Browse files

Add intent to intialize programs on APP installed

Adds a new broadcast intent for system APPs to send when some TV APP met
certain requirements is newly installed. The intent will wake up the APP
and notify it to initialize its channel and program list to the system
provider.

Test: build
Bug: 34739955
Change-Id: Ib172b40434db4a439ec0db7bf8b28037d0bfb8a8
parent 9220ff1f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -24535,6 +24535,7 @@ package android.media.tv {
    method public static boolean isChannelUriForPassthroughInput(android.net.Uri);
    method public static boolean isChannelUriForTunerInput(android.net.Uri);
    method public static boolean isProgramUri(android.net.Uri);
    field public static final java.lang.String ACTION_INITIALIZE_PROGRAMS = "android.media.tv.action.INITIALIZE_PROGRAMS";
    field public static final java.lang.String ACTION_MAKE_CHANNEL_BROWSABLE = "android.media.tv.action.MAKE_CHANNEL_BROWSABLE";
    field public static final java.lang.String ACTION_PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT = "android.media.tv.action.PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT";
    field public static final java.lang.String ACTION_PREVIEW_PROGRAM_BROWSABLE_DISABLED = "android.media.tv.action.PREVIEW_PROGRAM_BROWSABLE_DISABLED";
@@ -46013,7 +46014,6 @@ package android.view {
    method public static deprecated int getEdgeSlop();
    method public static deprecated int getFadingEdgeLength();
    method public static deprecated long getGlobalActionKeyTimeout();
    method public float getScaledHorizontalScrollFactor();
    method public static int getJumpTapTimeout();
    method public static int getKeyRepeatDelay();
    method public static int getKeyRepeatTimeout();
@@ -46025,6 +46025,7 @@ package android.view {
    method public int getScaledDoubleTapSlop();
    method public int getScaledEdgeSlop();
    method public int getScaledFadingEdgeLength();
    method public float getScaledHorizontalScrollFactor();
    method public int getScaledMaximumDrawingCacheSize();
    method public int getScaledMaximumFlingVelocity();
    method public int getScaledMinimumFlingVelocity();
@@ -46033,6 +46034,7 @@ package android.view {
    method public int getScaledPagingTouchSlop();
    method public int getScaledScrollBarSize();
    method public int getScaledTouchSlop();
    method public float getScaledVerticalScrollFactor();
    method public int getScaledWindowTouchSlop();
    method public static int getScrollBarFadeDuration();
    method public static deprecated int getScrollBarSize();
@@ -46040,7 +46042,6 @@ package android.view {
    method public static float getScrollFriction();
    method public static int getTapTimeout();
    method public static deprecated int getTouchSlop();
    method public float getScaledVerticalScrollFactor();
    method public static deprecated int getWindowTouchSlop();
    method public static long getZoomControlsTimeout();
    method public boolean hasPermanentMenuKey();
+3 −2
Original line number Diff line number Diff line
@@ -26468,6 +26468,7 @@ package android.media.tv {
    method public static boolean isChannelUriForPassthroughInput(android.net.Uri);
    method public static boolean isChannelUriForTunerInput(android.net.Uri);
    method public static boolean isProgramUri(android.net.Uri);
    field public static final java.lang.String ACTION_INITIALIZE_PROGRAMS = "android.media.tv.action.INITIALIZE_PROGRAMS";
    field public static final java.lang.String ACTION_MAKE_CHANNEL_BROWSABLE = "android.media.tv.action.MAKE_CHANNEL_BROWSABLE";
    field public static final java.lang.String ACTION_PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT = "android.media.tv.action.PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT";
    field public static final java.lang.String ACTION_PREVIEW_PROGRAM_BROWSABLE_DISABLED = "android.media.tv.action.PREVIEW_PROGRAM_BROWSABLE_DISABLED";
@@ -49470,7 +49471,6 @@ package android.view {
    method public static deprecated int getEdgeSlop();
    method public static deprecated int getFadingEdgeLength();
    method public static deprecated long getGlobalActionKeyTimeout();
    method public float getScaledHorizontalScrollFactor();
    method public static int getJumpTapTimeout();
    method public static int getKeyRepeatDelay();
    method public static int getKeyRepeatTimeout();
@@ -49482,6 +49482,7 @@ package android.view {
    method public int getScaledDoubleTapSlop();
    method public int getScaledEdgeSlop();
    method public int getScaledFadingEdgeLength();
    method public float getScaledHorizontalScrollFactor();
    method public int getScaledMaximumDrawingCacheSize();
    method public int getScaledMaximumFlingVelocity();
    method public int getScaledMinimumFlingVelocity();
@@ -49490,6 +49491,7 @@ package android.view {
    method public int getScaledPagingTouchSlop();
    method public int getScaledScrollBarSize();
    method public int getScaledTouchSlop();
    method public float getScaledVerticalScrollFactor();
    method public int getScaledWindowTouchSlop();
    method public static int getScrollBarFadeDuration();
    method public static deprecated int getScrollBarSize();
@@ -49497,7 +49499,6 @@ package android.view {
    method public static float getScrollFriction();
    method public static int getTapTimeout();
    method public static deprecated int getTouchSlop();
    method public float getScaledVerticalScrollFactor();
    method public static deprecated int getWindowTouchSlop();
    method public static long getZoomControlsTimeout();
    method public boolean hasPermanentMenuKey();
+3 −2
Original line number Diff line number Diff line
@@ -24648,6 +24648,7 @@ package android.media.tv {
    method public static boolean isChannelUriForPassthroughInput(android.net.Uri);
    method public static boolean isChannelUriForTunerInput(android.net.Uri);
    method public static boolean isProgramUri(android.net.Uri);
    field public static final java.lang.String ACTION_INITIALIZE_PROGRAMS = "android.media.tv.action.INITIALIZE_PROGRAMS";
    field public static final java.lang.String ACTION_MAKE_CHANNEL_BROWSABLE = "android.media.tv.action.MAKE_CHANNEL_BROWSABLE";
    field public static final java.lang.String ACTION_PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT = "android.media.tv.action.PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT";
    field public static final java.lang.String ACTION_PREVIEW_PROGRAM_BROWSABLE_DISABLED = "android.media.tv.action.PREVIEW_PROGRAM_BROWSABLE_DISABLED";
@@ -46390,7 +46391,6 @@ package android.view {
    method public static deprecated int getEdgeSlop();
    method public static deprecated int getFadingEdgeLength();
    method public static deprecated long getGlobalActionKeyTimeout();
    method public float getScaledHorizontalScrollFactor();
    method public static int getHoverTooltipHideShortTimeout();
    method public static int getHoverTooltipHideTimeout();
    method public static int getHoverTooltipShowTimeout();
@@ -46406,6 +46406,7 @@ package android.view {
    method public int getScaledDoubleTapSlop();
    method public int getScaledEdgeSlop();
    method public int getScaledFadingEdgeLength();
    method public float getScaledHorizontalScrollFactor();
    method public int getScaledMaximumDrawingCacheSize();
    method public int getScaledMaximumFlingVelocity();
    method public int getScaledMinimumFlingVelocity();
@@ -46414,6 +46415,7 @@ package android.view {
    method public int getScaledPagingTouchSlop();
    method public int getScaledScrollBarSize();
    method public int getScaledTouchSlop();
    method public float getScaledVerticalScrollFactor();
    method public int getScaledWindowTouchSlop();
    method public static int getScrollBarFadeDuration();
    method public static deprecated int getScrollBarSize();
@@ -46421,7 +46423,6 @@ package android.view {
    method public static float getScrollFriction();
    method public static int getTapTimeout();
    method public static deprecated int getTouchSlop();
    method public float getScaledVerticalScrollFactor();
    method public static deprecated int getWindowTouchSlop();
    method public static long getZoomControlsTimeout();
    method public boolean hasPermanentMenuKey();
+17 −0
Original line number Diff line number Diff line
@@ -128,6 +128,23 @@ public final class TvContract {
    public static final String ACTION_PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT =
            "android.media.tv.action.PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT";

    /**
     * Broadcast Action: sent to the target TV input after it is first installed to notify the input
     * to initialize its channels and programs to the system content provider.
     *
     * <p>Note that this intent is sent only on devices with
     * {@link android.content.pm.PackageManager#FEATURE_LEANBACK} enabled. Besides that, in order
     * to receive this intent, the target TV input must:
     * <ul>
     *     <li>Declare a broadcast receiver for this intent in its
     *         <code>AndroidManifest.xml</code>.</li>
     *     <li>Declare appropriate permissions to write channel and program data in its
     *         <code>AndroidManifest.xml</code>.</li>
     * </ul>
     */
    public static final String ACTION_INITIALIZE_PROGRAMS =
            "android.media.tv.action.INITIALIZE_PROGRAMS";

    /** The key for a bundle parameter containing a channel ID as a long integer */
    public static final String EXTRA_CHANNEL_ID = "android.media.tv.extra.CHANNEL_ID";