summaryrefslogtreecommitdiffstats
path: root/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
diff options
context:
space:
mode:
authorNitin Shivpure <nshivpur@codeaurora.org>2015-07-14 12:47:56 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:26:27 -0600
commitee66ed501df0d5b7d6f28bc9651b8c30543389bb (patch)
treec34cdf8e51b7369acfaf67d1bf51c28805c36011 /packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
parent669508fe0050408955037dc685da371b81ae8644 (diff)
downloadframeworks_base-ee66ed501df0d5b7d6f28bc9651b8c30543389bb.zip
frameworks_base-ee66ed501df0d5b7d6f28bc9651b8c30543389bb.tar.gz
frameworks_base-ee66ed501df0d5b7d6f28bc9651b8c30543389bb.tar.bz2
Bluetooth: DUN: Add framework changes to support DUN
Bluetooth DUN profile APIs added to the framework APIs. As DUN server supports only disconnection of DUN profile level connection this API is implemeted along with other APIs. It registers bluetooth state changed callback with the adapter service,once there is a change in the bluetooth state,it will bind/unbind the DUN service which is implemented in BluetoothExt.APK. DUN service, and other DUN Application layer are implemented in BluetoothExt.APK. CRs-Fixed: 557180 Change-Id: I6ce1204ac6138e28ad7486f2855f0f7444ad3886
Diffstat (limited to 'packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java')
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
index 8f5e1f1..f018b24 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
@@ -22,6 +22,7 @@ import android.bluetooth.BluetoothHeadset;
import android.bluetooth.BluetoothMap;
import android.bluetooth.BluetoothInputDevice;
import android.bluetooth.BluetoothPan;
+import android.bluetooth.BluetoothDun;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothUuid;
import android.content.Context;
@@ -32,6 +33,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
+import android.os.SystemProperties;
/**
* LocalBluetoothProfileManager provides access to the LocalBluetoothProfile
@@ -78,6 +80,7 @@ public final class LocalBluetoothProfileManager {
private final HidProfile mHidProfile;
private OppProfile mOppProfile;
private final PanProfile mPanProfile;
+ private DunServerProfile mDunProfile;
private final PbapServerProfile mPbapProfile;
/**
@@ -121,6 +124,12 @@ public final class LocalBluetoothProfileManager {
addProfile(mMapProfile, MapProfile.NAME,
BluetoothMap.ACTION_CONNECTION_STATE_CHANGED);
+ // enable DUN only if the property is set
+ if (SystemProperties.getBoolean("ro.bluetooth.dun", false) == true) {
+ mDunProfile = new DunServerProfile(context);
+ addProfile(mDunProfile, DunServerProfile.NAME,
+ BluetoothDun.ACTION_CONNECTION_STATE_CHANGED);
+ }
//Create PBAP server profile, but do not add it to list of profiles
// as we do not need to monitor the profile as part of profile list
mPbapProfile = new PbapServerProfile(context);