redundancy: remove unspecial special cases #3755
Merged
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.
As we discussed before, some of the dirs in
RAW_DIRNAMES
are treated as standard dirs in an APK, despite not being such.Instead of arbitrarily deciding what is known and what is unknown, we can make a concrete distinction: known dirs are dirs that are standard in APKs as generated by aapt:
assets
,lib
andres
. Everything else is app or library-specific and is unknown to aapt or smali/baksmali and should be treated as raw files that must be preserved as-is.libs
(notlib
) is another example of a non-standard dir that might appear in specific APKs simply because the developers decided so, but it's not used for native libraries when callingloadLibrary
.https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/app/LoadedApk.java;l=565
Thanks to refactoring done some months ago, everything in
unknown
is already being preserved when rebuilding an APK, no special considerations needed for kotlin.