Merge changes Ibd1291ff,I5224900b

* changes:
  Add ability to show/hide System Update.
  Clean up SystemUpdatePreferences tests.
This commit is contained in:
TreeHugger Robot
2018-01-24 08:10:14 +00:00
committed by Android (Google) Code Review
5 changed files with 103 additions and 28 deletions

View File

@@ -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;
}