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

Commit 2b534bde authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix an NPE in BatteryService" into rvc-qpr-dev

parents 5a2b08a5 595002a0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1505,6 +1505,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