I receive ParcelFileDecriptor in this way ParcelFileDescriptor.fromSocket (socket) then to transfer through AIDL to another process. But sometimes it returns to me not valid where FileDescriptor is -1. And when I try to transmit via AIDL, I get crash. Why is this happening?

    1 answer 1

    Perhaps there is already an object in the work? The documentation says: ParcelFileDescriptor fromSocket (Socket socket)

    Create a new ParcelFileDescriptor from the specified Socket. The new ParcelFileDescriptor is a copy of the original ParcelFileDescriptor.