[Bug] Private DNS shows odd message about Bluetooth

-Private DNS dialog uses preference_widget_dialog_summary
layout. It is wrong to set Bluetooth string for it.
-Remove default string from preference_widget_dialog_summary
-Set the customized string in BaseBluetoothDialogPreference

Bug: 179329046
Test: manual test
Change-Id: I749647f48e4bba7d4d0f9099d1c40d788778c15e
This commit is contained in:
Tim Peng
2021-02-19 13:53:20 +08:00
parent 977513924c
commit 8467b9f484
2 changed files with 6 additions and 3 deletions

View File

@@ -97,10 +97,14 @@ public abstract class BaseBluetoothDialogPreference extends CustomDialogPreferen
radioButton.setText(mRadioButtonStrings.get(i));
radioButton.setEnabled(selectableIndex.contains(i));
}
// View will be invisible when all options are enabled.
// Initial help information text view
final TextView helpTextView = view.findViewById(R.id.bluetooth_audio_codec_help_info);
if (selectableIndex.size() == mRadioButtonIds.size()) {
final TextView helpTextView = view.findViewById(R.id.bluetooth_audio_codec_help_info);
// View will be invisible when all options are enabled.
helpTextView.setVisibility(View.GONE);
} else {
helpTextView.setText(R.string.bluetooth_select_a2dp_codec_type_help_info);
helpTextView.setVisibility(View.VISIBLE);
}
}