summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorHoward Chen <howardsoc@google.com>2021-03-17 12:52:05 +0800
committerHoward Chen <howardsoc@google.com>2021-03-22 11:48:18 +0000
commite11bcc6c930c19777074300a7cbc6e425ca2c933 (patch)
tree95dd61e4508e2b4e6622d0e57055ef4696382132 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent7a2f9c06ca86d280ad6e8501ceb0070d2a1987b3 (diff)
Replace copy-on-write PDB with an empty one
This is follow-up for aosp/1549486. It replaces the copy-on-write PDB with an empty PDB created by the gsid because exposing the real PDB in the DSU mode is unnecessary. The empty PDB will triggers formatting during boot. To support this, we replace all OutputStream operations with FileChannel operations backed by a RandomAccessFile to avoid the backing file to be truncated during formatting. This also simplify the current implementation which mixes OutputStream and FileChannel. We appened a FileChannel.force() to FileChannel operations because the PDB can be a raw block or a backing file on a file system. The force method can make sure the file system cache is flushed. Bug: 175852148 Test: vts-tradefed run vts -m vts_kernel_net_tests Test: gts-tradefed run gts -m GtsOemLockServiceTestCases -t com.google.android.oemlock.gts.OemLockServiceTest Test: cts-tradefed run cts -m CtsPermission2TestCases -t android.permission2.cts.PrivappPermissionsTest Change-Id: I9aaa2193a3c7a93988590276cdbdf1a21f230cb3
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions