Merge "[Audiosharing] Adopt fallback API when developer preview on" into main
This commit is contained in:
@@ -339,7 +339,9 @@ public class AudioSharingCallAudioPreferenceController extends AudioSharingBaseP
|
|||||||
if (lead != null) {
|
if (lead != null) {
|
||||||
String addr = lead.getDevice().getAnonymizedAddress();
|
String addr = lead.getDevice().getAnonymizedAddress();
|
||||||
Log.d(TAG, "Set call audio device: " + addr);
|
Log.d(TAG, "Set call audio device: " + addr);
|
||||||
if (Flags.adoptPrimaryGroupManagementApi() && !mIsAudioModeOngoingCall.get()) {
|
if ((Flags.adoptPrimaryGroupManagementApi() || (Flags.audioSharingDeveloperOption()
|
||||||
|
&& BluetoothUtils.getAudioSharingPreviewValue(mContentResolver)))
|
||||||
|
&& !mIsAudioModeOngoingCall.get()) {
|
||||||
LeAudioProfile leaProfile = mBtManager == null ? null
|
LeAudioProfile leaProfile = mBtManager == null ? null
|
||||||
: mBtManager.getProfileManager().getLeAudioProfile();
|
: mBtManager.getProfileManager().getLeAudioProfile();
|
||||||
if (leaProfile != null) {
|
if (leaProfile != null) {
|
||||||
|
@@ -227,7 +227,10 @@ public class AudioSharingDialogHandler {
|
|||||||
mLocalBtManager, groupedDevices, /* filterByInSharing= */ true);
|
mLocalBtManager, groupedDevices, /* filterByInSharing= */ true);
|
||||||
AudioSharingStopDialogFragment.DialogEventListener listener =
|
AudioSharingStopDialogFragment.DialogEventListener listener =
|
||||||
() -> {
|
() -> {
|
||||||
if (Flags.adoptPrimaryGroupManagementApi() && mLocalBtManager != null) {
|
if (mLocalBtManager != null && (Flags.adoptPrimaryGroupManagementApi() || (
|
||||||
|
mContext != null && Flags.audioSharingDeveloperOption()
|
||||||
|
&& BluetoothUtils.getAudioSharingPreviewValue(
|
||||||
|
mContext.getContentResolver())))) {
|
||||||
LeAudioProfile profile =
|
LeAudioProfile profile =
|
||||||
mLocalBtManager.getProfileManager().getLeAudioProfile();
|
mLocalBtManager.getProfileManager().getLeAudioProfile();
|
||||||
if (profile != null) {
|
if (profile != null) {
|
||||||
|
Reference in New Issue
Block a user