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