Enable controllers to use a custom key.

Test: atest SettingsUnitTests
Test: m -j45 RunSettingsRoboTests
Bug: 191763369
Change-Id: I48eea95613600580c80c8850f0a3fd543a7e0a43
This commit is contained in:
Jan Tomljanovic
2021-06-25 01:45:30 +01:00
parent 37b1831d0d
commit c6667337ca
18 changed files with 171 additions and 27 deletions

View File

@@ -41,7 +41,11 @@ public class SimLockPreferenceController extends BasePreferenceController {
private TelephonyManager mTelephonyManager;
public SimLockPreferenceController(Context context) {
super(context, KEY_SIM_LOCK);
this(context, KEY_SIM_LOCK);
}
public SimLockPreferenceController(Context context, String key) {
super(context, key);
mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
mCarrierConfigManager = (CarrierConfigManager)
mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);