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

Commit b1640c13 authored by Yiyi Shen's avatar Yiyi Shen Committed by Android (Google) Code Review
Browse files

Merge "[Cleanup] Clean up legacy broadcast code from settingslib" into main

parents a5cb1326 073e77f8
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2022 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.
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
       xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
       android:shape="rectangle">
    <solid android:color="?androidprv:attr/colorAccentPrimary" />
    <corners android:radius="@dimen/broadcast_dialog_btn_radius" />
</shape>
+0 −23
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2022 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.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp"
        android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"
        android:tint="?attr/colorControlNormal">
    <path android:fillColor="@android:color/white"
          android:pathData="M9,22.4 L7.6,21 11,17.6V14.3Q10.325,14 9.913,13.375Q9.5,12.75 9.5,12Q9.5,10.95 10.225,10.225Q10.95,9.5 12,9.5Q13.05,9.5 13.775,10.225Q14.5,10.95 14.5,12Q14.5,12.75 14.088,13.375Q13.675,14 13,14.3V17.6L16.4,21L15,22.4L12,19.4ZM5,12Q5,9.05 7.05,7.025Q9.1,5 12,5Q14.9,5 16.95,7.025Q19,9.05 19,12H17Q17,9.925 15.538,8.462Q14.075,7 12,7Q9.925,7 8.463,8.462Q7,9.925 7,12ZM1,12Q1,9.7 1.863,7.7Q2.725,5.7 4.225,4.212Q5.725,2.725 7.725,1.862Q9.725,1 12,1Q14.275,1 16.275,1.862Q18.275,2.725 19.775,4.212Q21.275,5.7 22.138,7.7Q23,9.7 23,12H21Q21,10.125 20.288,8.487Q19.575,6.85 18.35,5.625Q17.125,4.4 15.488,3.7Q13.85,3 12,3Q10.15,3 8.512,3.7Q6.875,4.4 5.65,5.625Q4.425,6.85 3.712,8.487Q3,10.125 3,12Z"/>
</vector>
 No newline at end of file
+0 −84
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 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.
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_width="match_parent"
             android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/dialog_bg"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/broadcast_dialog_margin"
            android:orientation="vertical">

            <ImageView
                android:id="@+id/dialog_icon"
                android:layout_width="@dimen/broadcast_dialog_icon_size"
                android:layout_height="@dimen/broadcast_dialog_icon_size"
                android:layout_marginTop="@dimen/broadcast_dialog_icon_margin_top"
                android:layout_marginBottom="@dimen/broadcast_dialog_title_img_margin_top"
                android:layout_gravity="center"
                android:src="@drawable/settings_input_antenna"/>

            <TextView
                style="@style/BroadcastDialogTitleStyle"
                android:id="@+id/dialog_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:layout_gravity="center"/>

            <TextView
                style="@style/BroadcastDialogBodyStyle"
                android:id="@+id/dialog_subtitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:layout_gravity="center"/>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="@dimen/broadcast_dialog_margin"
            android:layout_marginBottom="@dimen/broadcast_dialog_margin"
            android:orientation="vertical">

            <Button
                android:layout_marginBottom="@dimen/broadcast_dialog_btn_margin_bottom"
                android:id="@+id/positive_btn"
                style="@style/BroadcastDialogButtonStyle"/>

            <Button
                android:layout_marginBottom="@dimen/broadcast_dialog_btn_margin_bottom"
                android:id="@+id/negative_btn"
                android:text="@string/bt_le_audio_broadcast_dialog_different_output"
                style="@style/BroadcastDialogButtonStyle"/>

            <Button
                android:id="@+id/neutral_btn"
                android:text="@android:string/cancel"
                style="@style/BroadcastDialogButtonStyle"/>
        </LinearLayout>

    </LinearLayout>
