Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b4ab5f0 authored by Sanket Padawe's avatar Sanket Padawe Committed by android-build-merger
Browse files

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

Uncheck checkbox for contact sharing by default for non carkit devices. am: dbc47fb2 am: 0ad16831 am: df5b8c5b
am: f20ba4b7

* commit 'f20ba4b7':
  Uncheck checkbox for contact sharing by default for non carkit devices.
parents e595ab1a f20ba4b7
Loading
Loading
Loading
Loading
+17 −16
Original line number Diff line number Diff line
@@ -193,8 +193,14 @@ public final class BluetoothPairingDialog extends AlertActivity implements
        } else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){
            contactSharing.setChecked(false);
        } else {
            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() {
@@ -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.addTextChangedListener(this);
        alphanumericPin.setOnCheckedChangeListener(this);
@@ -265,8 +266,14 @@ public final class BluetoothPairingDialog extends AlertActivity implements
        } else if (mDevice.getPhonebookAccessPermission() == BluetoothDevice.ACCESS_REJECTED){
            contactSharing.setChecked(false);
        } else {
            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() {
@@ -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 pairingContent = null;