forked from donjohanliebert/hardware_xiaomi
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:
parent
04053365b2
commit
8a05be348b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user