summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/bluetooth
diff options
context:
space:
mode:
authorSanket Padawe <sanketpadawe@google.com>2015-11-12 14:55:51 -0800
committerThe Android Automerger <android-build@google.com>2015-12-01 17:41:41 -0800
commitec25157ad840a4932c012f75eda1f239e6b4ef12 (patch)
treef76dc27be2655c590712b9a6a2d5cf3949ffd221 /src/com/android/settings/bluetooth
parentda91ef8b9a77edf99ef1c5f28071911549750c85 (diff)
downloadpackages_apps_Settings-ec25157ad840a4932c012f75eda1f239e6b4ef12.zip
packages_apps_Settings-ec25157ad840a4932c012f75eda1f239e6b4ef12.tar.gz
packages_apps_Settings-ec25157ad840a4932c012f75eda1f239e6b4ef12.tar.bz2
Uncheck checkbox for contact sharing by default for non carkit devices.
+ In BT pairing dialog, uncheck checkbox for contact sharing by default for devices not recognized as carkits at pair time. Bug: 23607427 Change-Id: I7f1d40d86e713e248d3c225459be4895c4f75d76
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 7fa31b3..1ff99f7 100755
--- a/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
+++ b/src/com/android/settings/bluetooth/BluetoothPairingDialog.java
@@ -195,8 +195,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() {
@@ -209,12 +215,7 @@ public final class BluetoothPairingDialog extends AlertActivity implements
}
}
});
- if (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);
@@ -267,8 +268,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() {
@@ -281,12 +288,6 @@ public final class BluetoothPairingDialog extends AlertActivity implements
}
}
});
- if (mDevice.getBluetoothClass().getDeviceClass()
- == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
- contactSharing.setVisibility(View.VISIBLE);
- } else {
- contactSharing.setVisibility(View.GONE);
- }
String messageCaption = null;
String pairingContent = null;