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

Commit d767cec5 authored by John Reck's avatar John Reck Committed by android-build-merger
Browse files

Merge "SharedMemory API changes" into oc-mr1-dev am: edf33843

am: 20933d04

Change-Id: I08d5eb7c5cf99c0af6f94a5f88af0ca8328c34f2
parents 4cdd9426 20933d04
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -31079,7 +31079,6 @@ package android.os {
    ctor public MemoryFile(java.lang.String, int) throws java.io.IOException;
    method public deprecated synchronized boolean allowPurging(boolean) throws java.io.IOException;
    method public void close();
    method public java.io.FileDescriptor getFileDescriptor() throws java.io.IOException;
    method public java.io.InputStream getInputStream();
    method public java.io.OutputStream getOutputStream();
    method public deprecated boolean isPurgingAllowed();
@@ -31511,8 +31510,6 @@ package android.os {
    method public void close();
    method public static android.os.SharedMemory create(java.lang.String, int) throws android.system.ErrnoException;
    method public int describeContents();
    method public int getFd();
    method public java.io.FileDescriptor getFileDescriptor();
    method public int getSize();
    method public java.nio.ByteBuffer map(int, int, int) throws android.system.ErrnoException;
    method public java.nio.ByteBuffer mapReadOnly() throws android.system.ErrnoException;
+0 −3
Original line number Diff line number Diff line
@@ -33923,7 +33923,6 @@ package android.os {
    ctor public MemoryFile(java.lang.String, int) throws java.io.IOException;
    method public deprecated synchronized boolean allowPurging(boolean) throws java.io.IOException;
    method public void close();
    method public java.io.FileDescriptor getFileDescriptor() throws java.io.IOException;
    method public java.io.InputStream getInputStream();
    method public java.io.OutputStream getOutputStream();
    method public deprecated boolean isPurgingAllowed();
@@ -34384,8 +34383,6 @@ package android.os {
    method public void close();
    method public static android.os.SharedMemory create(java.lang.String, int) throws android.system.ErrnoException;
    method public int describeContents();
    method public int getFd();
    method public java.io.FileDescriptor getFileDescriptor();
    method public int getSize();
    method public java.nio.ByteBuffer map(int, int, int) throws android.system.ErrnoException;
    method public java.nio.ByteBuffer mapReadOnly() throws android.system.ErrnoException;
+0 −3
Original line number Diff line number Diff line
@@ -31236,7 +31236,6 @@ package android.os {
    ctor public MemoryFile(java.lang.String, int) throws java.io.IOException;
    method public deprecated synchronized boolean allowPurging(boolean) throws java.io.IOException;
    method public void close();
    method public java.io.FileDescriptor getFileDescriptor() throws java.io.IOException;
    method public java.io.InputStream getInputStream();
    method public java.io.OutputStream getOutputStream();
    method public deprecated boolean isPurgingAllowed();
@@ -31669,8 +31668,6 @@ package android.os {
    method public void close();
    method public static android.os.SharedMemory create(java.lang.String, int) throws android.system.ErrnoException;
    method public int describeContents();
    method public int getFd();
    method public java.io.FileDescriptor getFileDescriptor();
    method public int getSize();
    method public java.nio.ByteBuffer map(int, int, int) throws android.system.ErrnoException;
    method public java.nio.ByteBuffer mapReadOnly() throws android.system.ErrnoException;
+2 −0
Original line number Diff line number Diff line
@@ -219,6 +219,8 @@ public class MemoryFile {
     * The returned file descriptor is not duplicated.
     *
     * @throws IOException If the memory file has been closed.
     *
     * @hide
     */
    public FileDescriptor getFileDescriptor() throws IOException {
        return mSharedMemory.getFileDescriptor();
+6 −1
Original line number Diff line number Diff line
@@ -60,7 +60,8 @@ public final class SharedMemory implements Parcelable, Closeable {
        }

        mMemoryRegistration = new MemoryRegistration(mSize);
        mCleaner = Cleaner.create(this, new Closer(mFileDescriptor, mMemoryRegistration));
        mCleaner = Cleaner.create(mFileDescriptor,
                new Closer(mFileDescriptor, mMemoryRegistration));
    }

    /**
@@ -138,6 +139,8 @@ public final class SharedMemory implements Parcelable, Closeable {
     * This FileDescriptor is interoperable with the ASharedMemory NDK APIs.
     *
     * @return Returns the FileDescriptor associated with this object.
     *
     * @hide Exists only for MemoryFile interop
     */
    public @NonNull FileDescriptor getFileDescriptor() {
        return mFileDescriptor;
@@ -150,6 +153,8 @@ public final class SharedMemory implements Parcelable, Closeable {
     * This fd is interoperable with the ASharedMemory NDK APIs.
     *
     * @return Returns the native fd associated with this object, or -1 if it is already closed.
     *
     * @hide Exposed for native ASharedMemory_dupFromJava()
     */
    public int getFd() {
        return mFileDescriptor.getInt$();
Loading