Make Android resources match SDK restrictions
Categories
(Firefox Build System :: Android Studio and Gradle Integration, defect, P3)
Tracking
(Not tracked)
People
(Reporter: jstockdale20, Unassigned)
Details
+++ This bug was initially created as a clone of Bug #1355616 +++
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.
Updated•3 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•