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

Commit bc320812 authored by David Zhao's avatar David Zhao
Browse files

Add TIAF recording request/response API

Bug: 252888452
Test: Cuttlefish
Change-Id: Ib133b2025aabaf867751d6a473bafdd326a7f1bf
parent 2bfcb2a2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ oneway interface ITvInteractiveAppClient {
    void onRequestStreamVolume(int seq);
    void onRequestTrackInfoList(int seq);
    void onRequestCurrentTvInputId(int seq);
    void onRequestStartRecording(in Uri programUri, int seq);
    void onRequestSigning(
            in String id, in String algorithm, in String alias, in byte[] data, int seq);
    void onAdRequest(in AdRequest request, int Seq);
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ interface ITvInteractiveAppManager {
    void notifyContentAllowed(in IBinder sessionToken, int userId);
    void notifyContentBlocked(in IBinder sessionToken, in String rating, int userId);
    void notifySignalStrength(in IBinder sessionToken, int stength, int userId);
    void notifyRecordingStarted(in IBinder sessionToken, in String recordingId, int userId);
    void setSurface(in IBinder sessionToken, in Surface surface, int userId);
    void dispatchSurfaceChanged(in IBinder sessionToken, int format, int width, int height,
            int userId);
+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ oneway interface ITvInteractiveAppSession {
    void notifyContentAllowed();
    void notifyContentBlocked(in String rating);
    void notifySignalStrength(int strength);
    void notifyRecordingStarted(in String recordingId);
    void setSurface(in Surface surface);
    void dispatchSurfaceChanged(int format, int width, int height);
    void notifyBroadcastInfoResponse(in BroadcastInfoResponse response);
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ oneway interface ITvInteractiveAppSessionCallback {
    void onRequestStreamVolume();
    void onRequestTrackInfoList();
    void onRequestCurrentTvInputId();
    void onRequestStartRecording(in Uri programUri);
    void onRequestSigning(in String id, in String algorithm, in String alias, in byte[] data);
    void onAdRequest(in AdRequest request);
}
+11 −0
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@ public class ITvInteractiveAppSessionWrapper
    private static final int DO_CREATE_MEDIA_VIEW = 27;
    private static final int DO_RELAYOUT_MEDIA_VIEW = 28;
    private static final int DO_REMOVE_MEDIA_VIEW = 29;
    private static final int DO_NOTIFY_RECORDING_STARTED = 30;

    private final HandlerCaller mCaller;
    private Session mSessionImpl;
@@ -164,6 +165,10 @@ public class ITvInteractiveAppSessionWrapper
                mSessionImpl.sendCurrentTvInputId((String) msg.obj);
                break;
            }
            case DO_NOTIFY_RECORDING_STARTED: {
                mSessionImpl.notifyRecordingStarted((String) msg.obj);
                break;
            }
            case DO_SEND_SIGNING_RESULT: {
                SomeArgs args = (SomeArgs) msg.obj;
                mSessionImpl.sendSigningResult((String) args.arg1, (byte[]) args.arg2);
@@ -380,6 +385,12 @@ public class ITvInteractiveAppSessionWrapper
        mCaller.executeOrSendMessage(mCaller.obtainMessageO(DO_NOTIFY_SIGNAL_STRENGTH, strength));
    }

    @Override
    public void notifyRecordingStarted(String recordingId) {
        mCaller.executeOrSendMessage(mCaller.obtainMessageO(
                DO_NOTIFY_RECORDING_STARTED, recordingId));
    }

    @Override
    public void setSurface(Surface surface) {
        mCaller.executeOrSendMessage(mCaller.obtainMessageO(DO_SET_SURFACE, surface));
Loading