diff --git a/api/src/main/java/io/github/libxposed/api/XposedInterface.java b/api/src/main/java/io/github/libxposed/api/XposedInterface.java index 87939e8..bb8fbc2 100644 --- a/api/src/main/java/io/github/libxposed/api/XposedInterface.java +++ b/api/src/main/java/io/github/libxposed/api/XposedInterface.java @@ -1,9 +1,7 @@ package io.github.libxposed.api; -import android.content.Context; import android.content.SharedPreferences; import android.content.pm.ApplicationInfo; -import android.content.res.Resources; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -445,20 +443,10 @@ public interface XposedInterface { /** * Gets the application info of the module. - * - * @see Context#getApplicationInfo() */ @NonNull ApplicationInfo getApplicationInfo(); - /** - * Gets resources of the module. - * - * @see Context#getResources() - */ - @NonNull - Resources getResources(); - /** * Gets remote preferences stored in Xposed framework. Note that those are read-only in hooked apps. * @@ -469,6 +457,15 @@ public interface XposedInterface { @Nullable SharedPreferences getRemotePreferences(@NonNull String group); + /** + * List all files in the module's shared data directory. + * + * @return The file list + * @throws UnsupportedOperationException If the framework is embedded + */ + @NonNull + String[] listRemoteFiles(); + /** * Open an InputStream to read a file from the module's shared data directory. * @@ -479,13 +476,4 @@ public interface XposedInterface { */ @NonNull FileInputStream openRemoteFileInput(@NonNull String name) throws FileNotFoundException; - - /** - * List all files in the module's shared data directory. - * - * @return The file list - * @throws UnsupportedOperationException If the framework is embedded - */ - @NonNull - String[] listRemoteFiles(); } diff --git a/api/src/main/java/io/github/libxposed/api/XposedInterfaceWrapper.java b/api/src/main/java/io/github/libxposed/api/XposedInterfaceWrapper.java index c435f4e..f6e4b4f 100644 --- a/api/src/main/java/io/github/libxposed/api/XposedInterfaceWrapper.java +++ b/api/src/main/java/io/github/libxposed/api/XposedInterfaceWrapper.java @@ -2,7 +2,6 @@ package io.github.libxposed.api; import android.content.SharedPreferences; import android.content.pm.ApplicationInfo; -import android.content.res.Resources; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -137,8 +136,8 @@ public class XposedInterfaceWrapper implements XposedInterface { @NonNull @Override - public Resources getResources() { - return mBase.getResources(); + public String[] listRemoteFiles() { + return mBase.listRemoteFiles(); } @NonNull @@ -146,10 +145,4 @@ public class XposedInterfaceWrapper implements XposedInterface { public FileInputStream openRemoteFileInput(@NonNull String name) throws FileNotFoundException { return mBase.openRemoteFileInput(name); } - - @NonNull - @Override - public String[] listRemoteFiles() { - return mBase.listRemoteFiles(); - } } diff --git a/api/src/main/java/io/github/libxposed/api/XposedModuleInterface.java b/api/src/main/java/io/github/libxposed/api/XposedModuleInterface.java index c21c479..1cb548c 100644 --- a/api/src/main/java/io/github/libxposed/api/XposedModuleInterface.java +++ b/api/src/main/java/io/github/libxposed/api/XposedModuleInterface.java @@ -57,12 +57,12 @@ public interface XposedModuleInterface { String getPackageName(); /** - * Gets the ApplicationInfo of the package being loaded. + * Gets the {@link ApplicationInfo} of the package being loaded. * * @return The ApplicationInfo. */ @NonNull - ApplicationInfo getAppInfo(); + ApplicationInfo getApplicationInfo(); /** * Gets default class loader.