Add --no-test-api-acces to am instrument.

By default instrumented processed have access to @TestApis; however for certain CTS tests we want to disable access to test APIs, where this flag would be used.

Test: manual
Bug: 133832325
Change-Id: Id56ce3079bcea2632d4002edcf120d9d5c9e0a26
Merged-In: Id56ce3079bcea2632d4002edcf120d9d5c9e0a26
This commit is contained in:
Artur Satayev
2019-10-31 12:07:55 +00:00
parent 423c3a32d6
commit e2ebc1be4b
5 changed files with 21 additions and 5 deletions

View File

@@ -153,6 +153,12 @@ public class ActivityManager {
*/
public static final int INSTR_FLAG_MOUNT_EXTERNAL_STORAGE_FULL = 1 << 1;
/**
* Disable test API access for the newly started instrumentation.
* @hide
*/
public static final int INSTR_FLAG_DISABLE_TEST_API_CHECKS = 1 << 2;
static final class UidObserver extends IUidObserver.Stub {
final OnUidImportanceListener mListener;
final Context mContext;