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

Commit a21e9455 authored by Mike Lockwood's avatar Mike Lockwood Committed by Mike Lockwood
Browse files

BatteryService: Don't fail to register native methods if kernel power supply driver is missing

parent 11ca3172
Loading
Loading
Loading
Loading
+59 −59
Original line number Diff line number Diff line
@@ -233,8 +233,7 @@ int register_android_server_BatteryService(JNIEnv* env)
    DIR* dir = opendir(POWER_SUPPLY_PATH);
    if (dir == NULL) {
        ALOGE("Could not open %s\n", POWER_SUPPLY_PATH);
        return -1;
    }
    } else {
        while ((entry = readdir(dir))) {
            const char* name = entry->d_name;

@@ -302,6 +301,7 @@ int register_android_server_BatteryService(JNIEnv* env)
            }
        }
        closedir(dir);
    }

    if (!gPaths.acOnlinePath)
        ALOGE("acOnlinePath not found");