[automerge] Fix some history issues 2p: 4d46dddbe7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17710594
Change-Id: Ia4166d749cab1f571f2becec77b3dfae996d5101
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 60174a5..0ed126f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -4079,6 +4079,38 @@
android:value="true" />
</activity>
+ <activity
+ android:name="Settings$BluetoothBroadcastActivity"
+ android:exported="true"
+ android:theme="@style/Theme.AlertDialog.SimConfirmDialog"
+ android:permission="android.permission.BLUETOOTH_CONNECT"
+ android:configChanges="orientation|keyboardHidden|screenSize">
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.MEDIA_BROADCAST_DIALOG" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.bluetooth.BluetoothBroadcastsDialog" />
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
+ </activity>
+
+ <activity
+ android:name="Settings$BluetoothFindBroadcastsActivity"
+ android:label="@string/bluetooth_find_broadcast_title"
+ android:exported="true"
+ android:permission="android.permission.BLUETOOTH_CONNECT"
+ android:configChanges="orientation|keyboardHidden|screenSize">
+ <intent-filter android:priority="1">
+ <action android:name="android.settings.BLUTOOTH_FIND_BROADCASTS_ACTIVITY" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+ android:value="com.android.settings.bluetooth.BluetoothFindBroadcastsFragment" />
+ <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+ android:value="true" />
+ </activity>
+
<activity android:name=".panel.SettingsPanelActivity"
android:label="@string/settings_panel_title"
android:theme="@style/Theme.Panel"
diff --git a/color-check-baseline.xml b/color-check-baseline.xml
index ade5789..edd2d59 100644
--- a/color-check-baseline.xml
+++ b/color-check-baseline.xml
@@ -405,8 +405,8 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <color name="message_text_incoming">#ffffffff</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" <color name="message_text_incoming">#E4E3DA</color>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="47"
@@ -437,8 +437,8 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <color name="message_text_outgoing">#ff323232</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" <color name="message_text_outgoing">#1B1C17</color>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="48"
@@ -533,7 +533,7 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <color name="message_bubble_incoming">#689f38</color>"
+ errorLine1=" <color name="message_bubble_incoming">#52534D</color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
@@ -549,8 +549,8 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <color name="message_bubble_outgoing">#ffffffff</color>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" <color name="message_bubble_outgoing">#C7C8B7</color>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
line="52"
@@ -565,7 +565,7 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <color name="message_icon_background_incoming">#689f38</color>"
+ errorLine1=" <color name="message_icon_background_incoming">#E6F451</color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
@@ -597,7 +597,7 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <color name="message_icon_background_outgoing">#4285f4</color>"
+ errorLine1=" <color name="message_icon_background_outgoing">#FBBC04</color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
@@ -629,11 +629,27 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" <color name="message_icon_color">#DADADA</color>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/values/colors.xml"
+ line="57"
+ column="5"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" <color name="usage_graph_dots">#B0BEC5</color>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="58"
+ line="59"
column="5"/>
</issue>
@@ -649,7 +665,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="61"
+ line="62"
column="5"/>
</issue>
@@ -665,7 +681,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="64"
+ line="65"
column="5"/>
</issue>
@@ -681,7 +697,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="67"
+ line="68"
column="5"/>
</issue>
@@ -697,7 +713,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="70"
+ line="71"
column="5"/>
</issue>
@@ -713,7 +729,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="71"
+ line="72"
column="5"/>
</issue>
@@ -729,7 +745,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="72"
+ line="73"
column="5"/>
</issue>
@@ -745,7 +761,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="73"
+ line="74"
column="5"/>
</issue>
@@ -761,7 +777,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="74"
+ line="75"
column="5"/>
</issue>
@@ -777,7 +793,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="75"
+ line="76"
column="5"/>
</issue>
@@ -793,7 +809,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="76"
+ line="77"
column="5"/>
</issue>
@@ -809,7 +825,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="77"
+ line="78"
column="5"/>
</issue>
@@ -825,7 +841,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="78"
+ line="79"
column="5"/>
</issue>
@@ -841,7 +857,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="79"
+ line="80"
column="5"/>
</issue>
@@ -857,7 +873,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="80"
+ line="81"
column="5"/>
</issue>
@@ -873,7 +889,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="81"
+ line="82"
column="5"/>
</issue>
@@ -889,7 +905,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="82"
+ line="83"
column="5"/>
</issue>
@@ -905,7 +921,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="83"
+ line="84"
column="5"/>
</issue>
@@ -921,7 +937,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="84"
+ line="85"
column="5"/>
</issue>
@@ -937,7 +953,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="85"
+ line="86"
column="5"/>
</issue>
@@ -953,7 +969,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="86"
+ line="87"
column="5"/>
</issue>
@@ -969,7 +985,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="87"
+ line="88"
column="5"/>
</issue>
@@ -985,7 +1001,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="88"
+ line="89"
column="5"/>
</issue>
@@ -1001,7 +1017,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="95"
+ line="96"
column="5"/>
</issue>
@@ -1017,7 +1033,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="98"
+ line="99"
column="5"/>
</issue>
@@ -1033,7 +1049,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="99"
+ line="100"
column="5"/>
</issue>
@@ -1049,7 +1065,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="100"
+ line="101"
column="5"/>
</issue>
@@ -1065,7 +1081,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="101"
+ line="102"
column="5"/>
</issue>
@@ -1081,7 +1097,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="102"
+ line="103"
column="5"/>
</issue>
@@ -1097,7 +1113,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="103"
+ line="104"
column="5"/>
</issue>
@@ -1113,7 +1129,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="106"
+ line="107"
column="5"/>
</issue>
@@ -1129,7 +1145,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="107"
+ line="108"
column="5"/>
</issue>
@@ -1145,7 +1161,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="108"
+ line="109"
column="5"/>
</issue>
@@ -1161,7 +1177,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="109"
+ line="110"
column="5"/>
</issue>
@@ -1177,7 +1193,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="110"
+ line="111"
column="5"/>
</issue>
@@ -1193,7 +1209,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="113"
+ line="114"
column="5"/>
</issue>
@@ -1209,7 +1225,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="114"
+ line="115"
column="5"/>
</issue>
@@ -1225,7 +1241,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="115"
+ line="116"
column="5"/>
</issue>
@@ -1241,7 +1257,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="118"
+ line="119"
column="5"/>
</issue>
@@ -1257,7 +1273,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="119"
+ line="120"
column="5"/>
</issue>
@@ -1273,7 +1289,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="120"
+ line="121"
column="5"/>
</issue>
@@ -1289,7 +1305,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="121"
+ line="122"
column="5"/>
</issue>
@@ -1305,7 +1321,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="122"
+ line="123"
column="5"/>
</issue>
@@ -1321,7 +1337,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="123"
+ line="124"
column="5"/>
</issue>
@@ -1337,7 +1353,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="130"
+ line="131"
column="5"/>
</issue>
@@ -1353,7 +1369,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="131"
+ line="132"
column="5"/>
</issue>
@@ -1369,7 +1385,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="132"
+ line="133"
column="5"/>
</issue>
@@ -1385,7 +1401,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="138"
+ line="139"
column="5"/>
</issue>
@@ -1401,7 +1417,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="140"
+ line="141"
column="5"/>
</issue>
@@ -1417,7 +1433,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="144"
+ line="145"
column="5"/>
</issue>
@@ -1433,7 +1449,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="145"
+ line="146"
column="5"/>
</issue>
@@ -1449,7 +1465,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="146"
+ line="147"
column="5"/>
</issue>
@@ -1465,7 +1481,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="147"
+ line="148"
column="5"/>
</issue>
@@ -1481,7 +1497,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="148"
+ line="149"
column="5"/>
</issue>
@@ -1497,7 +1513,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="149"
+ line="150"
column="5"/>
</issue>
@@ -1513,7 +1529,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="150"
+ line="151"
column="5"/>
</issue>
@@ -1529,7 +1545,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="151"
+ line="152"
column="5"/>
</issue>
@@ -1545,7 +1561,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="154"
+ line="155"
column="5"/>
</issue>
@@ -1561,7 +1577,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="155"
+ line="156"
column="5"/>
</issue>
@@ -1577,7 +1593,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="156"
+ line="157"
column="5"/>
</issue>
@@ -1593,7 +1609,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="157"
+ line="158"
column="5"/>
</issue>
@@ -1609,7 +1625,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="158"
+ line="159"
column="5"/>
</issue>
@@ -1625,7 +1641,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="159"
+ line="160"
column="5"/>
</issue>
@@ -1641,7 +1657,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="160"
+ line="161"
column="5"/>
</issue>
@@ -1657,7 +1673,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="161"
+ line="162"
column="5"/>
</issue>
@@ -1673,7 +1689,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="164"
+ line="165"
column="5"/>
</issue>
@@ -1689,7 +1705,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="165"
+ line="166"
column="5"/>
</issue>
@@ -1705,7 +1721,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="166"
+ line="167"
column="5"/>
</issue>
@@ -1721,7 +1737,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="167"
+ line="168"
column="5"/>
</issue>
@@ -1737,7 +1753,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="168"
+ line="169"
column="5"/>
</issue>
@@ -1753,7 +1769,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="169"
+ line="170"
column="5"/>
</issue>
@@ -1769,7 +1785,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="172"
+ line="173"
column="5"/>
</issue>
@@ -1785,7 +1801,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="173"
+ line="174"
column="5"/>
</issue>
@@ -1801,7 +1817,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="174"
+ line="175"
column="5"/>
</issue>
@@ -1817,7 +1833,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="175"
+ line="176"
column="5"/>
</issue>
@@ -1833,7 +1849,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="176"
+ line="177"
column="5"/>
</issue>
@@ -1849,7 +1865,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="177"
+ line="178"
column="5"/>
</issue>
@@ -1865,7 +1881,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="180"
+ line="181"
column="5"/>
</issue>
@@ -1881,7 +1897,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="181"
+ line="182"
column="5"/>
</issue>
@@ -1897,7 +1913,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="182"
+ line="183"
column="5"/>
</issue>
@@ -1913,7 +1929,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="183"
+ line="184"
column="5"/>
</issue>
@@ -1929,7 +1945,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="184"
+ line="185"
column="5"/>
</issue>
@@ -1945,7 +1961,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="185"
+ line="186"
column="5"/>
</issue>
@@ -1961,7 +1977,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="191"
+ line="192"
column="5"/>
</issue>
@@ -1977,7 +1993,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="192"
+ line="193"
column="5"/>
</issue>
@@ -1993,7 +2009,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="193"
+ line="194"
column="5"/>
</issue>
@@ -2009,7 +2025,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="194"
+ line="195"
column="5"/>
</issue>
@@ -2025,7 +2041,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="196"
+ line="197"
column="5"/>
</issue>
@@ -2041,7 +2057,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="198"
+ line="199"
column="5"/>
</issue>
@@ -2057,7 +2073,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/colors.xml"
- line="201"
+ line="202"
column="5"/>
</issue>
@@ -2085,6 +2101,22 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
+ errorLine1=" android:color="#639DF6"/>"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="res/drawable/conversation_message_text_info_view_background.xml"
+ line="23"
+ column="9"/>
+ </issue>
+
+ <issue
+ id="HardCodedColor"
+ severity="Error"
+ message="Avoid using hardcoded color"
+ category="Correctness"
+ priority="4"
+ summary="Using hardcoded color"
+ explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:tint="@color/face_enroll_icon_color">"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -2997,102 +3029,6 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <item android:offset="0" android:color="#33263238"/>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/drawable/ic_files_go_round.xml"
- line="46"
- column="34"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <item android:offset="1" android:color="#00263238"/>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/drawable/ic_files_go_round.xml"
- line="47"
- column="34"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <item android:offset="0" android:color="#281A237E"/>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/drawable/ic_files_go_round.xml"
- line="71"
- column="34"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <item android:offset="1" android:color="#051A237E"/>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/drawable/ic_files_go_round.xml"
- line="72"
- column="34"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <item android:offset="0.0029046" android:color="#19FFFFFF"/>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/drawable/ic_files_go_round.xml"
- line="116"
- column="42"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" <item android:offset="1" android:color="#00FFFFFF"/>"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/drawable/ic_files_go_round.xml"
- line="117"
- column="34"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
errorLine1=" android:color="@color/accessibility_feature_background"/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@@ -4389,11 +4325,11 @@
priority="4"
summary="Using hardcoded color"
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" app:iconTextColor="@color/message_icon_text_outgoing""
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ errorLine1=" app:iconBackgroundColor="@color/message_icon_background_incoming" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/screen_zoom_preview_1.xml"
- line="44"
+ line="42"
column="17"/>
</issue>
@@ -4409,103 +4345,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/screen_zoom_preview_1.xml"
- line="45"
- column="17"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" app:iconTextColor="@color/message_icon_text_incoming""
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/layout/screen_zoom_preview_1.xml"
- line="54"
- column="17"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" app:iconBackgroundColor="@color/message_icon_background_incoming" />"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/layout/screen_zoom_preview_1.xml"
- line="55"
- column="17"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" app:iconTextColor="@color/message_icon_text_outgoing""
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/layout/screen_zoom_preview_1.xml"
- line="64"
- column="17"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" app:iconBackgroundColor="@color/message_icon_background_outgoing" />"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/layout/screen_zoom_preview_1.xml"
- line="65"
- column="17"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" app:iconTextColor="@color/message_icon_text_incoming""
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/layout/screen_zoom_preview_1.xml"
- line="74"
- column="17"/>
- </issue>
-
- <issue
- id="HardCodedColor"
- severity="Error"
- message="Avoid using hardcoded color"
- category="Correctness"
- priority="4"
- summary="Using hardcoded color"
- explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
- errorLine1=" app:iconBackgroundColor="@color/message_icon_background_incoming" />"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="res/layout/screen_zoom_preview_1.xml"
- line="75"
+ line="49"
column="17"/>
</issue>
@@ -4569,7 +4409,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rXC/strings.xml"
- line="3144"
+ line="3152"
column="170"/>
</issue>
@@ -4585,7 +4425,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rAU/strings.xml"
- line="3158"
+ line="3157"
column="64"/>
</issue>
@@ -4601,7 +4441,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rCA/strings.xml"
- line="3158"
+ line="3157"
column="64"/>
</issue>
@@ -4617,7 +4457,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rGB/strings.xml"
- line="3158"
+ line="3157"
column="64"/>
</issue>
@@ -4633,7 +4473,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values-en-rIN/strings.xml"
- line="3158"
+ line="3157"
column="64"/>
</issue>
@@ -4649,7 +4489,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="res/values/strings.xml"
- line="7139"
+ line="7160"
column="36"/>
</issue>
diff --git a/res/drawable/broadcast_button_outline.xml b/res/drawable/broadcast_button_outline.xml
new file mode 100644
index 0000000..6609915
--- /dev/null
+++ b/res/drawable/broadcast_button_outline.xml
@@ -0,0 +1,42 @@
+<?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.
+-->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ android:insetTop="6dp"
+ android:insetBottom="6dp">
+ <ripple android:color="?android:attr/colorControlHighlight">
+ <item android:id="@android:id/mask">
+ <shape android:shape="rectangle">
+ <solid android:color="@android:color/white"/>
+ <corners android:radius="24dp"/>
+ </shape>
+ </item>
+ <item>
+ <shape android:shape="rectangle">
+ <corners android:radius="24dp"/>
+ <solid android:color="@android:color/transparent"/>
+ <stroke android:color="?androidprv:attr/colorAccentPrimaryVariant"
+ android:width="1dp"
+ />
+ <padding android:left="16dp"
+ android:top="8dp"
+ android:right="16dp"
+ android:bottom="8dp"/>
+ </shape>
+ </item>
+ </ripple>
+</inset>
diff --git a/res/layout/bluetooth_broadcast_entity_header.xml b/res/layout/bluetooth_broadcast_entity_header.xml
new file mode 100644
index 0000000..cc18d94
--- /dev/null
+++ b/res/layout/bluetooth_broadcast_entity_header.xml
@@ -0,0 +1,99 @@
+<?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.
+ -->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/entity_header"
+ style="@style/EntityHeader"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/entity_header_title"
+ style="@style/TextAppearance.EntityHeaderTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="false"
+ android:ellipsize="marquee"
+ android:textDirection="locale"/>
+
+ <TextView
+ android:id="@+id/entity_header_summary"
+ style="@style/TextAppearance.EntityHeaderSummary"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/bluetooth_find_broadcast_header_top_margin"
+ android:singleLine="false"
+ android:ellipsize="marquee"
+ android:textDirection="locale"/>
+
+ <Button
+ android:id="@+id/button_find_broadcast"
+ android:layout_width="@dimen/bluetooth_find_broadcast_button_one_size"
+ android:layout_height="wrap_content"
+ android:text="@string/bluetooth_find_broadcast"
+ android:clickable="true"
+ style="@style/BroadcastActionButton" />
+
+ <LinearLayout
+ android:id="@+id/button_broadcast_layout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:orientation="horizontal" >
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+ <Button
+ android:id="@+id/button_leave_broadcast"
+ android:layout_width="@dimen/bluetooth_find_broadcast_button_two_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/bluetooth_find_broadcast_button_leave"
+ android:clickable="true"
+ style="@style/BroadcastActionButton" />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/bluetooth_find_broadcast_button_start_margin">
+ <Button
+ android:id="@+id/button_scan_qr_code"
+ android:layout_width="@dimen/bluetooth_find_broadcast_button_two_size"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/bluetooth_find_broadcast_button_scan"
+ android:clickable="true"
+ style="@style/BroadcastActionButton" />
+ </LinearLayout>
+
+ </LinearLayout>
+
+ <android.widget.ProgressBar
+ android:id="@+id/progressBar"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:layout_width="@dimen/bluetooth_find_broadcast_progress_width"
+ android:layout_height="@dimen/bluetooth_find_broadcast_progress_height"
+ android:layout_marginTop="@dimen/bluetooth_find_broadcast_progress_margin_top"
+ android:progressDrawable="@drawable/color_bar_progress"/>
+</LinearLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 4db51c6..b67bb22 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -416,6 +416,15 @@
<dimen name="le_bluetooth_summary_start_margin">20dp</dimen>
<dimen name="le_bluetooth_summary_padding">1.5dp</dimen>
+ <!-- Header layout of bluetooth find broadcast page -->
+ <dimen name="bluetooth_find_broadcast_button_one_size">220dp</dimen>
+ <dimen name="bluetooth_find_broadcast_button_two_size">150dp</dimen>
+ <dimen name="bluetooth_find_broadcast_button_start_margin">16dp</dimen>
+ <dimen name="bluetooth_find_broadcast_header_top_margin">4dp</dimen>
+ <dimen name="bluetooth_find_broadcast_progress_width">155dp</dimen>
+ <dimen name="bluetooth_find_broadcast_progress_height">4dp</dimen>
+ <dimen name="bluetooth_find_broadcast_progress_margin_top">8dp</dimen>
+
<!-- Developer option bluetooth settings dialog -->
<dimen name="developer_option_dialog_margin_start">8dp</dimen>
<dimen name="developer_option_dialog_margin_top">8dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 67c0fe0..863bd8d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -14123,4 +14123,22 @@
<string name="ingress_rate_limit_dialog_title">Configure network download rate limit</string>
<!-- Developer Settings: Dialog ListPreference option to disable network bandwidth ingress rate limit [CHAR LIMIT=none] -->
<string name="ingress_rate_limit_no_limit_entry">No limit</string>
+
+ <!-- BT LE Audio Device: Media Broadcast -->
+ <!-- The title of the Media Broadcast Dialog [CHAR LIMIT=none] -->
+ <string name="bluetooth_broadcast_dialog_title">Broadcast</string>
+ <!-- The message of the Media Broadcast Dialog for finding broadcast [CHAR LIMIT=none] -->
+ <string name="bluetooth_broadcast_dialog_find_message">Listen to broadcasts that are playing near you</string>
+ <!-- The message of the Media Broadcast Dialog for broadcast [CHAR LIMIT=none] -->
+ <string name="bluetooth_broadcast_dialog_broadcast_message">Broadcast media to devices near you, or listen to someone else’s broadcast</string>
+ <!-- The title of the Media Find Broadcast activity [CHAR LIMIT=none] -->
+ <string name="bluetooth_find_broadcast_title">Broadcasts</string>
+ <!-- The summary of the Media Find Broadcast activity [CHAR LIMIT=none] -->
+ <string name="bluetooth_find_broadcast_summary">Listening to</string>
+ <!-- The Button of the action to find broadcasts [CHAR LIMIT=none] -->
+ <string name="bluetooth_find_broadcast">Find broadcasts</string>
+ <!-- The Button of the action to leave the broadcast [CHAR LIMIT=none] -->
+ <string name="bluetooth_find_broadcast_button_leave">Leave broadcast</string>
+ <!-- The Button of the action to scan QR code [CHAR LIMIT=none] -->
+ <string name="bluetooth_find_broadcast_button_scan">Scan QR code</string>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8e91a9e..5e4e5a4 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -953,4 +953,15 @@
<item name="android:background">@drawable/data_bytes_editor_spinner_background</item>
<item name="android:dropDownVerticalOffset">36dp</item>
</style>
+
+ <style name="BroadcastActionButton" parent="@android:style/Widget.Material.Button">
+ <item name="android:background">@drawable/broadcast_button_outline</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ <item name="android:textSize">14sp</item>
+ <item name="android:lineHeight">20sp</item>
+ <item name="android:fontFamily">@*android:string/config_bodyFontFamilyMedium</item>
+ <item name="android:stateListAnimator">@null</item>
+ <item name="android:minWidth">0dp</item>
+ <item name="android:textAllCaps">false</item>
+ </style>
</resources>
diff --git a/res/xml/bluetooth_find_broadcasts_fragment.xml b/res/xml/bluetooth_find_broadcasts_fragment.xml
new file mode 100644
index 0000000..a564ac9
--- /dev/null
+++ b/res/xml/bluetooth_find_broadcasts_fragment.xml
@@ -0,0 +1,35 @@
+<?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.
+ -->
+<PreferenceScreen
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:settings="http://schemas.android.com/apk/res-auto"
+ android:title="@string/bluetooth_find_broadcast_title">
+
+ <com.android.settingslib.widget.LayoutPreference
+ android:key="bluetooth_find_broadcast_header"
+ android:layout="@layout/bluetooth_broadcast_entity_header"
+ android:selectable="false"
+ settings:allowDividerBelow="true"
+ settings:searchable="false" />
+
+ <PreferenceCategory
+ android:key="broadcast_source_list"
+ android:layout="@layout/preference_category_no_label"/>
+
+</PreferenceScreen>
+
+
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 9cccb00..553ed19 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -358,6 +358,8 @@
public static class WebViewAppPickerActivity extends SettingsActivity { /* empty */ }
public static class AdvancedConnectedDeviceActivity extends SettingsActivity { /* empty */ }
public static class BluetoothDeviceDetailActivity extends SettingsActivity { /* empty */ }
+ public static class BluetoothBroadcastActivity extends SettingsActivity { /* empty */ }
+ public static class BluetoothFindBroadcastsActivity extends SettingsActivity { /* empty */ }
public static class WifiCallingDisclaimerActivity extends SettingsActivity { /* empty */ }
public static class MobileNetworkListActivity extends SettingsActivity {}
public static class PowerMenuSettingsActivity extends SettingsActivity {}
diff --git a/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java b/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
index bd8ee66..248bc12 100644
--- a/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleFeaturePreferenceFragment.java
@@ -157,7 +157,6 @@
}
}
- setupDefaultShortcutIfNecessary(getPrefContext());
final int resId = getPreferenceScreenResId();
if (resId <= 0) {
final PreferenceScreen preferenceScreen = getPreferenceManager().createPreferenceScreen(
@@ -226,6 +225,8 @@
if (mNeedsQSTooltipReshow) {
getView().post(this::showQuickSettingsTooltipIfNeeded);
}
+
+ writeDefaultShortcutTargetServiceToSettingsIfNeeded(getPrefContext());
}
@Override
@@ -792,8 +793,22 @@
/**
* Setups a configurable default if the setting has never been set.
+ *
+ * TODO(b/228562075): Remove this function when correcting the format in config file
+ * `config_defaultAccessibilityService`.
*/
- private static void setupDefaultShortcutIfNecessary(Context context) {
+ private void writeDefaultShortcutTargetServiceToSettingsIfNeeded(Context context) {
+ if (mComponentName == null) {
+ return;
+ }
+
+ final ComponentName defaultService = ComponentName.unflattenFromString(context.getString(
+ com.android.internal.R.string.config_defaultAccessibilityService));
+ // write default accessibility service only when user enter into corresponding page.
+ if (!mComponentName.equals(defaultService)) {
+ return;
+ }
+
final String targetKey = Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE;
String targetString = Settings.Secure.getString(context.getContentResolver(), targetKey);
if (!TextUtils.isEmpty(targetString)) {
diff --git a/src/com/android/settings/bluetooth/BluetoothBroadcastDialog.java b/src/com/android/settings/bluetooth/BluetoothBroadcastDialog.java
new file mode 100644
index 0000000..c743653
--- /dev/null
+++ b/src/com/android/settings/bluetooth/BluetoothBroadcastDialog.java
@@ -0,0 +1,139 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.bluetooth;
+
+import android.app.Dialog;
+import android.app.settings.SettingsEnums;
+import android.content.Context;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+
+import androidx.appcompat.app.AlertDialog;
+
+import com.android.settings.R;
+import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
+
+import java.util.ArrayList;
+
+/**
+ * This Dialog allowed users to do some actions for broadcast media or find the
+ * nearby broadcast sources.
+ */
+public class BluetoothBroadcastDialog extends InstrumentedDialogFragment {
+
+ private static final String TAG = "BTBroadcastsDialog";
+
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setShowsDialog(true);
+ }
+
+ @Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ final Context context = getActivity();
+ final boolean isMediaPlaying = isMediaPlaying();
+
+ final AlertDialog.Builder builder = new AlertDialog.Builder(context);
+ builder.setTitle(isMediaPlaying ? R.string.bluetooth_find_broadcast
+ : R.string.bluetooth_broadcast_dialog_title);
+ builder.setMessage(isMediaPlaying ? R.string.bluetooth_broadcast_dialog_find_message
+ : R.string.bluetooth_broadcast_dialog_broadcast_message);
+
+ ArrayList<String> optionList = new ArrayList<String>();
+ if (!isMediaPlaying) {
+ optionList.add(context.getString(R.string.bluetooth_broadcast_dialog_title));
+ }
+ optionList.add(context.getString(R.string.bluetooth_find_broadcast));
+ optionList.add(context.getString(android.R.string.cancel));
+
+ View content = LayoutInflater.from(context).inflate(
+ R.layout.sim_confirm_dialog_multiple_enabled_profiles_supported, null);
+
+ if (content != null) {
+ Log.i(TAG, "list =" + optionList.toString());
+
+ final ArrayAdapter<String> arrayAdapterItems = new ArrayAdapter<String>(
+ context,
+ R.layout.sim_confirm_dialog_item_multiple_enabled_profiles_supported,
+ optionList);
+ final ListView lvItems = content.findViewById(R.id.carrier_list);
+ if (lvItems != null) {
+ lvItems.setVisibility(View.VISIBLE);
+ lvItems.setAdapter(arrayAdapterItems);
+ lvItems.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+ @Override
+ public void onItemClick(AdapterView<?> parent, View view, int position,
+ long id) {
+ Log.i(TAG, "list onClick =" + position);
+ Log.i(TAG, "list item =" + optionList.get(position));
+
+ if (position == optionList.size() - 1) {
+ // The last position in the options is the Cancel button. So when
+ // the user clicks the button, we do nothing but dismiss the dialog.
+ dismiss();
+ } else {
+ if (optionList.get(position).equals(
+ context.getString(R.string.bluetooth_find_broadcast))) {
+ launchFindBroadcastsActivity();
+ } else {
+ launchMediaOutputBroadcastDialog();
+ }
+ }
+ }
+ });
+ }
+ builder.setView(content);
+ } else {
+ Log.i(TAG, "optionList is empty");
+ }
+
+ AlertDialog dialog = builder.create();
+ dialog.setCanceledOnTouchOutside(false);
+ return dialog;
+ }
+
+ private boolean isMediaPlaying() {
+ return true;
+ }
+
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ }
+
+ @Override
+ public int getMetricsCategory() {
+ //TODO(b/228255796) : add new enum for find broadcast fragment
+ return SettingsEnums.PAGE_UNKNOWN;
+ }
+
+ private void launchFindBroadcastsActivity() {
+
+ }
+
+ private void launchMediaOutputBroadcastDialog() {
+
+ }
+}
diff --git a/src/com/android/settings/bluetooth/BluetoothFindBroadcastsFragment.java b/src/com/android/settings/bluetooth/BluetoothFindBroadcastsFragment.java
new file mode 100644
index 0000000..f251db5
--- /dev/null
+++ b/src/com/android/settings/bluetooth/BluetoothFindBroadcastsFragment.java
@@ -0,0 +1,128 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.bluetooth;
+
+import static android.bluetooth.BluetoothDevice.BOND_NONE;
+import static android.os.UserManager.DISALLOW_CONFIG_BLUETOOTH;
+
+import android.app.settings.SettingsEnums;
+import android.bluetooth.BluetoothDevice;
+import android.content.Context;
+import android.util.Log;
+
+import androidx.annotation.VisibleForTesting;
+
+import com.android.settings.R;
+import com.android.settings.dashboard.RestrictedDashboardFragment;
+import com.android.settingslib.bluetooth.CachedBluetoothDevice;
+import com.android.settingslib.bluetooth.LocalBluetoothManager;
+import com.android.settingslib.core.AbstractPreferenceController;
+import com.android.settingslib.core.lifecycle.Lifecycle;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This fragment allowed users to find the nearby broadcast sources.
+ */
+public class BluetoothFindBroadcastsFragment extends RestrictedDashboardFragment {
+
+ private static final String TAG = "BTFindBroadcastsFrg";
+
+ public static final String KEY_DEVICE_ADDRESS = "device_address";
+
+ public static final String PREF_KEY_BROADCAST_SOURCE = "broadcast_source";
+
+ @VisibleForTesting
+ String mDeviceAddress;
+ @VisibleForTesting
+ LocalBluetoothManager mManager;
+ @VisibleForTesting
+ CachedBluetoothDevice mCachedDevice;
+
+ public BluetoothFindBroadcastsFragment() {
+ super(DISALLOW_CONFIG_BLUETOOTH);
+ }
+
+ @VisibleForTesting
+ LocalBluetoothManager getLocalBluetoothManager(Context context) {
+ return Utils.getLocalBtManager(context);
+ }
+
+ @VisibleForTesting
+ CachedBluetoothDevice getCachedDevice(String deviceAddress) {
+ BluetoothDevice remoteDevice =
+ mManager.getBluetoothAdapter().getRemoteDevice(deviceAddress);
+ return mManager.getCachedDeviceManager().findDevice(remoteDevice);
+ }
+
+ @Override
+ public void onAttach(Context context) {
+ mDeviceAddress = getArguments().getString(KEY_DEVICE_ADDRESS);
+ mManager = getLocalBluetoothManager(context);
+ mCachedDevice = getCachedDevice(mDeviceAddress);
+ super.onAttach(context);
+ if (mCachedDevice == null) {
+ //Close this page if device is null with invalid device mac address
+ Log.w(TAG, "onAttach() CachedDevice is null!");
+ finish();
+ return;
+ }
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ finishFragmentIfNecessary();
+ }
+
+ @VisibleForTesting
+ void finishFragmentIfNecessary() {
+ if (mCachedDevice.getBondState() == BOND_NONE) {
+ finish();
+ return;
+ }
+ }
+
+ @Override
+ public int getMetricsCategory() {
+ //TODO(b/228255796) : add new enum for find broadcast fragment
+ return SettingsEnums.PAGE_UNKNOWN;
+ }
+
+ @Override
+ protected String getLogTag() {
+ return TAG;
+ }
+
+ @Override
+ protected int getPreferenceScreenResId() {
+ return R.xml.bluetooth_find_broadcasts_fragment;
+ }
+
+ @Override
+ protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
+ ArrayList<AbstractPreferenceController> controllers = new ArrayList<>();
+
+ if (mCachedDevice != null) {
+ Lifecycle lifecycle = getSettingsLifecycle();
+ controllers.add(new BluetoothFindBroadcastsHeaderController(context, this,
+ mCachedDevice, lifecycle, mManager));
+ }
+ return controllers;
+ }
+}
diff --git a/src/com/android/settings/bluetooth/BluetoothFindBroadcastsHeaderController.java b/src/com/android/settings/bluetooth/BluetoothFindBroadcastsHeaderController.java
new file mode 100644
index 0000000..dfdcae0
--- /dev/null
+++ b/src/com/android/settings/bluetooth/BluetoothFindBroadcastsHeaderController.java
@@ -0,0 +1,131 @@
+/*
+ * 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.
+ */
+
+package com.android.settings.bluetooth;
+
+import android.content.Context;
+import android.util.Log;
+import android.view.View;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceScreen;
+
+import com.android.settings.R;
+import com.android.settingslib.bluetooth.CachedBluetoothDevice;
+import com.android.settingslib.bluetooth.LocalBluetoothManager;
+import com.android.settingslib.bluetooth.LocalBluetoothProfileManager;
+import com.android.settingslib.core.lifecycle.Lifecycle;
+import com.android.settingslib.widget.LayoutPreference;
+
+/**
+ * This class adds a header to display the action button for joining the broadcast session
+ * by scanning QR code and leaving the broadcast session
+ */
+public class BluetoothFindBroadcastsHeaderController extends BluetoothDetailsController {
+ private static final String TAG = "BtFindBroadcastCtrl";
+
+ private static final String KEY_BROADCAST_HEADER = "bluetooth_find_broadcast_header";
+ private static final String KEY_BROADCAST_SOURCE_LIST = "broadcast_source_list";
+
+ LayoutPreference mLayoutPreference;
+ PreferenceCategory mBroadcastSourceList;
+ TextView mTitle;
+ TextView mSummary;
+ Button mBtnFindBroadcast;
+ LinearLayout mBtnBroadcastLayout;
+ Button mBtnLeaveBroadcast;
+ Button mBtnScanQrCode;
+
+ public BluetoothFindBroadcastsHeaderController(Context context,
+ PreferenceFragmentCompat fragment, CachedBluetoothDevice device, Lifecycle lifecycle,
+ LocalBluetoothManager bluetoothManager) {
+ super(context, fragment, device, lifecycle);
+ }
+
+ @Override
+ protected void init(PreferenceScreen screen) {
+ mLayoutPreference = screen.findPreference(KEY_BROADCAST_HEADER);
+ mBroadcastSourceList = screen.findPreference(KEY_BROADCAST_SOURCE_LIST);
+
+ refresh();
+ }
+
+ @Override
+ protected void refresh() {
+ if (mLayoutPreference == null || mCachedDevice == null) {
+ return;
+ }
+
+ mTitle = mLayoutPreference.findViewById(R.id.entity_header_title);
+ mTitle.setText(mCachedDevice.getName());
+ mSummary = mLayoutPreference.findViewById(R.id.entity_header_summary);
+ mSummary.setText("");
+
+ mBtnFindBroadcast = mLayoutPreference.findViewById(R.id.button_find_broadcast);
+ mBtnFindBroadcast.setOnClickListener(v -> scanBroadcastSource());
+ mBtnBroadcastLayout = mLayoutPreference.findViewById(R.id.button_broadcast_layout);
+ mBtnLeaveBroadcast = mLayoutPreference.findViewById(R.id.button_leave_broadcast);
+ mBtnLeaveBroadcast.setOnClickListener(v -> leaveBroadcastSession());
+ mBtnScanQrCode = mLayoutPreference.findViewById(R.id.button_scan_qr_code);
+ mBtnScanQrCode.setOnClickListener(v -> launchQrCodeScanner());
+
+ updateHeaderLayout();
+ }
+
+ private boolean isBroadcastSourceExist() {
+ return mBroadcastSourceList.getPreferenceCount() > 0;
+ }
+
+ private void updateHeaderLayout() {
+ if (isBroadcastSourceExist()) {
+ mBtnFindBroadcast.setVisibility(View.GONE);
+ mBtnBroadcastLayout.setVisibility(View.VISIBLE);
+ } else {
+ mBtnFindBroadcast.setVisibility(View.VISIBLE);
+ mBtnBroadcastLayout.setVisibility(View.GONE);
+ }
+ }
+
+ private void scanBroadcastSource() {
+ // TODO(b/228258236) : Call the LocalBluetoothLeBroadcastAssistant
+ // to start searching for source
+ }
+
+ private void leaveBroadcastSession() {
+ // TODO(b/228258236) : Call the LocalBluetoothLeBroadcastAssistant
+ // to leave the broadcast session
+ }
+
+ private void launchQrCodeScanner() {
+ // TODO(b/228259065) : Launch the QR code scanner page by intent
+ }
+
+ @Override
+ public void onDeviceAttributesChanged() {
+ if (mCachedDevice != null) {
+ refresh();
+ }
+ }
+
+ @Override
+ public String getPreferenceKey() {
+ return KEY_BROADCAST_HEADER;
+ }
+}
diff --git a/src/com/android/settings/core/gateway/SettingsGateway.java b/src/com/android/settings/core/gateway/SettingsGateway.java
index b11ce01..81de756 100644
--- a/src/com/android/settings/core/gateway/SettingsGateway.java
+++ b/src/com/android/settings/core/gateway/SettingsGateway.java
@@ -71,7 +71,9 @@
import com.android.settings.biometrics.combination.CombinedBiometricSettings;
import com.android.settings.biometrics.face.FaceSettings;
import com.android.settings.biometrics.fingerprint.FingerprintSettings;
+import com.android.settings.bluetooth.BluetoothBroadcastDialog;
import com.android.settings.bluetooth.BluetoothDeviceDetailsFragment;
+import com.android.settings.bluetooth.BluetoothFindBroadcastsFragment;
import com.android.settings.bluetooth.BluetoothPairingDetail;
import com.android.settings.bugreporthandler.BugReportHandlerPicker;
import com.android.settings.connecteddevice.AdvancedConnectedDeviceDashboardFragment;
@@ -317,6 +319,8 @@
WebViewAppPicker.class.getName(),
LockscreenDashboardFragment.class.getName(),
BluetoothDeviceDetailsFragment.class.getName(),
+ BluetoothBroadcastDialog.class.getName(),
+ BluetoothFindBroadcastsFragment.class.getName(),
DataUsageList.class.getName(),
ToggleBackupSettingFragment.class.getName(),
PreviouslyConnectedDeviceDashboardFragment.class.getName(),
diff --git a/src/com/android/settings/fuelgauge/ConvertUtils.java b/src/com/android/settings/fuelgauge/ConvertUtils.java
index 4794d42..946c910 100644
--- a/src/com/android/settings/fuelgauge/ConvertUtils.java
+++ b/src/com/android/settings/fuelgauge/ConvertUtils.java
@@ -21,6 +21,7 @@
import android.os.UserHandle;
import android.text.format.DateFormat;
import android.text.format.DateUtils;
+import android.util.ArraySet;
import android.util.Log;
import androidx.annotation.VisibleForTesting;
@@ -32,7 +33,6 @@
import java.time.Duration;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
@@ -182,7 +182,7 @@
}
// Collects all keys in these three time slot records as all populations.
- final Set<String> allBatteryHistEntryKeys = new HashSet<>();
+ final Set<String> allBatteryHistEntryKeys = new ArraySet<>();
allBatteryHistEntryKeys.addAll(currentBatteryHistMap.keySet());
allBatteryHistEntryKeys.addAll(nextBatteryHistMap.keySet());
allBatteryHistEntryKeys.addAll(nextTwoBatteryHistMap.keySet());
diff --git a/src/com/android/settings/fuelgauge/PowerUsageFeatureProviderImpl.java b/src/com/android/settings/fuelgauge/PowerUsageFeatureProviderImpl.java
index 81e11b0..45b4886 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageFeatureProviderImpl.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageFeatureProviderImpl.java
@@ -21,12 +21,12 @@
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Process;
+import android.util.ArraySet;
import android.util.SparseIntArray;
import com.android.internal.util.ArrayUtils;
import com.android.settingslib.fuelgauge.Estimate;
-import java.util.HashSet;
import java.util.Map;
import java.util.Set;
@@ -169,7 +169,7 @@
@Override
public Set<CharSequence> getHideBackgroundUsageTimeSet(Context context) {
- return new HashSet<>();
+ return new ArraySet<>();
}
@Override
diff --git a/src/com/android/settings/localepicker/AppLocalePickerActivity.java b/src/com/android/settings/localepicker/AppLocalePickerActivity.java
index 4f23ae8..d3c855e 100644
--- a/src/com/android/settings/localepicker/AppLocalePickerActivity.java
+++ b/src/com/android/settings/localepicker/AppLocalePickerActivity.java
@@ -88,12 +88,6 @@
}
@Override
- public void onResume() {
- super.onResume();
- mLocalePickerWithRegion.getListView().addHeaderView(launchAppLocaleDetailsPage());
- }
-
- @Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
super.onBackPressed();
@@ -136,7 +130,19 @@
void launchLocalePickerPage() {
// LocalePickerWithRegion use android.app.ListFragment. Thus, it can not use
// getSupportFragmentManager() to add this into container.
- getFragmentManager().beginTransaction()
+ android.app.FragmentManager fragmentManager = getFragmentManager();
+ fragmentManager.registerFragmentLifecycleCallbacks(
+ new android.app.FragmentManager.FragmentLifecycleCallbacks() {
+ @Override
+ public void onFragmentResumed(
+ android.app.FragmentManager fm,
+ android.app.Fragment f) {
+ super.onFragmentResumed(fm, f);
+ mLocalePickerWithRegion.getListView()
+ .addHeaderView(launchAppLocaleDetailsPage());
+ }
+ }, true);
+ fragmentManager.beginTransaction()
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
.replace(R.id.content_frame, mLocalePickerWithRegion)
.commit();