Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Ie9d2c4d6d4618a167af1c5627d5d7918a404f398
Change-Id: I2ae428e37fd96226ce4e06032e2c0beaacbd0301
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 229db09..97462bb 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -6200,12 +6200,6 @@
<string name="user_credentials_summary">View and modify stored credentials</string>
<!-- Title of preference group for advance security settings [CHAR LIMIT=30] -->
<string name="advanced_security_title">Advanced</string>
- <!-- Title of preference of what type of credential storage this device has: hardware or software [CHAR LIMIT=30] -->
- <string name="credential_storage_type">Storage type</string>
- <!-- Summary text for preference showing what type of credential storage this device has when it is stored in a hardware-backed storage (as opposed to "software only") [CHAR LIMIT=NONE] -->
- <string name="credential_storage_type_hardware">Hardware-backed</string>
- <!-- Summary text for preference showing what type of credential storage this device has when it is stored in software only (as opposed to "hardware-backed") [CHAR LIMIT=NONE] -->
- <string name="credential_storage_type_software">Software only</string>
<!-- Error message for users that aren't allowed to see or modify credentials [CHAR LIMIT=none] -->
<string name="credentials_settings_not_available">Credentials are not available for this user</string>
<!-- Sub-heading for a user credential installed to be used by apps and as part of VPN configurations. [CHAR LIMIT=NONE] -->
diff --git a/res/xml/encryption_and_credential.xml b/res/xml/encryption_and_credential.xml
index b0906c1..fe0498d 100644
--- a/res/xml/encryption_and_credential.xml
+++ b/res/xml/encryption_and_credential.xml
@@ -37,12 +37,6 @@
android:persistent="false"
android:order="100">
- <com.android.settingslib.RestrictedPreference
- android:key="credential_storage_type"
- android:title="@string/credential_storage_type"
- android:summary="@string/summary_placeholder"
- settings:userRestriction="no_config_credentials" />
-
<Preference
android:key="trusted_credentials"
android:title="@string/trusted_credentials"
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingRequest.java b/src/com/android/settings/bluetooth/BluetoothPairingRequest.java
index 7da6342..3cd21f5 100644
--- a/src/com/android/settings/bluetooth/BluetoothPairingRequest.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingRequest.java
@@ -34,7 +34,7 @@
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
- if (!action.equals(BluetoothDevice.ACTION_PAIRING_REQUEST)) {
+ if (action == null || !action.equals(BluetoothDevice.ACTION_PAIRING_REQUEST)) {
return;
}
// convert broadcast intent into activity intent (same action string)
diff --git a/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogController.java b/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogController.java
index 370bdfb..9858ad2 100644
--- a/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogController.java
+++ b/src/com/android/settings/deviceinfo/simstatus/SimStatusDialogController.java
@@ -152,6 +152,7 @@
private final Context mContext;
private boolean mShowLatestAreaInfo;
+ private boolean mIsRegisteredListener = false;
private final BroadcastReceiver mAreaInfoReceiver = new BroadcastReceiver() {
@Override
@@ -282,11 +283,22 @@
mContext.registerReceiver(mAreaInfoReceiver,
new IntentFilter(CellBroadcastIntents.ACTION_AREA_INFO_UPDATED));
}
+
+ mIsRegisteredListener = true;
}
@Override
public void onPause() {
if (mSubscriptionInfo == null) {
+ if (mIsRegisteredListener) {
+ mSubscriptionManager.removeOnSubscriptionsChangedListener(
+ mOnSubscriptionsChangedListener);
+ mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
+ if (mShowLatestAreaInfo) {
+ mContext.unregisterReceiver(mAreaInfoReceiver);
+ }
+ mIsRegisteredListener = false;
+ }
return;
}
diff --git a/src/com/android/settings/network/ApnEditor.java b/src/com/android/settings/network/ApnEditor.java
index f9eccfa..a852fd6 100644
--- a/src/com/android/settings/network/ApnEditor.java
+++ b/src/com/android/settings/network/ApnEditor.java
@@ -726,6 +726,9 @@
telephonyManager = telephonyManagerForSubId;
}
mMvnoMatchData.setText(telephonyManager.getGroupIdLevel1());
+ } else {
+ // mvno type 'none' case. At this time, mvnoIndex should be 0.
+ mMvnoMatchData.setText("");
}
}
@@ -784,6 +787,7 @@
}
mMvnoType.setValue((String) newValue);
mMvnoType.setSummary(mvno);
+ mMvnoMatchData.setSummary(checkNull(mMvnoMatchData.getText()));
} else if (KEY_PASSWORD.equals(key)) {
mPassword.setSummary(starify(newValue != null ? String.valueOf(newValue) : ""));
} else if (KEY_CARRIER_ENABLED.equals(key)) {
diff --git a/src/com/android/settings/network/telephony/NetworkSelectSettings.java b/src/com/android/settings/network/telephony/NetworkSelectSettings.java
index 3f18928..525cf9f 100644
--- a/src/com/android/settings/network/telephony/NetworkSelectSettings.java
+++ b/src/com/android/settings/network/telephony/NetworkSelectSettings.java
@@ -223,9 +223,13 @@
setProgressBarVisible(false);
getPreferenceScreen().setEnabled(true);
- mSelectedPreference.setSummary(isSucceed
- ? R.string.network_connected
- : R.string.network_could_not_connect);
+ if (mSelectedPreference != null) {
+ mSelectedPreference.setSummary(isSucceed
+ ? R.string.network_connected
+ : R.string.network_could_not_connect);
+ } else {
+ Log.e(TAG, "No preference to update!");
+ }
break;
case EVENT_NETWORK_SCAN_RESULTS:
final List<CellInfo> results = (List<CellInfo>) msg.obj;
diff --git a/src/com/android/settings/network/telephony/TelephonyConstants.java b/src/com/android/settings/network/telephony/TelephonyConstants.java
index 78a177e..30cd568 100644
--- a/src/com/android/settings/network/telephony/TelephonyConstants.java
+++ b/src/com/android/settings/network/telephony/TelephonyConstants.java
@@ -18,6 +18,8 @@
import android.telephony.TelephonyManager;
+import android.telephony.TelephonyManager;
+
/**
* Contains hidden constants copied from the platform.
*/
@@ -209,12 +211,6 @@
* Copied from {@link android.telephony.RadioAccessFamily}
*/
public static class RadioAccessFamily {
- /**
- * TODO: get rid of RAF definition in RadioAccessFamily and
- * use {@link TelephonyManager.NetworkTypeBitMask}
- * TODO: public definition {@link TelephonyManager.NetworkTypeBitMask} is long.
- * TODO: Convert from int * to long everywhere including HAL definitions.
- */
// 2G
public static final int RAF_UNKNOWN = (int) TelephonyManager.NETWORK_TYPE_BITMASK_UNKNOWN;
public static final int RAF_GSM = (int) TelephonyManager.NETWORK_TYPE_BITMASK_GSM;
@@ -250,7 +246,9 @@
public static final int WCDMA = HS | RAF_UMTS;
// 4G
public static final int LTE = RAF_LTE | RAF_LTE_CA;
+
// 5G
public static final int NR = RAF_NR;
+
}
}
diff --git a/src/com/android/settings/network/telephony/TelephonyStatusControlSession.java b/src/com/android/settings/network/telephony/TelephonyStatusControlSession.java
index 12c9bee..3716f1f 100644
--- a/src/com/android/settings/network/telephony/TelephonyStatusControlSession.java
+++ b/src/com/android/settings/network/telephony/TelephonyStatusControlSession.java
@@ -22,6 +22,7 @@
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.utils.ThreadUtils;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
@@ -37,7 +38,7 @@
private static final String LOG_TAG = "TelephonyStatusControlSS";
private Collection<AbstractPreferenceController> mControllers;
- private Future<Boolean> mResult;
+ private Collection<Future<Boolean>> mResult = new ArrayList<>();
/**
* Buider of session
@@ -67,9 +68,9 @@
private TelephonyStatusControlSession(Collection<AbstractPreferenceController> controllers) {
mControllers = controllers;
- mResult = ThreadUtils.postOnBackgroundThread(() ->
- setupAvailabilityStatus(controllers)
- );
+ controllers.forEach(prefCtrl -> mResult
+ .add(ThreadUtils.postOnBackgroundThread(() -> setupAvailabilityStatus(prefCtrl))));
+
}
/**
@@ -79,25 +80,24 @@
*/
public void close() {
//check the background thread is finished then unset the status of availability.
- try {
- mResult.get();
- } catch (ExecutionException | InterruptedException exception) {
- Log.e(LOG_TAG, "setup availability status failed!", exception);
+
+ for (Future<Boolean> result : mResult) {
+ try {
+ result.get();
+ } catch (ExecutionException | InterruptedException exception) {
+ Log.e(LOG_TAG, "setup availability status failed!", exception);
+ }
}
unsetAvailabilityStatus(mControllers);
}
- private Boolean setupAvailabilityStatus(
- Collection<AbstractPreferenceController> controllerLists) {
+ private Boolean setupAvailabilityStatus(AbstractPreferenceController controller) {
try {
- controllerLists.stream()
- .filter(controller -> controller instanceof TelephonyAvailabilityHandler)
- .map(TelephonyAvailabilityHandler.class::cast)
- .forEach(controller -> {
- int status = ((BasePreferenceController) controller)
- .getAvailabilityStatus();
- controller.setAvailabilityStatus(status);
- });
+ if (controller instanceof TelephonyAvailabilityHandler) {
+ int status = ((BasePreferenceController) controller)
+ .getAvailabilityStatus();
+ ((TelephonyAvailabilityHandler) controller).setAvailabilityStatus(status);
+ }
return true;
} catch (Exception exception) {
Log.e(LOG_TAG, "Setup availability status failed!", exception);
diff --git a/src/com/android/settings/password/ChooseLockGeneric.java b/src/com/android/settings/password/ChooseLockGeneric.java
index 04ee1b8..1f554c9 100644
--- a/src/com/android/settings/password/ChooseLockGeneric.java
+++ b/src/com/android/settings/password/ChooseLockGeneric.java
@@ -772,7 +772,7 @@
* {@link DevicePolicyManager#PASSWORD_QUALITY_UNSPECIFIED}
*/
void updateUnlockMethodAndFinish(int quality, boolean disabled, boolean chooseLockSkipped) {
- // Sanity check. We should never get here without confirming user's existing password.
+ // We should never get here without confirming user's existing password.
if (!mPasswordConfirmed) {
throw new IllegalStateException("Tried to update password without confirming it");
}
diff --git a/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
index 64812fd..d3cdc73 100644
--- a/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
+++ b/src/com/android/settings/password/ConfirmDeviceCredentialActivity.java
@@ -377,7 +377,7 @@
boolean launched = false;
// The only difference between CREDENTIAL_MANAGED and CREDENTIAL_NORMAL is that for
// CREDENTIAL_MANAGED, we launch the real confirm credential activity with an explicit
- // but dummy challenge value (0L). This will result in ConfirmLockPassword calling
+ // but fake challenge value (0L). This will result in ConfirmLockPassword calling
// verifyTiedProfileChallenge() (if it's a profile with unified challenge), due to the
// difference between ConfirmLockPassword.startVerifyPassword() and
// ConfirmLockPassword.startCheckPassword(). Calling verifyTiedProfileChallenge() here is
diff --git a/src/com/android/settings/security/CredentialStoragePreferenceController.java b/src/com/android/settings/security/CredentialStoragePreferenceController.java
deleted file mode 100644
index 060d964..0000000
--- a/src/com/android/settings/security/CredentialStoragePreferenceController.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.security;
-
-import android.content.Context;
-import android.os.UserManager;
-import android.security.KeyStore;
-
-import androidx.preference.Preference;
-
-import com.android.settings.R;
-
-public class CredentialStoragePreferenceController extends
- RestrictedEncryptionPreferenceController {
-
- private static final String KEY_CREDENTIAL_STORAGE_TYPE = "credential_storage_type";
- private final KeyStore mKeyStore;
-
- public CredentialStoragePreferenceController(Context context) {
- super(context, UserManager.DISALLOW_CONFIG_CREDENTIALS);
- mKeyStore = KeyStore.getInstance();
- }
-
- @Override
- public String getPreferenceKey() {
- return KEY_CREDENTIAL_STORAGE_TYPE;
- }
-
- @Override
- public void updateState(Preference preference) {
- preference.setSummary(mKeyStore.isHardwareBacked()
- ? R.string.credential_storage_type_hardware
- : R.string.credential_storage_type_software);
- }
-}
diff --git a/src/com/android/settings/security/EncryptionAndCredential.java b/src/com/android/settings/security/EncryptionAndCredential.java
index d873271..5362ad0 100644
--- a/src/com/android/settings/security/EncryptionAndCredential.java
+++ b/src/com/android/settings/security/EncryptionAndCredential.java
@@ -72,7 +72,6 @@
controllers.add(new PreferenceCategoryController(context,
"encryption_and_credentials_status_category").setChildren(
Arrays.asList(encryptStatusController)));
- controllers.add(new CredentialStoragePreferenceController(context));
controllers.add(new UserCredentialsPreferenceController(context));
controllers.add(new ResetCredentialsPreferenceController(context, lifecycle));
controllers.add(new InstallCertificatePreferenceController(context));
diff --git a/src/com/android/settings/security/ScreenPinningSettings.java b/src/com/android/settings/security/ScreenPinningSettings.java
index c532366..1e620cf 100644
--- a/src/com/android/settings/security/ScreenPinningSettings.java
+++ b/src/com/android/settings/security/ScreenPinningSettings.java
@@ -186,7 +186,7 @@
}
/**
- * Listens to the state change of the lock-to-app master switch.
+ * Listens to the state change of the overall lock-to-app switch.
*/
@Override
public void onSwitchChanged(Switch switchView, boolean isChecked) {
diff --git a/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceController.java b/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceController.java
index 999c945..abeef2d 100644
--- a/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceController.java
+++ b/src/com/android/settings/security/screenlock/LockAfterTimeoutPreferenceController.java
@@ -112,7 +112,7 @@
mDPM.getMaximumTimeToLock(null /* admin */, UserHandle.myUserId());
final long displayTimeout = Math.max(0,
Settings.System.getInt(mContext.getContentResolver(), SCREEN_OFF_TIMEOUT, 0));
- // This setting is a slave to display timeout when a device policy is enforced.
+ // This setting is a secondary to display timeout when a device policy is enforced.
// As such, maxLockTimeout = adminTimeout - displayTimeout.
// If there isn't enough time, shows "immediately" setting.
final long maxTimeout = Math.max(0, adminTimeout - displayTimeout);
diff --git a/tests/robotests/Android.bp b/tests/robotests/Android.bp
index efef10a..fecbec1 100644
--- a/tests/robotests/Android.bp
+++ b/tests/robotests/Android.bp
@@ -68,6 +68,11 @@
"androidx.test.ext.junit",
],
+ libs: [
+ "ims-common",
+ "telephony-common",
+ ],
+
java_resource_dirs: ["config", "resources"],
instrumentation_for: "SettingsRoboTestStub",
diff --git a/tests/robotests/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java b/tests/robotests/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java
index 6322b57..1acbcda 100644
--- a/tests/robotests/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java
+++ b/tests/robotests/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java
@@ -21,6 +21,8 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import static java.util.Collections.emptyList;
+
import com.android.i18n.timezone.CountryTimeZones;
import com.android.i18n.timezone.CountryTimeZones.TimeZoneMapping;
import com.android.i18n.timezone.CountryZonesFinder;
@@ -49,7 +51,7 @@
public void testRegionsWithTimeZone() {
TimeZoneData timeZoneData = new TimeZoneData(mCountryZonesFinder);
CountryTimeZones countryTimeZones = mock(CountryTimeZones.class);
- when(countryTimeZones.getTimeZoneMappings()).thenReturn(Collections.emptyList());
+ when(countryTimeZones.getTimeZoneMappings()).thenReturn(emptyList());
when(mCountryZonesFinder.lookupCountryTimeZones("US")).thenReturn(countryTimeZones);
assertThat(timeZoneData.lookupCountryTimeZones("US").getCountryTimeZones())
.isSameAs(countryTimeZones);
@@ -57,7 +59,7 @@
@Test
public void testGetRegionIds() {
- when(mCountryZonesFinder.lookupAllCountryIsoCodes()).thenReturn(Collections.emptyList());
+ when(mCountryZonesFinder.lookupAllCountryIsoCodes()).thenReturn(emptyList());
TimeZoneData timeZoneData = new TimeZoneData(mCountryZonesFinder);
assertThat(timeZoneData.getRegionIds()).isEmpty();
@@ -73,13 +75,16 @@
CountryTimeZones US = mock(CountryTimeZones.class);
when(US.getCountryIso()).thenReturn("us");
when(US.getTimeZoneMappings()).thenReturn(Arrays.asList(
- TimeZoneMapping.createForTests("Unknown/Secret_City", true, null /* notUsedAfter */),
- TimeZoneMapping.createForTests("Unknown/Secret_City2", false, null /* notUsedAfter */)
+ TimeZoneMapping.createForTests(
+ "Unknown/Secret_City", true, null /* notUsedAfter */, emptyList()),
+ TimeZoneMapping.createForTests(
+ "Unknown/Secret_City2", false, null /* notUsedAfter */, emptyList())
));
CountryTimeZones GB = mock(CountryTimeZones.class);
when(GB.getCountryIso()).thenReturn("gb");
when(GB.getTimeZoneMappings()).thenReturn(Collections.singletonList(
- TimeZoneMapping.createForTests("Unknown/Secret_City", true, null /* notUsedAfter */)
+ TimeZoneMapping.createForTests(
+ "Unknown/Secret_City", true, null /* notUsedAfter */, emptyList())
));
when(mCountryZonesFinder.lookupCountryTimeZonesForZoneId("Unknown/Secret_City"))
.thenReturn(Arrays.asList(US, GB));
diff --git a/tests/robotests/src/com/android/settings/password/ChooseLockPatternTest.java b/tests/robotests/src/com/android/settings/password/ChooseLockPatternTest.java
index 557e7c1..3f3dcd6 100644
--- a/tests/robotests/src/com/android/settings/password/ChooseLockPatternTest.java
+++ b/tests/robotests/src/com/android/settings/password/ChooseLockPatternTest.java
@@ -46,7 +46,7 @@
@Test
public void activityCreationTest() {
- // Basic sanity test for activity created without crashing
+ // Basic test for activity created without crashing
Robolectric.buildActivity(ChooseLockPattern.class, new IntentBuilder(application).build())
.setup().get();
}
diff --git a/tests/robotests/src/com/android/settings/password/SetupChooseLockPasswordTest.java b/tests/robotests/src/com/android/settings/password/SetupChooseLockPasswordTest.java
index 77058c0..1a76799 100644
--- a/tests/robotests/src/com/android/settings/password/SetupChooseLockPasswordTest.java
+++ b/tests/robotests/src/com/android/settings/password/SetupChooseLockPasswordTest.java
@@ -82,7 +82,7 @@
@Test
public void createActivity_shouldNotCrash() {
- // Basic sanity test for activity created without crashing
+ // Basic test for activity created without crashing
final Intent intent =
SetupChooseLockPassword.modifyIntentForSetup(
application,
diff --git a/tests/robotests/src/com/android/settings/security/CredentialStoragePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/security/CredentialStoragePreferenceControllerTest.java
deleted file mode 100644
index 3eb21cf..0000000
--- a/tests/robotests/src/com/android/settings/security/CredentialStoragePreferenceControllerTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.settings.security;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import android.content.Context;
-
-import androidx.preference.Preference;
-
-import com.android.settings.R;
-import com.android.settings.testutils.shadow.ShadowKeyStore;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.robolectric.RobolectricTestRunner;
-import org.robolectric.RuntimeEnvironment;
-import org.robolectric.annotation.Config;
-
-@RunWith(RobolectricTestRunner.class)
-@Config(shadows = ShadowKeyStore.class)
-public class CredentialStoragePreferenceControllerTest {
-
- private Context mContext;
- private CredentialStoragePreferenceController mController;
- private Preference mPreference;
-
- @Before
- public void setUp() {
- mContext = RuntimeEnvironment.application;
- mController = new CredentialStoragePreferenceController(mContext);
- mPreference = new Preference(mContext);
- }
-
- @Test
- public void updateState_hardwareBacked_showHardwareSummary() {
- ShadowKeyStore.setHardwareBacked(true);
-
- mController.updateState(mPreference);
-
- assertThat(mPreference.getSummary())
- .isEqualTo(mContext.getText(R.string.credential_storage_type_hardware));
- }
-
- @Test
- public void updateState_hardwareBacked_showSoftwareSummary() {
- ShadowKeyStore.setHardwareBacked(false);
-
- mController.updateState(mPreference);
-
- assertThat(mPreference.getSummary())
- .isEqualTo(mContext.getText(R.string.credential_storage_type_software));
- }
-}
diff --git a/tests/robotests/src/com/android/settings/security/RestrictedEncryptionPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/security/RestrictedEncryptionPreferenceControllerTest.java
index 78ad5e5..c25700c 100644
--- a/tests/robotests/src/com/android/settings/security/RestrictedEncryptionPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/security/RestrictedEncryptionPreferenceControllerTest.java
@@ -39,7 +39,6 @@
private Context mContext;
private ShadowUserManager mUserManager;
- private CredentialStoragePreferenceController mCredentialStoragePreferenceController;
private InstallCertificatePreferenceController mInstallCertificatePreferenceController;
private ResetCredentialsPreferenceController mResetCredentialsPreferenceController;
private UserCredentialsPreferenceController mUserCredentialsPreferenceController;
@@ -54,8 +53,6 @@
mContext = RuntimeEnvironment.application;
mLifecycleOwner = () -> mLifecycle;
mLifecycle = new Lifecycle(mLifecycleOwner);
- mCredentialStoragePreferenceController =
- new CredentialStoragePreferenceController(mContext);
mInstallCertificatePreferenceController =
new InstallCertificatePreferenceController(mContext);
mResetCredentialsPreferenceController =
@@ -73,7 +70,6 @@
@Test
public void isAvailable_noRestriction_shouldReturnTrue() {
- assertThat(mCredentialStoragePreferenceController.isAvailable()).isTrue();
assertThat(mInstallCertificatePreferenceController.isAvailable()).isTrue();
assertThat(mResetCredentialsPreferenceController.isAvailable()).isTrue();
assertThat(mUserCredentialsPreferenceController.isAvailable()).isTrue();
@@ -86,7 +82,6 @@
public void isAvailable_hasRestriction_shouldReturnFalse() {
mUserManager.addBaseUserRestriction(UserManager.DISALLOW_CONFIG_CREDENTIALS);
- assertThat(mCredentialStoragePreferenceController.isAvailable()).isFalse();
assertThat(mInstallCertificatePreferenceController.isAvailable()).isFalse();
assertThat(mResetCredentialsPreferenceController.isAvailable()).isFalse();
assertThat(mUserCredentialsPreferenceController.isAvailable()).isFalse();
diff --git a/tests/unit/src/com/android/settings/deviceinfo/OWNERS b/tests/unit/src/com/android/settings/deviceinfo/OWNERS
new file mode 100644
index 0000000..ce702a7
--- /dev/null
+++ b/tests/unit/src/com/android/settings/deviceinfo/OWNERS
@@ -0,0 +1 @@
+include /src/com/android/settings/deviceinfo/OWNERS
diff --git a/tests/unit/src/com/android/settings/network/OWNERS b/tests/unit/src/com/android/settings/network/OWNERS
new file mode 100644
index 0000000..6e4c4a4
--- /dev/null
+++ b/tests/unit/src/com/android/settings/network/OWNERS
@@ -0,0 +1 @@
+include /src/com/android/settings/network/OWNERS
diff --git a/tests/unit/src/com/android/settings/sim/OWNERS b/tests/unit/src/com/android/settings/sim/OWNERS
new file mode 100644
index 0000000..273597e
--- /dev/null
+++ b/tests/unit/src/com/android/settings/sim/OWNERS
@@ -0,0 +1 @@
+include /src/com/android/settings/sim/OWNERS
diff --git a/tests/unit/src/com/android/settings/wifi/calling/OWNERS b/tests/unit/src/com/android/settings/wifi/calling/OWNERS
new file mode 100644
index 0000000..b592652
--- /dev/null
+++ b/tests/unit/src/com/android/settings/wifi/calling/OWNERS
@@ -0,0 +1 @@
+include /src/com/android/settings/wifi/calling/OWNERS