Uncheck checkbox for contact sharing by default for non carkit devices. am: dbc47fb262 am: 0ad16831ee am: df5b8c5b65

am: f20ba4b797

* commit 'f20ba4b797b0b11208aa72d822c17d7ab972a32e':
  Uncheck checkbox for contact sharing by default for non carkit devices.
This commit is contained in:
Sanket Padawe
2015-11-13 00:11:59 +00:00
committed by android-build-merger

View File

@@ -193,8 +193,14 @@ public final class BluetoothPairingDialog extends AlertActivity implements
} else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){ } else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){
contactSharing.setChecked(false); contactSharing.setChecked(false);
} else { } else {
contactSharing.setChecked(true); if (mDevice.getBluetoothClass().getDeviceClass()
mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); == 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() { contactSharing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@@ -207,12 +213,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 = (EditText) view.findViewById(R.id.text);
mPairingView.addTextChangedListener(this); mPairingView.addTextChangedListener(this);
alphanumericPin.setOnCheckedChangeListener(this); alphanumericPin.setOnCheckedChangeListener(this);
@@ -265,8 +266,14 @@ public final class BluetoothPairingDialog extends AlertActivity implements
} else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){ } else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){
contactSharing.setChecked(false); contactSharing.setChecked(false);
} else { } else {
contactSharing.setChecked(true); if (mDevice.getBluetoothClass().getDeviceClass()
mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); == 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() { contactSharing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@@ -279,12 +286,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 messageCaption = null;
String pairingContent = null; String pairingContent = null;