} 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() {
}
}
});
- 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);
} 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() {
}
}
});
- if (mDevice.getBluetoothClass().getDeviceClass()
- == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
- contactSharing.setVisibility(View.VISIBLE);
- } else {
- contactSharing.setVisibility(View.GONE);
- }
String messageCaption = null;
String pairingContent = null;