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

Skip to content
Commit ee010c02 authored by Nicolas Catania's avatar Nicolas Catania
Browse files

When the activity is destroyed, make sure any background thread is cancelled.

There was a race condition when the activity was destroyed when the background
thread was still running.
Before we release the handler, cancel any running thread, wait for it to
actually exit before purging the handler.
This code should be rewritten to use AsyncTask instead of raw threads
in my opinion.

Tested: I tried to import +100 vcard and make the app exit and it did not crash
however the current bug will show under high load. Need to wait for a monkey run
to confirm it is fixed.

Bug:2517391

Change-Id: I37e7619f6b93a8faa7da4506caffb9ed40e4f844
parent 6448da7f
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