Remove hardcoded URL string

* Details on URLs in the credential management
  app preference should be translatable.
* Remove hardcoded text and introduce strings.

Manual testing
* Download TestDPC and select 'Request to
  manage credentials'.
* Select allow.
* Go to Settings Credential management app
  preference and verify URL strings are displayed
  correctly.

Bug: 170627997
Test: manual testing
Change-Id: Iadff0c136064dabc3f77e30b46356126d657397f
This commit is contained in:
Alex Johnston
2021-03-30 17:31:53 +01:00
parent 21cf6c04db
commit 56519258ef
2 changed files with 7 additions and 2 deletions

View File

@@ -179,8 +179,8 @@ public class CredentialManagementAppAdapter extends RecyclerView.Adapter<Recycle
}
private String getNumberOfUrlsText(Map<Uri, String> urisToAliases) {
String url = urisToAliases.size() > 1 ? " URLs" : " URL";
return urisToAliases.size() + url;
return mContext.getResources().getQuantityString(R.plurals.number_of_urls,
urisToAliases.size(), urisToAliases.size());
}
}