Map numeric dpi value to density bucket for recovery resources.
When choosing the density for recovery resources, the code used to handle primary density values only, i.e. mdpi, hdpi, xhdpi, 400dpi, xxhdpi, 560dpi and xxxhdpi. Unlisted values, such as 500dpi, will be categorized as xhdpi, but with tiny font size selected for recovery. This CL improves the handling of numeric dpi values. It allows targets using numeric values in PRODUCT_AAPT_PREF_CONFIG, and maps that to a proper density bucket. Targets can still specify the density bucket directly, which will take priority. Bug: 111559919 Test: `m -j bootimage` with marlin/sailfish/walleye/taimen respectively. Check the chosen density bucket for recovery resources (xxxhdpi/xxhdpi/xxhdpi/xxxhdpi). Test: Set PRODUCT_AAPT_PREF_CONFIG to 279/280/281/500/559/560/640. Check the computed bucket and the selected recovery font file. Change-Id: Ia40fcdec5a2752c08172716bcc622a36a2a83cea
Loading
Please register or sign in to comment