diff options
author | Smriti Gupta <smritig@codeaurora.org> | 2014-10-31 17:34:27 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2014-11-04 08:26:34 -0700 |
commit | bc7cbb628447ef58a8730ea84d85f1bd46b22bc6 (patch) | |
tree | 4c94fb1eadc506b5758b692d6aaa6edb9b1f117f | |
parent | 6209d01db54a49618f5159cb241fbfd614c9130a (diff) | |
download | android_packages_apps_Bluetooth-bc7cbb628447ef58a8730ea84d85f1bd46b22bc6.tar.gz android_packages_apps_Bluetooth-bc7cbb628447ef58a8730ea84d85f1bd46b22bc6.tar.bz2 android_packages_apps_Bluetooth-bc7cbb628447ef58a8730ea84d85f1bd46b22bc6.zip |
PBAP: Handle EXTRA_ALWAYS_ALLOWED flag and setPhonebookPermission.
Set PhonebookAccessPermission sharedPreference for PBAP authorization
as per EXTRA_ALWAYS_ALLOWED flag indicated in ACTION_CONNECTION_ACCESS_REPLY
from Settings authority package.
CRs-fixed: 748993
Change-Id: If2783636a8282e6b4135715b0b01cf17bae20cb6
-rw-r--r-- | src/com/android/bluetooth/pbap/BluetoothPbapService.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/bluetooth/pbap/BluetoothPbapService.java b/src/com/android/bluetooth/pbap/BluetoothPbapService.java index 69f42c7b8..f0f42337f 100644 --- a/src/com/android/bluetooth/pbap/BluetoothPbapService.java +++ b/src/com/android/bluetooth/pbap/BluetoothPbapService.java @@ -292,6 +292,16 @@ public class BluetoothPbapService extends Service { if (intent.getIntExtra(BluetoothDevice.EXTRA_CONNECTION_ACCESS_RESULT, BluetoothDevice.CONNECTION_ACCESS_NO) == BluetoothDevice.CONNECTION_ACCESS_YES) { + + if (intent.getBooleanExtra(BluetoothDevice.EXTRA_ALWAYS_ALLOWED, false)) { + boolean result = mRemoteDevice.setPhonebookAccessPermission( + BluetoothDevice.ACCESS_ALLOWED); + if (VERBOSE) { + Log.v(TAG, "setPhonebookAccessPermission(ACCESS_ALLOWED) result=" + + result); + } + } + try { if (mConnSocket != null) { startObexServerSession(); |