Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -4752,6 +4752,9 @@ <!-- Whether or not we should show the option to show battery percentage --> <bool name="config_battery_percentage_setting_available">true</bool> <!-- Default value set for battery percentage in status bar false = disabled, true = enabled --> <bool name="config_defaultBatteryPercentageSetting">false</bool> <!-- Whether or not battery saver should be "sticky" when manually enabled. --> <bool name="config_batterySaverStickyBehaviourDisabled">false</bool> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2329,6 +2329,7 @@ <java-symbol type="style" name="Animation.RecentApplications" /> <java-symbol type="integer" name="dock_enter_exit_duration" /> <java-symbol type="bool" name="config_battery_percentage_setting_available" /> <java-symbol type="bool" name="config_defaultBatteryPercentageSetting" /> <java-symbol type="string" name="nas_upgrade_notification_title" /> <java-symbol type="string" name="nas_upgrade_notification_content" /> <java-symbol type="string" name="nas_upgrade_notification_enable_action" /> Loading packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java +3 −1 Original line number Diff line number Diff line Loading @@ -331,7 +331,9 @@ public class BatteryMeterView extends LinearLayout implements DarkReceiver { // TODO(b/140051051) final boolean systemSetting = 0 != whitelistIpcs(() -> Settings.System .getIntForUser(getContext().getContentResolver(), SHOW_BATTERY_PERCENT, 0, UserHandle.USER_CURRENT)); SHOW_BATTERY_PERCENT, getContext().getResources().getBoolean( com.android.internal.R.bool.config_defaultBatteryPercentageSetting) ? 1 : 0, UserHandle.USER_CURRENT)); boolean shouldShow = (mShowPercentAvailable && systemSetting && mShowPercentMode != MODE_OFF) || mShowPercentMode == MODE_ON Loading Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -4752,6 +4752,9 @@ <!-- Whether or not we should show the option to show battery percentage --> <bool name="config_battery_percentage_setting_available">true</bool> <!-- Default value set for battery percentage in status bar false = disabled, true = enabled --> <bool name="config_defaultBatteryPercentageSetting">false</bool> <!-- Whether or not battery saver should be "sticky" when manually enabled. --> <bool name="config_batterySaverStickyBehaviourDisabled">false</bool> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2329,6 +2329,7 @@ <java-symbol type="style" name="Animation.RecentApplications" /> <java-symbol type="integer" name="dock_enter_exit_duration" /> <java-symbol type="bool" name="config_battery_percentage_setting_available" /> <java-symbol type="bool" name="config_defaultBatteryPercentageSetting" /> <java-symbol type="string" name="nas_upgrade_notification_title" /> <java-symbol type="string" name="nas_upgrade_notification_content" /> <java-symbol type="string" name="nas_upgrade_notification_enable_action" /> Loading
packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java +3 −1 Original line number Diff line number Diff line Loading @@ -331,7 +331,9 @@ public class BatteryMeterView extends LinearLayout implements DarkReceiver { // TODO(b/140051051) final boolean systemSetting = 0 != whitelistIpcs(() -> Settings.System .getIntForUser(getContext().getContentResolver(), SHOW_BATTERY_PERCENT, 0, UserHandle.USER_CURRENT)); SHOW_BATTERY_PERCENT, getContext().getResources().getBoolean( com.android.internal.R.bool.config_defaultBatteryPercentageSetting) ? 1 : 0, UserHandle.USER_CURRENT)); boolean shouldShow = (mShowPercentAvailable && systemSetting && mShowPercentMode != MODE_OFF) || mShowPercentMode == MODE_ON Loading