Loading core/res/res/values/config.xml +4 −1 Original line number Diff line number Diff line Loading @@ -1248,7 +1248,7 @@ <!-- Default value for led color when battery is medium charged --> <integer name="config_notificationsBatteryMediumARGB">0xFFFFFF00</integer> <!-- Default value for led color when battery is fully charged --> <!-- Default value for led color when battery is fully or nearly fully charged --> <integer name="config_notificationsBatteryFullARGB">0xFF00FF00</integer> <!-- Default value for LED on time when the battery is low on charge in miliseconds --> Loading @@ -1263,6 +1263,9 @@ <!-- Default value for LED off time when the battery is low on charge in miliseconds --> <integer name="config_notificationsBatteryLedOff">2875</integer> <!-- Battery level percent that is treated as nearly full. --> <integer name="config_notificationsBatteryNearlyFullLevel">90</integer> <!-- If true, only colorized CallStyle notifications will apply custom colors --> <bool name="config_callNotificationActionColorsRequireColorized">true</bool> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2043,6 +2043,7 @@ <java-symbol type="integer" name="config_notificationsBatteryLedOn" /> <java-symbol type="integer" name="config_notificationsBatteryLowARGB" /> <java-symbol type="integer" name="config_notificationsBatteryMediumARGB" /> <java-symbol type="integer" name="config_notificationsBatteryNearlyFullLevel" /> <java-symbol type="integer" name="config_notificationServiceArchiveSize" /> <java-symbol type="integer" name="config_previousVibrationsDumpLimit" /> <java-symbol type="integer" name="config_defaultVibrationAmplitude" /> Loading services/core/java/com/android/server/BatteryService.java +5 −1 Original line number Diff line number Diff line Loading @@ -158,6 +158,7 @@ public final class BatteryService extends SystemService { private int mLowBatteryWarningLevel; private int mLastLowBatteryWarningLevel; private int mLowBatteryCloseWarningLevel; private int mBatteryNearlyFullLevel; private int mShutdownBatteryTemperature; private int mPlugType; Loading Loading @@ -1183,6 +1184,8 @@ public final class BatteryService extends SystemService { com.android.internal.R.integer.config_notificationsBatteryLedOn); mBatteryLedOff = context.getResources().getInteger( com.android.internal.R.integer.config_notificationsBatteryLedOff); mBatteryNearlyFullLevel = context.getResources().getInteger( com.android.internal.R.integer.config_notificationsBatteryNearlyFullLevel); } /** Loading @@ -1205,7 +1208,8 @@ public final class BatteryService extends SystemService { } } else if (status == BatteryManager.BATTERY_STATUS_CHARGING || status == BatteryManager.BATTERY_STATUS_FULL) { if (status == BatteryManager.BATTERY_STATUS_FULL || level >= 90) { if (status == BatteryManager.BATTERY_STATUS_FULL || level >= mBatteryNearlyFullLevel) { // Solid green when full or charging and nearly full mBatteryLight.setColor(mBatteryFullARGB); } else { Loading Loading
core/res/res/values/config.xml +4 −1 Original line number Diff line number Diff line Loading @@ -1248,7 +1248,7 @@ <!-- Default value for led color when battery is medium charged --> <integer name="config_notificationsBatteryMediumARGB">0xFFFFFF00</integer> <!-- Default value for led color when battery is fully charged --> <!-- Default value for led color when battery is fully or nearly fully charged --> <integer name="config_notificationsBatteryFullARGB">0xFF00FF00</integer> <!-- Default value for LED on time when the battery is low on charge in miliseconds --> Loading @@ -1263,6 +1263,9 @@ <!-- Default value for LED off time when the battery is low on charge in miliseconds --> <integer name="config_notificationsBatteryLedOff">2875</integer> <!-- Battery level percent that is treated as nearly full. --> <integer name="config_notificationsBatteryNearlyFullLevel">90</integer> <!-- If true, only colorized CallStyle notifications will apply custom colors --> <bool name="config_callNotificationActionColorsRequireColorized">true</bool> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2043,6 +2043,7 @@ <java-symbol type="integer" name="config_notificationsBatteryLedOn" /> <java-symbol type="integer" name="config_notificationsBatteryLowARGB" /> <java-symbol type="integer" name="config_notificationsBatteryMediumARGB" /> <java-symbol type="integer" name="config_notificationsBatteryNearlyFullLevel" /> <java-symbol type="integer" name="config_notificationServiceArchiveSize" /> <java-symbol type="integer" name="config_previousVibrationsDumpLimit" /> <java-symbol type="integer" name="config_defaultVibrationAmplitude" /> Loading
services/core/java/com/android/server/BatteryService.java +5 −1 Original line number Diff line number Diff line Loading @@ -158,6 +158,7 @@ public final class BatteryService extends SystemService { private int mLowBatteryWarningLevel; private int mLastLowBatteryWarningLevel; private int mLowBatteryCloseWarningLevel; private int mBatteryNearlyFullLevel; private int mShutdownBatteryTemperature; private int mPlugType; Loading Loading @@ -1183,6 +1184,8 @@ public final class BatteryService extends SystemService { com.android.internal.R.integer.config_notificationsBatteryLedOn); mBatteryLedOff = context.getResources().getInteger( com.android.internal.R.integer.config_notificationsBatteryLedOff); mBatteryNearlyFullLevel = context.getResources().getInteger( com.android.internal.R.integer.config_notificationsBatteryNearlyFullLevel); } /** Loading @@ -1205,7 +1208,8 @@ public final class BatteryService extends SystemService { } } else if (status == BatteryManager.BATTERY_STATUS_CHARGING || status == BatteryManager.BATTERY_STATUS_FULL) { if (status == BatteryManager.BATTERY_STATUS_FULL || level >= 90) { if (status == BatteryManager.BATTERY_STATUS_FULL || level >= mBatteryNearlyFullLevel) { // Solid green when full or charging and nearly full mBatteryLight.setColor(mBatteryFullARGB); } else { Loading