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:
@@ -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 {
|
||||||
|
if (mDevice.getBluetoothClass().getDeviceClass()
|
||||||
|
== BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
|
||||||
contactSharing.setChecked(true);
|
contactSharing.setChecked(true);
|
||||||
mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
|
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 {
|
||||||
|
if (mDevice.getBluetoothClass().getDeviceClass()
|
||||||
|
== BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
|
||||||
contactSharing.setChecked(true);
|
contactSharing.setChecked(true);
|
||||||
mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
|
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;
|
||||||
|
Reference in New Issue
Block a user