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

Commit be26ce76 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix an NPE in BatteryService" into rvc-qpr-dev am: 2b534bde

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

Change-Id: I5086c0425b71654ac2115ce8f504ee65a5715766
parents cf2a7d93 2b534bde
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1508,6 +1508,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