Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1c5eae2 authored by Ryan Mitchell's avatar Ryan Mitchell
Browse files

Add formats for declare-styleable attributes

AAPT does not allow for attributes declared in declared-styleables that
do not have a format to create new attribute resources. AAPT2 does and
should not.

Declare-styleable attribues added while AAPT2 was enabled and that are
missing a format definition must declare a format.

Bug: 131100106
Test: build
Change-Id: I3affed34e6a534e70b159faee26a16964070b133
parent acde95c3
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -2380,6 +2380,12 @@
    <!-- ============================= -->
    <eat-comment />

    <!-- Removed View attributes without a specified format (b/131100106) -->
    <attr name="__removed3" />
    <attr name="__removed4" />
    <attr name="__removed5" />
    <attr name="__removed6" />

    <!-- Attributes that can be used with {@link android.view.View} or
         any of its subclasses.  Also see {@link #ViewGroup_Layout} for
         attributes that are processed by the view's parent. -->
@@ -4722,7 +4728,7 @@
        <!-- Style (normal, bold, italic, bold|italic) for the text. -->
        <attr name="textStyle" />
        <!-- Weight for the font used in the TextView. -->
        <attr name="textFontWeight" />
        <attr name="textFontWeight" format="integer"/>
        <!-- Font family (named by string or as a font resource reference) for the text. -->
        <attr name="fontFamily" />
        <!-- Specifies the {@link android.os.LocaleList} for the text in this TextView.
@@ -8018,7 +8024,7 @@
        <attr name="supportsAmbientMode" format="boolean" />

        <!-- Uri that specifies a settings Slice for this wallpaper. -->
        <attr name="settingsSliceUri" />
        <attr name="settingsSliceUri" format="string"/>

        <!-- Indicates that this wallpaper service can support multiple engines to render on each
             surface independently. An example use case is a multi-display set-up where the
@@ -8242,7 +8248,7 @@
        <!-- The activity to launch when the setting is clicked on. -->
        <attr name="settingsActivity"/>
        <!-- The user restriction for this preference. -->
        <attr name="userRestriction"/>
        <attr name="userRestriction" format="string"/>
    </declare-styleable>

    <!-- =============================== -->
@@ -8900,7 +8906,7 @@
        <attr name="layout_ignoreOffset" format="boolean" />
        <attr name="layout_gravity" />
        <attr name="layout_hasNestedScrollIndicator" format="boolean" />
        <attr name="layout_maxHeight" />
        <attr name="layout_maxHeight" format="dimension"/>
    </declare-styleable>

    <!-- @hide -->
@@ -9110,4 +9116,6 @@
        <attr name="magnifierHorizontalOffset" format="dimension" />
        <attr name="magnifierColorOverlay" format="color" />
    </declare-styleable>

    <attr name="autoSizePresetSizes" />
</resources>
+8 −8
Original line number Diff line number Diff line
@@ -1682,14 +1682,14 @@
        <attr name="usesNonSdkApi" />

        <!-- If {@code true} the user is prompted to keep the app's data on uninstall -->
        <attr name="hasFragileUserData" />
        <attr name="hasFragileUserData" format="boolean"/>

        <attr name="zygotePreloadName" />

        <!-- If {@code true} the system will clear app's data if a restore operation fails.
             This flag is turned on by default. <em>This attribute is usable only by system apps.
             </em> -->
        <attr name="allowClearUserDataOnFailedRestore"/>
        <attr name="allowClearUserDataOnFailedRestore" format="boolean"/>
        <!-- If {@code true} the app's non sensitive audio can be captured by other apps with
             {@link android.media.AudioPlaybackCaptureConfiguration} and a
             {@link android.media.projection.MediaProjection}.
@@ -1747,7 +1747,7 @@
        <attr name="banner" />
        <attr name="logo" />
        <attr name="permissionGroup" />
        <attr name="backgroundPermission" />
        <attr name="backgroundPermission" format="string"/>
        <attr name="description" />
        <attr name="request" />
        <attr name="protectionLevel" />
@@ -1777,10 +1777,10 @@
        <attr name="banner" />
        <attr name="logo" />
        <attr name="description" />
        <attr name="request" />
        <attr name="requestDetail" />
        <attr name="backgroundRequest" />
        <attr name="backgroundRequestDetail" />
        <attr name="request" format="string"/>
        <attr name="requestDetail" format="string"/>
        <attr name="backgroundRequest" format="string"/>
        <attr name="backgroundRequestDetail" format="string"/>
        <attr name="permissionGroupFlags" />
        <attr name="priority" />
    </declare-styleable>
@@ -2246,7 +2246,7 @@
        <attr name="path" />
        <attr name="pathPrefix" />
        <attr name="pathPattern" />
        <attr name="pathAdvancedPattern" />
        <attr name="pathAdvancedPattern" format="string"/>
        <attr name="permission" />
        <attr name="readPermission" />
        <attr name="writePermission" />