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

Commit 20933d04 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

Change-Id: Ib5f641f37e73fc6b236fe90c229bb3855025375c
parents becff025 edf33843
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -31077,7 +31077,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();
@@ -31509,8 +31508,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
@@ -33920,7 +33920,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();
@@ -34381,8 +34380,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
@@ -31234,7 +31234,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();
@@ -31667,8 +31666,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