summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/health/HealthServiceWrapperAidl.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/health/HealthServiceWrapperAidl.java b/services/core/java/com/android/server/health/HealthServiceWrapperAidl.java
index 4f2ed68974fa..c4113198ae1d 100644
--- a/services/core/java/com/android/server/health/HealthServiceWrapperAidl.java
+++ b/services/core/java/com/android/server/health/HealthServiceWrapperAidl.java
@@ -208,7 +208,9 @@ class HealthServiceWrapperAidl extends HealthServiceWrapper {
if (Objects.equals(newBinder, oldBinder)) return;
Slog.i(TAG, "New health AIDL HAL service registered");
- mRegCallback.onRegistration(oldService, newService);
+ if (mRegCallback != null) {
+ mRegCallback.onRegistration(oldService, newService);
+ }
});
}
}