Loading res/layout/bluetooth_pin_confirm.xml +4 −5 Original line number Diff line number Diff line Loading @@ -86,16 +86,15 @@ android:textColor="@*android:color/secondary_text_material_light" android:visibility="gone" /> <TextView android:id="@+id/phonebook_sharing_message" <CheckBox android:id="@+id/phonebook_sharing_message_confirm_pin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/bluetooth_dialog_padding" android:layout_marginEnd="@dimen/bluetooth_dialog_padding" android:layout_marginBottom="@dimen/bluetooth_dialog_padding" android:gravity="center_vertical" android:text="@string/bluetooth_pairing_will_share_phonebook" android:textSize="12sp" /> android:text="@string/bluetooth_pairing_shares_phonebook" android:textAppearance="?android:attr/textAppearanceSmall" /> </LinearLayout> Loading res/layout/bluetooth_pin_entry.xml +4 −5 Original line number Diff line number Diff line Loading @@ -87,16 +87,15 @@ android:textAppearance="@android:style/TextAppearance.Material.Subhead" android:textColor="@*android:color/secondary_text_material_light"/> <TextView android:id="@+id/phonebook_sharing_message" <CheckBox android:id="@+id/phonebook_sharing_message_entry_pin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/bluetooth_dialog_padding" android:layout_marginEnd="@dimen/bluetooth_dialog_padding" android:layout_marginBottom="@dimen/bluetooth_dialog_padding" android:gravity="center_vertical" android:text="@string/bluetooth_pairing_will_share_phonebook" android:textSize="12sp" /> android:text="@string/bluetooth_pairing_shares_phonebook" android:textAppearance="?android:attr/textAppearanceSmall" /> </LinearLayout> Loading res/values/strings.xml +0 −2 Original line number Diff line number Diff line Loading @@ -1155,8 +1155,6 @@ <!-- Message when bluetooth dialog when passkey or pin needs to be displayed. --> <string name="bluetooth_display_passkey_pin_msg">To pair with:<xliff:g id="bold1"><br><b></xliff:g><xliff:g id="device_name">%1$s</xliff:g><xliff:g id="end_bold1"></b><br><br></xliff:g>Type on it:<xliff:g id="bold2"><br><b></xliff:g><xliff:g id="passkey">%2$s</xliff:g><xliff:g id="end_bold2"></b></xliff:g>, then press Return or Enter.</string> <!-- Message in pairing dialogs. [CHAR LIMIT=NONE] --> <string name="bluetooth_pairing_will_share_phonebook">Pairing grants access to your contacts and call history when connected.</string> <!-- Checkbox message in pairing dialogs. [CHAR LIMIT=NONE] --> <string name="bluetooth_pairing_shares_phonebook">Grant access to your contacts and call history when connected.</string> Loading src/com/android/settings/bluetooth/BluetoothPairingDialog.java +37 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.settings.bluetooth; import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; import android.content.BroadcastReceiver; import android.content.Context; Loading Loading @@ -186,6 +187,24 @@ public final class BluetoothPairingDialog extends AlertActivity implements TextView messageViewContent = (TextView) view.findViewById(R.id.message_subhead); TextView messageView2 = (TextView) view.findViewById(R.id.message_below_pin); CheckBox alphanumericPin = (CheckBox) view.findViewById(R.id.alphanumeric_pin); CheckBox contactSharing = (CheckBox) view.findViewById( R.id.phonebook_sharing_message_entry_pin); contactSharing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) { if (isChecked) { mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); } else { mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED); } } }); 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); Loading Loading @@ -238,6 +257,24 @@ public final class BluetoothPairingDialog extends AlertActivity implements TextView pairingViewCaption = (TextView) view.findViewById(R.id.pairing_caption); TextView pairingViewContent = (TextView) view.findViewById(R.id.pairing_subhead); TextView messagePairing = (TextView) view.findViewById(R.id.pairing_code_message); CheckBox contactSharing = (CheckBox) view.findViewById( R.id.phonebook_sharing_message_confirm_pin); contactSharing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) { if (isChecked) { mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); } else { mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED); } } }); if (mDevice.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) { contactSharing.setVisibility(View.VISIBLE); } else { contactSharing.setVisibility(View.GONE); } String messageCaption = null; String pairingContent = null; Loading Loading
res/layout/bluetooth_pin_confirm.xml +4 −5 Original line number Diff line number Diff line Loading @@ -86,16 +86,15 @@ android:textColor="@*android:color/secondary_text_material_light" android:visibility="gone" /> <TextView android:id="@+id/phonebook_sharing_message" <CheckBox android:id="@+id/phonebook_sharing_message_confirm_pin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/bluetooth_dialog_padding" android:layout_marginEnd="@dimen/bluetooth_dialog_padding" android:layout_marginBottom="@dimen/bluetooth_dialog_padding" android:gravity="center_vertical" android:text="@string/bluetooth_pairing_will_share_phonebook" android:textSize="12sp" /> android:text="@string/bluetooth_pairing_shares_phonebook" android:textAppearance="?android:attr/textAppearanceSmall" /> </LinearLayout> Loading
res/layout/bluetooth_pin_entry.xml +4 −5 Original line number Diff line number Diff line Loading @@ -87,16 +87,15 @@ android:textAppearance="@android:style/TextAppearance.Material.Subhead" android:textColor="@*android:color/secondary_text_material_light"/> <TextView android:id="@+id/phonebook_sharing_message" <CheckBox android:id="@+id/phonebook_sharing_message_entry_pin" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/bluetooth_dialog_padding" android:layout_marginEnd="@dimen/bluetooth_dialog_padding" android:layout_marginBottom="@dimen/bluetooth_dialog_padding" android:gravity="center_vertical" android:text="@string/bluetooth_pairing_will_share_phonebook" android:textSize="12sp" /> android:text="@string/bluetooth_pairing_shares_phonebook" android:textAppearance="?android:attr/textAppearanceSmall" /> </LinearLayout> Loading
res/values/strings.xml +0 −2 Original line number Diff line number Diff line Loading @@ -1155,8 +1155,6 @@ <!-- Message when bluetooth dialog when passkey or pin needs to be displayed. --> <string name="bluetooth_display_passkey_pin_msg">To pair with:<xliff:g id="bold1"><br><b></xliff:g><xliff:g id="device_name">%1$s</xliff:g><xliff:g id="end_bold1"></b><br><br></xliff:g>Type on it:<xliff:g id="bold2"><br><b></xliff:g><xliff:g id="passkey">%2$s</xliff:g><xliff:g id="end_bold2"></b></xliff:g>, then press Return or Enter.</string> <!-- Message in pairing dialogs. [CHAR LIMIT=NONE] --> <string name="bluetooth_pairing_will_share_phonebook">Pairing grants access to your contacts and call history when connected.</string> <!-- Checkbox message in pairing dialogs. [CHAR LIMIT=NONE] --> <string name="bluetooth_pairing_shares_phonebook">Grant access to your contacts and call history when connected.</string> Loading
src/com/android/settings/bluetooth/BluetoothPairingDialog.java +37 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.settings.bluetooth; import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; import android.content.BroadcastReceiver; import android.content.Context; Loading Loading @@ -186,6 +187,24 @@ public final class BluetoothPairingDialog extends AlertActivity implements TextView messageViewContent = (TextView) view.findViewById(R.id.message_subhead); TextView messageView2 = (TextView) view.findViewById(R.id.message_below_pin); CheckBox alphanumericPin = (CheckBox) view.findViewById(R.id.alphanumeric_pin); CheckBox contactSharing = (CheckBox) view.findViewById( R.id.phonebook_sharing_message_entry_pin); contactSharing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) { if (isChecked) { mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); } else { mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED); } } }); 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); Loading Loading @@ -238,6 +257,24 @@ public final class BluetoothPairingDialog extends AlertActivity implements TextView pairingViewCaption = (TextView) view.findViewById(R.id.pairing_caption); TextView pairingViewContent = (TextView) view.findViewById(R.id.pairing_subhead); TextView messagePairing = (TextView) view.findViewById(R.id.pairing_code_message); CheckBox contactSharing = (CheckBox) view.findViewById( R.id.phonebook_sharing_message_confirm_pin); contactSharing.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean isChecked) { if (isChecked) { mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); } else { mDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED); } } }); if (mDevice.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) { contactSharing.setVisibility(View.VISIBLE); } else { contactSharing.setVisibility(View.GONE); } String messageCaption = null; String pairingContent = null; Loading