Loading jni/com_android_bluetooth_sdp.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -547,7 +547,7 @@ static void cleanupNative(JNIEnv *env, jobject object) { } } if (sCallbacksObj != NULL) { if (sCallbacksObj != NULL) { ALOGW("Cleaning up Bluetooth Health object"); ALOGW("Cleaning up Bluetooth SDP object"); env->DeleteGlobalRef(sCallbacksObj); env->DeleteGlobalRef(sCallbacksObj); sCallbacksObj = NULL; sCallbacksObj = NULL; } } Loading src/com/android/bluetooth/a2dp/A2dpService.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -214,8 +214,10 @@ public class A2dpService extends ProfileService { } } public void resetAvrcpBlacklist(BluetoothDevice device) { public void resetAvrcpBlacklist(BluetoothDevice device) { if (mAvrcp != null) { mAvrcp.resetBlackList(device.getAddress()); mAvrcp.resetBlackList(device.getAddress()); } } } synchronized boolean isA2dpPlaying(BluetoothDevice device) { synchronized boolean isA2dpPlaying(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, enforceCallingOrSelfPermission(BLUETOOTH_PERM, Loading src/com/android/bluetooth/btservice/BondStateMachine.java +2 −31 Original line number Original line Diff line number Diff line Loading @@ -216,15 +216,7 @@ final class BondStateMachine extends StateMachine { mAdapterService.setSimAccessPermission(dev, mAdapterService.setSimAccessPermission(dev, BluetoothDevice.ACCESS_UNKNOWN); BluetoothDevice.ACCESS_UNKNOWN); // Set the profile Priorities to undefined // Set the profile Priorities to undefined clearProfilePriorty(dev); clearProfilePriority(dev); } else if (newState == BluetoothDevice.BOND_BONDED) { // Do not set profile priority // Profile priority should be set after SDP completion // Restore the profile priorty settings //setProfilePriorty(dev); } } } } else if(!mDevices.contains(dev)) else if(!mDevices.contains(dev)) Loading Loading @@ -450,28 +442,7 @@ final class BondStateMachine extends StateMachine { sendMessage(msg); sendMessage(msg); } } private void setProfilePriorty (BluetoothDevice device){ private void clearProfilePriority(BluetoothDevice device) { HidService hidService = HidService.getHidService(); A2dpService a2dpService = A2dpService.getA2dpService(); HeadsetService headsetService = HeadsetService.getHeadsetService(); if ((hidService != null) && (hidService.getPriority(device) == BluetoothProfile.PRIORITY_UNDEFINED)){ hidService.setPriority(device,BluetoothProfile.PRIORITY_ON); } if ((a2dpService != null) && (a2dpService.getPriority(device) == BluetoothProfile.PRIORITY_UNDEFINED)){ a2dpService.setPriority(device,BluetoothProfile.PRIORITY_ON); } if ((headsetService != null) && (headsetService.getPriority(device) == BluetoothProfile.PRIORITY_UNDEFINED)){ headsetService.setPriority(device,BluetoothProfile.PRIORITY_ON); } } private void clearProfilePriorty (BluetoothDevice device){ HidService hidService = HidService.getHidService(); HidService hidService = HidService.getHidService(); A2dpService a2dpService = A2dpService.getA2dpService(); A2dpService a2dpService = A2dpService.getA2dpService(); HeadsetService headsetService = HeadsetService.getHeadsetService(); HeadsetService headsetService = HeadsetService.getHeadsetService(); Loading Loading
jni/com_android_bluetooth_sdp.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -547,7 +547,7 @@ static void cleanupNative(JNIEnv *env, jobject object) { } } if (sCallbacksObj != NULL) { if (sCallbacksObj != NULL) { ALOGW("Cleaning up Bluetooth Health object"); ALOGW("Cleaning up Bluetooth SDP object"); env->DeleteGlobalRef(sCallbacksObj); env->DeleteGlobalRef(sCallbacksObj); sCallbacksObj = NULL; sCallbacksObj = NULL; } } Loading
src/com/android/bluetooth/a2dp/A2dpService.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -214,8 +214,10 @@ public class A2dpService extends ProfileService { } } public void resetAvrcpBlacklist(BluetoothDevice device) { public void resetAvrcpBlacklist(BluetoothDevice device) { if (mAvrcp != null) { mAvrcp.resetBlackList(device.getAddress()); mAvrcp.resetBlackList(device.getAddress()); } } } synchronized boolean isA2dpPlaying(BluetoothDevice device) { synchronized boolean isA2dpPlaying(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, enforceCallingOrSelfPermission(BLUETOOTH_PERM, Loading
src/com/android/bluetooth/btservice/BondStateMachine.java +2 −31 Original line number Original line Diff line number Diff line Loading @@ -216,15 +216,7 @@ final class BondStateMachine extends StateMachine { mAdapterService.setSimAccessPermission(dev, mAdapterService.setSimAccessPermission(dev, BluetoothDevice.ACCESS_UNKNOWN); BluetoothDevice.ACCESS_UNKNOWN); // Set the profile Priorities to undefined // Set the profile Priorities to undefined clearProfilePriorty(dev); clearProfilePriority(dev); } else if (newState == BluetoothDevice.BOND_BONDED) { // Do not set profile priority // Profile priority should be set after SDP completion // Restore the profile priorty settings //setProfilePriorty(dev); } } } } else if(!mDevices.contains(dev)) else if(!mDevices.contains(dev)) Loading Loading @@ -450,28 +442,7 @@ final class BondStateMachine extends StateMachine { sendMessage(msg); sendMessage(msg); } } private void setProfilePriorty (BluetoothDevice device){ private void clearProfilePriority(BluetoothDevice device) { HidService hidService = HidService.getHidService(); A2dpService a2dpService = A2dpService.getA2dpService(); HeadsetService headsetService = HeadsetService.getHeadsetService(); if ((hidService != null) && (hidService.getPriority(device) == BluetoothProfile.PRIORITY_UNDEFINED)){ hidService.setPriority(device,BluetoothProfile.PRIORITY_ON); } if ((a2dpService != null) && (a2dpService.getPriority(device) == BluetoothProfile.PRIORITY_UNDEFINED)){ a2dpService.setPriority(device,BluetoothProfile.PRIORITY_ON); } if ((headsetService != null) && (headsetService.getPriority(device) == BluetoothProfile.PRIORITY_UNDEFINED)){ headsetService.setPriority(device,BluetoothProfile.PRIORITY_ON); } } private void clearProfilePriorty (BluetoothDevice device){ HidService hidService = HidService.getHidService(); HidService hidService = HidService.getHidService(); A2dpService a2dpService = A2dpService.getA2dpService(); A2dpService a2dpService = A2dpService.getA2dpService(); HeadsetService headsetService = HeadsetService.getHeadsetService(); HeadsetService headsetService = HeadsetService.getHeadsetService(); Loading