Android 12.0.0 release 21
Switch to PWrite to grow underlying file in FileBackedVector.
Modify file-backed-vector to 1) include a check that the size of the
file is greater than or equal to the number of elements *
sizeof(element) and 2) use PWrite to force the system to allocate disk
blocks so that we avoid the risk of trying to mmap a region of the file
that the system hasn't allocated a block for (and is unable to do so).
Bug: 191444782
Test: framework presubmit
Test: manually copied change to google3 and ran all icing lib c++ tests
Test: Unit tests added to FileBackedVectorTest
Change-Id: I1134df4becf246e0a9e170b80ee62c37383f8d7b
3 files changed