1 /*
2  * Copyright (C) 2022 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.view.cts.util.aidl;
18 
19 import android.os.IBinder;
20 import android.view.SurfaceControlViewHost.SurfacePackage;
21 import android.view.WindowManager.LayoutParams;
22 import android.view.SurfaceControl;
23 import android.view.cts.util.aidl.IMotionEventReceiver;
24 import android.window.InputTransferToken;
25 
26 interface IAttachEmbeddedWindow {
attachEmbedded(IBinder hostToken, int width, int height, int displayId, long delayMs)27     SurfacePackage attachEmbedded(IBinder hostToken, int width, int height, int displayId, long delayMs);
relayout(in LayoutParams lp)28     void relayout(in LayoutParams lp);
sendCrash()29     void sendCrash();
attachEmbeddedSurfaceControl(in SurfaceControl sc, in InputTransferToken hostToken, int width, int height, boolean transferTouchToHost, in @nullable IMotionEventReceiver motionEventReceiver)30     String attachEmbeddedSurfaceControl(in SurfaceControl sc, in InputTransferToken hostToken,
31             int width, int height, boolean transferTouchToHost,
32             in @nullable IMotionEventReceiver motionEventReceiver);
getEmbeddedInputTransferToken()33     InputTransferToken getEmbeddedInputTransferToken();
tearDownEmbeddedSurfaceControl()34     void tearDownEmbeddedSurfaceControl();
35 
attachEmbeddedASurfaceControl(in SurfaceControl parentSc, in InputTransferToken hostToken, int width, int height, boolean transferTouchToHost, in @nullable IMotionEventReceiver receiver)36     boolean attachEmbeddedASurfaceControl(in SurfaceControl parentSc,
37             in InputTransferToken hostToken, int width, int height, boolean transferTouchToHost,
38             in @nullable IMotionEventReceiver receiver);
tearDownEmbeddedASurfaceControl()39     void tearDownEmbeddedASurfaceControl();
40 }