From b90e1e38fedf4573b479e1ade6c26b4db9b7b4e0 Mon Sep 17 00:00:00 2001 From: Devin Moore Date: Mon, 19 Oct 2020 18:18:20 -0700 Subject: [PATCH] Change error log to fatal when failing to register framework HALs If the system server fails to register a framework HAL, it should be treated as a fatal error. Test: builds & boots on cuttlefish and flame devices Change-Id: Ib7cf0d738be51c315f0936582d92ec70f19ce479 --- services/core/jni/com_android_server_SystemServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/core/jni/com_android_server_SystemServer.cpp b/services/core/jni/com_android_server_SystemServer.cpp index f7567b168dd88..43f50bfc33d55 100644 --- a/services/core/jni/com_android_server_SystemServer.cpp +++ b/services/core/jni/com_android_server_SystemServer.cpp @@ -76,7 +76,7 @@ static void android_server_SystemServer_startHidlServices(JNIEnv* env, jobject / sp sensorService = new SensorManager(vm); err = sensorService->registerAsService(); - ALOGE_IF(err != OK, "Cannot register %s: %d", ISensorManager::descriptor, err); + LOG_ALWAYS_FATAL_IF(err != OK, "Cannot register %s: %d", ISensorManager::descriptor, err); sp schedulingService = new SchedulingPolicyService(); if (IServiceManager::Transport::HWBINDER == @@ -91,7 +91,7 @@ static void android_server_SystemServer_startHidlServices(JNIEnv* env, jobject / sp statsHal = new StatsHal(); err = statsHal->registerAsService(); - ALOGE_IF(err != OK, "Cannot register %s: %d", IStats::descriptor, err); + LOG_ALWAYS_FATAL_IF(err != OK, "Cannot register %s: %d", IStats::descriptor, err); } static void android_server_SystemServer_initZygoteChildHeapProfiling(JNIEnv* /* env */,