summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/bluetooth
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@cyngn.com>2016-01-05 11:43:48 -0800
committerJessica Wagantall <jwagantall@cyngn.com>2016-01-05 11:43:48 -0800
commit5381b5a2b61fea30b6d5249643412b4b87ca13ca (patch)
tree77ba3a28be12aaed5d20a8bc683559cf26ca1b2f /src/com/android/settings/bluetooth
parent32f2f125160a57f4511c56069398c024b7f91579 (diff)
parentf4b8ad6c3105fa17fba85e852b710e48aaf0794d (diff)
downloadpackages_apps_Settings-5381b5a2b61fea30b6d5249643412b4b87ca13ca.zip
packages_apps_Settings-5381b5a2b61fea30b6d5249643412b4b87ca13ca.tar.gz
packages_apps_Settings-5381b5a2b61fea30b6d5249643412b4b87ca13ca.tar.bz2
Merge tag 'android-6.0.1_r10' into HEAD
Ticket: CYNGNOS-1404 Android 6.0.1 release 10 Change-Id: I40f4f8e3e1c508807323ec222eeb4baeb329fd5e
Diffstat (limited to 'src/com/android/settings/bluetooth')
-rwxr-xr-xsrc/com/android/settings/bluetooth/BluetoothPairingDialog.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
index 456b7e9..716ce41 100755
--- a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
@@ -198,8 +198,14 @@ public final class BluetoothPairingDialog extends AlertActivity implements
} else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){
contactSharing.setChecked(false);
} else {
- contactSharing.setChecked(true);
- mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
+ if (mDevice.getBluetoothClass().getDeviceClass()
+ == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
+ contactSharing.setChecked(true);
+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
+ } else {
+ contactSharing.setChecked(false);
+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED);
+ }
}
contactSharing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@@ -212,12 +218,7 @@ public final class BluetoothPairingDialog extends AlertActivity implements
}
}
});
- if ((mDevice.getBluetoothClass() != null) && (mDevice.getBluetoothClass().getDeviceClass()
- == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE)) {
- contactSharing.setVisibility(View.VISIBLE);
- } else {
- contactSharing.setVisibility(View.GONE);
- }
+
mPairingView = (EditText) view.findViewById(R.id.text);
mPairingView.addTextChangedListener(this);
alphanumericPin.setOnCheckedChangeListener(this);
@@ -270,8 +271,14 @@ public final class BluetoothPairingDialog extends AlertActivity implements
} else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){
contactSharing.setChecked(false);
} else {
- contactSharing.setChecked(true);
- mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
+ if (mDevice.getBluetoothClass().getDeviceClass()
+ == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
+ contactSharing.setChecked(true);
+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
+ } else {
+ contactSharing.setChecked(false);
+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED);
+ }
}
contactSharing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@@ -284,12 +291,6 @@ public final class BluetoothPairingDialog extends AlertActivity implements
}
}
});
- if ((mDevice.getBluetoothClass() != null) && (mDevice.getBluetoothClass().getDeviceClass()
- == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE)) {
- contactSharing.setVisibility(View.VISIBLE);
- } else {
- contactSharing.setVisibility(View.GONE);
- }
String messageCaption = null;
String pairingContent = null;