Merge "Add null check to batterymeterview in case the percent view becomes null" into sc-dev

This commit is contained in:
Evan Laird
2021-03-23 18:55:37 +00:00
committed by Android (Google) Code Review

View File

@@ -349,6 +349,9 @@ public class BatteryMeterView extends LinearLayout implements
}
private void setPercentTextAtCurrentLevel() {
if (mBatteryPercentView == null) {
return;
}
mBatteryPercentView.setText(
NumberFormat.getPercentInstance().format(mLevel / 100f));
setContentDescription(