Controls/Wallet privacy settings
Addressing feedback from ag/14353975 Fixes: 185597511 Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.display Change-Id: I4de5b7f94d4be44820b1fa463d97f4f098f64bff
This commit is contained in:
@@ -52,13 +52,8 @@ public class ControlsPrivacyPreferenceController extends TogglePreferenceControl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CharSequence getSummary() {
|
public CharSequence getSummary() {
|
||||||
boolean controlsAvailable = isControlsAvailable();
|
final int res = isSecure() ? R.string.lockscreen_privacy_controls_summary :
|
||||||
final int res;
|
R.string.lockscreen_privacy_not_secure;
|
||||||
if (!isSecure()) {
|
|
||||||
res = R.string.lockscreen_privacy_not_secure;
|
|
||||||
} else {
|
|
||||||
res = R.string.lockscreen_privacy_controls_summary;
|
|
||||||
}
|
|
||||||
return mContext.getText(res);
|
return mContext.getText(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +78,7 @@ public class ControlsPrivacyPreferenceController extends TogglePreferenceControl
|
|||||||
final LockPatternUtils utils = FeatureFactory.getFactory(mContext)
|
final LockPatternUtils utils = FeatureFactory.getFactory(mContext)
|
||||||
.getSecurityFeatureProvider()
|
.getSecurityFeatureProvider()
|
||||||
.getLockPatternUtils(mContext);
|
.getLockPatternUtils(mContext);
|
||||||
int userId = UserHandle.myUserId();
|
final int userId = UserHandle.myUserId();
|
||||||
return utils.isSecure(userId);
|
return utils.isSecure(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -55,12 +55,8 @@ public class WalletPrivacyPreferenceController extends TogglePreferenceControlle
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CharSequence getSummary() {
|
public CharSequence getSummary() {
|
||||||
final int res;
|
final int res = isSecure() ? R.string.lockscreen_privacy_wallet_summary :
|
||||||
if (!isSecure()) {
|
R.string.lockscreen_privacy_not_secure;
|
||||||
res = R.string.lockscreen_privacy_not_secure;
|
|
||||||
} else {
|
|
||||||
res = R.string.lockscreen_privacy_wallet_summary;
|
|
||||||
}
|
|
||||||
return mContext.getText(res);
|
return mContext.getText(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020 The Android Open Source Project
|
* Copyright (C) 2021 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
Reference in New Issue
Block a user