Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14d2be6b authored by dhacker29's avatar dhacker29
Browse files

Fix mismerge of implement 1% battery on select devices

Change-Id: I2dcafba2c39f50cf435b90ca261b325c10fd5b6b
parent a2419d4b
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -352,9 +352,6 @@ int register_android_server_BatteryService(JNIEnv* env)
                if (access(path, R_OK) == 0)
                    gPaths.batteryPresentPath = path;
                path.clear();
                path.appendFormat("%s/%s/capacity", POWER_SUPPLY_PATH, name);
                if (access(path, R_OK) == 0)
                    gPaths.batteryCapacityPath = path;

                /* For some weird, unknown reason Motorola phones provide
                * capacity information only in 10% steps in the 'capacity'
@@ -368,11 +365,11 @@ int register_android_server_BatteryService(JNIEnv* env)
                    && (!strcmp(valueChargeCounter, "1"))) {
                   path.appendFormat("%s/%s/charge_counter", POWER_SUPPLY_PATH, name);
                   if (access(path, R_OK) == 0)
                       gPaths.batteryCapacityPath = strdup(path);
                       gPaths.batteryCapacityPath = path;
                } else {
                    path.appendFormat("%s/%s/capacity", POWER_SUPPLY_PATH, name);
                    if (access(path, R_OK) == 0)
                        gPaths.batteryCapacityPath = strdup(path);
                        gPaths.batteryCapacityPath = path;
                }