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

Commit bde00465 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6269144 from b8c5a0f9 to rvc-release

Change-Id: Icf00721978651ecbf183ed02739bde82f8b66972
parents e1379356 b8c5a0f9
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -54,6 +54,21 @@ static hal_version connectPowerHalLocked() {
        return NONE;
    }

    if (gPowerHalHidlExists) {
        // (re)connect if handle is null
        if (!gPowerHal_1_2_) {
            gPowerHal_1_2_ =
                    android::hardware::power::V1_2::IPower::getService();
        }
        if (gPowerHal_1_2_) {
            ALOGI("Successfully connected to Power Hal Hidl service.");
            return HIDL_1_2;
        } else {
            // no more try on this handle
            gPowerHalHidlExists = false;
        }
    }

    if (gPowerHalAidlExists) {
        // (re)connect if handle is null
        if (!gPowerHal_Aidl_) {
@@ -70,21 +85,6 @@ static hal_version connectPowerHalLocked() {
        }
    }

    if (gPowerHalHidlExists) {
        // (re)connect if handle is null
        if (!gPowerHal_1_2_) {
            gPowerHal_1_2_ =
                    android::hardware::power::V1_2::IPower::getService();
        }
        if (gPowerHal_1_2_) {
            ALOGI("Successfully connected to Power Hal Hidl service.");
            return HIDL_1_2;
        } else {
            // no more try on this handle
            gPowerHalHidlExists = false;
        }
    }

    return NONE;
}