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

Commit 4be257e0 authored by Marcus Oakland's avatar Marcus Oakland Committed by Patrick Jacques
Browse files

Prevent key dispatch ANR on rapid change of orientation.

Rapidly opening and closing the keyboard slider while playing a
track on the music player and touching the screen to start the key
dispatch timer, an ANR could occur because the 500ms timeout occured
with mWasFrozen true, causing waitedFor to be set to zero and mWasFrozen
to be set to false. If the 500ms timeout then occured again before the
mWasFrozen frozen flag was set to true again, the value of waitedFor
was recalculated and if this indicated that the keyDispatchingTimeout
had elapsed then a "key dispatching" ANR was raised. The intention was
to restart the timeout checks if we were frozen during configuration
change, and this is properly achieved by setting startTime to the
current time so that the subsequent recalculation of waitedFor is from
this new point.

Change-Id: I6626c4bfff82ebe3d3401fed15263d09fe2b69ad
parent 096ab5eb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment