mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 17:02:13 +01:00
fix refresh of device list when bluetooth gets turned on
This commit is contained in:
parent
a9c6ca79bc
commit
2b31d4b359
@ -17,7 +17,7 @@ public class BluetoothStateChangeReceiver extends BroadcastReceiver {
|
|||||||
if (intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1) == BluetoothAdapter.STATE_ON) {
|
if (intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1) == BluetoothAdapter.STATE_ON) {
|
||||||
|
|
||||||
Intent refreshIntent = new Intent(ControlCenter.ACTION_REFRESH_DEVICELIST);
|
Intent refreshIntent = new Intent(ControlCenter.ACTION_REFRESH_DEVICELIST);
|
||||||
context.sendBroadcast(refreshIntent);
|
LocalBroadcastManager.getInstance(context).sendBroadcast(refreshIntent);
|
||||||
|
|
||||||
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
if (!sharedPrefs.getBoolean("general_autoconnectonbluetooth", false)) {
|
if (!sharedPrefs.getBoolean("general_autoconnectonbluetooth", false)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user