Merge "Update wallet setting availability" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
61f81ffb07
@@ -64,15 +64,18 @@ public class WalletPrivacyPreferenceController extends TogglePreferenceControlle
|
||||
public int getAvailabilityStatus() {
|
||||
if (CustomizableLockScreenUtils.isFeatureEnabled(mContext)) {
|
||||
return UNSUPPORTED_ON_DEVICE;
|
||||
} else if (!isEnabled()) {
|
||||
return UNSUPPORTED_ON_DEVICE;
|
||||
} else if (!isSecure()) {
|
||||
return DISABLED_DEPENDENT_SETTING;
|
||||
}
|
||||
|
||||
return isEnabled() && isSecure() ? AVAILABLE : DISABLED_DEPENDENT_SETTING;
|
||||
return AVAILABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateState(Preference preference) {
|
||||
super.updateState(preference);
|
||||
preference.setEnabled(getAvailabilityStatus() != DISABLED_DEPENDENT_SETTING);
|
||||
preference.setEnabled(getAvailabilityStatus() == AVAILABLE);
|
||||
refreshSummary(preference);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user