Support new resource table fields and flags in Android 35 android.jar
#223
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bumping the
target_sdk_versionto35results in hitting random asserts inside theResTableparser. Digging further shows that the parser wasn't that robust after all and happily ignored new fields and flags which should have affected how certain elements are parsed. New changes that Android made since 33:SPARSElists forTypechunk, instead of storing large arrays with manyNoneelements;TypeSpecis nowtypes_count;Typechunk;COMPACTTypeEntrys are now used for 4-byte values.Note that this PR only marginally tries to remove data-representation-specific pieces from the public
ChunksAPI. Callers will still have to guess a few fields that really should be handled internally, but since none of this is really actively used internally I did not bother.fn compile_mipmap()seems to spit out mostly bogus though, specifically forResTablePackageHeader.The existing tests already cover building and then parsing the table again, and also test all installed SDKs which happen to be the full
28..=35range on my machine; all succeed successfully.