OSDN Git Service

Add flag to AMS.startInstrumentation() to disable hidden API checks
authorDavid Brazdil <dbrazdil@google.com>
Mon, 19 Feb 2018 15:39:15 +0000 (15:39 +0000)
committerDavid Brazdil <dbrazdil@google.com>
Mon, 19 Feb 2018 15:39:40 +0000 (15:39 +0000)
commit27be1e9ba40cbeb4098ecede645eb5ecefa6a6b2
treecf96221a30cbd952ebc2347e7c6af506104b5eb3
parent8dbbc3543e18e7b43fa3dd99e8ab698c4b5c3b19
Add flag to AMS.startInstrumentation() to disable hidden API checks

Some tests need to use hidden APIs to check the internal state of
the framework. For those special use cases, we add a new flag to
ActivityManagerService.startInstrumentation that enables to start
instrumented processes without hidden API enforcement. Individual
test harnesses can change their Am command to request the exemption.

Bug: 64382372
Test: adb shell am instrument --no-hidden-api-checks <component>
      adb logcat | grep 'Accessing hidden'
Merged-In: I1d734a95423fae90dae63ff09d5f606495830905
Change-Id: Ifbb0d19d95737a9f601b11e20352cdc11f0ca5b6
cmds/am/src/com/android/commands/am/Am.java
cmds/am/src/com/android/commands/am/Instrument.java
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityManagerShellCommand.java