</FrameLayout>
+1 −14
Original line number Diff line number Diff line
@@ -98,20 +98,7 @@
    <!-- Minimum density scale for external displays for 9 stops. -->
    <fraction name="external_display_density_min_scale_extended">50%</fraction>

    <!-- Broadcast dialog -->
    <dimen name="broadcast_dialog_title_img_margin_top">18dp</dimen>
    <dimen name="broadcast_dialog_title_text_size">24sp</dimen>
    <dimen name="broadcast_dialog_title_text_margin">16dp</dimen>
    <dimen name="broadcast_dialog_title_text_margin_top">18dp</dimen>
    <dimen name="broadcast_dialog_subtitle_text_size">14sp</dimen>
    <dimen name="broadcast_dialog_icon_size">24dp</dimen>
    <dimen name="broadcast_dialog_icon_margin_top">25dp</dimen>
    <dimen name="broadcast_dialog_btn_radius">100dp</dimen>
    <dimen name="broadcast_dialog_btn_margin_bottom">4dp</dimen>
    <dimen name="broadcast_dialog_btn_text_size">16sp</dimen>
    <dimen name="broadcast_dialog_btn_minHeight">44dp</dimen>
    <dimen name="broadcast_dialog_margin">16dp</dimen>

    <dimen name="dialog_title_text_size">24sp</dimen>
    <dimen name="dialog_content_padding">16dp</dimen>
    <dimen name="radio_button_padding">12dp</dimen>
    <dimen name="radio_button_padding_start">8dp</dimen>
+2 −46
Original line number Diff line number Diff line
@@ -34,59 +34,15 @@
        <item name="android:textColor">?android:attr/colorError</item>
    </style>

    <style name="BroadcastDialogTitleStyle">
        <item name="android:textAppearance">@style/TextAppearanceBroadcastDialogTitle</item>
        <item name="android:layout_marginStart">@dimen/broadcast_dialog_title_text_margin</item>
        <item name="android:layout_marginEnd">@dimen/broadcast_dialog_title_text_margin</item>
        <item name="android:layout_marginTop">@dimen/broadcast_dialog_title_text_margin_top</item>
        <item name="android:layout_marginBottom">18dp</item>
    </style>

    <style name="TextAppearanceBroadcastDialogTitle" parent="@android:TextAppearance.DeviceDefault.Headline">
        <item name="android:textSize">@dimen/broadcast_dialog_title_text_size</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:textDirection">locale</item>
        <item name="android:ellipsize">end</item>
    </style>

    <style name="BroadcastDialogBodyStyle">
        <item name="android:textAppearance">@style/TextAppearanceBroadcastDialogSubTitle</item>
        <item name="android:layout_margin">@dimen/broadcast_dialog_title_text_margin</item>
    </style>

    <style name="TextAppearanceBroadcastDialogSubTitle" parent="@android:TextAppearance.DeviceDefault.Headline">
        <item name="android:textSize">@dimen/broadcast_dialog_subtitle_text_size</item>
        <item name="android:textColor">?android:attr/textColorSecondary</item>
        <item name="android:textDirection">locale</item>
        <item name="android:ellipsize">end</item>
    </style>

    <style name="BroadcastDialogButtonStyle">
        <item name="android:textAppearance">@style/TextAppearanceBroadcastDialogButton</item>
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_gravity">center</item>
        <item name="android:gravity">center</item>
        <item name="android:stateListAnimator">@null</item>
        <item name="android:elevation">0dp</item>
        <item name="android:minHeight">@dimen/broadcast_dialog_btn_minHeight</item>
        <item name="android:background">@drawable/broadcast_dialog_btn_bg</item>
    </style>

    <style name="TextAppearanceBroadcastDialogButton" parent="@android:TextAppearance.DeviceDefault.Headline">
        <item name="android:textColor">?androidprv:attr/textColorOnAccent</item>
        <item name="android:textSize">@dimen/broadcast_dialog_btn_text_size</item>
    </style>

    <style name="EditUserDialogTitle" parent="@android:TextAppearance.DeviceDefault.Headline">
        <item name="android:textSize">@dimen/broadcast_dialog_title_text_size</item>
        <item name="android:textSize">@dimen/dialog_title_text_size</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:textDirection">locale</item>
        <item name="android:ellipsize">end</item>
    </style>

    <style name="DialogWithIconTitle" parent="@android:TextAppearance.DeviceDefault.Headline">
        <item name="android:textSize">@dimen/broadcast_dialog_title_text_size</item>
        <item name="android:textSize">@dimen/dialog_title_text_size</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
        <item name="android:textDirection">locale</item>
        <item name="android:ellipsize">end</item>
Loading