Enable controllers to use a custom key.
Test: atest SettingsUnitTests Test: m -j45 RunSettingsRoboTests Bug: 191763369 Change-Id: I48eea95613600580c80c8850f0a3fd543a7e0a43
This commit is contained in:
@@ -37,9 +37,17 @@ public class ChangeProfileScreenLockPreferenceController extends
|
||||
|
||||
private static final String KEY_UNLOCK_SET_OR_CHANGE_PROFILE = "unlock_set_or_change_profile";
|
||||
|
||||
private final String mPreferenceKey;
|
||||
|
||||
public ChangeProfileScreenLockPreferenceController(Context context,
|
||||
SettingsPreferenceFragment host) {
|
||||
this(context, host, KEY_UNLOCK_SET_OR_CHANGE_PROFILE);
|
||||
}
|
||||
|
||||
public ChangeProfileScreenLockPreferenceController(Context context,
|
||||
SettingsPreferenceFragment host, String key) {
|
||||
super(context, host);
|
||||
this.mPreferenceKey = key;
|
||||
}
|
||||
|
||||
public boolean isAvailable() {
|
||||
@@ -65,7 +73,7 @@ public class ChangeProfileScreenLockPreferenceController extends
|
||||
|
||||
@Override
|
||||
public String getPreferenceKey() {
|
||||
return KEY_UNLOCK_SET_OR_CHANGE_PROFILE;
|
||||
return mPreferenceKey;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user