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

Skip to content
Commit a0c92d49 authored by Vairavan Srinivasan's avatar Vairavan Srinivasan
Browse files

Fix for the race in Wallpaperservice

Wallpaperservice has a race among message handler of
DO_DETACH and service's onDestroy. In certain cases,
the engine kept track in mActiveEngies is removed by
message handler of DO_DETACH and service's onDestroy
doesn't get an entry in mActiveEngines and isn't able
to invoke detach on it. This keeps the broadcast
receiver mReceiver active and causes the framework to
report a leak and unregister the receiver.

Meanwhile, the message handler of DO_DETACH continues
and invokes detach on the mEngine, which tries to
unregister the receiver, mReceiver and framework throws
an exception "Receiver not registered" and causes the
framework to reboot.

In case of system_server, WindowManagerPolicy and
android.server.ServerThread contest for access of
shared members. Fix is to protect the critical section
with a synchronized block.

Change-Id: I506b9453aecb0a121c2029443ae9c175d7c12af6
parent f82fa927
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