am d1a04291
: Update application code for BluetoothAdapter.getDefaultAdapter().
Merge commit 'd1a04291c537e271999c7e7c5c72f1f61632aacf' into eclair-mr2 * commit 'd1a04291c537e271999c7e7c5c72f1f61632aacf': Update application code for BluetoothAdapter.getDefaultAdapter().
This commit is contained in:
@@ -92,7 +92,7 @@ public class LocalBluetoothManager {
|
|||||||
// This will be around as long as this process is
|
// This will be around as long as this process is
|
||||||
mContext = context.getApplicationContext();
|
mContext = context.getApplicationContext();
|
||||||
|
|
||||||
mAdapter = (BluetoothAdapter) context.getSystemService(Context.BLUETOOTH_SERVICE);
|
mAdapter = BluetoothAdapter.getDefaultAdapter();
|
||||||
if (mAdapter == null) {
|
if (mAdapter == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -377,7 +377,7 @@ public class Status extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setBtStatus() {
|
private void setBtStatus() {
|
||||||
BluetoothAdapter bluetooth = (BluetoothAdapter) getSystemService(BLUETOOTH_SERVICE);
|
BluetoothAdapter bluetooth = BluetoothAdapter.getDefaultAdapter();
|
||||||
Preference btAddressPref = findPreference(KEY_BT_ADDRESS);
|
Preference btAddressPref = findPreference(KEY_BT_ADDRESS);
|
||||||
|
|
||||||
if (bluetooth == null) {
|
if (bluetooth == null) {
|
||||||
|
Reference in New Issue
Block a user