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

Skip to content
Commit 3dc5a4b1 authored by Li Li's avatar Li Li
Browse files

Stop using CannotDeliverBroadcastException

This crash behavior was introduced a long time ago to show a crash
dialog if the broadcast couldn't be delivered (b/28196243). Android
has changed a lot since then. The crash dialog won't be shown to the
user as it impacts user experience, especially when the app is in the
background.

Furthermore, this CannotDeliverBroadcastException crashes the app with
the same callstack, without any useful information for app developers
to debug the issue. And it pollutes the app crashlytics stats in a
negative way so app developers choose to suppress it (b/245258072).

This exception is hidden and not documented at developers.android.com.
Let's stop sending it to apps. Kill the app gently instead (as what's
already mentioned in the comments).

Bug: 239419108
Test: atest BroadcastQueueTest
Test: observe app is killed gently on failed broadcast (instead of crash)
Change-Id: I93aabe99167105111f9f3bd945cf4977cfb8cdb1
parent c68b02a3
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