powershare: Treat non-zero value as enabled

On SM8350, we use trx_online to determine whether PowerShare is enabled.

Change-Id: I62d7448e6337696867a264cfd521379b53fe61f9
This commit is contained in:
LuK1337 2021-09-19 18:10:18 +02:00 committed by Sebastiano Barezzi
parent 04053365b2
commit 8a05be348b
No known key found for this signature in database
GPG Key ID: 47760583F393BC44

View File

@ -35,7 +35,8 @@ static T get(const std::string& path, const T& def) {
}
Return<bool> PowerShare::isEnabled() {
return get<std::string>(WIRELESS_TX_ENABLE_PATH, "disable") != "disable";
const auto value = get<std::string>(WIRELESS_TX_ENABLE_PATH, "");
return !(value == "disable" || value == "0");
}
Return<bool> PowerShare::setEnabled(bool enable) {