Files
app_Settings/res/layout/dialog_audio_sharing_join.xml
Yiyi Shen 10bddfd334 [Audiosharing] Avoid dialog flickering for same bt device group.
Before this change, the dialog will dismiss and show up again if the
second bud of the same group is connected.

In this change, StopDialog and JoinDialog will only update the message
and event listener when the dialog is triggered by another device with the same group id or the new bt device with different group id. (No dismiss and show); DisconnectDialog will only dismiss and show again when a new bt device with different group id is connected and update the event listener when another device with the same group id connected.

Also dismiss the dialog when the triggering device disconnect or join
the sharing.

Test: atest
Bug: 305620450
Change-Id: I798812101cefb24185d76d56f78eae27712dd7a6
2024-02-06 11:52:58 +08:00

53 lines
2.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2023 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:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="?android:dialogPreferredPadding"
android:paddingBottom="?android:dialogPreferredPadding">
<TextView
android:id="@+id/share_audio_subtitle"
style="@style/DeviceAudioSharingText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingBottom="24dp"
android:textFontWeight="400" />
<Button
android:id="@+id/share_btn"
style="@style/SettingsLibActionButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="4dp"
android:background="@drawable/audio_sharing_rounded_bg_ripple" />
<Button
android:id="@+id/cancel_btn"
style="@style/SettingsLibActionButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="4dp"
android:background="@drawable/audio_sharing_rounded_bg_ripple"
android:text="Not now" />
</LinearLayout>