Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace constants in annotations of method arguments #2358

Conversation

nitram84
Copy link
Contributor

@nitram84 nitram84 commented Dec 3, 2024

This PR replaces constants in annotation of method arguments. Example:

Having an annotation like

@Retention(RetentionPolicy.RUNTIME)
public @interface UsesAndroidResource {
	int value() default 0;
}

this class

public static class TestCls {
	public void test(@UsesAndroidResource(17039370 /* android.R.string.ok */) int i) {
	}
}

would be decompiled to

public static class TestCls {
	public void test(@UsesAndroidResource(R.string.ok) int i) {
	}
}

I need this fix to generate an issue with AGP > 8.0.0, I'd like to fix later.

Copy link
Owner

@skylot skylot left a comment

Choose a reason for hiding this comment

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

Nice fix! Thank you 👍

@skylot skylot merged commit 828cad3 into skylot:master Dec 4, 2024
4 checks passed
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