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

Commit 8049e839 authored by Dave Mankoff's avatar Dave Mankoff
Browse files

Rename `buttonSize` to `buttonPreferenceSize`.

The name `buttonSize` causes aapt to have a resource merge conflict
with play-services-base when compiling in gradle. Changing the
name avoids the conflict.

Fixes: 370558301
Test: test_gradle_build.sh
Flag: EXEMPT minor refactor
Change-Id: I5d42abe046a177472a6243e172525f247be9e1e8
parent 3d22e6f4
Loading
Loading
Loading
Loading
+0 −31
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2024 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<resources>
    <declare-styleable name="ButtonPreference">
        <attr name="buttonType" format="enum">
            <enum name="filled" value="0"/>
            <enum name="tonal" value="1"/>
            <enum name="outline" value="2"/>
        </attr>
        <attr name="buttonSize" format="enum">
            <enum name="normal" value="0"/>
            <enum name="large" value="1"/>
            <enum name="extra" value="2"/>
        </attr>
    </declare-styleable>
</resources>
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -18,12 +18,12 @@
<resources>
    <declare-styleable name="ButtonPreference">
        <attr name="android:gravity" />
        <attr name="buttonType" format="enum">
        <attr name="buttonPreferenceType" format="enum">
            <enum name="filled" value="0"/>
            <enum name="tonal" value="1"/>
            <enum name="outline" value="2"/>
        </attr>
        <attr name="buttonSize" format="enum">
        <attr name="buttonPreferenceSize" format="enum">
            <enum name="normal" value="0"/>
            <enum name="large" value="1"/>
            <enum name="extra" value="2"/>
+2 −2
Original line number Diff line number Diff line
@@ -137,8 +137,8 @@ public class ButtonPreference extends Preference {
            mGravity = a.getInt(R.styleable.ButtonPreference_android_gravity, Gravity.START);

            if (SettingsThemeHelper.isExpressiveTheme(context)) {
                int type = a.getInt(R.styleable.ButtonPreference_buttonType, 0);
                int size = a.getInt(R.styleable.ButtonPreference_buttonSize, 0);
                int type = a.getInt(R.styleable.ButtonPreference_buttonPreferenceType, 0);
                int size = a.getInt(R.styleable.ButtonPreference_buttonPreferenceSize, 0);
                resId = ButtonStyle.getLayoutId(type, size);
            }
            a.recycle();