Fixed the Bluetooth On/Off Checkbox in settings so it is enabled/disable properly.
In the BroadcastReceiver, pickup the new bluetooth status from the intent instead of calling back to LocalBluetoothManager. There could be race condition since LocalBluetoothManager itself gets the same info via the BroadcastReceiver mechanism. Also cleaned up logs.
This commit is contained in:
@@ -30,6 +30,7 @@ import android.bluetooth.BluetoothIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
@@ -40,7 +41,8 @@ import android.widget.Toast;
|
||||
*/
|
||||
public class LocalBluetoothManager {
|
||||
private static final String TAG = "LocalBluetoothManager";
|
||||
static final boolean V = true;
|
||||
static final boolean V = Config.LOGV;
|
||||
static final boolean D = Config.LOGD && false;
|
||||
|
||||
private static final String SHARED_PREFERENCES_NAME = "bluetooth_settings";
|
||||
|
||||
|
Reference in New Issue
Block a user