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

Commit ef761723 authored by Jeffrey Huang's avatar Jeffrey Huang Committed by Automerger Merge Worker
Browse files

Merge "Fix an NPE in BatteryService" into sc-dev am: 884614ff

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13841857

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic0fd64a58a342f243ffac147fecb741a4a44c424
parents 30c201a3 884614ff
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