Snap for 4874588 from 6f4e7c816372444f74d4715963db6ed22dd6b695 to pi-dr1-release

Change-Id: I57d5d8fce404237190441c998c08c10eed53ab68
diff --git a/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothFacade.java b/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothFacade.java
index e675340..584ec18 100644
--- a/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothFacade.java
+++ b/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothFacade.java
@@ -121,7 +121,7 @@
         public void onReceive(Context context, Intent intent) {
             String action = intent.getAction();
             if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
-                final int state = mBluetoothAdapter.getState();
+                final int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1);
                 Bundle msg = new Bundle();
                 if (state == BluetoothAdapter.STATE_ON) {
                     msg.putString("State", "ON");