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

Unverified Commit 0159cf05 authored by Gabriele M's avatar Gabriele M Committed by Michael Bestas
Browse files

PowerManager: don't pass NULL pointers to power HAL (2)

The framework can now send the expected duration of the user
interaction along with POWER_HINT_INTERACTION, or zero if unknown.

Similarily to commit ecb6fdda ("PowerManager: don't pass NULL
pointers to power HAL") pass a pointer to a variabile of null value
rather than a NULL pointer.

Change-Id: I019ef3c910d9b501a77e7c03e34841f9d742f0ce
parent 4babf176
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -70,7 +70,8 @@ static bool checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodNa
void android_server_PowerManagerService_userActivity(nsecs_t eventTime, int32_t eventType) {
    // Tell the power HAL when user activity occurs.
    if (gPowerModule && gPowerModule->powerHint) {
        gPowerModule->powerHint(gPowerModule, POWER_HINT_INTERACTION, NULL);
        int data_param = 0;
        gPowerModule->powerHint(gPowerModule, POWER_HINT_INTERACTION, &data_param);
    }

    if (gPowerManagerServiceObj) {