Rename launcher:iconSize attribute to prevent overriding material

A previous change [1] introduced the material library as a static library
for the SecondaryDisplayLauncher. The material library defines a
resource "attr/iconSize" with format="dimension" while Launcher3 defines
a resource of the same name with format="float". The material resource
is being overriden by the Launcher3 resource and is preventing aapt2
from disallowing multiple definitions of the same attribute with
different formats.

This change renames the Launcher3 iconSize so it will not collide with
the material resource.

[1] If183dd35a1d197c4a9a8225a021e36c4f1662587

Bug: 129146717
Test: build success and inspection of generated apk
Change-Id: I5eb54ea606ddcfb47d5150b44906a8707203e905
This commit is contained in:
Ryan Mitchell 2019-03-28 17:01:07 -07:00
parent d89298d659
commit 09328442d6
4 changed files with 12 additions and 12 deletions

View File

@ -30,7 +30,7 @@
launcher:name="Go Device"
launcher:minWidthDps="296"
launcher:minHeightDps="491.33"
launcher:iconSize="60"
launcher:iconImageSize="60"
launcher:iconTextSize="14.0"
launcher:canBeDefault="true" />

View File

@ -123,7 +123,7 @@
<attr name="minWidthDps" format="float" />
<attr name="minHeightDps" format="float" />
<attr name="iconSize" format="float" />
<attr name="iconImageSize" format="float" />
<!-- landscapeIconSize defaults to iconSize, if not specified -->
<attr name="landscapeIconSize" format="float" />
<attr name="iconTextSize" format="float" />

View File

@ -30,7 +30,7 @@
launcher:name="Super Short Stubby"
launcher:minWidthDps="255"
launcher:minHeightDps="300"
launcher:iconSize="48"
launcher:iconImageSize="48"
launcher:iconTextSize="13.0"
launcher:canBeDefault="true" />
@ -38,7 +38,7 @@
launcher:name="Shorter Stubby"
launcher:minWidthDps="255"
launcher:minHeightDps="400"
launcher:iconSize="48"
launcher:iconImageSize="48"
launcher:iconTextSize="13.0"
launcher:canBeDefault="true" />
@ -57,7 +57,7 @@
launcher:name="Short Stubby"
launcher:minWidthDps="275"
launcher:minHeightDps="420"
launcher:iconSize="48"
launcher:iconImageSize="48"
launcher:iconTextSize="13.0"
launcher:canBeDefault="true" />
@ -65,7 +65,7 @@
launcher:name="Stubby"
launcher:minWidthDps="255"
launcher:minHeightDps="450"
launcher:iconSize="48"
launcher:iconImageSize="48"
launcher:iconTextSize="13.0"
launcher:canBeDefault="true" />
@ -73,7 +73,7 @@
launcher:name="Nexus S"
launcher:minWidthDps="296"
launcher:minHeightDps="491.33"
launcher:iconSize="48"
launcher:iconImageSize="48"
launcher:iconTextSize="13.0"
launcher:canBeDefault="true" />
@ -81,7 +81,7 @@
launcher:name="Nexus 4"
launcher:minWidthDps="359"
launcher:minHeightDps="567"
launcher:iconSize="54"
launcher:iconImageSize="54"
launcher:iconTextSize="13.0"
launcher:canBeDefault="true" />
@ -89,7 +89,7 @@
launcher:name="Nexus 5"
launcher:minWidthDps="335"
launcher:minHeightDps="567"
launcher:iconSize="54"
launcher:iconImageSize="54"
launcher:iconTextSize="13.0"
launcher:canBeDefault="true" />
@ -108,7 +108,7 @@
launcher:name="Large Phone"
launcher:minWidthDps="406"
launcher:minHeightDps="694"
launcher:iconSize="56"
launcher:iconImageSize="56"
launcher:iconTextSize="14.4"
launcher:canBeDefault="true" />
@ -116,7 +116,7 @@
launcher:name="Shorter Stubby"
launcher:minWidthDps="255"
launcher:minHeightDps="400"
launcher:iconSize="48"
launcher:iconImageSize="48"
launcher:iconTextSize="13.0"
launcher:canBeDefault="true" />

View File

@ -543,7 +543,7 @@ public class InvariantDeviceProfile {
canBeDefault = a.getBoolean(
R.styleable.ProfileDisplayOption_canBeDefault, false);
iconSize = a.getFloat(R.styleable.ProfileDisplayOption_iconSize, 0);
iconSize = a.getFloat(R.styleable.ProfileDisplayOption_iconImageSize, 0);
landscapeIconSize = a.getFloat(R.styleable.ProfileDisplayOption_landscapeIconSize,
iconSize);
iconTextSize = a.getFloat(R.styleable.ProfileDisplayOption_iconTextSize, 0);