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

Commit 819093b3 authored by Youngsang Cho's avatar Youngsang Cho Committed by Android Git Automerger
Browse files

am 76f8d671: Block logging watched histories for passthrough inputs

* commit '76f8d6714a64a101e281fbe3a24c2289f9a79a8f':
  Block logging watched histories for passthrough inputs
parents 754eb5c3 008f6d4e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.media.tv;

import android.annotation.SystemApi;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.ContentUris;
@@ -119,6 +120,15 @@ public final class TvContract {
                .appendPath(PATH_PASSTHROUGH).build();
    }

    /**
     * Returns true, if {@code channelUri} is a channel URI for a passthrough TV input.
     * @hide
     */
    @SystemApi
    public static final boolean isChannelUriForPassthroughTvInput(Uri channelUri) {
        return channelUri.toString().endsWith(PATH_PASSTHROUGH);
    }

    /**
     * Builds a URI that points to a channel logo. See {@link Channels.Logo}.
     *
+4 −1
Original line number Diff line number Diff line
@@ -993,7 +993,10 @@ public final class TvInputManagerService extends SystemService {
                synchronized (mLock) {
                    try {
                        getSessionLocked(sessionToken, callingUid, resolvedUserId).tune(channelUri);

                        if (TvContract.isChannelUriForPassthroughTvInput(channelUri)) {
                            // Do not log the watch history for passthrough inputs.
                            return;
                        }
                        long currentTime = System.currentTimeMillis();
                        long channelId = ContentUris.parseId(channelUri);