android_packages_modules_Co.../tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Chalard Jean f34735ebdc Fix : crash ConnectivityService when PendingIntent is canceled
PendingIntent.send will throw CanceledException when the intent
can't be sent, because it was canceled or some other reason. In
some, but not all of these cases, it will still call onSendFinished
after the send is done. This means there is no way to be sure
to do something exactly once after the intent is sent.

Unfortunately, ConnectivityService must keep a wakelock until
sent is finished, and wakelocks must be released exactly once.
Too bad.

The simplest solution is to create a specialized listener object
that can manage the lifecycle of the wakelock. This allows
very localized code, easy review and checking, cheap thread
safety, and not creating multiple locks. It also avoids the
ConnectivityService class implementing OnFinished itself,
which is arguably not very readable considering how big
the class is.

Test: new test that crashes the system without the patch
Fixes: 390043283
Change-Id: Ice528eddaedb4d663098eb2bb0ae7183dafbc073
2025-02-27 11:46:06 +09:00
..
benchmark [DON'T BLOCK] Test ownership migration rules 2024-01-31 14:10:00 +00:00
common Merge changes Icecb889a,Id06116ad into main 2024-12-12 16:08:35 -08:00
cts Fix : crash ConnectivityService when PendingIntent is canceled 2025-02-27 11:46:06 +09:00
deflake Remove dependencies on the 1-variant fallback 2024-10-22 16:31:00 -07:00
integration Listen to permission changes in permission monitor 2025-02-07 15:08:09 -05:00
native Remove unused libprocessgroup dependency 2025-01-17 11:20:39 -08:00
smoketest [DON'T BLOCK] Test ownership migration rules 2024-01-31 14:10:00 +00:00
unit Merge changes Icf49147d,I622c86fe,I3e789541 into main 2025-02-10 16:54:47 -08:00