Loading cmds/am/src/com/android/commands/am/Am.java +3 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,9 @@ public class Am extends BaseCommand { instrument.alwaysCheckSignature = true; } else if (opt.equals("--instrument-sdk-sandbox")) { instrument.instrumentSdkSandbox = true; } else if (opt.equals("--instrument-sdk-in-sandbox")) { instrument.instrumentSdkSandbox = true; instrument.instrumentSdkInSandbox = true; } else { System.err.println("Error: Unknown option: " + opt); return; Loading cmds/am/src/com/android/commands/am/Instrument.java +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.app.ActivityManager.INSTR_FLAG_ALWAYS_CHECK_SIGNATURE; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_HIDDEN_API_CHECKS; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_ISOLATED_STORAGE; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_TEST_API_CHECKS; import static android.app.ActivityManager.INSTR_FLAG_INSTRUMENT_SDK_IN_SANDBOX; import static android.app.ActivityManager.INSTR_FLAG_INSTRUMENT_SDK_SANDBOX; import static android.app.ActivityManager.INSTR_FLAG_NO_RESTART; Loading Loading @@ -99,6 +100,7 @@ public class Instrument { public String componentNameArg; public boolean alwaysCheckSignature = false; public boolean instrumentSdkSandbox = false; public boolean instrumentSdkInSandbox = false; /** * Construct the instrument command runner. Loading Loading @@ -530,6 +532,9 @@ public class Instrument { if (instrumentSdkSandbox) { flags |= INSTR_FLAG_INSTRUMENT_SDK_SANDBOX; } if (instrumentSdkInSandbox) { flags |= INSTR_FLAG_INSTRUMENT_SDK_IN_SANDBOX; } if (!mAm.startInstrumentation(cn, profileFile, flags, args, watcher, connection, userId, abi)) { throw new AndroidException("INSTRUMENTATION_FAILED: " + cn.flattenToString()); Loading core/java/android/app/ActivityManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,11 @@ public class ActivityManager { * @hide */ public static final int INSTR_FLAG_INSTRUMENT_SDK_SANDBOX = 1 << 5; /** * Instrument an Sdk Sandbox process corresponding to an Sdk running inside the sandbox. * @hide */ public static final int INSTR_FLAG_INSTRUMENT_SDK_IN_SANDBOX = 1 << 6; static final class UidObserver extends IUidObserver.Stub { final OnUidImportanceListener mListener; Loading services/core/java/com/android/server/am/ActivityManagerService.java +5 −3 Original line number Diff line number Diff line Loading @@ -15446,7 +15446,8 @@ public class ActivityManagerService extends IActivityManager.Stub ai, noRestart, disableHiddenApiChecks, disableTestApiChecks); disableTestApiChecks, (flags & ActivityManager.INSTR_FLAG_INSTRUMENT_SDK_IN_SANDBOX) != 0); } ActiveInstrumentation activeInstr = new ActiveInstrumentation(this); Loading Loading @@ -15543,7 +15544,8 @@ public class ActivityManagerService extends IActivityManager.Stub ApplicationInfo sdkSandboxClientAppInfo, boolean noRestart, boolean disableHiddenApiChecks, boolean disableTestApiChecks) { boolean disableTestApiChecks, boolean isSdkInSandbox) { if (noRestart) { reportStartInstrumentationFailureLocked( Loading @@ -15565,7 +15567,7 @@ public class ActivityManagerService extends IActivityManager.Stub try { sdkSandboxInfo = sandboxManagerLocal.getSdkSandboxApplicationInfoForInstrumentation( sdkSandboxClientAppInfo, userId); sdkSandboxClientAppInfo, userId, isSdkInSandbox); } catch (NameNotFoundException e) { reportStartInstrumentationFailureLocked( watcher, className, "Can't find SdkSandbox package"); Loading
cmds/am/src/com/android/commands/am/Am.java +3 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,9 @@ public class Am extends BaseCommand { instrument.alwaysCheckSignature = true; } else if (opt.equals("--instrument-sdk-sandbox")) { instrument.instrumentSdkSandbox = true; } else if (opt.equals("--instrument-sdk-in-sandbox")) { instrument.instrumentSdkSandbox = true; instrument.instrumentSdkInSandbox = true; } else { System.err.println("Error: Unknown option: " + opt); return; Loading
cmds/am/src/com/android/commands/am/Instrument.java +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.app.ActivityManager.INSTR_FLAG_ALWAYS_CHECK_SIGNATURE; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_HIDDEN_API_CHECKS; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_ISOLATED_STORAGE; import static android.app.ActivityManager.INSTR_FLAG_DISABLE_TEST_API_CHECKS; import static android.app.ActivityManager.INSTR_FLAG_INSTRUMENT_SDK_IN_SANDBOX; import static android.app.ActivityManager.INSTR_FLAG_INSTRUMENT_SDK_SANDBOX; import static android.app.ActivityManager.INSTR_FLAG_NO_RESTART; Loading Loading @@ -99,6 +100,7 @@ public class Instrument { public String componentNameArg; public boolean alwaysCheckSignature = false; public boolean instrumentSdkSandbox = false; public boolean instrumentSdkInSandbox = false; /** * Construct the instrument command runner. Loading Loading @@ -530,6 +532,9 @@ public class Instrument { if (instrumentSdkSandbox) { flags |= INSTR_FLAG_INSTRUMENT_SDK_SANDBOX; } if (instrumentSdkInSandbox) { flags |= INSTR_FLAG_INSTRUMENT_SDK_IN_SANDBOX; } if (!mAm.startInstrumentation(cn, profileFile, flags, args, watcher, connection, userId, abi)) { throw new AndroidException("INSTRUMENTATION_FAILED: " + cn.flattenToString()); Loading
core/java/android/app/ActivityManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,11 @@ public class ActivityManager { * @hide */ public static final int INSTR_FLAG_INSTRUMENT_SDK_SANDBOX = 1 << 5; /** * Instrument an Sdk Sandbox process corresponding to an Sdk running inside the sandbox. * @hide */ public static final int INSTR_FLAG_INSTRUMENT_SDK_IN_SANDBOX = 1 << 6; static final class UidObserver extends IUidObserver.Stub { final OnUidImportanceListener mListener; Loading
services/core/java/com/android/server/am/ActivityManagerService.java +5 −3 Original line number Diff line number Diff line Loading @@ -15446,7 +15446,8 @@ public class ActivityManagerService extends IActivityManager.Stub ai, noRestart, disableHiddenApiChecks, disableTestApiChecks); disableTestApiChecks, (flags & ActivityManager.INSTR_FLAG_INSTRUMENT_SDK_IN_SANDBOX) != 0); } ActiveInstrumentation activeInstr = new ActiveInstrumentation(this); Loading Loading @@ -15543,7 +15544,8 @@ public class ActivityManagerService extends IActivityManager.Stub ApplicationInfo sdkSandboxClientAppInfo, boolean noRestart, boolean disableHiddenApiChecks, boolean disableTestApiChecks) { boolean disableTestApiChecks, boolean isSdkInSandbox) { if (noRestart) { reportStartInstrumentationFailureLocked( Loading @@ -15565,7 +15567,7 @@ public class ActivityManagerService extends IActivityManager.Stub try { sdkSandboxInfo = sandboxManagerLocal.getSdkSandboxApplicationInfoForInstrumentation( sdkSandboxClientAppInfo, userId); sdkSandboxClientAppInfo, userId, isSdkInSandbox); } catch (NameNotFoundException e) { reportStartInstrumentationFailureLocked( watcher, className, "Can't find SdkSandbox package");