QS: Make BT detail be more consistent with Settings

 - Show turning on as on
 - Disable switch when in a turning on/off state

Change-Id: I55f977808d1b881f6dc27192dcc2e907b0576447
Fixes: 29237638
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
index 014cc49..4f880b4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
@@ -49,6 +49,7 @@
     private CachedBluetoothDevice mLastDevice;
 
     private final H mHandler = new H();
+    private int mState;
 
     public BluetoothControllerImpl(Context context, Looper bgLooper) {
         mLocalBluetoothManager = LocalBluetoothManager.getInstance(context, null);
@@ -120,6 +121,11 @@
     }
 
     @Override
+    public int getBluetoothState() {
+        return mState;
+    }
+
+    @Override
     public boolean isBluetoothConnected() {
         return mConnectionState == BluetoothAdapter.STATE_CONNECTED;
     }
@@ -192,7 +198,9 @@
 
     @Override
     public void onBluetoothStateChanged(int bluetoothState) {
-        mEnabled = bluetoothState == BluetoothAdapter.STATE_ON;
+        mEnabled = bluetoothState == BluetoothAdapter.STATE_ON
+                || bluetoothState == BluetoothAdapter.STATE_TURNING_ON;
+        mState = bluetoothState;
         mHandler.sendEmptyMessage(H.MSG_STATE_CHANGED);
     }