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:
Matt Pietal
2021-05-07 14:54:54 -04:00
parent 180051cf05
commit a13e30c11a
3 changed files with 6 additions and 15 deletions

View File

@@ -52,13 +52,8 @@ public class ControlsPrivacyPreferenceController extends TogglePreferenceControl
@Override
public CharSequence getSummary() {
boolean controlsAvailable = isControlsAvailable();
final int res;
if (!isSecure()) {
res = R.string.lockscreen_privacy_not_secure;
} else {
res = R.string.lockscreen_privacy_controls_summary;
}
final int res = isSecure() ? R.string.lockscreen_privacy_controls_summary :
R.string.lockscreen_privacy_not_secure;
return mContext.getText(res);
}
@@ -83,7 +78,7 @@ public class ControlsPrivacyPreferenceController extends TogglePreferenceControl
final LockPatternUtils utils = FeatureFactory.getFactory(mContext)
.getSecurityFeatureProvider()
.getLockPatternUtils(mContext);
int userId = UserHandle.myUserId();
final int userId = UserHandle.myUserId();
return utils.isSecure(userId);
}