Open
Bug 1355616
Opened 8 years ago
Updated 2 years ago
Make Android resources match SDK restrictions
Categories
(Firefox Build System :: Android Studio and Gradle Integration, enhancement)
Firefox Build System
Android Studio and Gradle Integration
Tracking
(Not tracked)
NEW
People
(Reporter: nalexander, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
59 bytes,
text/x-review-board-request
|
Details |
Right now, mobile/android/base/resources contains some resources folders that contain qualifiers (like hdpi, xhdpi, etc) but no versions. These are accepted, but they have a "secret" version qualifier -- in the case of hdpi, it's v4, since that's the first Android version that discriminated on screen density. The set of versions is small; I reverse engineered it from [1] and some of the outputs of a Gradle build.
In addition, we have resources that we can statically prove will never be accessed because there's a more recent version that is less than the minimum SDK version we run on. For example, drawable-v12/toast_button_background.xml will _always_ be preferred to drawable/toast_button_background.xml, since v12 is less than our minimum SDK version v15 (and since drawable-v12 overrides the unqualified drawable).
This ticket tracks adding the version qualifiers, and purging the inaccessible resources.
The motivation for doing so is simple: by adding the qualifiers, we get closer to the set of merged resources that the Gradle build process ends up using. Future work will converge the set of resources used by moz.build to exactly the same set used by Gradle, making it easier to "flip the switch". In addition, we save a small amount of APK space by purging the unused resources.
[1] https://android.googlesource.com/platform/tools/base/+/588c433884c745cba0e09eb16a7f269dfee2c1aa/sdk-common/src/main/java/com/android/ide/common/resources/configuration/FolderConfiguration.java
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Reporter | ||
Updated•8 years ago
|
Attachment #8857197 -
Attachment is obsolete: true
Attachment #8857197 -
Flags: review?(s.kaspari)
Reporter | ||
Comment 3•8 years ago
|
||
Comment on attachment 8857216 [details]
Bug 1355616 - Move Android resources to match SDK restrictions.
Sorry for the churn -- I found problems with my comparison scripts, so this isn't quite enough just yet.
Attachment #8857216 -
Flags: review?(s.kaspari)
Reporter | ||
Comment 5•8 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian) from comment #4)
> I guess we can fold bug 1261037 into this one?
I commented on that ticket. I'd like to keep this one just for the build system stuff, and use that one for general purpose clean up.
Reporter | ||
Updated•7 years ago
|
No longer blocks: gradle-automation
Reporter | ||
Updated•7 years ago
|
Blocks: gradle-automation-v2
Updated•5 years ago
|
Product: Firefox for Android → Firefox Build System
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•