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

fix: decoding references to private resources #2650

Merged
merged 3 commits into from
Oct 17, 2021

Conversation

MrIkso
Copy link
Contributor

@MrIkso MrIkso commented Sep 7, 2021

fixed #2033, fixed #2637 of error
error: resource <name> is private.
Use * before resource name if rererence to private resources.
Expample:
before fix
<color name="gm3_ref_palette_dynamic_tertiary900">@android:color/Indigo_700</color>
after fix
<color name="gm3_ref_palette_dynamic_tertiary900">@*android:color/Indigo_700</color>

@iBotPeaches
Copy link
Owner

Approved the workfun to run. I remember reverting this fix a few years ago because I improperly added it to ALL resources, this seems like a safer version.

iBotPeaches
iBotPeaches previously approved these changes Sep 9, 2021
@iBotPeaches
Copy link
Owner

Do you have a good idea of a way we can test this in our test suite? Like finding a resource that should remain private and adding it to colors.xml? Then testing to make sure it comes out with the asterisk?

@iBotPeaches
Copy link
Owner

@MrIkso ping here. I am curious if you have a good idea for a test so we don't regress this.

@MrIkso
Copy link
Contributor Author

MrIkso commented Oct 13, 2021

@iBotPeaches even thought of this for the test...

@iBotPeaches iBotPeaches merged commit d294111 into iBotPeaches:master Oct 17, 2021
@iBotPeaches
Copy link
Owner

thanks!

@pashamcr
Copy link
Contributor

pashamcr commented Oct 18, 2021

This is fixed in aapt/aapt2 https://github.com/pashamcr/AAPTS/tree/windows, and works without this fix with #2637 ,
apk file #2033 I didn't find one to check. Here's for aapt's for Windows test
aapt_64.exe.txt
aapt2_64.exe.txt
:

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.

[BUG] Can't roundtrip gboard error: Error: Resource is not public.
4 participants