From e7168d9f5b4f6252831380a001a8a9a3b2d32363 Mon Sep 17 00:00:00 2001
From: ronnie <ronnie@industiosoft.com>
Date: Sun, 23 Oct 2022 09:19:20 +0000
Subject: [PATCH] set battery 100% default

---
 android/system/core/healthd/BatteryMonitor.cpp |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/android/system/core/healthd/BatteryMonitor.cpp b/android/system/core/healthd/BatteryMonitor.cpp
index 06c8176..c88e90d 100644
--- a/android/system/core/healthd/BatteryMonitor.cpp
+++ b/android/system/core/healthd/BatteryMonitor.cpp
@@ -72,7 +72,7 @@
     props->batteryStatus = BATTERY_STATUS_UNKNOWN;
     props->batteryHealth = BATTERY_HEALTH_UNKNOWN;
     props->batteryPresent = false;
-    props->batteryLevel = 0;
+    props->batteryLevel = 100;
     props->batteryVoltage = 0;
     props->batteryTemperature = 0;
     props->batteryCurrent = 0;
@@ -210,9 +210,10 @@
     else
         props.batteryPresent = mBatteryDevicePresent;
 
-    props.batteryLevel = mBatteryFixedCapacity ?
-        mBatteryFixedCapacity :
-        getIntField(mHealthdConfig->batteryCapacityPath);
+    //props.batteryLevel = mBatteryFixedCapacity ?
+    //    mBatteryFixedCapacity :
+    //    getIntField(mHealthdConfig->batteryCapacityPath);
+     props.batteryLevel = 100;
     props.batteryVoltage = getIntField(mHealthdConfig->batteryVoltagePath) / 1000;
 
     if (!mHealthdConfig->batteryCurrentNowPath.isEmpty())

--
Gitblit v1.6.2