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

Skip to content
Commit 018d0702 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

GlobalActions: Fix possible race condition when showing dialog.

Depending on the presence of a previous dialog, the newly generated one
gets either immediately displayed (no old dialog) or shortly delayed
(after dismissal of the existing one).
If a new show event happens (by rapid fire of the power key, for instance,
using a keyboard with fast-repeating events) during that delay, a new
dialog will be immediately displayed, and when the delayed show triggers
it'll conflict with it (and bring everything down).

This moves the creation of the new Dialog object to _before_ showing
it (delayed or not), instead of the show method itself, to ensure the
object isn't clobbered by competing/sequential calls to handleShow()

Change-Id: Ie4d9a8507ebaf59da31869c38b98c3c98a74468e
parent 3827d424
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment