sm8150-common: DeviceSettings: HBMModeTileService: Fix HBM write value

Signed-off-by: Anirudh Gupta <anirudhgupta109@gmail.com>
Signed-off-by: Anirudh Gupta <anirudhgupta109@aosip.dev>
This commit is contained in:
Anirudh Gupta 2019-12-21 10:51:35 +00:00 committed by Anirudh Gupta
parent 0918c7cb71
commit 7566191266
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ public class HBMModeTileService extends TileService {
super.onClick(); super.onClick();
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
enabled = HBMModeSwitch.isCurrentlyEnabled(this); enabled = HBMModeSwitch.isCurrentlyEnabled(this);
Utils.writeValue(HBMModeSwitch.getFile(), enabled ? "0" : "1"); Utils.writeValue(HBMModeSwitch.getFile(), enabled ? "0" : "5");
sharedPrefs.edit().putBoolean(DeviceSettings.KEY_HBM_SWITCH, enabled ? false : true).commit(); sharedPrefs.edit().putBoolean(DeviceSettings.KEY_HBM_SWITCH, enabled ? false : true).commit();
//getQsTile().setLabel(enabled ? "HBM off" : "HBM On"); //getQsTile().setLabel(enabled ? "HBM off" : "HBM On");
getQsTile().setState(enabled ? Tile.STATE_INACTIVE : Tile.STATE_ACTIVE); getQsTile().setState(enabled ? Tile.STATE_INACTIVE : Tile.STATE_ACTIVE);