Remove allowlist reboot behavior
As we switch to use allowlist or bypass it, it would only impact the default connection after the paring. So based on it, we don't need to force device reboot to apply the setting Bug: 300012501 Test: m SettingsGoogle Change-Id: I0b63a68e1263692e922968c122b96b5635b9861f
This commit is contained in:
@@ -49,9 +49,6 @@ public class BluetoothLeAudioAllowListPreferenceController
|
||||
|
||||
private final DevelopmentSettingsDashboardFragment mFragment;
|
||||
|
||||
@VisibleForTesting
|
||||
boolean mChanged = false;
|
||||
|
||||
public BluetoothLeAudioAllowListPreferenceController(Context context,
|
||||
DevelopmentSettingsDashboardFragment fragment) {
|
||||
super(context);
|
||||
@@ -66,8 +63,6 @@ public class BluetoothLeAudioAllowListPreferenceController
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
BluetoothRebootDialog.show(mFragment);
|
||||
mChanged = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -92,25 +87,4 @@ public class BluetoothLeAudioAllowListPreferenceController
|
||||
((SwitchPreference) mPreference).setChecked(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the RebootDialog confirm is clicked.
|
||||
*/
|
||||
public void onRebootDialogConfirmed() {
|
||||
if (!mChanged) {
|
||||
return;
|
||||
}
|
||||
|
||||
final boolean leAudioAllowListEnabled =
|
||||
SystemProperties.getBoolean(LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY, false);
|
||||
SystemProperties.set(LE_AUDIO_ALLOW_LIST_ENABLED_PROPERTY,
|
||||
Boolean.toString(leAudioAllowListEnabled));
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the RebootDialog cancel is clicked.
|
||||
*/
|
||||
public void onRebootDialogCanceled() {
|
||||
mChanged = false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user