[Wi-Fi] WiFi Settings inclusive language fix plan phase 2

Replace WiFi related terms which contain Blacklist,Dummy,Sane or Sanity Check wordings.
Goal: Create a fixit for Android Platform to reduce the use of non-inclusive language for all code.

Bug: 161425297
Test: make RunSettingsRoboTests -j
Change-Id: I1ff89bd2a6636ada1e0f5b9879aecbbd5dab4012
This commit is contained in:
govenliu
2020-07-22 12:41:01 +08:00
parent 8c27db4fb4
commit fec71036f7
6 changed files with 12 additions and 12 deletions

View File

@@ -378,11 +378,11 @@ public class DataUsageSummaryPreferenceController extends TelephonyBasePreferenc
// First plan in the list is the primary plan
SubscriptionPlan plan = plans.get(0);
return plan.getDataLimitBytes() > 0
&& saneSize(plan.getDataUsageBytes())
&& validSize(plan.getDataUsageBytes())
&& plan.getCycleRule() != null ? plan : null;
}
private static boolean saneSize(long value) {
private static boolean validSize(long value) {
return value >= 0L && value < PETA;
}

View File

@@ -36,7 +36,7 @@ import android.util.Log;
import androidx.annotation.VisibleForTesting;
/**
* Activity which acts as a proxy to the tether provisioning app for sanity checks and permission
* Activity which acts as a proxy to the tether provisioning app for validity checks and permission
* restrictions. Specifically, the provisioning apps require
* {@link android.permission.TETHER_PRIVILEGED}, while this activity can be started by a caller
* with {@link android.permission.TETHER_PRIVILEGED}.

View File

@@ -490,7 +490,7 @@ public class WifiSettings extends RestrictedSettingsFragment
}
// "forget" for normal saved network. And "disconnect" for ephemeral network because it
// could only be disconnected and be put in blacklists so it won't be used again.
// could only be disconnected and be put in blocklists so it won't be used again.
if (canForgetNetwork()) {
menu.add(Menu.NONE, MENU_ID_FORGET, 0 /* order */, R.string.forget);
}

View File

@@ -846,7 +846,7 @@ public class WifiDetailPreferenceController extends AbstractPreferenceController
}
private void refreshButtons() {
// Ephemeral network won't be removed permanently, but be putted in blacklist.
// Ephemeral network won't be removed permanently, but be putted in blocklist.
mButtonsPref.setButton1Text(
mIsEphemeral ? R.string.wifi_disconnect_button_text : R.string.forget);

View File

@@ -113,7 +113,7 @@ public class TetherSettingsTest {
FeatureFlagUtils.setEnabled(mContext, FeatureFlags.TETHER_ALL_IN_ONE, false);
// We can ignore the condition of Utils.isMonkeyRunning()
// In normal case, monkey and robotest should not execute at the same time
when(mConnectivityManager.getTetherableUsbRegexs()).thenReturn(new String[]{"dummyRegex"});
when(mConnectivityManager.getTetherableUsbRegexs()).thenReturn(new String[]{"fakeRegex"});
final List<String> niks =
TetherSettings.SEARCH_INDEX_DATA_PROVIDER.getNonIndexableKeys(mContext);
@@ -135,7 +135,7 @@ public class TetherSettingsTest {
public void testTetherNonIndexableKeys_bluetoothAvailable_bluetoothKeyNotReturned() {
FeatureFlagUtils.setEnabled(mContext, FeatureFlags.TETHER_ALL_IN_ONE, false);
when(mConnectivityManager.getTetherableBluetoothRegexs())
.thenReturn(new String[]{"dummyRegex"});
.thenReturn(new String[]{"fakeRegex"});
final List<String> niks =
TetherSettings.SEARCH_INDEX_DATA_PROVIDER.getNonIndexableKeys(mContext);

View File

@@ -106,12 +106,12 @@ public class WifiP2PPreferenceControllerTest {
mController.displayPreference(mScreen);
verify(mWifiDirectPreference).setEnabled(true);
Intent dummyIntent = new Intent();
mController.mReceiver.onReceive(mContext, dummyIntent);
Intent fakeIntent = new Intent();
mController.mReceiver.onReceive(mContext, fakeIntent);
verify(mWifiDirectPreference, times(2)).setEnabled(true);
when(mWifiManager.isWifiEnabled()).thenReturn(false);
mController.mReceiver.onReceive(mContext, dummyIntent);
mController.mReceiver.onReceive(mContext, fakeIntent);
verify(mWifiDirectPreference).setEnabled(false);
}
@@ -136,12 +136,12 @@ public class WifiP2PPreferenceControllerTest {
public void updateState_withLocationDisabled_preferenceShouldBeDisable() {
when(mWifiManager.isWifiEnabled()).thenReturn(true);
when(mLocationManager.isLocationEnabled()).thenReturn(true);
Intent dummyIntent = new Intent();
Intent fakeIntent = new Intent();
mController.displayPreference(mScreen);
verify(mWifiDirectPreference).setEnabled(true);
when(mLocationManager.isLocationEnabled()).thenReturn(false);
mController.mLocationReceiver.onReceive(mContext, dummyIntent);
mController.mLocationReceiver.onReceive(mContext, fakeIntent);
verify(mWifiDirectPreference).setEnabled(false);
}
}