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
tree: c0a00b9b4d52ff3dfeb50f5d894bad2d71389b00
  1. icing/
  2. java/
  3. nativeLib/
  4. proto/
  5. .gitignore
  6. Android.bp
  7. AndroidManifest.xml
  8. build.gradle
  9. CMakeLists.txt
  10. CONTRIBUTING.md
  11. LICENSE
  12. METADATA
  13. MODULE_LICENSE_APACHE2
  14. README.md
  15. synced_AOSP_CL_number.txt
  16. TEST_MAPPING
README.md

Icing Search Library

Icing is a fast, embedded, mobile-friendly full-text-search library written in C++.

This is not an officially supported Google product.