Fix tests breaking when bluetooth is on

BluetoothPhoneServiceImpl now uses a BluetoothAdapterProxy so that it is
now isolated from system bluetooth.

Bug: 27686250
Change-Id: If27c9ba642b163ecde68ae8956bc76523a552d31
diff --git a/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java b/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java
index 6680eb6..33ca531 100644
--- a/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java
+++ b/src/com/android/server/telecom/BluetoothPhoneServiceImpl.java
@@ -401,7 +401,7 @@
         }
     };
 
-    private BluetoothAdapter mBluetoothAdapter;
+    private BluetoothAdapterProxy mBluetoothAdapter;
     private BluetoothHeadsetProxy mBluetoothHeadset;
 
     // A map from Calls to indexes used to identify calls for CLCC (C* List Current Calls).
@@ -422,6 +422,7 @@
             Context context,
             TelecomSystem.SyncRoot lock,
             CallsManager callsManager,
+            BluetoothAdapterProxy bluetoothAdapter,
             PhoneAccountRegistrar phoneAccountRegistrar) {
         Log.d(this, "onCreate");
 
@@ -430,7 +431,7 @@
         mCallsManager = callsManager;
         mPhoneAccountRegistrar = phoneAccountRegistrar;
 
-        mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
+        mBluetoothAdapter = bluetoothAdapter;
         if (mBluetoothAdapter == null) {
             Log.d(this, "BluetoothPhoneService shutting down, no BT Adapter found.");
             return;