Settings: Add config to show/hide vendor security patch level

This commit is contained in:
Joey
2024-06-05 16:23:59 +09:00
parent 7c1e380d58
commit d41c2b2337
2 changed files with 5 additions and 1 deletions

View File

@@ -58,4 +58,7 @@
<!-- Face enroll finish text --> <!-- Face enroll finish text -->
<string name="security_settings_face_enroll_finish_description_with_bp">Now you can use your face to unlock your phone or verify its you, like when you sign in to apps or approve a purchase</string> <string name="security_settings_face_enroll_finish_description_with_bp">Now you can use your face to unlock your phone or verify its you, like when you sign in to apps or approve a purchase</string>
<!-- Whether to show vendor security patch level -->
<bool name="config_show_vendor_patch_level" translatable="false">true</bool>
</resources> </resources>

View File

@@ -44,7 +44,8 @@ public class LineageVendorSecurityPatchLevelPreferenceController extends BasePre
@Override @Override
public int getAvailabilityStatus() { public int getAvailabilityStatus() {
return AVAILABLE; return mContext.getResources().getBoolean(R.bool.config_show_vendor_patch_level)
? AVAILABLE : UNSUPPORTED_ON_DEVICE;
} }
@Override @Override