From 96a55efb0edac3c2af523f938b338dd16d4f8ac4 Mon Sep 17 00:00:00 2001 From: Sravan Kumar V Date: Tue, 19 Jul 2016 17:28:46 +0530 Subject: Bluetooth: Disable NON-AOSP BT DATA Features Disable NON-AOSP bluetooth data related features from resource configuration values If disable_non_aosp_bt_features is set as true in config.xml following NON-AOSP features would be disabled OPP-1.2 MAP-EMAIL PBAP-1.2 PBAP-SIM disable_non_aosp_bt_features is set to false by default. It can be configured as per need. Change-Id: I4c5924bd7c94407342c6da83869eaa8da905605d CRs-Fixed: 1064006 --- src/com/android/bluetooth/opp/BluetoothOppTransfer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/com/android/bluetooth/opp/BluetoothOppTransfer.java') diff --git a/src/com/android/bluetooth/opp/BluetoothOppTransfer.java b/src/com/android/bluetooth/opp/BluetoothOppTransfer.java index 4dcbb09c3..d74cbd67b 100644 --- a/src/com/android/bluetooth/opp/BluetoothOppTransfer.java +++ b/src/com/android/bluetooth/opp/BluetoothOppTransfer.java @@ -32,6 +32,7 @@ package com.android.bluetooth.opp; +import com.android.bluetooth.R; import javax.obex.ObexTransport; import com.android.bluetooth.BluetoothObexTransport; @@ -565,7 +566,10 @@ public class BluetoothOppTransfer implements BluetoothOppBatch.BluetoothOppBatch mConnectThread.start(); } else { OolConnManager.setSdpInitiatedAddress(mBatch.mDestination); - if (!mBatch.mDestination.sdpSearch(BluetoothUuid.ObexObjectPush)) { + boolean isDisabledNonAosp = mContext.getResources().getBoolean + (R.bool.disable_non_aosp_bt_features); + if (D) Log.d(TAG, "isDisabledNonAosp :" + isDisabledNonAosp); + if (isDisabledNonAosp || !mBatch.mDestination.sdpSearch(BluetoothUuid.ObexObjectPush)) { /* SDP failed, start rfcomm connect directly */ mConnectThread = new SocketConnectThread(mBatch.mDestination, false, false); /* update bd address as sdp could not be started */ -- cgit v1.2.3