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

Commit f74c76e2 authored by Ivan Lozano's avatar Ivan Lozano Committed by android-build-merger
Browse files

Merge "Fix doFadingAnimationLocked in sanitized builds." am: 05284b6c

am: b327eb68

Change-Id: I109a08b8ae94cbeca28044f2c64c885a586f680a
parents 9853a653 b327eb68
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -551,18 +551,20 @@ bool PointerController::doFadingAnimationLocked(nsecs_t timestamp) {
    }

    // Animate spots that are fading out and being removed.
    for (size_t i = 0; i < mLocked.spots.size(); i++) {
    for (size_t i = 0; i < mLocked.spots.size();) {
        Spot* spot = mLocked.spots.itemAt(i);
        if (spot->id == Spot::INVALID_ID) {
            spot->alpha -= float(frameDelay) / SPOT_FADE_DURATION;
            if (spot->alpha <= 0) {
                mLocked.spots.removeAt(i--);
                mLocked.spots.removeAt(i);
                releaseSpotLocked(spot);
                continue;
            } else {
                spot->sprite->setAlpha(spot->alpha);
                keepAnimating = true;
            }
        }
        ++i;
    }
    return keepAnimating;
}