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

Commit 2443a091 authored by Daichi Hirono's avatar Daichi Hirono
Browse files

@hide non-Handler variant of SM.openProxyFileDescriptor

Bug: 37749462
Test: Build succeeded
Change-Id: I2e3d0cf9e219353eae4dae384c93d99b9ef60ea9
parent f1476881
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -31939,7 +31939,6 @@ package android.os.storage {
    method public boolean isEncrypted(java.io.File);
    method public boolean isObbMounted(java.lang.String);
    method public boolean mountObb(java.lang.String, java.lang.String, android.os.storage.OnObbStateChangeListener);
    method public android.os.ParcelFileDescriptor openProxyFileDescriptor(int, android.os.ProxyFileDescriptorCallback) throws java.io.IOException;
    method public android.os.ParcelFileDescriptor openProxyFileDescriptor(int, android.os.ProxyFileDescriptorCallback, android.os.Handler) throws java.io.IOException;
    method public void setCacheBehaviorGroup(java.io.File, boolean) throws java.io.IOException;
    method public void setCacheBehaviorTombstone(java.io.File, boolean) throws java.io.IOException;
+0 −1
Original line number Diff line number Diff line
@@ -34837,7 +34837,6 @@ package android.os.storage {
    method public boolean isEncrypted(java.io.File);
    method public boolean isObbMounted(java.lang.String);
    method public boolean mountObb(java.lang.String, java.lang.String, android.os.storage.OnObbStateChangeListener);
    method public android.os.ParcelFileDescriptor openProxyFileDescriptor(int, android.os.ProxyFileDescriptorCallback) throws java.io.IOException;
    method public android.os.ParcelFileDescriptor openProxyFileDescriptor(int, android.os.ProxyFileDescriptorCallback, android.os.Handler) throws java.io.IOException;
    method public void setCacheBehaviorGroup(java.io.File, boolean) throws java.io.IOException;
    method public void setCacheBehaviorTombstone(java.io.File, boolean) throws java.io.IOException;
+0 −1
Original line number Diff line number Diff line
@@ -32072,7 +32072,6 @@ package android.os.storage {
    method public boolean isEncrypted(java.io.File);
    method public boolean isObbMounted(java.lang.String);
    method public boolean mountObb(java.lang.String, java.lang.String, android.os.storage.OnObbStateChangeListener);
    method public android.os.ParcelFileDescriptor openProxyFileDescriptor(int, android.os.ProxyFileDescriptorCallback) throws java.io.IOException;
    method public android.os.ParcelFileDescriptor openProxyFileDescriptor(int, android.os.ProxyFileDescriptorCallback, android.os.Handler) throws java.io.IOException;
    method public void setCacheBehaviorGroup(java.io.File, boolean) throws java.io.IOException;
    method public void setCacheBehaviorTombstone(java.io.File, boolean) throws java.io.IOException;
+3 −13
Original line number Diff line number Diff line
@@ -1414,6 +1414,7 @@ public class StorageManager {
    public @NonNull ParcelFileDescriptor openProxyFileDescriptor(
            int mode, ProxyFileDescriptorCallback callback, Handler handler, ThreadFactory factory)
                    throws IOException {
        Preconditions.checkNotNull(callback);
        MetricsLogger.count(mContext, "storage_open_proxy_file_descriptor", 1);
        // Retry is needed because the mount point mFuseAppLoop is using may be unmounted before
        // invoking StorageManagerService#openProxyFileDescriptor. In this case, we need to re-mount
@@ -1460,19 +1461,7 @@ public class StorageManager {
        }
    }

    /**
     * Opens seekable ParcelFileDescriptor that routes file operation requests to
     * ProxyFileDescriptorCallback.
     *
     * @param mode The desired access mode, must be one of
     *     {@link ParcelFileDescriptor#MODE_READ_ONLY},
     *     {@link ParcelFileDescriptor#MODE_WRITE_ONLY}, or
     *     {@link ParcelFileDescriptor#MODE_READ_WRITE}
     * @param callback Callback to process file operation requests issued on returned file
     *     descriptor.
     * @return Seekable ParcelFileDescriptor.
     * @throws IOException
     */
    /** {@hide} */
    public @NonNull ParcelFileDescriptor openProxyFileDescriptor(
            int mode, ProxyFileDescriptorCallback callback)
                    throws IOException {
@@ -1496,6 +1485,7 @@ public class StorageManager {
    public @NonNull ParcelFileDescriptor openProxyFileDescriptor(
            int mode, ProxyFileDescriptorCallback callback, Handler handler)
                    throws IOException {
        Preconditions.checkNotNull(handler);
        return openProxyFileDescriptor(mode, callback, handler, null);
    }