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
Loading
Please register or sign in to comment
