This commit is contained in:
Nullptr 2023-08-15 21:37:32 +08:00
parent 19c2201eec
commit 97701a9299
No known key found for this signature in database
2 changed files with 7 additions and 7 deletions

View File

@ -2,11 +2,11 @@ package io.github.libxposed.api;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.os.ParcelFileDescriptor;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Constructor;
@ -467,13 +467,13 @@ public interface XposedInterface {
String[] listRemoteFiles();
/**
* Open an InputStream to read a file from the module's shared data directory.
* Open a file in the module's shared data directory. The file is opened in read-only mode.
*
* @param name File name, must not contain path separators and . or ..
* @return The InputStream
* @return The file descriptor
* @throws FileNotFoundException If the file does not exist or the path is forbidden
* @throws UnsupportedOperationException If the framework is embedded
*/
@NonNull
FileInputStream openRemoteFileInput(@NonNull String name) throws FileNotFoundException;
ParcelFileDescriptor openRemoteFile(@NonNull String name) throws FileNotFoundException;
}

View File

@ -2,11 +2,11 @@ package io.github.libxposed.api;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.os.ParcelFileDescriptor;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Constructor;
@ -142,7 +142,7 @@ public class XposedInterfaceWrapper implements XposedInterface {
@NonNull
@Override
public FileInputStream openRemoteFileInput(@NonNull String name) throws FileNotFoundException {
return mBase.openRemoteFileInput(name);
public ParcelFileDescriptor openRemoteFile(@NonNull String name) throws FileNotFoundException {
return mBase.openRemoteFile(name);
}
}