• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

Revisãoec25157ad840a4932c012f75eda1f239e6b4ef12 (tree)
Hora2015-12-02 10:41:41
AutorSanket Padawe <sanketpadawe@goog...>
CommiterThe Android Automerger

Mensagem de Log

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

Mudança Sumário

Diff

--- 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
195195 } else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){
196196 contactSharing.setChecked(false);
197197 } else {
198- contactSharing.setChecked(true);
199- mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
198+ if (mDevice.getBluetoothClass().getDeviceClass()
199+ == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
200+ contactSharing.setChecked(true);
201+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
202+ } else {
203+ contactSharing.setChecked(false);
204+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED);
205+ }
200206 }
201207
202208 contactSharing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@@ -209,12 +215,7 @@ public final class BluetoothPairingDialog extends AlertActivity implements
209215 }
210216 }
211217 });
212- if (mDevice.getBluetoothClass().getDeviceClass()
213- == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
214- contactSharing.setVisibility(View.VISIBLE);
215- } else {
216- contactSharing.setVisibility(View.GONE);
217- }
218+
218219 mPairingView = (EditText) view.findViewById(R.id.text);
219220 mPairingView.addTextChangedListener(this);
220221 alphanumericPin.setOnCheckedChangeListener(this);
@@ -267,8 +268,14 @@ public final class BluetoothPairingDialog extends AlertActivity implements
267268 } else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){
268269 contactSharing.setChecked(false);
269270 } else {
270- contactSharing.setChecked(true);
271- mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
271+ if (mDevice.getBluetoothClass().getDeviceClass()
272+ == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
273+ contactSharing.setChecked(true);
274+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED);
275+ } else {
276+ contactSharing.setChecked(false);
277+ mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED);
278+ }
272279 }
273280
274281 contactSharing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@@ -281,12 +288,6 @@ public final class BluetoothPairingDialog extends AlertActivity implements
281288 }
282289 }
283290 });
284- if (mDevice.getBluetoothClass().getDeviceClass()
285- == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
286- contactSharing.setVisibility(View.VISIBLE);
287- } else {
288- contactSharing.setVisibility(View.GONE);
289- }
290291
291292 String messageCaption = null;
292293 String pairingContent = null;