Add generation numbers to the metadata for each media item. This is
useful for apps that are attempting to quickly identify exactly
which media items have changed since a previous point in
time. Generation numbers are monotonically increasing over time, and
can be safely arithmetically compared.
Detecting media changes using generation numbers is more robust than
using DATE_MODIFIED, since those values may change in unexpected
ways when apps use File.setLastModified() or when the system clock
is set incorrectly.
This is implemented by ensuring that all mutations to go through
our local SQLiteQueryBuilder, which then forces those mutations to
always happen inside an active transaction. Then each time we
create a transaction, we increment the generation counter, and
force-copy the current generation into any mutation operations.
This design also means that all mutations that should affect the
generation counter must go through DatabaseHelper to ensure that
the logic above is applied; there's mechanical refactoring across
MediaProvider to accomplish this.
Fix bug in getWritableDatabase() that could return a readable
database. Fix bug in LegacyMediaProvider to create missing
directories. Adjust logging script to enable log cleaner SQL from
SQLQueryBuilder instead of noisy raw logs.
Bug: 140248585
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: If87f586e2340688ea1716682de20ee40c0d2b953
Currently, only support the three elements in the config that are
known to be used.
Bug: 138306002
Test: builds, boots
Test: atest FrameworksTelephonyTests
Change-Id: I1d231ec2ddcff97c039bcbc815a39c1d3e26c410
The service is already registered in ServiceManager. It needs to be
accessible from SystemServiceRegistry so that other mainline modules
can communicate with it.
Bug: 147255753
Test: Dependent CLs using the service
Change-Id: I940c62064466c3b3b8d2a195b810e90eaade7e6c
Merged-In: I940c62064466c3b3b8d2a195b810e90eaade7e6c
This API is for TunerResourceManager to get the callingPid of a TIS
client from TIF with the sessionId provided by TIS when TIS requests
resources from the TunerResourceManager.
This CL is also handling the creating and storing mechanism of the
sessionId.
The sessionId is provided by TIF when TIS created session through
TIF.
The sessionId to clientPid mapping is saved in a global map
in TIF service.
It is passed to the vendor TIS through new public API
onCreateSession(inputId, sessionId)/onCreateRecordingSession(inputId,
sessionId).
Test: Run with CTS on Cuttlefish
Bug: 147380882
Change-Id: I344a812add4a9637bf7eb226e5e4e3ead5b456a2