From 7d0e5b30df514ff6a6d7f2f283ff97ce03556ebd Mon Sep 17 00:00:00 2001 From: Howard Chen Date: Mon, 13 Nov 2023 13:01:37 +0800 Subject: Fix the callback status The callback is expected to utilize 0 to indicate success. Test: ABTD build Bug: 297441347 Change-Id: Ic13d56ad11039206438309fb9e8d15bc64a9637f --- gsi_service.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gsi_service.cpp b/gsi_service.cpp index 18e97ff..6f2428d 100644 --- a/gsi_service.cpp +++ b/gsi_service.cpp @@ -352,9 +352,10 @@ binder::Status GsiService::isGsiEnabled(bool* _aidl_return) { } binder::Status GsiService::removeGsiAsync(const sp& resultCallback) { - bool result = false; - auto status = removeGsi(&result); - if (!status.isOk()) { + int result = IGsiService::INSTALL_OK; + bool success = true; + auto status = removeGsi(&success); + if (!status.isOk() || !success) { LOG(ERROR) << "Could not removeGsi: " << status.exceptionMessage().c_str(); result = IGsiService::INSTALL_ERROR_GENERIC; } -- cgit v1.2.3