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

Commit 474dda22 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [9200581, 9200376, 9200474, 9200583, 9200491, 9200584,...

Merge cherrypicks of [9200581, 9200376, 9200474, 9200583, 9200491, 9200584, 9200505, 9200585, 9200475, 9200586, 9200476, 9200588, 9200589, 9200639] into qt-release

Change-Id: I591f441572b3edc2b5f5e8093556a68e1c7970c9
parents c0fbdf45 371c5e63
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -581,12 +581,16 @@ public class ParcelFileDescriptor implements Parcelable, Closeable {
    public static ParcelFileDescriptor fromData(byte[] data, String name) throws IOException {
        if (data == null) return null;
        MemoryFile file = new MemoryFile(name, data.length);
        try {
            if (data.length > 0) {
                file.writeBytes(data, 0, 0, data.length);
            }
            file.deactivate();
            FileDescriptor fd = file.getFileDescriptor();
            return fd != null ? ParcelFileDescriptor.dup(fd) : null;
        } finally {
            file.close();
        }
    }

    /**