Themes: Fix blurry composed icons
In a composed icon the original icon could be scaled incorrectly due to a density mismatch resulting in blurry icons. For example, Grouper has a screen density of 213 dpi but Trebuchet will want to show a larger icon and therefore requests to the framework to load app icons with a slightly higher density of 320dpi (XHDPI bucket). When Resources.loadDrawable(TypedValue value, ...) is called, it will use observe value.density. Since the image is from the XHDPI bucket it will have a TypedValue.density of 320dpi, much higher than the screen's 213dpi, and therefore loadDrawablei() will configure BitmapFactory to scale down the image to match the screen density. This is not what we want, so this patch modifies the density value to prevent scaling, much the same way getDrawableForDensity() does. Change-Id: Ie638c8576872f9115dc029bb4823b50bb31ecebf
Loading
Please register or sign in to comment