Merge "Fix a NPE in BatteryStatsImpl" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-07-21 00:59:59 +00:00
committed by Android (Google) Code Review

View File

@@ -4021,7 +4021,9 @@ public class BatteryStatsImpl extends BatteryStats {
try {
IBatteryPropertiesRegistrar registrar = IBatteryPropertiesRegistrar.Stub.asInterface(
ServiceManager.getService("batteryproperties"));
registrar.scheduleUpdate();
if (registrar != null) {
registrar.scheduleUpdate();
}
} catch (RemoteException e) {
// Ignore.
}