Move BluetoothManager to telecomm.

Copy over bluetooth manager from teleservice and add usage in
CallAudioManager (for audio routing), Ringer (ringtone routing),
InCallTonePlayer (tone routing).

Change-Id: I015961aebf42389a7f4cf3a5f89ec194d6ca64e2
Bug: 13242863
diff --git a/src/com/android/telecomm/Ringer.java b/src/com/android/telecomm/Ringer.java
index 367a1de..40fb1aa 100644
--- a/src/com/android/telecomm/Ringer.java
+++ b/src/com/android/telecomm/Ringer.java
@@ -167,7 +167,12 @@
                 Log.v(this, "startRingingOrCallWaiting");
                 mCallAudioManager.setIsRinging(true);
 
-                mRingtonePlayer.play();
+                // Only play ringtone if a bluetooth device is not available. When a BT device
+                // is available, then we send it a signal to do its own ringtone and we dont need
+                // to play the ringtone on the device.
+                if (!mCallAudioManager.isBluetoothDeviceAvailable()) {
+                    mRingtonePlayer.play();
+                }
             } else {
                 Log.v(this, "startRingingOrCallWaiting, skipping because volume is 0");
             }