Fix RTL display problem in Open by default

- setTextDirection for ListView ih the verified links dialog.
- setCompoundDrawables for TextView in the supported link dialog.

Fixes: 277082703
Fixes: 277084378
Test: manual review
Change-Id: Ib42ed2f04785a5f1803b9d2d95055e4208c9e88f
This commit is contained in:
Sunny Shao
2023-04-18 16:35:46 +08:00
parent e346dc6779
commit b0b8ca7e1c
3 changed files with 19 additions and 1 deletions

View File

@@ -281,12 +281,18 @@ public class AppLaunchSettings extends AppInfoBase implements
final List<String> verifiedLinksList = IntentPickerUtils.getLinksList(
mDomainVerificationManager, mPackageName, DOMAIN_STATE_VERIFIED);
return new AlertDialog.Builder(mContext)
AlertDialog dialog = new AlertDialog.Builder(mContext)
.setCustomTitle(titleView)
.setCancelable(true)
.setItems(verifiedLinksList.toArray(new String[0]), /* listener= */ null)
.setPositiveButton(R.string.app_launch_dialog_ok, /* listener= */ null)
.create();
if (dialog.getListView() != null) {
dialog.getListView().setTextDirection(View.TEXT_DIRECTION_LOCALE);
} else {
Log.w(TAG, "createVerifiedLinksDialog: dialog.getListView() is null, please check it.");
}
return dialog;
}
@VisibleForTesting