powershare: Use EX_SERVICE_SPECIFIC exception code for setEnabled()

Makes it match hardware/lineage/interfaces/powershare/aidl/default.

Change-Id: I5a4978cc7b62127dd00795dd6aaff10c2f2ade38
This commit is contained in:
LuK1337
2025-05-27 00:33:18 +02:00
parent 8e39a4f7a4
commit 90b33a8325

View File

@@ -43,7 +43,7 @@ ndk::ScopedAStatus PowerShare::isEnabled(bool* _aidl_return) {
ndk::ScopedAStatus PowerShare::setEnabled(bool enable) {
if (!WriteStringToFile(enable ? "1" : "0", kWirelessTxEnablePath, true)) {
LOG(ERROR) << "Failed to write PowerShare state";
return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
return ndk::ScopedAStatus::fromExceptionCode(EX_SERVICE_SPECIFIC);
}
return ndk::ScopedAStatus::ok();