xref: /aosp_15_r20/prebuilts/sdk/34/public/api/framework-sdksandbox.txt (revision 344a7f5ef16c479e7a7f54ee6567a9d112f9e72b)
1*344a7f5eSAndroid Build Coastguard Worker// Signature format: 2.0
2*344a7f5eSAndroid Build Coastguard Workerpackage android.app.sdksandbox {
3*344a7f5eSAndroid Build Coastguard Worker
4*344a7f5eSAndroid Build Coastguard Worker  public final class LoadSdkException extends java.lang.Exception implements android.os.Parcelable {
5*344a7f5eSAndroid Build Coastguard Worker    ctor public LoadSdkException(@NonNull Throwable, @NonNull android.os.Bundle);
6*344a7f5eSAndroid Build Coastguard Worker    method public int describeContents();
7*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.os.Bundle getExtraInformation();
8*344a7f5eSAndroid Build Coastguard Worker    method public int getLoadSdkErrorCode();
9*344a7f5eSAndroid Build Coastguard Worker    method public void writeToParcel(@NonNull android.os.Parcel, int);
10*344a7f5eSAndroid Build Coastguard Worker    field @NonNull public static final android.os.Parcelable.Creator<android.app.sdksandbox.LoadSdkException> CREATOR;
11*344a7f5eSAndroid Build Coastguard Worker  }
12*344a7f5eSAndroid Build Coastguard Worker
13*344a7f5eSAndroid Build Coastguard Worker  public final class RequestSurfacePackageException extends java.lang.Exception {
14*344a7f5eSAndroid Build Coastguard Worker    ctor public RequestSurfacePackageException(int, @Nullable String);
15*344a7f5eSAndroid Build Coastguard Worker    ctor public RequestSurfacePackageException(int, @Nullable String, @Nullable Throwable);
16*344a7f5eSAndroid Build Coastguard Worker    ctor public RequestSurfacePackageException(int, @Nullable String, @Nullable Throwable, @NonNull android.os.Bundle);
17*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.os.Bundle getExtraErrorInformation();
18*344a7f5eSAndroid Build Coastguard Worker    method public int getRequestSurfacePackageErrorCode();
19*344a7f5eSAndroid Build Coastguard Worker  }
20*344a7f5eSAndroid Build Coastguard Worker
21*344a7f5eSAndroid Build Coastguard Worker  public final class SandboxedSdk implements android.os.Parcelable {
22*344a7f5eSAndroid Build Coastguard Worker    ctor public SandboxedSdk(@NonNull android.os.IBinder);
23*344a7f5eSAndroid Build Coastguard Worker    method public int describeContents();
24*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public android.os.IBinder getInterface();
25*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.content.pm.SharedLibraryInfo getSharedLibraryInfo();
26*344a7f5eSAndroid Build Coastguard Worker    method public void writeToParcel(@NonNull android.os.Parcel, int);
27*344a7f5eSAndroid Build Coastguard Worker    field @NonNull public static final android.os.Parcelable.Creator<android.app.sdksandbox.SandboxedSdk> CREATOR;
28*344a7f5eSAndroid Build Coastguard Worker  }
29*344a7f5eSAndroid Build Coastguard Worker
30*344a7f5eSAndroid Build Coastguard Worker  public abstract class SandboxedSdkProvider {
31*344a7f5eSAndroid Build Coastguard Worker    ctor public SandboxedSdkProvider();
32*344a7f5eSAndroid Build Coastguard Worker    method public final void attachContext(@NonNull android.content.Context);
33*344a7f5eSAndroid Build Coastguard Worker    method public void beforeUnloadSdk();
34*344a7f5eSAndroid Build Coastguard Worker    method @Nullable public final android.content.Context getContext();
35*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public abstract android.view.View getView(@NonNull android.content.Context, @NonNull android.os.Bundle, int, int);
36*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public abstract android.app.sdksandbox.SandboxedSdk onLoadSdk(@NonNull android.os.Bundle) throws android.app.sdksandbox.LoadSdkException;
37*344a7f5eSAndroid Build Coastguard Worker  }
38*344a7f5eSAndroid Build Coastguard Worker
39*344a7f5eSAndroid Build Coastguard Worker  public final class SdkSandboxManager {
40*344a7f5eSAndroid Build Coastguard Worker    method public void addSdkSandboxProcessDeathCallback(@NonNull java.util.concurrent.Executor, @NonNull android.app.sdksandbox.SdkSandboxManager.SdkSandboxProcessDeathCallback);
41*344a7f5eSAndroid Build Coastguard Worker    method public void addSyncedSharedPreferencesKeys(@NonNull java.util.Set<java.lang.String>);
42*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public java.util.List<android.app.sdksandbox.SandboxedSdk> getSandboxedSdks();
43*344a7f5eSAndroid Build Coastguard Worker    method public static int getSdkSandboxState();
44*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public java.util.Set<java.lang.String> getSyncedSharedPreferencesKeys();
45*344a7f5eSAndroid Build Coastguard Worker    method public void loadSdk(@NonNull String, @NonNull android.os.Bundle, @NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<android.app.sdksandbox.SandboxedSdk,android.app.sdksandbox.LoadSdkException>);
46*344a7f5eSAndroid Build Coastguard Worker    method public void removeSdkSandboxProcessDeathCallback(@NonNull android.app.sdksandbox.SdkSandboxManager.SdkSandboxProcessDeathCallback);
47*344a7f5eSAndroid Build Coastguard Worker    method public void removeSyncedSharedPreferencesKeys(@NonNull java.util.Set<java.lang.String>);
48*344a7f5eSAndroid Build Coastguard Worker    method public void requestSurfacePackage(@NonNull String, @NonNull android.os.Bundle, @NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<android.os.Bundle,android.app.sdksandbox.RequestSurfacePackageException>);
49*344a7f5eSAndroid Build Coastguard Worker    method public void startSdkSandboxActivity(@NonNull android.app.Activity, @NonNull android.os.IBinder);
50*344a7f5eSAndroid Build Coastguard Worker    method public void unloadSdk(@NonNull String);
51*344a7f5eSAndroid Build Coastguard Worker    field public static final String EXTRA_DISPLAY_ID = "android.app.sdksandbox.extra.DISPLAY_ID";
52*344a7f5eSAndroid Build Coastguard Worker    field public static final String EXTRA_HEIGHT_IN_PIXELS = "android.app.sdksandbox.extra.HEIGHT_IN_PIXELS";
53*344a7f5eSAndroid Build Coastguard Worker    field public static final String EXTRA_HOST_TOKEN = "android.app.sdksandbox.extra.HOST_TOKEN";
54*344a7f5eSAndroid Build Coastguard Worker    field public static final String EXTRA_SURFACE_PACKAGE = "android.app.sdksandbox.extra.SURFACE_PACKAGE";
55*344a7f5eSAndroid Build Coastguard Worker    field public static final String EXTRA_WIDTH_IN_PIXELS = "android.app.sdksandbox.extra.WIDTH_IN_PIXELS";
56*344a7f5eSAndroid Build Coastguard Worker    field public static final int LOAD_SDK_ALREADY_LOADED = 101; // 0x65
57*344a7f5eSAndroid Build Coastguard Worker    field public static final int LOAD_SDK_INTERNAL_ERROR = 500; // 0x1f4
58*344a7f5eSAndroid Build Coastguard Worker    field public static final int LOAD_SDK_NOT_FOUND = 100; // 0x64
59*344a7f5eSAndroid Build Coastguard Worker    field public static final int LOAD_SDK_SDK_DEFINED_ERROR = 102; // 0x66
60*344a7f5eSAndroid Build Coastguard Worker    field public static final int LOAD_SDK_SDK_SANDBOX_DISABLED = 103; // 0x67
61*344a7f5eSAndroid Build Coastguard Worker    field public static final int REQUEST_SURFACE_PACKAGE_INTERNAL_ERROR = 700; // 0x2bc
62*344a7f5eSAndroid Build Coastguard Worker    field public static final int REQUEST_SURFACE_PACKAGE_SDK_NOT_LOADED = 701; // 0x2bd
63*344a7f5eSAndroid Build Coastguard Worker    field public static final int SDK_SANDBOX_PROCESS_NOT_AVAILABLE = 503; // 0x1f7
64*344a7f5eSAndroid Build Coastguard Worker    field public static final String SDK_SANDBOX_SERVICE = "sdk_sandbox";
65*344a7f5eSAndroid Build Coastguard Worker    field public static final int SDK_SANDBOX_STATE_DISABLED = 0; // 0x0
66*344a7f5eSAndroid Build Coastguard Worker    field public static final int SDK_SANDBOX_STATE_ENABLED_PROCESS_ISOLATION = 2; // 0x2
67*344a7f5eSAndroid Build Coastguard Worker  }
68*344a7f5eSAndroid Build Coastguard Worker
69*344a7f5eSAndroid Build Coastguard Worker  public static interface SdkSandboxManager.SdkSandboxProcessDeathCallback {
70*344a7f5eSAndroid Build Coastguard Worker    method public void onSdkSandboxDied();
71*344a7f5eSAndroid Build Coastguard Worker  }
72*344a7f5eSAndroid Build Coastguard Worker
73*344a7f5eSAndroid Build Coastguard Worker}
74*344a7f5eSAndroid Build Coastguard Worker
75*344a7f5eSAndroid Build Coastguard Workerpackage android.app.sdksandbox.sdkprovider {
76*344a7f5eSAndroid Build Coastguard Worker
77*344a7f5eSAndroid Build Coastguard Worker  public interface SdkSandboxActivityHandler {
78*344a7f5eSAndroid Build Coastguard Worker    method public void onActivityCreated(@NonNull android.app.Activity);
79*344a7f5eSAndroid Build Coastguard Worker  }
80*344a7f5eSAndroid Build Coastguard Worker
81*344a7f5eSAndroid Build Coastguard Worker  public class SdkSandboxController {
82*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.content.SharedPreferences getClientSharedPreferences();
83*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public java.util.List<android.app.sdksandbox.SandboxedSdk> getSandboxedSdks();
84*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public android.os.IBinder registerSdkSandboxActivityHandler(@NonNull android.app.sdksandbox.sdkprovider.SdkSandboxActivityHandler);
85*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public void unregisterSdkSandboxActivityHandler(@NonNull android.app.sdksandbox.sdkprovider.SdkSandboxActivityHandler);
86*344a7f5eSAndroid Build Coastguard Worker    field public static final String SDK_SANDBOX_CONTROLLER_SERVICE = "sdk_sandbox_controller_service";
87*344a7f5eSAndroid Build Coastguard Worker  }
88*344a7f5eSAndroid Build Coastguard Worker
89*344a7f5eSAndroid Build Coastguard Worker}
90*344a7f5eSAndroid Build Coastguard Worker
91