Merge "Fix doFadingAnimationLocked in sanitized builds."
am: 05284b6c6a
Change-Id: I5822b920fe1dec72f0f49af35256bfbf6d9474fa
This commit is contained in:
@@ -551,18 +551,20 @@ bool PointerController::doFadingAnimationLocked(nsecs_t timestamp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Animate spots that are fading out and being removed.
|
// 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);
|
Spot* spot = mLocked.spots.itemAt(i);
|
||||||
if (spot->id == Spot::INVALID_ID) {
|
if (spot->id == Spot::INVALID_ID) {
|
||||||
spot->alpha -= float(frameDelay) / SPOT_FADE_DURATION;
|
spot->alpha -= float(frameDelay) / SPOT_FADE_DURATION;
|
||||||
if (spot->alpha <= 0) {
|
if (spot->alpha <= 0) {
|
||||||
mLocked.spots.removeAt(i--);
|
mLocked.spots.removeAt(i);
|
||||||
releaseSpotLocked(spot);
|
releaseSpotLocked(spot);
|
||||||
|
continue;
|
||||||
} else {
|
} else {
|
||||||
spot->sprite->setAlpha(spot->alpha);
|
spot->sprite->setAlpha(spot->alpha);
|
||||||
keepAnimating = true;
|
keepAnimating = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
++i;
|
||||||
}
|
}
|
||||||
return keepAnimating;
|
return keepAnimating;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user