1 /* 2 * Copyright (C) 2021 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 com.android.sdksandbox; 18 19 import android.app.sdksandbox.SharedPreferencesUpdate; 20 import android.content.pm.ApplicationInfo; 21 import android.os.Bundle; 22 import android.os.IBinder; 23 24 import com.android.sdksandbox.ILoadSdkInSandboxCallback; 25 import android.app.sdksandbox.ISdkToServiceCallback; 26 import com.android.sdksandbox.IUnloadSdkInSandboxCallback; 27 import android.app.sdksandbox.SandboxLatencyInfo; 28 import com.android.sdksandbox.IComputeSdkStorageCallback; 29 30 /** @hide */ 31 oneway interface ISdkSandboxService { initialize(in ISdkToServiceCallback sdkToService)32 void initialize(in ISdkToServiceCallback sdkToService); computeSdkStorage(in List<String> sharedPaths, in List<String> sdkPaths, in IComputeSdkStorageCallback callback)33 void computeSdkStorage(in List<String> sharedPaths, in List<String> sdkPaths, 34 in IComputeSdkStorageCallback callback); 35 // TODO(b/228045863): Wrap parameters in a parcelable loadSdk(in String callingPackageName, in ApplicationInfo info, in String sdkName, in String sdkProviderClassName, in ApplicationInfo customizedInfo, in Bundle params, in ILoadSdkInSandboxCallback callback, in SandboxLatencyInfo sandboxLatencyInfo)36 void loadSdk(in String callingPackageName, in ApplicationInfo info, 37 in String sdkName, in String sdkProviderClassName, 38 in ApplicationInfo customizedInfo, 39 in Bundle params, in ILoadSdkInSandboxCallback callback, 40 in SandboxLatencyInfo sandboxLatencyInfo); unloadSdk(in String sdkName, in IUnloadSdkInSandboxCallback callback, in SandboxLatencyInfo sandboxLatencyInfo)41 void unloadSdk(in String sdkName, in IUnloadSdkInSandboxCallback callback, in SandboxLatencyInfo sandboxLatencyInfo); syncDataFromClient(in SharedPreferencesUpdate update)42 void syncDataFromClient(in SharedPreferencesUpdate update); notifySdkSandboxClientImportanceChange(boolean isForeground)43 void notifySdkSandboxClientImportanceChange(boolean isForeground); 44 } 45