Merge "[LE Audio] Broadcast Sink UI" into tm-dev am: 6ebed73fbe

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17442209

Change-Id: Ia13a32d105fc1fbf72e42ef133a75e0ae7fd872c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Betty Chang
2022-04-11 14:14:57 +00:00
committed by Automerger Merge Worker
12 changed files with 650 additions and 0 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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 elses 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>

View File

@@ -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>

View File

@@ -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>