Merge "Fix Bluetooth tethering toggle status" into udc-dev

This commit is contained in:
Chaohui Wang
2023-05-12 13:32:04 +00:00
committed by Android (Google) Code Review

View File

@@ -171,6 +171,8 @@ public class TetherSettings extends RestrictedSettingsFragment
return;
}
setupTetherPreference();
final Activity activity = getActivity();
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
if (adapter != null) {
@@ -184,7 +186,6 @@ public class TetherSettings extends RestrictedSettingsFragment
new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED));
}
setupTetherPreference();
setTopIntroPreferenceTitle();
mDataSaverBackend.addListener(this);
@@ -605,6 +606,7 @@ public class TetherSettings extends RestrictedSettingsFragment
public void onServiceConnected(int profile, BluetoothProfile proxy) {
if (mBluetoothPan.get() == null) {
mBluetoothPan.set((BluetoothPan) proxy);
updateBluetoothState();
}
}