Introduce boolean flags to show/hide battery/memory in App info.
This adds two flags: config_show_app_info_settings_memory config_show_app_info_settings_battery Which when individually set to false, will hide them item from "App info" which is accessed from clicking on an application in Apps & notifications -> App info. Bug: 62379413 Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.applications Change-Id: Ifb3b644901728dc7ea04d13198abddaa7b230538
This commit is contained in:
@@ -76,7 +76,9 @@ public class AppBatteryPreferenceController extends BasePreferenceController
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return AVAILABLE;
|
||||
return mContext.getResources().getBoolean(R.bool.config_show_app_info_settings_battery)
|
||||
? AVAILABLE
|
||||
: DISABLED_UNSUPPORTED;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user