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

am: df5b8c5b65

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

View File

@@ -195,8 +195,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() {
@@ -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 = (EditText) view.findViewById(R.id.text);
mPairingView.addTextChangedListener(this); mPairingView.addTextChangedListener(this);
alphanumericPin.setOnCheckedChangeListener(this); alphanumericPin.setOnCheckedChangeListener(this);
@@ -267,8 +268,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() {
@@ -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 messageCaption = null;
String pairingContent = null; String pairingContent = null;