Unified content notifications.
All the various code that can trigger notifications was messy; it
often tried to guess if it was inside a transaction to improve
performance, but many cases had been missed.
This change collects all notifications when inside a transaction,
and then dispatches a single notification with the common prefix
when that transaction succeeds.
Since media items can be exposed through multiple collections or
views, we need to notify all relevant views. This change also
unifies that logic in a single place for consistency.
Bug: 128787096
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I0996cc0c09bda985b0000642a54888a517d94e04
2 files changed