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

am: 0587bdd59f

Change-Id: I3bcc5d38995a38f068df6251826050fd59325e80
This commit is contained in:
Mike Ma
2018-07-20 21:14:10 -07:00
committed by android-build-merger

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.
}