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

Commit 16f56e8c authored by Wei Wang's avatar Wei Wang Committed by Android (Google) Code Review
Browse files

Merge "Fix powerhint for NULL parameter"

parents 3cb3b55c e0c1bbbe
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -44,8 +44,12 @@ Return<void> Power::setInteractive(bool interactive) {

Return<void> Power::powerHint(PowerHint hint, int32_t data)  {
    int32_t param = data;
    if (mModule->powerHint > 0)
    if (mModule->powerHint > 0) {
        if (data)
            mModule->powerHint(mModule, static_cast<power_hint_t>(hint), &param);
        else
            mModule->powerHint(mModule, static_cast<power_hint_t>(hint), NULL);
    }
    return Void();
}