summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chan Kim <kimchan@google.com> 2023-08-24 02:50:00 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-08-24 02:50:00 +0000
commit5908abd413b81b6bb100fe51481f9dd9fb53c17c (patch)
treeec724ef71bff6c4cd90c2845979c7448e36798d4
parentfabdb43a30838f34589c7d304104b0ab2a0e39f0 (diff)
parent29b544d595f7367bff2956d71a3421657e5b4713 (diff)
Merge "Update language to comply with Android's inclusive language guidance" into main
-rw-r--r--apct-tests/perftests/autofill/src/android/view/autofill/LoginTest.java6
-rw-r--r--apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java48
-rw-r--r--apct-tests/perftests/windowmanager/src/android/wm/RelayoutPerfTest.java2
3 files changed, 28 insertions, 28 deletions
diff --git a/apct-tests/perftests/autofill/src/android/view/autofill/LoginTest.java b/apct-tests/perftests/autofill/src/android/view/autofill/LoginTest.java
index a5d1e00139b5..59f08f645def 100644
--- a/apct-tests/perftests/autofill/src/android/view/autofill/LoginTest.java
+++ b/apct-tests/perftests/autofill/src/android/view/autofill/LoginTest.java
@@ -140,7 +140,7 @@ public class LoginTest extends AbstractAutofillPerfTestCase {
state.resumeTiming();
}
- // Sanity check
+ // Check for no errors
callback.assertNoAsyncErrors();
} finally {
mAfm.unregisterCallback(callback);
@@ -190,7 +190,7 @@ public class LoginTest extends AbstractAutofillPerfTestCase {
state.resumeTiming();
}
- // Sanity check
+ // Check for no errors
callback.assertNoAsyncErrors();
} finally {
mAfm.unregisterCallback(callback);
@@ -303,7 +303,7 @@ public class LoginTest extends AbstractAutofillPerfTestCase {
callback.expectEvent(mPassword, EVENT_INPUT_SHOWN);
}
- // Sanity check
+ // Check for no errors
callback.assertNoAsyncErrors();
} finally {
mAfm.unregisterCallback(callback);
diff --git a/apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java b/apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java
index a44d93972ae1..4d24c8c42530 100644
--- a/apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java
+++ b/apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java
@@ -97,16 +97,16 @@ public class UserLifecycleTests {
/** Name of users/profiles in the test. Users with this name may be freely removed. */
private static final String TEST_USER_NAME = "UserLifecycleTests_test_user";
- /** Name of dummy package used when timing how long app launches take. */
+ /** Name of placeholder package used when timing how long app launches take. */
private static final String DUMMY_PACKAGE_NAME = "perftests.multiuser.apps.dummyapp";
- // Copy of UserSystemPackageInstaller whitelist mode constants.
- private static final String PACKAGE_WHITELIST_MODE_PROP =
+ // Copy of UserSystemPackageInstaller allowlist mode constants.
+ private static final String PACKAGE_ALLOWLIST_MODE_PROP =
"persist.debug.user.package_whitelist_mode";
- private static final int USER_TYPE_PACKAGE_WHITELIST_MODE_DISABLE = 0;
- private static final int USER_TYPE_PACKAGE_WHITELIST_MODE_ENFORCE = 0b001;
- private static final int USER_TYPE_PACKAGE_WHITELIST_MODE_IMPLICIT_WHITELIST = 0b100;
- private static final int USER_TYPE_PACKAGE_WHITELIST_MODE_DEVICE_DEFAULT = -1;
+ private static final int USER_TYPE_PACKAGE_ALLOWLIST_MODE_DISABLE = 0;
+ private static final int USER_TYPE_PACKAGE_ALLOWLIST_MODE_ENFORCE = 0b001;
+ private static final int USER_TYPE_PACKAGE_ALLOWLIST_MODE_IMPLICIT_ALLOWLIST = 0b100;
+ private static final int USER_TYPE_PACKAGE_ALLOWLIST_MODE_DEVICE_DEFAULT = -1;
private UserManager mUm;
private ActivityManager mAm;
@@ -563,13 +563,13 @@ public class UserLifecycleTests {
}
// TODO: This is just a POC. Do this properly and add more.
- /** Tests starting (unlocking) a newly-created profile using the user-type-pkg-whitelist. */
+ /** Tests starting (unlocking) a newly-created profile using the user-type-pkg-allowlist. */
@Test(timeout = TIMEOUT_MAX_TEST_TIME_MS)
public void managedProfileUnlock_usingWhitelist() {
assumeTrue(mHasManagedUserFeature);
- final int origMode = getUserTypePackageWhitelistMode();
- setUserTypePackageWhitelistMode(USER_TYPE_PACKAGE_WHITELIST_MODE_ENFORCE
- | USER_TYPE_PACKAGE_WHITELIST_MODE_IMPLICIT_WHITELIST);
+ final int origMode = getUserTypePackageAllowlistMode();
+ setUserTypePackageAllowlistMode(USER_TYPE_PACKAGE_ALLOWLIST_MODE_ENFORCE
+ | USER_TYPE_PACKAGE_ALLOWLIST_MODE_IMPLICIT_ALLOWLIST);
try {
while (mRunner.keepRunning()) {
@@ -586,15 +586,15 @@ public class UserLifecycleTests {
mRunner.resumeTimingForNextIteration();
}
} finally {
- setUserTypePackageWhitelistMode(origMode);
+ setUserTypePackageAllowlistMode(origMode);
}
}
- /** Tests starting (unlocking) a newly-created profile NOT using the user-type-pkg-whitelist. */
+ /** Tests starting (unlocking) a newly-created profile NOT using the user-type-pkg-allowlist. */
@Test(timeout = TIMEOUT_MAX_TEST_TIME_MS)
public void managedProfileUnlock_notUsingWhitelist() {
assumeTrue(mHasManagedUserFeature);
- final int origMode = getUserTypePackageWhitelistMode();
- setUserTypePackageWhitelistMode(USER_TYPE_PACKAGE_WHITELIST_MODE_DISABLE);
+ final int origMode = getUserTypePackageAllowlistMode();
+ setUserTypePackageAllowlistMode(USER_TYPE_PACKAGE_ALLOWLIST_MODE_DISABLE);
try {
while (mRunner.keepRunning()) {
@@ -611,7 +611,7 @@ public class UserLifecycleTests {
mRunner.resumeTimingForNextIteration();
}
} finally {
- setUserTypePackageWhitelistMode(origMode);
+ setUserTypePackageAllowlistMode(origMode);
}
}
@@ -822,17 +822,17 @@ public class UserLifecycleTests {
attestTrue(errMsg, success);
}
- /** Gets the PACKAGE_WHITELIST_MODE_PROP System Property. */
- private int getUserTypePackageWhitelistMode() {
- return SystemProperties.getInt(PACKAGE_WHITELIST_MODE_PROP,
- USER_TYPE_PACKAGE_WHITELIST_MODE_DEVICE_DEFAULT);
+ /** Gets the PACKAGE_ALLOWLIST_MODE_PROP System Property. */
+ private int getUserTypePackageAllowlistMode() {
+ return SystemProperties.getInt(PACKAGE_ALLOWLIST_MODE_PROP,
+ USER_TYPE_PACKAGE_ALLOWLIST_MODE_DEVICE_DEFAULT);
}
- /** Sets the PACKAGE_WHITELIST_MODE_PROP System Property to the given value. */
- private void setUserTypePackageWhitelistMode(int mode) {
+ /** Sets the PACKAGE_ALLOWLIST_MODE_PROP System Property to the given value. */
+ private void setUserTypePackageAllowlistMode(int mode) {
String result = ShellHelper.runShellCommand(
- String.format("setprop %s %d", PACKAGE_WHITELIST_MODE_PROP, mode));
- attestFalse("Failed to set sysprop " + PACKAGE_WHITELIST_MODE_PROP + ": " + result,
+ String.format("setprop %s %d", PACKAGE_ALLOWLIST_MODE_PROP, mode));
+ attestFalse("Failed to set sysprop " + PACKAGE_ALLOWLIST_MODE_PROP + ": " + result,
result != null && result.contains("Failed"));
}
diff --git a/apct-tests/perftests/windowmanager/src/android/wm/RelayoutPerfTest.java b/apct-tests/perftests/windowmanager/src/android/wm/RelayoutPerfTest.java
index fb62920681de..9e29820706c7 100644
--- a/apct-tests/perftests/windowmanager/src/android/wm/RelayoutPerfTest.java
+++ b/apct-tests/perftests/windowmanager/src/android/wm/RelayoutPerfTest.java
@@ -111,7 +111,7 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase
stopProfiling();
}
- /** A dummy view to get IWindow. */
+ /** A placeholder view to get IWindow. */
private static class ContentView extends LinearLayout {
ContentView(Context context) {
super(context);