Correct the flag value for system_server reconnection am: 36a22ac049 Original change: https://googleplex-android-review.googlesource.com/c/platform/system/chre/+/23754386 Change-Id: Ie4274bc3629faf07b6f487f90eca8397bb0f92c8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/host/hal_generic/common/hal_client_manager.cc b/host/hal_generic/common/hal_client_manager.cc index 1660ff5..f6945eb 100644 --- a/host/hal_generic/common/hal_client_manager.cc +++ b/host/hal_generic/common/hal_client_manager.cc
@@ -159,7 +159,8 @@ for (const auto &[procName, id] : mProcessNamesToClientIds) { if (id == clientId && procName == kSystemServerName) { - mIsFirstClient = false; + LOGE("System server is disconnected"); + mIsFirstClient = true; } }
diff --git a/host/hal_generic/common/multi_client_context_hub_base.cc b/host/hal_generic/common/multi_client_context_hub_base.cc index 543eb47..950c09f 100644 --- a/host/hal_generic/common/multi_client_context_hub_base.cc +++ b/host/hal_generic/common/multi_client_context_hub_base.cc
@@ -41,6 +41,7 @@ enum class HalErrorCode : int32_t { OPERATION_FAILED = -1, INVALID_RESULT = -2, + INVALID_ARGUMENT = -3, }; bool isValidContextHubId(uint32_t hubId) { @@ -333,14 +334,14 @@ break; default: LOGE("Unsupported host endpoint type %" PRIu32, info.type); - return ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); + return fromServiceError(HalErrorCode::INVALID_ARGUMENT); } uint16_t endpointId = info.hostEndpointId; if (!mHalClientManager->registerEndpointId(info.hostEndpointId) || !mHalClientManager->mutateEndpointIdFromHostIfNeeded( AIBinder_getCallingPid(), endpointId)) { - return ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); + return fromServiceError(HalErrorCode::INVALID_ARGUMENT); } flatbuffers::FlatBufferBuilder builder(64); HostProtocolHost::encodeHostEndpointConnected(