Files
device_xiaomi_stone/fastcharge/FastCharge.cpp

60 lines
1.7 KiB
C++
Raw Normal View History

[SQUASH] stone: fastcharge implementation this commit contains following commits to introduce the fastcharge toggle for stone device that use this tree they were renamed from sm8250-common to stone sm8250-common: add fastcharge implementation * Disabling fast charge may be useful for reducing the heat produced by the device while charging, or for extending the lifespan of the battery * This commit introduces the fastcharge HIDL, which writes in the node /sys/class/qcom-battery/restrict_chg 0 or 1 depeding on user selection. 0 means that fastcharge is enabled, while 1 means that fastcharge is disabled Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb Signed-off-by: Davide Garberi <dade.garberi@gmail.com> Signed-off-by: althafvly <althafvly@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/6510782439cedeb20fd75c99f264d44e5869b086 sm8250-common: fastcharge: Make user setting persistent Change-Id: I4ff051d6f9685e94022eab32035bfe86a65264b8 Signed-off-by: Davide Garberi <dade.garberi@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/e050f0dab00d0ec22d619e180f1fee2aa5ebc984 sm8250-common: fastcharge: Use pragma once Change-Id: I9a9e193a6f66f045f41394d059af8b71778e8d72 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/ff8e5f6173f613a8f28559adf4d652ef0348d64b sm8250-common: fastcharge: Migrate to blueprint Change-Id: I200fd6c685183c98f0815b207adae5aa75a37238 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/4e0d22f4863bde7ef6c68b54e345374e650b542f sm8250-common: Build fastcharge implementation Change-Id: I3e6994d2c2f419dc8ce98a060204fda3dd16df81 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/136d369c4ef13c52fe4cecb3bbda45df8b6eee4d sm8250-common: Sepolicy: Label FastCharge more general https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/7a619945ca3b9bf284a1cfdd4063b864bf5e5290 sm8250-common: Sepolicy: Fastcharge: Provide needed permissions https: //github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/298ff28a2ab9c04f953780958de6a8971a947c51 batterysecret hack https://github.com/VILI-AS-STUDIOS/device_xiaomi_sm8350-common/commit/51ebc8de81b7ca2f60f932b6a7614619ef93a68a Co-Authored-By: Ivan Martynov <johnivan19999@gmail.com> Co-Authored-By: Bruno Martins <1696148+bgcngm@users.noreply.github.com> Co-Authored-By: Francescodario Cuzzocrea <bosconovic@gmail.com> Co-Authored-By: Davide Garberi <dade.garberi@gmail.com> Co-Authored-By: Mohammed Althaf Thayyil <me@althafvly.com> Co-Authored-By: blazerpaul15 <107421375+blazerpaul15@users.noreply.github.com> Signed-off-by: Arijit78 <sahaarijit2007@gmail.com>
2024-05-12 11:15:39 +02:00
/*
* Copyright (C) 2023 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define LOG_TAG "fastcharge@1.0-service.stone"
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <cstdlib>
#include "FastCharge.h"
[SQUASH] stone: fastcharge implementation this commit contains following commits to introduce the fastcharge toggle for stone device that use this tree they were renamed from sm8250-common to stone sm8250-common: add fastcharge implementation * Disabling fast charge may be useful for reducing the heat produced by the device while charging, or for extending the lifespan of the battery * This commit introduces the fastcharge HIDL, which writes in the node /sys/class/qcom-battery/restrict_chg 0 or 1 depeding on user selection. 0 means that fastcharge is enabled, while 1 means that fastcharge is disabled Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb Signed-off-by: Davide Garberi <dade.garberi@gmail.com> Signed-off-by: althafvly <althafvly@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/6510782439cedeb20fd75c99f264d44e5869b086 sm8250-common: fastcharge: Make user setting persistent Change-Id: I4ff051d6f9685e94022eab32035bfe86a65264b8 Signed-off-by: Davide Garberi <dade.garberi@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/e050f0dab00d0ec22d619e180f1fee2aa5ebc984 sm8250-common: fastcharge: Use pragma once Change-Id: I9a9e193a6f66f045f41394d059af8b71778e8d72 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/ff8e5f6173f613a8f28559adf4d652ef0348d64b sm8250-common: fastcharge: Migrate to blueprint Change-Id: I200fd6c685183c98f0815b207adae5aa75a37238 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/4e0d22f4863bde7ef6c68b54e345374e650b542f sm8250-common: Build fastcharge implementation Change-Id: I3e6994d2c2f419dc8ce98a060204fda3dd16df81 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/136d369c4ef13c52fe4cecb3bbda45df8b6eee4d sm8250-common: Sepolicy: Label FastCharge more general https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/7a619945ca3b9bf284a1cfdd4063b864bf5e5290 sm8250-common: Sepolicy: Fastcharge: Provide needed permissions https: //github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/298ff28a2ab9c04f953780958de6a8971a947c51 batterysecret hack https://github.com/VILI-AS-STUDIOS/device_xiaomi_sm8350-common/commit/51ebc8de81b7ca2f60f932b6a7614619ef93a68a Co-Authored-By: Ivan Martynov <johnivan19999@gmail.com> Co-Authored-By: Bruno Martins <1696148+bgcngm@users.noreply.github.com> Co-Authored-By: Francescodario Cuzzocrea <bosconovic@gmail.com> Co-Authored-By: Davide Garberi <dade.garberi@gmail.com> Co-Authored-By: Mohammed Althaf Thayyil <me@althafvly.com> Co-Authored-By: blazerpaul15 <107421375+blazerpaul15@users.noreply.github.com> Signed-off-by: Arijit78 <sahaarijit2007@gmail.com>
2024-05-12 11:15:39 +02:00
namespace vendor {
namespace lineage {
namespace fastcharge {
namespace V1_0 {
namespace implementation {
static constexpr const char *kFastChargingProp = "persist.vendor.sec.fastchg_enabled";
static constexpr bool FASTCHARGE_DEFAULT_SETTING = true;
[SQUASH] stone: fastcharge implementation this commit contains following commits to introduce the fastcharge toggle for stone device that use this tree they were renamed from sm8250-common to stone sm8250-common: add fastcharge implementation * Disabling fast charge may be useful for reducing the heat produced by the device while charging, or for extending the lifespan of the battery * This commit introduces the fastcharge HIDL, which writes in the node /sys/class/qcom-battery/restrict_chg 0 or 1 depeding on user selection. 0 means that fastcharge is enabled, while 1 means that fastcharge is disabled Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb Signed-off-by: Davide Garberi <dade.garberi@gmail.com> Signed-off-by: althafvly <althafvly@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/6510782439cedeb20fd75c99f264d44e5869b086 sm8250-common: fastcharge: Make user setting persistent Change-Id: I4ff051d6f9685e94022eab32035bfe86a65264b8 Signed-off-by: Davide Garberi <dade.garberi@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/e050f0dab00d0ec22d619e180f1fee2aa5ebc984 sm8250-common: fastcharge: Use pragma once Change-Id: I9a9e193a6f66f045f41394d059af8b71778e8d72 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/ff8e5f6173f613a8f28559adf4d652ef0348d64b sm8250-common: fastcharge: Migrate to blueprint Change-Id: I200fd6c685183c98f0815b207adae5aa75a37238 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/4e0d22f4863bde7ef6c68b54e345374e650b542f sm8250-common: Build fastcharge implementation Change-Id: I3e6994d2c2f419dc8ce98a060204fda3dd16df81 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/136d369c4ef13c52fe4cecb3bbda45df8b6eee4d sm8250-common: Sepolicy: Label FastCharge more general https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/7a619945ca3b9bf284a1cfdd4063b864bf5e5290 sm8250-common: Sepolicy: Fastcharge: Provide needed permissions https: //github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/298ff28a2ab9c04f953780958de6a8971a947c51 batterysecret hack https://github.com/VILI-AS-STUDIOS/device_xiaomi_sm8350-common/commit/51ebc8de81b7ca2f60f932b6a7614619ef93a68a Co-Authored-By: Ivan Martynov <johnivan19999@gmail.com> Co-Authored-By: Bruno Martins <1696148+bgcngm@users.noreply.github.com> Co-Authored-By: Francescodario Cuzzocrea <bosconovic@gmail.com> Co-Authored-By: Davide Garberi <dade.garberi@gmail.com> Co-Authored-By: Mohammed Althaf Thayyil <me@althafvly.com> Co-Authored-By: blazerpaul15 <107421375+blazerpaul15@users.noreply.github.com> Signed-off-by: Arijit78 <sahaarijit2007@gmail.com>
2024-05-12 11:15:39 +02:00
FastCharge::FastCharge() {
android::base::SetProperty(kFastChargingProp, "true");
[SQUASH] stone: fastcharge implementation this commit contains following commits to introduce the fastcharge toggle for stone device that use this tree they were renamed from sm8250-common to stone sm8250-common: add fastcharge implementation * Disabling fast charge may be useful for reducing the heat produced by the device while charging, or for extending the lifespan of the battery * This commit introduces the fastcharge HIDL, which writes in the node /sys/class/qcom-battery/restrict_chg 0 or 1 depeding on user selection. 0 means that fastcharge is enabled, while 1 means that fastcharge is disabled Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb Signed-off-by: Davide Garberi <dade.garberi@gmail.com> Signed-off-by: althafvly <althafvly@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/6510782439cedeb20fd75c99f264d44e5869b086 sm8250-common: fastcharge: Make user setting persistent Change-Id: I4ff051d6f9685e94022eab32035bfe86a65264b8 Signed-off-by: Davide Garberi <dade.garberi@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/e050f0dab00d0ec22d619e180f1fee2aa5ebc984 sm8250-common: fastcharge: Use pragma once Change-Id: I9a9e193a6f66f045f41394d059af8b71778e8d72 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/ff8e5f6173f613a8f28559adf4d652ef0348d64b sm8250-common: fastcharge: Migrate to blueprint Change-Id: I200fd6c685183c98f0815b207adae5aa75a37238 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/4e0d22f4863bde7ef6c68b54e345374e650b542f sm8250-common: Build fastcharge implementation Change-Id: I3e6994d2c2f419dc8ce98a060204fda3dd16df81 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/136d369c4ef13c52fe4cecb3bbda45df8b6eee4d sm8250-common: Sepolicy: Label FastCharge more general https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/7a619945ca3b9bf284a1cfdd4063b864bf5e5290 sm8250-common: Sepolicy: Fastcharge: Provide needed permissions https: //github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/298ff28a2ab9c04f953780958de6a8971a947c51 batterysecret hack https://github.com/VILI-AS-STUDIOS/device_xiaomi_sm8350-common/commit/51ebc8de81b7ca2f60f932b6a7614619ef93a68a Co-Authored-By: Ivan Martynov <johnivan19999@gmail.com> Co-Authored-By: Bruno Martins <1696148+bgcngm@users.noreply.github.com> Co-Authored-By: Francescodario Cuzzocrea <bosconovic@gmail.com> Co-Authored-By: Davide Garberi <dade.garberi@gmail.com> Co-Authored-By: Mohammed Althaf Thayyil <me@althafvly.com> Co-Authored-By: blazerpaul15 <107421375+blazerpaul15@users.noreply.github.com> Signed-off-by: Arijit78 <sahaarijit2007@gmail.com>
2024-05-12 11:15:39 +02:00
system("start batterysecret");
[SQUASH] stone: fastcharge implementation this commit contains following commits to introduce the fastcharge toggle for stone device that use this tree they were renamed from sm8250-common to stone sm8250-common: add fastcharge implementation * Disabling fast charge may be useful for reducing the heat produced by the device while charging, or for extending the lifespan of the battery * This commit introduces the fastcharge HIDL, which writes in the node /sys/class/qcom-battery/restrict_chg 0 or 1 depeding on user selection. 0 means that fastcharge is enabled, while 1 means that fastcharge is disabled Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb Signed-off-by: Davide Garberi <dade.garberi@gmail.com> Signed-off-by: althafvly <althafvly@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/6510782439cedeb20fd75c99f264d44e5869b086 sm8250-common: fastcharge: Make user setting persistent Change-Id: I4ff051d6f9685e94022eab32035bfe86a65264b8 Signed-off-by: Davide Garberi <dade.garberi@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/e050f0dab00d0ec22d619e180f1fee2aa5ebc984 sm8250-common: fastcharge: Use pragma once Change-Id: I9a9e193a6f66f045f41394d059af8b71778e8d72 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/ff8e5f6173f613a8f28559adf4d652ef0348d64b sm8250-common: fastcharge: Migrate to blueprint Change-Id: I200fd6c685183c98f0815b207adae5aa75a37238 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/4e0d22f4863bde7ef6c68b54e345374e650b542f sm8250-common: Build fastcharge implementation Change-Id: I3e6994d2c2f419dc8ce98a060204fda3dd16df81 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/136d369c4ef13c52fe4cecb3bbda45df8b6eee4d sm8250-common: Sepolicy: Label FastCharge more general https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/7a619945ca3b9bf284a1cfdd4063b864bf5e5290 sm8250-common: Sepolicy: Fastcharge: Provide needed permissions https: //github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/298ff28a2ab9c04f953780958de6a8971a947c51 batterysecret hack https://github.com/VILI-AS-STUDIOS/device_xiaomi_sm8350-common/commit/51ebc8de81b7ca2f60f932b6a7614619ef93a68a Co-Authored-By: Ivan Martynov <johnivan19999@gmail.com> Co-Authored-By: Bruno Martins <1696148+bgcngm@users.noreply.github.com> Co-Authored-By: Francescodario Cuzzocrea <bosconovic@gmail.com> Co-Authored-By: Davide Garberi <dade.garberi@gmail.com> Co-Authored-By: Mohammed Althaf Thayyil <me@althafvly.com> Co-Authored-By: blazerpaul15 <107421375+blazerpaul15@users.noreply.github.com> Signed-off-by: Arijit78 <sahaarijit2007@gmail.com>
2024-05-12 11:15:39 +02:00
}
android::hardware::Return<bool> FastCharge::isEnabled() {
return android::hardware::Return<bool>(android::base::GetBoolProperty(kFastChargingProp, false));
[SQUASH] stone: fastcharge implementation this commit contains following commits to introduce the fastcharge toggle for stone device that use this tree they were renamed from sm8250-common to stone sm8250-common: add fastcharge implementation * Disabling fast charge may be useful for reducing the heat produced by the device while charging, or for extending the lifespan of the battery * This commit introduces the fastcharge HIDL, which writes in the node /sys/class/qcom-battery/restrict_chg 0 or 1 depeding on user selection. 0 means that fastcharge is enabled, while 1 means that fastcharge is disabled Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb Signed-off-by: Davide Garberi <dade.garberi@gmail.com> Signed-off-by: althafvly <althafvly@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/6510782439cedeb20fd75c99f264d44e5869b086 sm8250-common: fastcharge: Make user setting persistent Change-Id: I4ff051d6f9685e94022eab32035bfe86a65264b8 Signed-off-by: Davide Garberi <dade.garberi@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/e050f0dab00d0ec22d619e180f1fee2aa5ebc984 sm8250-common: fastcharge: Use pragma once Change-Id: I9a9e193a6f66f045f41394d059af8b71778e8d72 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/ff8e5f6173f613a8f28559adf4d652ef0348d64b sm8250-common: fastcharge: Migrate to blueprint Change-Id: I200fd6c685183c98f0815b207adae5aa75a37238 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/4e0d22f4863bde7ef6c68b54e345374e650b542f sm8250-common: Build fastcharge implementation Change-Id: I3e6994d2c2f419dc8ce98a060204fda3dd16df81 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/136d369c4ef13c52fe4cecb3bbda45df8b6eee4d sm8250-common: Sepolicy: Label FastCharge more general https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/7a619945ca3b9bf284a1cfdd4063b864bf5e5290 sm8250-common: Sepolicy: Fastcharge: Provide needed permissions https: //github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/298ff28a2ab9c04f953780958de6a8971a947c51 batterysecret hack https://github.com/VILI-AS-STUDIOS/device_xiaomi_sm8350-common/commit/51ebc8de81b7ca2f60f932b6a7614619ef93a68a Co-Authored-By: Ivan Martynov <johnivan19999@gmail.com> Co-Authored-By: Bruno Martins <1696148+bgcngm@users.noreply.github.com> Co-Authored-By: Francescodario Cuzzocrea <bosconovic@gmail.com> Co-Authored-By: Davide Garberi <dade.garberi@gmail.com> Co-Authored-By: Mohammed Althaf Thayyil <me@althafvly.com> Co-Authored-By: blazerpaul15 <107421375+blazerpaul15@users.noreply.github.com> Signed-off-by: Arijit78 <sahaarijit2007@gmail.com>
2024-05-12 11:15:39 +02:00
}
android::hardware::Return<bool> FastCharge::setEnabled(bool enable) {
android::base::SetProperty(kFastChargingProp, enable ? "true" : "false");
[SQUASH] stone: fastcharge implementation this commit contains following commits to introduce the fastcharge toggle for stone device that use this tree they were renamed from sm8250-common to stone sm8250-common: add fastcharge implementation * Disabling fast charge may be useful for reducing the heat produced by the device while charging, or for extending the lifespan of the battery * This commit introduces the fastcharge HIDL, which writes in the node /sys/class/qcom-battery/restrict_chg 0 or 1 depeding on user selection. 0 means that fastcharge is enabled, while 1 means that fastcharge is disabled Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb Signed-off-by: Davide Garberi <dade.garberi@gmail.com> Signed-off-by: althafvly <althafvly@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/6510782439cedeb20fd75c99f264d44e5869b086 sm8250-common: fastcharge: Make user setting persistent Change-Id: I4ff051d6f9685e94022eab32035bfe86a65264b8 Signed-off-by: Davide Garberi <dade.garberi@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/e050f0dab00d0ec22d619e180f1fee2aa5ebc984 sm8250-common: fastcharge: Use pragma once Change-Id: I9a9e193a6f66f045f41394d059af8b71778e8d72 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/ff8e5f6173f613a8f28559adf4d652ef0348d64b sm8250-common: fastcharge: Migrate to blueprint Change-Id: I200fd6c685183c98f0815b207adae5aa75a37238 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/4e0d22f4863bde7ef6c68b54e345374e650b542f sm8250-common: Build fastcharge implementation Change-Id: I3e6994d2c2f419dc8ce98a060204fda3dd16df81 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/136d369c4ef13c52fe4cecb3bbda45df8b6eee4d sm8250-common: Sepolicy: Label FastCharge more general https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/7a619945ca3b9bf284a1cfdd4063b864bf5e5290 sm8250-common: Sepolicy: Fastcharge: Provide needed permissions https: //github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/298ff28a2ab9c04f953780958de6a8971a947c51 batterysecret hack https://github.com/VILI-AS-STUDIOS/device_xiaomi_sm8350-common/commit/51ebc8de81b7ca2f60f932b6a7614619ef93a68a Co-Authored-By: Ivan Martynov <johnivan19999@gmail.com> Co-Authored-By: Bruno Martins <1696148+bgcngm@users.noreply.github.com> Co-Authored-By: Francescodario Cuzzocrea <bosconovic@gmail.com> Co-Authored-By: Davide Garberi <dade.garberi@gmail.com> Co-Authored-By: Mohammed Althaf Thayyil <me@althafvly.com> Co-Authored-By: blazerpaul15 <107421375+blazerpaul15@users.noreply.github.com> Signed-off-by: Arijit78 <sahaarijit2007@gmail.com>
2024-05-12 11:15:39 +02:00
if (enable) {
system("start batterysecret");
} else {
system("stop batterysecret");
}
[SQUASH] stone: fastcharge implementation this commit contains following commits to introduce the fastcharge toggle for stone device that use this tree they were renamed from sm8250-common to stone sm8250-common: add fastcharge implementation * Disabling fast charge may be useful for reducing the heat produced by the device while charging, or for extending the lifespan of the battery * This commit introduces the fastcharge HIDL, which writes in the node /sys/class/qcom-battery/restrict_chg 0 or 1 depeding on user selection. 0 means that fastcharge is enabled, while 1 means that fastcharge is disabled Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb Signed-off-by: Davide Garberi <dade.garberi@gmail.com> Signed-off-by: althafvly <althafvly@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/6510782439cedeb20fd75c99f264d44e5869b086 sm8250-common: fastcharge: Make user setting persistent Change-Id: I4ff051d6f9685e94022eab32035bfe86a65264b8 Signed-off-by: Davide Garberi <dade.garberi@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/e050f0dab00d0ec22d619e180f1fee2aa5ebc984 sm8250-common: fastcharge: Use pragma once Change-Id: I9a9e193a6f66f045f41394d059af8b71778e8d72 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/ff8e5f6173f613a8f28559adf4d652ef0348d64b sm8250-common: fastcharge: Migrate to blueprint Change-Id: I200fd6c685183c98f0815b207adae5aa75a37238 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/4e0d22f4863bde7ef6c68b54e345374e650b542f sm8250-common: Build fastcharge implementation Change-Id: I3e6994d2c2f419dc8ce98a060204fda3dd16df81 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/136d369c4ef13c52fe4cecb3bbda45df8b6eee4d sm8250-common: Sepolicy: Label FastCharge more general https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/7a619945ca3b9bf284a1cfdd4063b864bf5e5290 sm8250-common: Sepolicy: Fastcharge: Provide needed permissions https: //github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/298ff28a2ab9c04f953780958de6a8971a947c51 batterysecret hack https://github.com/VILI-AS-STUDIOS/device_xiaomi_sm8350-common/commit/51ebc8de81b7ca2f60f932b6a7614619ef93a68a Co-Authored-By: Ivan Martynov <johnivan19999@gmail.com> Co-Authored-By: Bruno Martins <1696148+bgcngm@users.noreply.github.com> Co-Authored-By: Francescodario Cuzzocrea <bosconovic@gmail.com> Co-Authored-By: Davide Garberi <dade.garberi@gmail.com> Co-Authored-By: Mohammed Althaf Thayyil <me@althafvly.com> Co-Authored-By: blazerpaul15 <107421375+blazerpaul15@users.noreply.github.com> Signed-off-by: Arijit78 <sahaarijit2007@gmail.com>
2024-05-12 11:15:39 +02:00
return android::hardware::Return<bool>(enable);
[SQUASH] stone: fastcharge implementation this commit contains following commits to introduce the fastcharge toggle for stone device that use this tree they were renamed from sm8250-common to stone sm8250-common: add fastcharge implementation * Disabling fast charge may be useful for reducing the heat produced by the device while charging, or for extending the lifespan of the battery * This commit introduces the fastcharge HIDL, which writes in the node /sys/class/qcom-battery/restrict_chg 0 or 1 depeding on user selection. 0 means that fastcharge is enabled, while 1 means that fastcharge is disabled Change-Id: I369ba9c437b3a83a88c2ce74d603b7d7ddd9cfbb Signed-off-by: Davide Garberi <dade.garberi@gmail.com> Signed-off-by: althafvly <althafvly@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/6510782439cedeb20fd75c99f264d44e5869b086 sm8250-common: fastcharge: Make user setting persistent Change-Id: I4ff051d6f9685e94022eab32035bfe86a65264b8 Signed-off-by: Davide Garberi <dade.garberi@gmail.com> https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/e050f0dab00d0ec22d619e180f1fee2aa5ebc984 sm8250-common: fastcharge: Use pragma once Change-Id: I9a9e193a6f66f045f41394d059af8b71778e8d72 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/ff8e5f6173f613a8f28559adf4d652ef0348d64b sm8250-common: fastcharge: Migrate to blueprint Change-Id: I200fd6c685183c98f0815b207adae5aa75a37238 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/4e0d22f4863bde7ef6c68b54e345374e650b542f sm8250-common: Build fastcharge implementation Change-Id: I3e6994d2c2f419dc8ce98a060204fda3dd16df81 https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/136d369c4ef13c52fe4cecb3bbda45df8b6eee4d sm8250-common: Sepolicy: Label FastCharge more general https://github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/7a619945ca3b9bf284a1cfdd4063b864bf5e5290 sm8250-common: Sepolicy: Fastcharge: Provide needed permissions https: //github.com/kamikaonashi/device_xiaomi_sm8250-common/commit/298ff28a2ab9c04f953780958de6a8971a947c51 batterysecret hack https://github.com/VILI-AS-STUDIOS/device_xiaomi_sm8350-common/commit/51ebc8de81b7ca2f60f932b6a7614619ef93a68a Co-Authored-By: Ivan Martynov <johnivan19999@gmail.com> Co-Authored-By: Bruno Martins <1696148+bgcngm@users.noreply.github.com> Co-Authored-By: Francescodario Cuzzocrea <bosconovic@gmail.com> Co-Authored-By: Davide Garberi <dade.garberi@gmail.com> Co-Authored-By: Mohammed Althaf Thayyil <me@althafvly.com> Co-Authored-By: blazerpaul15 <107421375+blazerpaul15@users.noreply.github.com> Signed-off-by: Arijit78 <sahaarijit2007@gmail.com>
2024-05-12 11:15:39 +02:00
}
} // namespace implementation
} // namespace V1_0
} // namespace fastcharge
} // namespace lineage
} // namespace vendor