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

@@ -55,9 +55,15 @@ public class VisiblePatternProfilePreferenceController extends TogglePreferenceC
this(context, null /* lifecycle */);
}
// TODO (b/73074893) Replace this constructor without Lifecycle using setter method instead.
public VisiblePatternProfilePreferenceController(Context context, Lifecycle lifecycle) {
super(context, KEY_VISIBLE_PATTERN_PROFILE);
this(context, lifecycle, KEY_VISIBLE_PATTERN_PROFILE);
}
// TODO (b/73074893) Replace this constructor without Lifecycle using setter method instead.
public VisiblePatternProfilePreferenceController(
Context context, Lifecycle lifecycle, String key) {
super(context, key);
mUm = (UserManager) context.getSystemService(Context.USER_SERVICE);
mLockPatternUtils = FeatureFactory.getFactory(context)
.getSecurityFeatureProvider()