From f1e8b1685b78f5ea8c7d97f54514e1e08df3b00d Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 13 Jul 2024 11:42:27 +0200 Subject: [PATCH] Removed reading name from profile --- app/src/amazon/AndroidManifest.xml | 3 --- app/src/debug/AndroidManifest.xml | 3 --- app/src/fdroid/AndroidManifest.xml | 3 --- app/src/github/AndroidManifest.xml | 3 --- app/src/main/AndroidManifest.xml | 3 --- .../java/eu/faircode/email/FragmentGmail.java | 16 ---------------- app/src/play/AndroidManifest.xml | 3 --- 7 files changed, 34 deletions(-) diff --git a/app/src/amazon/AndroidManifest.xml b/app/src/amazon/AndroidManifest.xml index abda0941e0..034c5b383c 100644 --- a/app/src/amazon/AndroidManifest.xml +++ b/app/src/amazon/AndroidManifest.xml @@ -23,9 +23,6 @@ - diff --git a/app/src/debug/AndroidManifest.xml b/app/src/debug/AndroidManifest.xml index a224ec694e..f827cf7fd7 100644 --- a/app/src/debug/AndroidManifest.xml +++ b/app/src/debug/AndroidManifest.xml @@ -26,9 +26,6 @@ - diff --git a/app/src/fdroid/AndroidManifest.xml b/app/src/fdroid/AndroidManifest.xml index d16e93595b..a81398d7ff 100644 --- a/app/src/fdroid/AndroidManifest.xml +++ b/app/src/fdroid/AndroidManifest.xml @@ -25,9 +25,6 @@ - diff --git a/app/src/github/AndroidManifest.xml b/app/src/github/AndroidManifest.xml index 51ae43bfb2..aac1485f32 100644 --- a/app/src/github/AndroidManifest.xml +++ b/app/src/github/AndroidManifest.xml @@ -25,9 +25,6 @@ - diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9cd0fbdcbc..853f50c474 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -23,9 +23,6 @@ - diff --git a/app/src/main/java/eu/faircode/email/FragmentGmail.java b/app/src/main/java/eu/faircode/email/FragmentGmail.java index 7f30b92e30..4462f1ed54 100644 --- a/app/src/main/java/eu/faircode/email/FragmentGmail.java +++ b/app/src/main/java/eu/faircode/email/FragmentGmail.java @@ -33,14 +33,12 @@ import android.accounts.AuthenticatorException; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; -import android.database.Cursor; import android.graphics.Paint; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.os.Bundle; import android.os.Handler; -import android.provider.ContactsContract; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -288,20 +286,6 @@ public class FragmentGmail extends FragmentBase { btnGrant.setEnabled(!granted); tvGranted.setVisibility(granted ? View.VISIBLE : View.GONE); - boolean hasName = (etName.getText() != null && etName.getText().length() > 0); - if (granted && !hasName) { - try (Cursor cursor = getContext().getContentResolver().query( - ContactsContract.Profile.CONTENT_URI, - new String[]{ContactsContract.Profile.DISPLAY_NAME}, null, null, null)) { - if (cursor != null && cursor.moveToFirst()) { - int colDisplay = cursor.getColumnIndex(ContactsContract.Profile.DISPLAY_NAME); - etName.setText(cursor.getString(colDisplay)); - } - } catch (Throwable ex) { - Log.e(ex); - } - } - etName.setEnabled(granted); cbPop.setEnabled(granted); cbRecent.setEnabled(granted); diff --git a/app/src/play/AndroidManifest.xml b/app/src/play/AndroidManifest.xml index 3a72880f4f..8657a6d922 100644 --- a/app/src/play/AndroidManifest.xml +++ b/app/src/play/AndroidManifest.xml @@ -23,9 +23,6 @@ -