Loading res/values/strings.xml +0 −3 Original line number Diff line number Diff line Loading @@ -5814,9 +5814,6 @@ other {# apps restricted} }</string> <!-- Title to display the battery percentage. [CHAR LIMIT=24] --> <string name="battery_header_title_alternate"><xliff:g id="number" example="88">^1</xliff:g><small> <font size="20"><xliff:g id="unit" example="%">%</xliff:g></font></small></string> <!-- Summary for top level battery tile if battery is not present. [CHAR LIMIT=NONE] --> <string name="battery_missing_message">Problem reading the battery meter.</string> <!-- Help text if battery is not present. [CHAR LIMIT=NONE] --> src/com/android/settings/fuelgauge/BatteryHeaderPreferenceController.java +1 −5 Original line number Diff line number Diff line Loading @@ -17,10 +17,8 @@ package com.android.settings.fuelgauge; import android.content.Context; import android.content.Intent; import android.icu.text.NumberFormat; import android.os.BatteryManager; import android.os.PowerManager; import android.text.TextUtils; import android.util.Log; import androidx.annotation.VisibleForTesting; Loading Loading @@ -145,8 +143,6 @@ public class BatteryHeaderPreferenceController extends BasePreferenceController } private CharSequence formatBatteryPercentageText(int batteryLevel) { return TextUtils.expandTemplate( mContext.getText(R.string.battery_header_title_alternate), NumberFormat.getIntegerInstance().format(batteryLevel)); return com.android.settings.Utils.formatPercentage(batteryLevel); } } tests/robotests/src/com/android/settings/fuelgauge/BatteryHeaderPreferenceControllerTest.java +1 −5 Original line number Diff line number Diff line Loading @@ -28,10 +28,8 @@ import android.content.Intent; import android.hardware.usb.UsbManager; import android.hardware.usb.UsbPort; import android.hardware.usb.UsbPortStatus; import android.icu.text.NumberFormat; import android.os.BatteryManager; import android.os.PowerManager; import android.text.TextUtils; import androidx.preference.PreferenceScreen; Loading Loading @@ -320,9 +318,7 @@ public class BatteryHeaderPreferenceControllerTest { } private CharSequence formatBatteryPercentageText() { return TextUtils.expandTemplate( mContext.getText(R.string.battery_header_title_alternate), NumberFormat.getIntegerInstance().format(BATTERY_LEVEL)); return com.android.settings.Utils.formatPercentage(BATTERY_LEVEL); } private void setChargingState(boolean isDischarging, boolean updatedByStatusFeature) { Loading Loading
res/values/strings.xml +0 −3 Original line number Diff line number Diff line Loading @@ -5814,9 +5814,6 @@ other {# apps restricted} }</string> <!-- Title to display the battery percentage. [CHAR LIMIT=24] --> <string name="battery_header_title_alternate"><xliff:g id="number" example="88">^1</xliff:g><small> <font size="20"><xliff:g id="unit" example="%">%</xliff:g></font></small></string> <!-- Summary for top level battery tile if battery is not present. [CHAR LIMIT=NONE] --> <string name="battery_missing_message">Problem reading the battery meter.</string> <!-- Help text if battery is not present. [CHAR LIMIT=NONE] -->
src/com/android/settings/fuelgauge/BatteryHeaderPreferenceController.java +1 −5 Original line number Diff line number Diff line Loading @@ -17,10 +17,8 @@ package com.android.settings.fuelgauge; import android.content.Context; import android.content.Intent; import android.icu.text.NumberFormat; import android.os.BatteryManager; import android.os.PowerManager; import android.text.TextUtils; import android.util.Log; import androidx.annotation.VisibleForTesting; Loading Loading @@ -145,8 +143,6 @@ public class BatteryHeaderPreferenceController extends BasePreferenceController } private CharSequence formatBatteryPercentageText(int batteryLevel) { return TextUtils.expandTemplate( mContext.getText(R.string.battery_header_title_alternate), NumberFormat.getIntegerInstance().format(batteryLevel)); return com.android.settings.Utils.formatPercentage(batteryLevel); } }
tests/robotests/src/com/android/settings/fuelgauge/BatteryHeaderPreferenceControllerTest.java +1 −5 Original line number Diff line number Diff line Loading @@ -28,10 +28,8 @@ import android.content.Intent; import android.hardware.usb.UsbManager; import android.hardware.usb.UsbPort; import android.hardware.usb.UsbPortStatus; import android.icu.text.NumberFormat; import android.os.BatteryManager; import android.os.PowerManager; import android.text.TextUtils; import androidx.preference.PreferenceScreen; Loading Loading @@ -320,9 +318,7 @@ public class BatteryHeaderPreferenceControllerTest { } private CharSequence formatBatteryPercentageText() { return TextUtils.expandTemplate( mContext.getText(R.string.battery_header_title_alternate), NumberFormat.getIntegerInstance().format(BATTERY_LEVEL)); return com.android.settings.Utils.formatPercentage(BATTERY_LEVEL); } private void setChargingState(boolean isDischarging, boolean updatedByStatusFeature) { Loading