Skip to content

Update javadoc#59

Merged
vvb2060 merged 5 commits intomasterfrom
vvb2060-patch-1
Mar 30, 2026
Merged

Update javadoc#59
vvb2060 merged 5 commits intomasterfrom
vvb2060-patch-1

Conversation

@vvb2060
Copy link
Copy Markdown
Contributor

@vvb2060 vvb2060 commented Mar 25, 2026

No description provided.

@vvb2060 vvb2060 requested a review from Copilot March 25, 2026 15:39
@vvb2060 vvb2060 marked this pull request as ready for review March 25, 2026 15:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the API Javadoc on XposedModuleInterface to better clarify lifecycle callback semantics and the stability of parameter objects during module/package loading.

Changes:

  • Clarify that *Param objects represent a snapshot at load time and are not updated afterward.
  • Refine callback Javadocs for package loading/ready phases (including AppComponentFactory references).
  • Document that exceptions thrown by callbacks are caught and logged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/src/main/java/io/github/libxposed/api/XposedModuleInterface.java Outdated
Comment thread api/src/main/java/io/github/libxposed/api/XposedModuleInterface.java Outdated
Comment thread api/src/main/java/io/github/libxposed/api/XposedModuleInterface.java Outdated
@vvb2060 vvb2060 changed the title Update comments for clarity on package loading callbacks Update javadoc Mar 30, 2026
@vvb2060 vvb2060 requested a review from Copilot March 30, 2026 17:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread api/src/main/java/io/github/libxposed/api/package-info.java Outdated
Comment thread api/src/main/java/io/github/libxposed/api/package-info.java Outdated
Comment thread settings.gradle.kts Outdated
Comment thread api/build.gradle.kts
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +118 to +122
* Gets notified when a {@link android.R.attr#hasCode} package is loaded into the process.
* This is the time when the default classloader is ready but before the instantiation of
* {@link AppComponentFactory}.
* <p>
* This callback is invoked only once for each package name loaded into the process,
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Javadoc states the callback is invoked when a hasCode package is loaded, but package-info.java now mentions receiving an android package loading event even though android has no code. Please clarify whether packages without code can trigger onPackageLoaded/onPackageReady (and adjust the hasCode wording or the android example accordingly) so the API docs are consistent.

Copilot uses AI. Check for mistakes.
Comment thread api/proguard-rules.pro
Comment on lines +1 to 4
-adaptresourcefilecontents META-INF/xposed/java_init.list
-keep,allowoptimization,allowobfuscation public class * extends io.github.libxposed.api.XposedModule {
public <init>();
}
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change updates consumer ProGuard/R8 rules (resource adaptation and keep rules for XposedModule subclasses), which can affect shrinking/obfuscation behavior for downstream consumers. The PR title/description indicates a Javadoc-only update; please update the PR metadata to reflect the build/tooling behavior change as well.

Copilot uses AI. Check for mistakes.
Comment on lines 3 to 5
import android.app.AppComponentFactory;
import android.content.Context;
import android.content.pm.ApplicationInfo;
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

android.content.Context is only referenced in Javadoc {@link ...} tags, so this import is unused from the compiler’s perspective and may trigger unused-import checks in stricter builds. Consider using the fully-qualified android.content.Context in the Javadoc and removing the import, or otherwise referencing Context from code.

Copilot uses AI. Check for mistakes.
Comment on lines +57 to +60
* Modules scoped to {@code android} can still receive events for {@code android} package loading
* even though {@code android} package has no code. By contrast, {@code com.android.providers.settings}
* is not a valid scope target, modules should use the {@code system} scope and then wait
* for the {@code com.android.providers.settings} package loading event.</p>
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new section says modules can receive an "android package loading" event even though the android package has no code, but XposedModuleInterface#onPackageLoaded is documented as firing only for hasCode packages. Please clarify which lifecycle callback(s) (if any) are expected to run for packages without code, and align the wording here accordingly to avoid conflicting guidance.

Suggested change
* Modules scoped to {@code android} can still receive events for {@code android} package loading
* even though {@code android} package has no code. By contrast, {@code com.android.providers.settings}
* is not a valid scope target, modules should use the {@code system} scope and then wait
* for the {@code com.android.providers.settings} package loading event.</p>
* Modules scoped to {@code android} can still receive callbacks that run in those processes,
* even though the base {@code android} package itself has no code and therefore never triggers
* {@link io.github.libxposed.api.XposedModuleInterface#onPackageLoaded onPackageLoaded()}.
* By contrast, {@code com.android.providers.settings} is not a valid scope target; modules
* should use the {@code system} scope and then wait for the
* {@code com.android.providers.settings} package loading event.</p>

Copilot uses AI. Check for mistakes.
@vvb2060 vvb2060 merged commit 532fa3b into master Mar 30, 2026
4 checks passed
@vvb2060 vvb2060 deleted the vvb2060-patch-1 branch March 30, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants