mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Android: Detach file descriptor from ParcelFileDescriptor
This fixes a warning in logcat "A resource failed to call close."
This commit is contained in:
parent
bbc17c3523
commit
4f05365c4e
Notes:
sideshowbarker
2024-07-17 18:06:52 +09:00
Author: https://github.com/Olekoop 🔰 Commit: https://github.com/LadybirdBrowser/ladybird/commit/4f05365c4e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/454 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 3 additions and 1 deletions
|
@ -35,9 +35,11 @@ class LadybirdServiceConnection(
|
|||
init.data.putString("PATH", resourceDir)
|
||||
service!!.send(init)
|
||||
|
||||
val parcel = ParcelFileDescriptor.adoptFd(ipcFd)
|
||||
val msg = Message.obtain(null, MSG_TRANSFER_SOCKET)
|
||||
msg.data.putParcelable("IPC_SOCKET", ParcelFileDescriptor.adoptFd(ipcFd))
|
||||
msg.data.putParcelable("IPC_SOCKET", parcel)
|
||||
service!!.send(msg)
|
||||
parcel.detachFd()
|
||||
}
|
||||
|
||||
override fun onServiceDisconnected(className: ComponentName) {
|
||||
|
|
Loading…
Reference in a new issue