Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba570a4a authored by Chan Kim's avatar Chan Kim
Browse files

Update language to comply with Android's inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code for reference

For this round, the fixes are only applied to the following to minimize breaking dependencies:
  * comments (excluding javaDoc annotations)
	* private constants
	* private functions
	* parameters within functions

BYPASS_INCLUSIVE_LANGUAGE_REASON=Just updating a few select inclusive language violations.
No-Typo-Check: Changes focused on inclusive language violations.
BUG: 295342157
Change-Id: I7a7205e2ad2b52856f8e31813b616b17d8fde70b
parent e1ee1aab
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -131,7 +131,7 @@ public class AAAPlusPlusVerifySysuiRequiredTestPropertiesTest extends SysuiTestC
        // with the main process dependency graph because it will not exist
        // with the main process dependency graph because it will not exist
        // at runtime and could lead to incorrect tests which assume
        // at runtime and could lead to incorrect tests which assume
        // the main SystemUI process. Therefore, exclude this package
        // the main SystemUI process. Therefore, exclude this package
        // from the base class whitelist.
        // from the base class allowlist.
        filter.add(s -> !s.startsWith("com.android.systemui.screenshot"));
        filter.add(s -> !s.startsWith("com.android.systemui.screenshot"));
        return filter;
        return filter;
    }
    }
+5 −5
Original line number Original line Diff line number Diff line
@@ -64,7 +64,7 @@ import java.util.List;
public class InflatedSmartRepliesTest extends SysuiTestCase {
public class InflatedSmartRepliesTest extends SysuiTestCase {


    private static final Intent TEST_INTENT = new Intent("com.android.SMART_REPLY_VIEW_ACTION");
    private static final Intent TEST_INTENT = new Intent("com.android.SMART_REPLY_VIEW_ACTION");
    private static final Intent WHITELISTED_TEST_INTENT =
    private static final Intent ALLOWLISTED_TEST_INTENT =
            new Intent("com.android.WHITELISTED_TEST_ACTION");
            new Intent("com.android.WHITELISTED_TEST_ACTION");


    @Mock private SmartReplyConstants mSmartReplyConstants;
    @Mock private SmartReplyConstants mSmartReplyConstants;
@@ -343,7 +343,7 @@ public class InflatedSmartRepliesTest extends SysuiTestCase {


        assertThat(smartReplyState.getSmartReplies().choices)
        assertThat(smartReplyState.getSmartReplies().choices)
                .containsExactlyElementsIn(mEntry.getSmartReplies()).inOrder();
                .containsExactlyElementsIn(mEntry.getSmartReplies()).inOrder();
        // Since no apps are whitelisted no actions should be shown.
        // Since no apps are allowlisted no actions should be shown.
        assertThat(smartReplyState.getSmartActions().actions).isEmpty();
        assertThat(smartReplyState.getSmartActions().actions).isEmpty();
        assertThat(smartReplyState.getSuppressedActions()).isNull();
        assertThat(smartReplyState.getSuppressedActions()).isNull();
        assertThat(smartReplyState.getHasPhishingAction()).isFalse();
        assertThat(smartReplyState.getHasPhishingAction()).isFalse();
@@ -358,7 +358,7 @@ public class InflatedSmartRepliesTest extends SysuiTestCase {
        allowedResolveInfo.activityInfo.packageName = allowedPackage;
        allowedResolveInfo.activityInfo.packageName = allowedPackage;
        when(mPackageManagerWrapper
        when(mPackageManagerWrapper
                .resolveActivity(
                .resolveActivity(
                        argThat(intent -> WHITELISTED_TEST_INTENT.getAction().equals(
                        argThat(intent -> ALLOWLISTED_TEST_INTENT.getAction().equals(
                                intent.getAction())),
                                intent.getAction())),
                        anyInt() /* flags */))
                        anyInt() /* flags */))
                .thenReturn(allowedResolveInfo);
                .thenReturn(allowedResolveInfo);
@@ -368,7 +368,7 @@ public class InflatedSmartRepliesTest extends SysuiTestCase {
        // suggestions.
        // suggestions.
        setupAppGeneratedReplies(null /* smartReplies */);
        setupAppGeneratedReplies(null /* smartReplies */);
        ArrayList<Notification.Action> actions = new ArrayList<>();
        ArrayList<Notification.Action> actions = new ArrayList<>();
        actions.add(createAction("allowed action", WHITELISTED_TEST_INTENT));
        actions.add(createAction("allowed action", ALLOWLISTED_TEST_INTENT));
        actions.add(createAction("non-allowed action", TEST_INTENT));
        actions.add(createAction("non-allowed action", TEST_INTENT));


        modifyRanking(mEntry)
        modifyRanking(mEntry)
@@ -379,7 +379,7 @@ public class InflatedSmartRepliesTest extends SysuiTestCase {
        InflatedSmartReplyState smartReplyState =
        InflatedSmartReplyState smartReplyState =
                mSmartReplyStateInflater.chooseSmartRepliesAndActions(mEntry);
                mSmartReplyStateInflater.chooseSmartRepliesAndActions(mEntry);


        // Only the action for the whitelisted package should be allowed.
        // Only the action for the allowlisted package should be allowed.
        assertThat(smartReplyState.getSmartActions().actions)
        assertThat(smartReplyState.getSmartActions().actions)
                .containsExactly(mEntry.getSmartActions().get(0));
                .containsExactly(mEntry.getSmartActions().get(0));
        assertThat(smartReplyState.getSuppressedActions()).isNull();
        assertThat(smartReplyState.getSuppressedActions()).isNull();