Bluetooth: Update Settings.apk to match BT API change.

Split BluetoothDevice into BluetoothDevice and BluetoothAdapter.

BluetoothAdapter: Represents the local BT adapter. Operations on the local
                  adapter (start a scan, etc).
BluetoothDevice: Represents a remote BT device. Operations on remote devices
                 (pair, connect, etc).
This commit is contained in:
Nick Pelly
2009-08-14 18:43:18 -07:00
parent 5eb32e86a2
commit d63c011225
16 changed files with 518 additions and 507 deletions

View File

@@ -19,7 +19,7 @@ package com.android.settings.widget;
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothAdapter;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
@@ -379,9 +379,9 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
}
}
int state = mLocalBluetoothManager.getBluetoothState();
if (state == BluetoothDevice.BLUETOOTH_STATE_OFF) {
if (state == BluetoothAdapter.BLUETOOTH_STATE_OFF) {
return STATE_DISABLED;
} else if (state == BluetoothDevice.BLUETOOTH_STATE_ON) {
} else if (state == BluetoothAdapter.BLUETOOTH_STATE_ON) {
return STATE_ENABLED;
} else {
return STATE_INTERMEDIATE;