diff --git a/README.md b/README.md index 081f36b..b3009fc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # libxposed API -[](https://github.com/libxposed/api) +[](https://github.com/libxposed/api) [](https://central.sonatype.com/artifact/io.github.libxposed/api) [](https://developer.android.com/about/versions/oreo) [](LICENSE) @@ -13,7 +13,7 @@ Modern Xposed Module API — a type-safe, redesigned replacement for the legacy ```kotlin dependencies { - compileOnly("io.github.libxposed:api:102.0.0") + compileOnly("io.github.libxposed:api:103.0.0") } ``` @@ -33,7 +33,7 @@ These rules keep module entry classes from being removed and rewrite `META-INF/x ```kotlin dependencies { - implementation("io.github.libxposed:api:102.0.0") + implementation("io.github.libxposed:api:103.0.0") } ``` diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 8f9ea18..79b4893 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -32,7 +32,7 @@ android { } } -val libVersion = "102.0.0" +val libVersion = "103.0.0" val publishSnapshot = providers.gradleProperty("publishSnapshot").orNull == "true" val dependencySnapshot = providers.gradleProperty("dependencySnapshot").orNull == "true" fun String.real(snapshot: Boolean) = if (snapshot) "$this-SNAPSHOT" else this 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 c36b775..4a15c76 100644 --- a/api/src/main/java/io/github/libxposed/api/XposedInterface.java +++ b/api/src/main/java/io/github/libxposed/api/XposedInterface.java @@ -51,11 +51,20 @@ public interface XposedInterface { */ int API_102 = 102; + /** + * API version 103. + *
New features
+ *This can be used to obtain already-created target objects directly instead of installing nested hooks + * only to capture them from later calls.
+ * + *Returned object references are strong references. Keeping the returned results reachable also keeps + * returned objects reachable.
+ * + *The framework does not run a garbage collection before scanning. Non-reachable but not-yet-collected objects + * will be returned as well. If you need to exclude objects that are only waiting to be collected, you should trigger + * garbage collection before calling this method.
+ * + *The overload of scanning one class is the same as scanning multiple classes with the batched API. + * If you need to scan multiple classes, it is recommended to use the batched API to reduce the number + * of heap walks and improve performance.
+ * + * @param clazz The class to match. Primitive classes and {@code void.class} are not valid. + * @param assignable Whether to match subclasses of the class. + * @paramFind already-created objects by class with + * {@link io.github.libxposed.api.XposedInterface#findInstances(java.lang.Class, boolean)} or + * {@link io.github.libxposed.api.XposedInterface#findInstances(java.lang.Class[], boolean)}. + * This is useful when a module needs a target object that may already exist before its hooks are + * installed, avoiding extra nested hooks whose only purpose is to capture that object from later + * calls.
+ * *Override the following callbacks in {@link io.github.libxposed.api.XposedModule}: