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

Commit 013f571b authored by Shubang Lu's avatar Shubang Lu
Browse files

CSAI: handle session

createSession, releaseSession etc

Bug: 318906105
Test: mmm
Change-Id: Iea41f56f24b02e9514b77a00c97129fedd82e551
parent 4d29ed23
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.media.tv.ad;

import android.view.InputChannel;

/**
 * Interface a client of the ITvAdManager implements, to identify itself and receive
 * information about changes to the state of each TV AD service.
 * @hide
 */
oneway interface ITvAdClient {
    void onSessionCreated(in String serviceId, IBinder token, in InputChannel channel, int seq);
    void onSessionReleased(int seq);
}
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -16,10 +16,15 @@

package android.media.tv.ad;

import android.media.tv.ad.ITvAdClient;

/**
 * Interface to the TV AD service.
 * @hide
 */
interface ITvAdManager {
    void createSession(
            in ITvAdClient client, in String serviceId, in String type, int seq, int userId);
    void releaseSession(in IBinder sessionToken, int userId);
    void startAdService(in IBinder sessionToken, int userId);
}
+24 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.media.tv.ad;

/**
 * Interface to receive callbacks from ITvAdManager regardless of sessions.
 * @hide
 */
oneway interface ITvAdManagerCallback {
}
 No newline at end of file
+35 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.media.tv.ad;

import android.media.tv.ad.ITvAdServiceCallback;
import android.media.tv.ad.ITvAdSessionCallback;
import android.os.Bundle;
import android.view.InputChannel;

/**
 * Top-level interface to a TV AD component (implemented in a Service). It's used for
 * TvAdManagerService to communicate with TvAdService.
 * @hide
 */
oneway interface ITvAdService {
    void registerCallback(in ITvAdServiceCallback callback);
    void unregisterCallback(in ITvAdServiceCallback callback);
    void createSession(in InputChannel channel, in ITvAdSessionCallback callback,
            in String serviceId, in String type);
    void sendAppLinkCommand(in Bundle command);
}
 No newline at end of file
+24 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.media.tv.ad;

/**
 * Helper interface for ITvAdService to allow the TvAdService to notify the TvAdManagerService.
 * @hide
 */
oneway interface ITvAdServiceCallback {
}
 No newline at end of file
Loading