[Audiosharing] Set earlist connected device active in sharing.
Flagged with enable_le_audio_sharing Bug: 305620450 Test: Manual Change-Id: I8e0132f3d982fe2723581cd2aafd3cb9a9ed409c
This commit is contained in:
@@ -160,6 +160,7 @@ public class AudioSharingDevicePreferenceController extends BasePreferenceContro
|
||||
+ ", reason = "
|
||||
+ reason);
|
||||
mBluetoothDeviceUpdater.forceUpdate();
|
||||
AudioSharingUtils.updateActiveDeviceIfNeeded(mLocalBtManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -204,6 +205,7 @@ public class AudioSharingDevicePreferenceController extends BasePreferenceContro
|
||||
+ ", reason = "
|
||||
+ reason);
|
||||
mBluetoothDeviceUpdater.forceUpdate();
|
||||
AudioSharingUtils.updateActiveDeviceIfNeeded(mLocalBtManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -299,7 +301,7 @@ public class AudioSharingDevicePreferenceController extends BasePreferenceContro
|
||||
mPreferenceGroup.setVisible(false);
|
||||
mAudioSharingSettingsPreference.setVisible(false);
|
||||
|
||||
if (isAvailable() && mBluetoothDeviceUpdater != null) {
|
||||
if (isAvailable()) {
|
||||
mBluetoothDeviceUpdater.setPrefContext(screen.getContext());
|
||||
mBluetoothDeviceUpdater.forceUpdate();
|
||||
}
|
||||
@@ -309,6 +311,7 @@ public class AudioSharingDevicePreferenceController extends BasePreferenceContro
|
||||
public int getAvailabilityStatus() {
|
||||
return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)
|
||||
&& Flags.enableLeAudioSharing()
|
||||
&& mBluetoothDeviceUpdater != null
|
||||
? AVAILABLE_UNSEARCHABLE
|
||||
: UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user