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

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

Stop using CannotDeliverBroadcastException

This is a squashed CL. Due to significant BroadcastQueue rearchitecture
in master branch, the original CL can't be directly cherry-picked here.

This CL combines code from the following CLs:

ag/20498660 Stop using CannotDeliverBroadcastException
ag/20516440 Add killing subreason for undelivered broadcast

=== Original commit message ===

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 ApplicationExitInfoTest
Test: atest BroadcastQueueTest
Test: observe app is killed gently on failed broadcast (instead of
crash)
Test: use up async buffer, broadcast & dumpsys activity exit-info
Change-Id: I93aabe99167105111f9f3bd945cf4977cfb8cdb1
Merged-In: I93aabe99167105111f9f3bd945cf4977cfb8cdb1
parent 31944123
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