Give fd
This commit is contained in:
parent
19c2201eec
commit
97701a9299
|
|
@ -2,11 +2,11 @@ package io.github.libxposed.api;
|
||||||
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
|
import android.os.ParcelFileDescriptor;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
|
|
@ -467,13 +467,13 @@ public interface XposedInterface {
|
||||||
String[] listRemoteFiles();
|
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 ..
|
* @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 FileNotFoundException If the file does not exist or the path is forbidden
|
||||||
* @throws UnsupportedOperationException If the framework is embedded
|
* @throws UnsupportedOperationException If the framework is embedded
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
FileInputStream openRemoteFileInput(@NonNull String name) throws FileNotFoundException;
|
ParcelFileDescriptor openRemoteFile(@NonNull String name) throws FileNotFoundException;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@ package io.github.libxposed.api;
|
||||||
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
|
import android.os.ParcelFileDescriptor;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
|
|
@ -142,7 +142,7 @@ public class XposedInterfaceWrapper implements XposedInterface {
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public FileInputStream openRemoteFileInput(@NonNull String name) throws FileNotFoundException {
|
public ParcelFileDescriptor openRemoteFile(@NonNull String name) throws FileNotFoundException {
|
||||||
return mBase.openRemoteFileInput(name);
|
return mBase.openRemoteFile(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue