Loading src/com/android/settings/bluetooth/BluetoothPairingDialog.java +9 −3 Original line number Diff line number Diff line Loading @@ -17,12 +17,14 @@ package com.android.settings.bluetooth; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothUuid; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.os.ParcelUuid; import android.text.Editable; import android.text.Html; import android.text.InputFilter; Loading Loading @@ -111,6 +113,7 @@ public final class BluetoothPairingDialog extends AlertActivity implements mDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); mType = intent.getIntExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, BluetoothDevice.ERROR); mDevice.fetchUuidsWithSdp(); switch (mType) { case BluetoothDevice.PAIRING_VARIANT_PIN: Loading Loading @@ -318,7 +321,7 @@ public final class BluetoothPairingDialog extends AlertActivity implements } } private void allowPhonebookAccess() { private void processPhonebookAccess() { CachedBluetoothDevice cachedDevice = mCachedDeviceManager.findDevice(mDevice); if (cachedDevice == null) { cachedDevice = mCachedDeviceManager.addDevice( Loading @@ -326,11 +329,14 @@ public final class BluetoothPairingDialog extends AlertActivity implements mBluetoothManager.getProfileManager(), mDevice); } ParcelUuid[] uuids = mDevice.getUuids(); if (BluetoothUuid.containsAnyUuid(uuids, PbapServerProfile.PBAB_CLIENT_UUIDS)) { cachedDevice.setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED); } } private void onPair(String value) { allowPhonebookAccess(); processPhonebookAccess(); switch (mType) { case BluetoothDevice.PAIRING_VARIANT_PIN: Loading src/com/android/settings/bluetooth/PbapServerProfile.java +9 −0 Original line number Diff line number Diff line Loading @@ -21,7 +21,9 @@ import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothPbap; import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothUuid; import android.content.Context; import android.os.ParcelUuid; import android.util.Log; import com.android.settings.R; Loading @@ -44,6 +46,13 @@ final class PbapServerProfile implements LocalBluetoothProfile { // Order of this profile in device profiles list private static final int ORDINAL = 6; // The UUIDs indicate that remote device might access pbap server static final ParcelUuid[] PBAB_CLIENT_UUIDS = { BluetoothUuid.HSP, BluetoothUuid.Handsfree, BluetoothUuid.PBAP_PCE }; // These callbacks run on the main thread. private final class PbapServiceListener implements BluetoothPbap.ServiceListener { Loading Loading
src/com/android/settings/bluetooth/BluetoothPairingDialog.java +9 −3 Original line number Diff line number Diff line Loading @@ -17,12 +17,14 @@ package com.android.settings.bluetooth; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothUuid; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.os.ParcelUuid; import android.text.Editable; import android.text.Html; import android.text.InputFilter; Loading Loading @@ -111,6 +113,7 @@ public final class BluetoothPairingDialog extends AlertActivity implements mDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); mType = intent.getIntExtra(BluetoothDevice.EXTRA_PAIRING_VARIANT, BluetoothDevice.ERROR); mDevice.fetchUuidsWithSdp(); switch (mType) { case BluetoothDevice.PAIRING_VARIANT_PIN: Loading Loading @@ -318,7 +321,7 @@ public final class BluetoothPairingDialog extends AlertActivity implements } } private void allowPhonebookAccess() { private void processPhonebookAccess() { CachedBluetoothDevice cachedDevice = mCachedDeviceManager.findDevice(mDevice); if (cachedDevice == null) { cachedDevice = mCachedDeviceManager.addDevice( Loading @@ -326,11 +329,14 @@ public final class BluetoothPairingDialog extends AlertActivity implements mBluetoothManager.getProfileManager(), mDevice); } ParcelUuid[] uuids = mDevice.getUuids(); if (BluetoothUuid.containsAnyUuid(uuids, PbapServerProfile.PBAB_CLIENT_UUIDS)) { cachedDevice.setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED); } } private void onPair(String value) { allowPhonebookAccess(); processPhonebookAccess(); switch (mType) { case BluetoothDevice.PAIRING_VARIANT_PIN: Loading
src/com/android/settings/bluetooth/PbapServerProfile.java +9 −0 Original line number Diff line number Diff line Loading @@ -21,7 +21,9 @@ import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothPbap; import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothUuid; import android.content.Context; import android.os.ParcelUuid; import android.util.Log; import com.android.settings.R; Loading @@ -44,6 +46,13 @@ final class PbapServerProfile implements LocalBluetoothProfile { // Order of this profile in device profiles list private static final int ORDINAL = 6; // The UUIDs indicate that remote device might access pbap server static final ParcelUuid[] PBAB_CLIENT_UUIDS = { BluetoothUuid.HSP, BluetoothUuid.Handsfree, BluetoothUuid.PBAP_PCE }; // These callbacks run on the main thread. private final class PbapServiceListener implements BluetoothPbap.ServiceListener { Loading