mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
fix refresh of device list when bluetooth gets turned on
This commit is contained in:
+1
-1
@@ -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)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user