Merge "Temporarily whitelist platform test packages for hidden API" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
bd632c3960
@@ -21753,6 +21753,54 @@ public class ActivityManagerService extends IActivityManager.Stub
|
|||||||
// INSTRUMENTATION
|
// INSTRUMENTATION
|
||||||
// =========================================================
|
// =========================================================
|
||||||
|
|
||||||
|
private static String[] HIDDENAPI_EXEMPT_PACKAGES = {
|
||||||
|
"com.android.bluetooth.tests",
|
||||||
|
"com.android.managedprovisioning.tests",
|
||||||
|
"com.android.frameworks.coretests",
|
||||||
|
"com.android.frameworks.coretests.binderproxycountingtestapp",
|
||||||
|
"com.android.frameworks.coretests.binderproxycountingtestservice",
|
||||||
|
"com.android.frameworks.tests.net",
|
||||||
|
"com.android.frameworks.tests.uiservices",
|
||||||
|
"com.android.coretests.apps.bstatstestapp",
|
||||||
|
"com.android.servicestests.apps.conntestapp",
|
||||||
|
"com.android.frameworks.servicestests",
|
||||||
|
"com.android.frameworks.utiltests",
|
||||||
|
"com.android.mtp.tests",
|
||||||
|
"android.mtp",
|
||||||
|
"com.android.documentsui.tests",
|
||||||
|
"com.android.shell.tests",
|
||||||
|
"com.android.systemui.tests",
|
||||||
|
"com.android.testables",
|
||||||
|
"android.net.wifi.test",
|
||||||
|
"com.android.server.wifi.test",
|
||||||
|
"com.android.frameworks.telephonytests",
|
||||||
|
"com.android.providers.contacts.tests",
|
||||||
|
"com.android.providers.contacts.tests2",
|
||||||
|
"com.android.settings.tests.unit",
|
||||||
|
"com.android.server.telecom.tests",
|
||||||
|
"com.android.vcard.tests",
|
||||||
|
"com.android.providers.blockednumber.tests",
|
||||||
|
"android.settings.functional",
|
||||||
|
"com.android.notification.functional",
|
||||||
|
"com.android.frameworks.dexloggertest",
|
||||||
|
"com.android.server.usb",
|
||||||
|
"com.android.providers.downloads.tests",
|
||||||
|
"com.android.emergency.tests.unit",
|
||||||
|
"com.android.providers.calendar.tests",
|
||||||
|
"com.android.settingslib",
|
||||||
|
"com.android.rs.test",
|
||||||
|
"com.android.printspooler.outofprocess.tests",
|
||||||
|
"com.android.cellbroadcastreceiver.tests.unit",
|
||||||
|
"com.android.providers.telephony.tests",
|
||||||
|
"com.android.carrierconfig.tests",
|
||||||
|
"com.android.phone.tests",
|
||||||
|
"com.android.service.ims.presence.tests",
|
||||||
|
"com.android.providers.setting.test",
|
||||||
|
"com.android.frameworks.locationtests",
|
||||||
|
"com.android.frameworks.coretests.privacy",
|
||||||
|
"com.android.settings.ui",
|
||||||
|
};
|
||||||
|
|
||||||
public boolean startInstrumentation(ComponentName className,
|
public boolean startInstrumentation(ComponentName className,
|
||||||
String profileFile, int flags, Bundle arguments,
|
String profileFile, int flags, Bundle arguments,
|
||||||
IInstrumentationWatcher watcher, IUiAutomationConnection uiAutomationConnection,
|
IInstrumentationWatcher watcher, IUiAutomationConnection uiAutomationConnection,
|
||||||
@@ -21835,6 +21883,14 @@ public class ActivityManagerService extends IActivityManager.Stub
|
|||||||
}
|
}
|
||||||
boolean disableHiddenApiChecks =
|
boolean disableHiddenApiChecks =
|
||||||
(flags & INSTRUMENTATION_FLAG_DISABLE_HIDDEN_API_CHECKS) != 0;
|
(flags & INSTRUMENTATION_FLAG_DISABLE_HIDDEN_API_CHECKS) != 0;
|
||||||
|
|
||||||
|
// TODO: Temporary whitelist of packages which need to be exempt from hidden API
|
||||||
|
// checks. Remove this as soon as the testing infrastructure allows to set
|
||||||
|
// the flag in AndroidTest.xml.
|
||||||
|
if (Arrays.asList(HIDDENAPI_EXEMPT_PACKAGES).contains(ai.packageName)) {
|
||||||
|
disableHiddenApiChecks = true;
|
||||||
|
}
|
||||||
|
|
||||||
ProcessRecord app = addAppLocked(ai, defProcess, false, disableHiddenApiChecks,
|
ProcessRecord app = addAppLocked(ai, defProcess, false, disableHiddenApiChecks,
|
||||||
abiOverride);
|
abiOverride);
|
||||||
app.instr = activeInstr;
|
app.instr = activeInstr;
|
||||||
|
|||||||
Reference in New Issue
Block a user