Automated import from //branches/master/...@141698,141698
diff --git a/core/java/android/server/BluetoothEventLoop.java b/core/java/android/server/BluetoothEventLoop.java
index 6eabea4..11c297c 100644
--- a/core/java/android/server/BluetoothEventLoop.java
+++ b/core/java/android/server/BluetoothEventLoop.java
@@ -76,8 +76,7 @@
}
break;
case EVENT_RESTART_BLUETOOTH:
- mBluetoothService.disable();
- mBluetoothService.enable();
+ mBluetoothService.restart();
break;
}
}
@@ -170,6 +169,7 @@
if (mode >= 0) {
Intent intent = new Intent(BluetoothIntent.SCAN_MODE_CHANGED_ACTION);
intent.putExtra(BluetoothIntent.SCAN_MODE, mode);
+ intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
mContext.sendBroadcast(intent, BLUETOOTH_PERM);
}
}