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

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

TIF: Rename requestUnblockContent to unblockContent

The method TvView.requestUnblockContent doesn't match the name of the
corresponding method in TvInputService, onUnblockContent, hence changed
the name to make it consistent with the current naming scheme.
This change deprecated the requestUnblockContent method as the first
step.

Bug: 19337627
Change-Id: I530209c4dca66305da90ffded7199fa3c1c1780c
parent cf1b4c77
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -19375,7 +19375,7 @@ package android.media.tv {
    method public java.util.List<android.media.tv.TvTrackInfo> getTracks(int);
    method protected void onLayout(boolean, int, int, int, int);
    method public boolean onUnhandledInputEvent(android.view.InputEvent);
    method public void requestUnblockContent(android.media.tv.TvContentRating);
    method public deprecated void requestUnblockContent(android.media.tv.TvContentRating);
    method public void reset();
    method public void selectTrack(int, java.lang.String);
    method public void sendAppPrivateCommand(java.lang.String, android.os.Bundle);
@@ -19393,6 +19393,7 @@ package android.media.tv {
    method public void timeShiftSetPlaybackRate(float, int);
    method public void tune(java.lang.String, android.net.Uri);
    method public void tune(java.lang.String, android.net.Uri, android.os.Bundle);
    method public void unblockContent(android.media.tv.TvContentRating);
  }
  public static abstract interface TvView.OnUnhandledInputEventListener {
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ interface ITvInputManager {
    void relayoutOverlayView(in IBinder sessionToken, in Rect frame, int userId);
    void removeOverlayView(in IBinder sessionToken, int userId);

    void requestUnblockContent(in IBinder sessionToken, in String unblockedRating, int userId);
    void unblockContent(in IBinder sessionToken, in String unblockedRating, int userId);

    void timeShiftPause(in IBinder sessionToken, int userId);
    void timeShiftResume(in IBinder sessionToken, int userId);
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ oneway interface ITvInputSession {
    void relayoutOverlayView(in Rect frame);
    void removeOverlayView();

    void requestUnblockContent(in String unblockedRating);
    void unblockContent(in String unblockedRating);

    void timeShiftPause();
    void timeShiftResume();
+4 −4
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand
    private static final int DO_CREATE_OVERLAY_VIEW = 10;
    private static final int DO_RELAYOUT_OVERLAY_VIEW = 11;
    private static final int DO_REMOVE_OVERLAY_VIEW = 12;
    private static final int DO_REQUEST_UNBLOCK_CONTENT = 13;
    private static final int DO_UNBLOCK_CONTENT = 13;
    private static final int DO_TIME_SHIFT_PAUSE = 14;
    private static final int DO_TIME_SHIFT_RESUME = 15;
    private static final int DO_TIME_SHIFT_SEEK_TO = 16;
@@ -155,7 +155,7 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand
                mTvInputSessionImpl.removeOverlayView(true);
                break;
            }
            case DO_REQUEST_UNBLOCK_CONTENT: {
            case DO_UNBLOCK_CONTENT: {
                mTvInputSessionImpl.unblockContent((String) msg.obj);
                break;
            }
@@ -267,9 +267,9 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand
    }

    @Override
    public void requestUnblockContent(String unblockedRating) {
    public void unblockContent(String unblockedRating) {
        mCaller.executeOrSendMessage(mCaller.obtainMessageO(
                DO_REQUEST_UNBLOCK_CONTENT, unblockedRating));
                DO_UNBLOCK_CONTENT, unblockedRating));
    }

    @Override
+2 −2
Original line number Diff line number Diff line
@@ -1820,14 +1820,14 @@ public final class TvInputManager {
        /**
         * Requests to unblock content blocked by parental controls.
         */
        void requestUnblockContent(@NonNull TvContentRating unblockedRating) {
        void unblockContent(@NonNull TvContentRating unblockedRating) {
            Preconditions.checkNotNull(unblockedRating);
            if (mToken == null) {
                Log.w(TAG, "The session has been already released");
                return;
            }
            try {
                mService.requestUnblockContent(mToken, unblockedRating.flattenToString(), mUserId);
                mService.unblockContent(mToken, unblockedRating.flattenToString(), mUserId);
            } catch (RemoteException e) {
                throw new RuntimeException(e);
            }
Loading