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

Skip to content
Commit 42f96bfd authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Fix issue where async code in Telecom wasn't ACTUALLY async.

Telecom used an AsyncTask (which is deprecated) to update the emergency
call notification when carrier config changes or block suppression state
changes are reported from the blocked numbers provider.  EXCEPT the way
the AsyncTask code was used, it was NOT actually doing this work async.
The code should have called
`new UpdateEmergencyCallNotificationTask().execute`, not doInBackground.

Since AsyncTask is deprecated and Telecom has an async executor for this
kind of thing now, changing to use the async task executor.

Also doing some minor refactoring on static dependencies to make it
possible to unit test these changes.

Test: Add new unit tests for broadcast handling.
Test: Run existing telecom tests to verify no regression.
Test: Make test emergency call with unknown number blocking enabled
and verify notification is posted.
Test: From blocked number settings screen, reenable blocked number
functionality and verify notification is removed.
Fixes: 274540300

Change-Id: Id836df7cbe71b57f4d318cd588a8a0965b95c06c
parent cb20ad6e
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