Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 670feb4a authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

am fc5b41eb: am 78c14368: Merge "FileBridge needs to keep strong reference to PFD." into lmp-dev

* commit 'fc5b41eb8ef68686f49ed2b455fa25928e86a3f6':
  FileBridge needs to keep strong reference to PFD.
parents 23e972e3 4b21cb68
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -623,7 +623,7 @@ public class PackageInstaller {
            try {
            try {
                final ParcelFileDescriptor clientSocket = mSession.openWrite(name,
                final ParcelFileDescriptor clientSocket = mSession.openWrite(name,
                        offsetBytes, lengthBytes);
                        offsetBytes, lengthBytes);
                return new FileBridge.FileBridgeOutputStream(clientSocket.getFileDescriptor());
                return new FileBridge.FileBridgeOutputStream(clientSocket);
            } catch (RuntimeException e) {
            } catch (RuntimeException e) {
                ExceptionUtils.maybeUnwrapIOException(e);
                ExceptionUtils.maybeUnwrapIOException(e);
                throw e;
                throw e;
+4 −2
Original line number Original line Diff line number Diff line
@@ -131,11 +131,13 @@ public class FileBridge extends Thread {
    }
    }


    public static class FileBridgeOutputStream extends OutputStream {
    public static class FileBridgeOutputStream extends OutputStream {
        private final ParcelFileDescriptor mClientPfd;
        private final FileDescriptor mClient;
        private final FileDescriptor mClient;
        private final byte[] mTemp = new byte[MSG_LENGTH];
        private final byte[] mTemp = new byte[MSG_LENGTH];


        public FileBridgeOutputStream(FileDescriptor client) {
        public FileBridgeOutputStream(ParcelFileDescriptor clientPfd) {
            mClient = client;
            mClientPfd = clientPfd;
            mClient = clientPfd.getFileDescriptor();
        }
        }


        @Override
        @Override