Add test to ensure scan doesn't skip newly inserted file

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.
This CL adds a test to verify that (3) doesn't skip scanning the file
and updates the right metadata.

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

Change-Id: I6e3c438444082c8f161a63e1331b87c2e2e4d3d9
Merged-In: I6e3c438444082c8f161a63e1331b87c2e2e4d3d9
2 files changed