summaryrefslogtreecommitdiff
path: root/test/674-hiddenapi/src-art/Main.java
diff options
context:
space:
mode:
author Andrei Onea <andreionea@google.com> 2020-07-29 19:52:34 +0100
committer Andrei-Valentin Onea <andreionea@google.com> 2020-08-10 12:27:13 +0000
commitfc12a6cb415b2eacee0459fd170490a407c2548a (patch)
treef3b8508544e7320635146d0458e612e4b6f735d9 /test/674-hiddenapi/src-art/Main.java
parent0f5784886faf0281a7b06eba35105ee68f1e5a00 (diff)
Rename ApiList::Value enums
Use a more inclusive terminology for the API lists. This change focuses specifically on the ApiList::Value enum values. The string equivalents will be changed separately, as they have multiple extra dependencies. Bug: 162326106 Test: m Test: m test-art-host-gtest-art_hiddenapi_tests Test: art/tools/run-gtests.sh Change-Id: I1dccf59ecc9e08b60dbd1bfed6ce438b5ce081d0
Diffstat (limited to 'test/674-hiddenapi/src-art/Main.java')
-rw-r--r--test/674-hiddenapi/src-art/Main.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/674-hiddenapi/src-art/Main.java b/test/674-hiddenapi/src-art/Main.java
index c92d3527af..13c4e81700 100644
--- a/test/674-hiddenapi/src-art/Main.java
+++ b/test/674-hiddenapi/src-art/Main.java
@@ -89,7 +89,7 @@ public class Main {
}
private static void doTest(DexDomain parentDomain, DexDomain childDomain,
- boolean whitelistAllApis) throws Exception {
+ boolean addAllApisToSdk) throws Exception {
// Load parent dex if it is not in boot class path.
ClassLoader parentLoader = null;
if (parentDomain == DexDomain.Application) {
@@ -114,17 +114,17 @@ public class Main {
// be loaded once, but for some reason even classes from a class loader
// cannot register their native methods against symbols in a shared library
// loaded by their parent class loader.
- String nativeLibCopy = createNativeLibCopy(parentDomain, childDomain, whitelistAllApis);
+ String nativeLibCopy = createNativeLibCopy(parentDomain, childDomain, addAllApisToSdk);
- // Set exemptions to "L" (matches all classes) if we are testing whitelisting.
- setWhitelistAll(whitelistAllApis);
+ // Set exemptions to "L" (matches all classes) if we are testing sdk APIs.
+ setSdkAll(addAllApisToSdk);
// Invoke ChildClass.runTest
Class<?> childClass = Class.forName("ChildClass", true, childLoader);
Method runTestMethod = childClass.getDeclaredMethod(
"runTest", String.class, Integer.TYPE, Integer.TYPE, Boolean.TYPE);
runTestMethod.invoke(null, nativeLibCopy, parentDomain.ordinal(), childDomain.ordinal(),
- whitelistAllApis);
+ addAllApisToSdk);
}
// Routine which tries to figure out the absolute path of our native library.
@@ -150,10 +150,10 @@ public class Main {
// Copy native library to a new file with a unique name so it does not
// conflict with other loaded instance of the same binary file.
private static String createNativeLibCopy(DexDomain parentDomain, DexDomain childDomain,
- boolean whitelistAllApis) throws Exception {
+ boolean addAllApisToSdk) throws Exception {
String tempFileName = System.mapLibraryName(
"hiddenapitest_" + (parentDomain.ordinal()) + (childDomain.ordinal()) +
- (whitelistAllApis ? "1" : "0"));
+ (addAllApisToSdk ? "1" : "0"));
File tempFile = new File(System.getenv("DEX_LOCATION"), tempFileName);
Files.copy(new File(nativeLibFileName).toPath(), tempFile.toPath());
return tempFile.getAbsolutePath();
@@ -181,5 +181,5 @@ public class Main {
private static native int appendToBootClassLoader(String dexPath, boolean isCorePlatform);
private static native void setDexDomain(int index, boolean isCorePlatform);
private static native void init();
- private static native void setWhitelistAll(boolean value);
+ private static native void setSdkAll(boolean value);
}