Revert "Profile name permission check"

This reverts commit e4785763fb.
This commit is contained in:
M66B 2022-01-09 17:27:44 +01:00
parent e4785763fb
commit aa45cb7e21
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ public class FragmentGmail extends FragmentBase {
tvGranted.setVisibility(granted ? View.VISIBLE : View.GONE);
boolean hasName = (etName.getText() != null && etName.getText().length() > 0);
if (granted && !hasName && hasPermission(Manifest.permission.READ_CONTACTS)) {
if (granted && !hasName) {
try (Cursor cursor = getContext().getContentResolver().query(
ContactsContract.Profile.CONTENT_URI,
new String[]{ContactsContract.Profile.DISPLAY_NAME}, null, null, null)) {