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:
Michael Chan
2009-04-29 14:17:06 -07:00
parent d842cee7c2
commit f25063aee3
4 changed files with 33 additions and 30 deletions

View File

@@ -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";