Merge "Fix an NPE in BatteryService" into rvc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2b534bde0e
@@ -1505,6 +1505,8 @@ public final class BatteryService extends SystemService {
|
|||||||
if (Objects.equals(newService, oldService)) return;
|
if (Objects.equals(newService, oldService)) return;
|
||||||
|
|
||||||
Slog.i(TAG, "health: new instance registered " + mInstanceName);
|
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);
|
mCallback.onRegistration(oldService, newService, mInstanceName);
|
||||||
} catch (NoSuchElementException | RemoteException ex) {
|
} catch (NoSuchElementException | RemoteException ex) {
|
||||||
Slog.e(TAG, "health: Cannot get instance '" + mInstanceName
|
Slog.e(TAG, "health: Cannot get instance '" + mInstanceName
|
||||||
|
|||||||
Reference in New Issue
Block a user