Loading core/java/android/server/BluetoothService.java +17 −11 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.content.res.Resources; import android.os.Binder; import android.os.Handler; import android.os.IBinder; Loading Loading @@ -554,12 +555,15 @@ public class BluetoothService extends IBluetooth.Stub { private synchronized void updateSdpRecords() { ArrayList<ParcelUuid> uuids = new ArrayList<ParcelUuid>(); Resources R = mContext.getResources(); // Add the default records if (R.getBoolean(com.android.internal.R.bool.config_bluetooth_default_profiles)) { uuids.add(BluetoothUuid.HSP_AG); uuids.add(BluetoothUuid.ObexObjectPush); } if (mContext.getResources(). getBoolean(com.android.internal.R.bool.config_voice_capable)) { if (R.getBoolean(com.android.internal.R.bool.config_voice_capable)) { uuids.add(BluetoothUuid.Handsfree_AG); uuids.add(BluetoothUuid.PBAP_PSE); } Loading @@ -567,6 +571,7 @@ public class BluetoothService extends IBluetooth.Stub { // Add SDP records for profiles maintained by Android userspace addReservedSdpRecords(uuids); if (R.getBoolean(com.android.internal.R.bool.config_bluetooth_default_profiles)) { // Enable profiles maintained by Bluez userspace. setBluetoothTetheringNative(true, BluetoothPanProfileHandler.NAP_ROLE, BluetoothPanProfileHandler.NAP_BRIDGE); Loading @@ -575,6 +580,7 @@ public class BluetoothService extends IBluetooth.Stub { uuids.add(BluetoothUuid.AudioSource); uuids.add(BluetoothUuid.AvrcpTarget); uuids.add(BluetoothUuid.NAP); } // Cannot cast uuids.toArray directly since ParcelUuid is parcelable mAdapterUuids = new ParcelUuid[uuids.size()]; Loading core/res/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -631,6 +631,10 @@ cell broadcasting sms, and MMS. --> <bool name="config_sms_capable">true</bool> <!-- Enable/disable default bluetooth profiles: HSP_AG, ObexObjectPush, Audio, NAP --> <bool name="config_bluetooth_default_profiles">true</bool> <!-- IP address of the dns server to use if nobody else suggests one --> <string name="config_default_dns_server" translatable="false">8.8.8.8</string> Loading Loading
core/java/android/server/BluetoothService.java +17 −11 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.content.res.Resources; import android.os.Binder; import android.os.Handler; import android.os.IBinder; Loading Loading @@ -554,12 +555,15 @@ public class BluetoothService extends IBluetooth.Stub { private synchronized void updateSdpRecords() { ArrayList<ParcelUuid> uuids = new ArrayList<ParcelUuid>(); Resources R = mContext.getResources(); // Add the default records if (R.getBoolean(com.android.internal.R.bool.config_bluetooth_default_profiles)) { uuids.add(BluetoothUuid.HSP_AG); uuids.add(BluetoothUuid.ObexObjectPush); } if (mContext.getResources(). getBoolean(com.android.internal.R.bool.config_voice_capable)) { if (R.getBoolean(com.android.internal.R.bool.config_voice_capable)) { uuids.add(BluetoothUuid.Handsfree_AG); uuids.add(BluetoothUuid.PBAP_PSE); } Loading @@ -567,6 +571,7 @@ public class BluetoothService extends IBluetooth.Stub { // Add SDP records for profiles maintained by Android userspace addReservedSdpRecords(uuids); if (R.getBoolean(com.android.internal.R.bool.config_bluetooth_default_profiles)) { // Enable profiles maintained by Bluez userspace. setBluetoothTetheringNative(true, BluetoothPanProfileHandler.NAP_ROLE, BluetoothPanProfileHandler.NAP_BRIDGE); Loading @@ -575,6 +580,7 @@ public class BluetoothService extends IBluetooth.Stub { uuids.add(BluetoothUuid.AudioSource); uuids.add(BluetoothUuid.AvrcpTarget); uuids.add(BluetoothUuid.NAP); } // Cannot cast uuids.toArray directly since ParcelUuid is parcelable mAdapterUuids = new ParcelUuid[uuids.size()]; Loading
core/res/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -631,6 +631,10 @@ cell broadcasting sms, and MMS. --> <bool name="config_sms_capable">true</bool> <!-- Enable/disable default bluetooth profiles: HSP_AG, ObexObjectPush, Audio, NAP --> <bool name="config_bluetooth_default_profiles">true</bool> <!-- IP address of the dns server to use if nobody else suggests one --> <string name="config_default_dns_server" translatable="false">8.8.8.8</string> Loading