1 // Copyright (C) 2022 The Android Open Source Project
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 package android.app.sdksandbox.interfaces;
16 
17 import android.app.sdksandbox.interfaces.IActivityStarter;
18 import android.os.Bundle;
19 
20 interface ISdkApi {
getFileDescriptor(String inputValue)21     ParcelFileDescriptor getFileDescriptor(String inputValue);
parseFileDescriptor(in ParcelFileDescriptor pFd)22     String parseFileDescriptor(in ParcelFileDescriptor pFd);
createFile(int sizeInMb)23     String createFile(int sizeInMb);
loadSdkBySdk(String sdkName)24     void loadSdkBySdk(String sdkName);
getSyncedSharedPreferencesString(String key)25     String getSyncedSharedPreferencesString(String key);
startActivity(IActivityStarter callback, in Bundle params)26     void startActivity(IActivityStarter callback, in Bundle params);
getSandboxDump()27     String getSandboxDump();
isCustomizedSdkContextEnabled()28     boolean isCustomizedSdkContextEnabled();
29 
30     //For pausing playback when app is not active
notifyMainActivityStarted()31     oneway void notifyMainActivityStarted();
notifyMainActivityStopped()32     oneway void notifyMainActivityStopped();
33 }
34