Merge "Determine LeAudio toggle visibility after mIsLeAudioOnlyDevice is initialized" into main
This commit is contained in:
@@ -182,7 +182,15 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
|
||||
}
|
||||
|
||||
if (profile instanceof LeAudioProfile) {
|
||||
profilePref.setVisible(mIsLeAudioToggleEnabled);
|
||||
boolean showLeAudioToggle = mIsLeAudioToggleEnabled;
|
||||
if (Flags.hideLeAudioToggleForLeAudioOnlyDevice() && mIsLeAudioOnlyDevice) {
|
||||
showLeAudioToggle = false;
|
||||
Log.d(
|
||||
TAG,
|
||||
"Hide LeAudio toggle for LeAudio-only Device: "
|
||||
+ mCachedDevice.getDevice().getAnonymizedAddress());
|
||||
}
|
||||
profilePref.setVisible(showLeAudioToggle);
|
||||
}
|
||||
|
||||
if (profile instanceof MapProfile) {
|
||||
@@ -526,13 +534,6 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
|
||||
boolean isLeEnabledByDefault =
|
||||
SystemProperties.getBoolean(LE_AUDIO_CONNECTION_BY_DEFAULT_PROPERTY, true);
|
||||
mIsLeAudioToggleEnabled = isLeAudioToggleVisible || isLeEnabledByDefault;
|
||||
if (Flags.hideLeAudioToggleForLeAudioOnlyDevice() && mIsLeAudioOnlyDevice) {
|
||||
mIsLeAudioToggleEnabled = false;
|
||||
Log.d(
|
||||
TAG,
|
||||
"Hide LeAudio toggle for LeAudio-only Device: "
|
||||
+ mCachedDevice.getDevice().getAnonymizedAddress());
|
||||
}
|
||||
Log.d(TAG, "BT_LE_AUDIO_CONTACT_SHARING_ENABLED:" + mIsLeContactSharingEnabled
|
||||
+ ", LE_AUDIO_TOGGLE_VISIBLE_PROPERTY:" + isLeAudioToggleVisible
|
||||
+ ", LE_AUDIO_CONNECTION_BY_DEFAULT_PROPERTY:" + isLeEnabledByDefault);
|
||||
|
Reference in New Issue
Block a user