Merge "Add missing null check for mBatteryPercentView." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f1c8817e0f
@@ -326,6 +326,9 @@ public class BatteryMeterView extends LinearLayout implements
|
||||
if (mBatteryPercentView != null) {
|
||||
if (mShowPercentMode == MODE_ESTIMATE && !mCharging) {
|
||||
mBatteryController.getEstimatedTimeRemainingString((String estimate) -> {
|
||||
if (mBatteryPercentView == null) {
|
||||
return;
|
||||
}
|
||||
if (estimate != null) {
|
||||
mBatteryPercentView.setText(estimate);
|
||||
setContentDescription(getContext().getString(
|
||||
|
||||
Reference in New Issue
Block a user