summaryrefslogtreecommitdiff
path: root/libs/androidfw/PathUtils.cpp
diff options
context:
space:
mode:
author Jayant Chowdhary <jchowdhary@google.com> 2024-12-16 21:03:47 +0000
committer Jayant Chowdhary <jchowdhary@google.com> 2024-12-17 07:35:18 +0000
commit0f88880062545988bdd5b39db8b1709d35d76d01 (patch)
tree33406e57e1089af0ea3a682af8df4b4e0b8cd913 /libs/androidfw/PathUtils.cpp
parent9165f171d2827b780a0f637afd0872b7d4519bec (diff)
Close MQDescriptor internal FDs while writing to Parcel to transfer to native code.
Though ParcelFileDescriptors do close the wrapped fds in finalize(), GC may not run for a while so it is beneficial to close them explicitly. Also recycle the temporary Parcel written into by MQDescriptor since that dups the MQDescriptor's fds as well. They're not needed after the native FMQ Reader has been created since the MQDescriptor in the native code dups those descriptors upon creation from the AParcel as well. Bug: 383702975 Flag: EXEMPT; bugfix Test: Run test app with StrictMode on, no longer get android.os.strictmode.LeakedClosableViolation for ParceFileDescriptor Change-Id: Ic2a49577f1e0da13dbc33ef14a2a437966aebc99 Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Diffstat (limited to 'libs/androidfw/PathUtils.cpp')
0 files changed, 0 insertions, 0 deletions