Loading core/api/module-lib-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ package android.content { public abstract class Context { method @NonNull public android.content.Context createContextForSdkInSandbox(@NonNull android.content.pm.ApplicationInfo, int) throws android.content.pm.PackageManager.NameNotFoundException; method @NonNull public android.os.IBinder getIApplicationThreadBinder(); method @NonNull public android.os.IBinder getProcessToken(); method @NonNull public android.os.UserHandle getUser(); field public static final String PAC_PROXY_SERVICE = "pac_proxy"; field public static final String TEST_NETWORK_SERVICE = "test_network"; Loading core/java/android/app/ContextImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -2028,7 +2028,7 @@ class ContextImpl extends Context { /** @hide */ @NonNull @Override public IBinder getIApplicationThreadBinder() { public IBinder getProcessToken() { return getIApplicationThread().asBinder(); } Loading core/java/android/content/Context.java +2 −4 Original line number Diff line number Diff line Loading @@ -7527,14 +7527,12 @@ public abstract class Context { } /** * Get the binder object associated with the IApplicationThread of this Context. * * This can be used by a mainline module to uniquely identify a specific app process. * Used by a mainline module to uniquely identify a specific app process. * @hide */ @NonNull @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public IBinder getIApplicationThreadBinder() { public IBinder getProcessToken() { throw new RuntimeException("Not implemented. Must override in a subclass."); } Loading core/java/android/content/ContextWrapper.java +2 −2 Original line number Diff line number Diff line Loading @@ -1286,8 +1286,8 @@ public class ContextWrapper extends Context { * @hide */ @Override public IBinder getIApplicationThreadBinder() { return mBase.getIApplicationThreadBinder(); public IBinder getProcessToken() { return mBase.getProcessToken(); } /** Loading services/core/java/com/android/server/am/ActivityManagerLocal.java +8 −7 Original line number Diff line number Diff line Loading @@ -75,8 +75,9 @@ public interface ActivityManagerLocal { * @param conn Receives information as the service is started and stopped. * This must be a valid ServiceConnection object; it must not be null. * @param clientAppUid Uid of the app for which the sdk sandbox process needs to be spawned. * @param clientApplicationThread ApplicationThread object of the app for which the sdk sandboox * is spawned. * @param clientAppProcessToken process token used to uniquely identify the client app * process binding to the SDK sandbox. This is obtained using * {@link Context#getProcessToken()}. * @param clientAppPackage Package of the app for which the sdk sandbox process needs to * be spawned. This package must belong to the clientAppUid. * @param processName Unique identifier for the service instance. Each unique name here will Loading @@ -92,7 +93,7 @@ public interface ActivityManagerLocal { */ @SuppressLint("RethrowRemoteException") boolean bindSdkSandboxService(@NonNull Intent service, @NonNull ServiceConnection conn, int clientAppUid, @NonNull IBinder clientApplicationThread, int clientAppUid, @NonNull IBinder clientAppProcessToken, @NonNull String clientAppPackage, @NonNull String processName, @Context.BindServiceFlags int flags) throws RemoteException; Loading @@ -112,9 +113,9 @@ public interface ActivityManagerLocal { /** * Kill an app process associated with an SDK sandbox. * * @param clientApplicationThreadBinder binder value of the * {@link android.app.IApplicationThread} of a client app process associated with a * sandbox. This is obtained using {@link Context#getIApplicationThreadBinder()}. * @param clientAppProcessToken process token used to uniquely identify the client app * process associated with an SDK sandbox. This is obtained using * {@link Context#getProcessToken()}. */ void killSdkSandboxClientAppProcess(@NonNull IBinder clientApplicationThreadBinder); void killSdkSandboxClientAppProcess(@NonNull IBinder clientAppProcessToken); } Loading
core/api/module-lib-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ package android.content { public abstract class Context { method @NonNull public android.content.Context createContextForSdkInSandbox(@NonNull android.content.pm.ApplicationInfo, int) throws android.content.pm.PackageManager.NameNotFoundException; method @NonNull public android.os.IBinder getIApplicationThreadBinder(); method @NonNull public android.os.IBinder getProcessToken(); method @NonNull public android.os.UserHandle getUser(); field public static final String PAC_PROXY_SERVICE = "pac_proxy"; field public static final String TEST_NETWORK_SERVICE = "test_network"; Loading
core/java/android/app/ContextImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -2028,7 +2028,7 @@ class ContextImpl extends Context { /** @hide */ @NonNull @Override public IBinder getIApplicationThreadBinder() { public IBinder getProcessToken() { return getIApplicationThread().asBinder(); } Loading
core/java/android/content/Context.java +2 −4 Original line number Diff line number Diff line Loading @@ -7527,14 +7527,12 @@ public abstract class Context { } /** * Get the binder object associated with the IApplicationThread of this Context. * * This can be used by a mainline module to uniquely identify a specific app process. * Used by a mainline module to uniquely identify a specific app process. * @hide */ @NonNull @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public IBinder getIApplicationThreadBinder() { public IBinder getProcessToken() { throw new RuntimeException("Not implemented. Must override in a subclass."); } Loading
core/java/android/content/ContextWrapper.java +2 −2 Original line number Diff line number Diff line Loading @@ -1286,8 +1286,8 @@ public class ContextWrapper extends Context { * @hide */ @Override public IBinder getIApplicationThreadBinder() { return mBase.getIApplicationThreadBinder(); public IBinder getProcessToken() { return mBase.getProcessToken(); } /** Loading
services/core/java/com/android/server/am/ActivityManagerLocal.java +8 −7 Original line number Diff line number Diff line Loading @@ -75,8 +75,9 @@ public interface ActivityManagerLocal { * @param conn Receives information as the service is started and stopped. * This must be a valid ServiceConnection object; it must not be null. * @param clientAppUid Uid of the app for which the sdk sandbox process needs to be spawned. * @param clientApplicationThread ApplicationThread object of the app for which the sdk sandboox * is spawned. * @param clientAppProcessToken process token used to uniquely identify the client app * process binding to the SDK sandbox. This is obtained using * {@link Context#getProcessToken()}. * @param clientAppPackage Package of the app for which the sdk sandbox process needs to * be spawned. This package must belong to the clientAppUid. * @param processName Unique identifier for the service instance. Each unique name here will Loading @@ -92,7 +93,7 @@ public interface ActivityManagerLocal { */ @SuppressLint("RethrowRemoteException") boolean bindSdkSandboxService(@NonNull Intent service, @NonNull ServiceConnection conn, int clientAppUid, @NonNull IBinder clientApplicationThread, int clientAppUid, @NonNull IBinder clientAppProcessToken, @NonNull String clientAppPackage, @NonNull String processName, @Context.BindServiceFlags int flags) throws RemoteException; Loading @@ -112,9 +113,9 @@ public interface ActivityManagerLocal { /** * Kill an app process associated with an SDK sandbox. * * @param clientApplicationThreadBinder binder value of the * {@link android.app.IApplicationThread} of a client app process associated with a * sandbox. This is obtained using {@link Context#getIApplicationThreadBinder()}. * @param clientAppProcessToken process token used to uniquely identify the client app * process associated with an SDK sandbox. This is obtained using * {@link Context#getProcessToken()}. */ void killSdkSandboxClientAppProcess(@NonNull IBinder clientApplicationThreadBinder); void killSdkSandboxClientAppProcess(@NonNull IBinder clientAppProcessToken); }