Merge "Introduce boolean flags to show/hide battery/memory in App info."
This commit is contained in:
committed by
Android (Google) Code Review
commit
e07e8cc423
@@ -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
|
||||
|
@@ -104,6 +104,10 @@ public class AppMemoryPreferenceController extends BasePreferenceController
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
if (!mContext.getResources().getBoolean(R.bool.config_show_app_info_settings_memory)) {
|
||||
return DISABLED_UNSUPPORTED;
|
||||
}
|
||||
|
||||
return DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(mContext)
|
||||
? AVAILABLE : DISABLED_DEPENDENT_SETTING;
|
||||
}
|
||||
|
Reference in New Issue
Block a user