Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 884614ff authored by Jeffrey Huang's avatar Jeffrey Huang Committed by Android (Google) Code Review
Browse files

Merge "Fix an NPE in BatteryService" into sc-dev

parents ed432c41 780ca87a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1595,6 +1595,8 @@ public final class BatteryService extends SystemService {
                            if (Objects.equals(newService, oldService)) return;

                            Slog.i(TAG, "health: new instance registered " + mInstanceName);
                            // #init() may be called with null callback. Skip null callbacks.
                            if (mCallback == null) return;
                            mCallback.onRegistration(oldService, newService, mInstanceName);
                        } catch (NoSuchElementException | RemoteException ex) {
                            Slog.e(TAG, "health: Cannot get instance '" + mInstanceName