Identify modifier of database row to make scan/no-scan decision

Legacy apps sometimes follow below steps to create/publish file
1) Create and write to the file via file path operations
2) Insert the new file to database and/or
3) Scan the file to update metadata
If legacy app does both (2) and (3) scanFile will not update the file
metadata because DATE_MODIFIED and file size column values match with
lastModifiedTime and size of the file.

To fix this issue, in this CL, we add a new column which identifies the
last modifier of the database row. If the last modifier of the row is
not media scan, we consider the row has changed, and we scan the file
again.

Bug: 171854824
Test: atest
android.scopedstorage.cts.host.LegacyStorageHostTest#testScanUpdatesMetadataForNewlyAddedFile_hasRW

Change-Id: I6c021fe52c1c3fd1158c16360bd8ad96e7cc2ba2
Merged-In: I6c021fe52c1c3fd1158c16360bd8ad96e7cc2ba2
4 files changed