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

Commit 0eea6155 authored by David Zhao's avatar David Zhao
Browse files

Update onTvMessage callback to also be int

Bug: 269425648
Test: atest TvInputServiceTest
Change-Id: I14869181c27348334025a2d0884d0956dc169dff
parent 07e4e1b9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27478,7 +27478,7 @@ package android.media.tv {
    method public boolean onTrackballEvent(android.view.MotionEvent);
    method public abstract boolean onTune(android.net.Uri);
    method public boolean onTune(android.net.Uri, android.os.Bundle);
    method public void onTvMessage(@NonNull String, @NonNull android.os.Bundle);
    method public void onTvMessage(int, @NonNull android.os.Bundle);
    method public void onUnblockContent(android.media.tv.TvContentRating);
    method public void setOverlayViewEnabled(boolean);
  }
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ public class ITvInputSessionWrapper extends ITvInputSession.Stub implements Hand
            }
            case DO_NOTIFY_TV_MESSAGE: {
                SomeArgs args = (SomeArgs) msg.obj;
                mTvInputSessionImpl.onTvMessageReceived((String) args.arg1, (Bundle) args.arg2);
                mTvInputSessionImpl.onTvMessageReceived((Integer) args.arg1, (Bundle) args.arg2);
                break;
            }
            default: {
+2 −2
Original line number Diff line number Diff line
@@ -1512,7 +1512,7 @@ public abstract class TvInputService extends Service {
         *             See {@link TvInputManager#TV_MESSAGE_KEY_SUBTYPE} for more information on
         *             how to parse this data.
         */
        public void onTvMessage(@NonNull @TvInputManager.TvMessageType String type,
        public void onTvMessage(@TvInputManager.TvMessageType int type,
                @NonNull Bundle data) {
        }

@@ -2065,7 +2065,7 @@ public abstract class TvInputService extends Service {
            onAdBufferReady(buffer);
        }

        void onTvMessageReceived(String type, Bundle data) {
        void onTvMessageReceived(int type, Bundle data) {
            onTvMessage(type, data);
        }