Add ability to show/hide System Update.
This adds one flag: config_show_system_update_settings Which when set to false will hide "System update" from System page. This is useful for devices that controls its system update elsewhere. Bug: 69813881 Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.deviceinfo Change-Id: Ibd1291ffd8948419e8aa06d0721842246a069378
This commit is contained in:
@@ -47,7 +47,8 @@ public class SystemUpdatePreferenceController extends BasePreferenceController {
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return mUm.isAdminUser()
|
||||
return mContext.getResources().getBoolean(R.bool.config_show_system_update_settings)
|
||||
&& mUm.isAdminUser()
|
||||
? AVAILABLE
|
||||
: DISABLED_UNSUPPORTED;
|
||||
}
|
||||
|
Reference in New Issue
Block a user