-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
refactor: ExtDataInput rework, source layout and formatting #3738
Conversation
Refactor ExtDataInput classes: ExtDataInput is now the extended interface, ExtDataInputStream is an easy-to-use FilterInputStream implementing ExtDataInput with static creator methods for big-endian and little-endian wrappers. Refactor AaptManager class: unify aapt-related verifications to one class. Replace Apache Commons' deprecated CountingInputStream with Google Guava's equivalent with the same name. Apache's BoundedInputStream is an overkill for our use case and its constructors are deprecated as well. Normalize source layout to have a common and somewhat more standard order: Static fields first, instance fields after, methods last. Fix some formatting, like empty spaces or extra spaces and exception messages. Renamed ResXmlPatcher to ResXmlUtils, as it has more purposes than just patching. Renamed DirUtil to DirUtils, to match other utility classes naming convention. Moved "properties/apktool.properties" to jar's root, to match smali/baksmali. Moved Android Framework to "prebuilt", as it is just a prebuilt, looks out of place among .class files. @SuppressWarnings removed from Duo as there are quite a few unsafe assignments of raw Duo[] instances to parameterized Duo<> variables in the project, this is just Java being the primitive boilerplate it is, no point in fighting it. No end-user changes. Tested against a full ROM decompile/recompile, no issues found.
117 changes :o |
Most of the changes are just lines moved around and some private variables renamed lmao |
Great work @IgorEisberg. I remember you from when you created Xiaomi EU ROMs 👍 |
I'm still the only developer for Xiaomi.eu since 2017, besides the included Updater app. |
thanks! |
Refactor ExtDataInput classes: ExtDataInput is now the extended interface, ExtDataInputStream is an easy-to-use FilterInputStream implementing ExtDataInput with static creator methods for big-endian and little-endian wrappers.
Refactor AaptManager class: unify aapt-related verifications to one class.
Replace Apache Commons' deprecated CountingInputStream with Google Guava's equivalent with the same name. Apache's BoundedInputStream is an overkill for our use case and its constructors are deprecated as well.
Normalize source layout to have a common and somewhat more standard order: Static fields first, instance fields after, methods last.
Fix some formatting, like empty spaces or extra spaces and exception messages.
Renamed ResXmlPatcher to ResXmlUtils, as it has more purposes than just patching.
Renamed DirUtil to DirUtils, to match other utility classes naming convention.
Moved "properties/apktool.properties" to jar's root, to match smali/baksmali.
Moved Android Framework to "prebuilt", as it is just a prebuilt, looks out of place among .class files.
@SuppressWarnings removed from Duo as there are quite a few unsafe assignments of raw Duo[] instances to parameterized Duo<> variables in the project, this is just Java being the primitive boilerplate it is, no point in fighting it.
No end-user changes.
Tested against a full ROM decompile/recompile, no issues found.