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.adservices.ondevicepersonalization.aidl; 18 19 import android.content.ComponentName; 20 import android.adservices.ondevicepersonalization.CallerMetadata; 21 import android.adservices.ondevicepersonalization.aidl.IExecuteCallback; 22 import android.adservices.ondevicepersonalization.aidl.IRegisterMeasurementEventCallback; 23 import android.adservices.ondevicepersonalization.aidl.IRequestSurfacePackageCallback; 24 import android.os.Bundle; 25 import android.os.PersistableBundle; 26 27 /** @hide */ 28 interface IOnDevicePersonalizationManagingService { getVersion()29 String getVersion(); execute( in String callingPackageName, in ComponentName handler, in Bundle wrappedParams, in CallerMetadata metadata, in IExecuteCallback callback)30 void execute( 31 in String callingPackageName, 32 in ComponentName handler, 33 in Bundle wrappedParams, 34 in CallerMetadata metadata, 35 in IExecuteCallback callback); 36 requestSurfacePackage( in String slotResultToken, in IBinder hostToken, int displayId, int width, int height, in CallerMetadata metadata, in IRequestSurfacePackageCallback callback)37 void requestSurfacePackage( 38 in String slotResultToken, 39 in IBinder hostToken, 40 int displayId, 41 int width, 42 int height, 43 in CallerMetadata metadata, 44 in IRequestSurfacePackageCallback callback); 45 46 // TODO(b/301732670): Move to a new service. registerMeasurementEvent( in int measurementEventType, in Bundle params, in CallerMetadata metadata, in IRegisterMeasurementEventCallback callback)47 void registerMeasurementEvent( 48 in int measurementEventType, 49 in Bundle params, 50 in CallerMetadata metadata, 51 in IRegisterMeasurementEventCallback callback); 52 logApiCallStats( in String sdkPackageName, in int apiName, in long latencyMillis, in long rpcCallLatencyMillis, in long rpcReturnLatencyMillis, in int responseCode )53 void logApiCallStats( 54 in String sdkPackageName, 55 in int apiName, 56 in long latencyMillis, 57 in long rpcCallLatencyMillis, 58 in long rpcReturnLatencyMillis, 59 in int responseCode 60 ); 61 } 62