Removed reading name from profile

pull/215/head
M66B 4 months ago
parent 2ba75bb63d
commit f1e8b1685b

@ -23,9 +23,6 @@
<uses-permission
android:name="android.permission.USE_CREDENTIALS"
android:maxSdkVersion="22" />
<uses-permission
android:name="android.permission.READ_PROFILE"
android:maxSdkVersion="22" />
<!-- https://github.com/leolin310148/ShortcutBadger/pull/368 -->
<uses-permission android:name="com.vivo.notification.permission.BADGE_ICON" />

@ -26,9 +26,6 @@
<uses-permission
android:name="android.permission.USE_CREDENTIALS"
android:maxSdkVersion="22" />
<uses-permission
android:name="android.permission.READ_PROFILE"
android:maxSdkVersion="22" />
<!-- https://github.com/leolin310148/ShortcutBadger/pull/368 -->
<uses-permission android:name="com.vivo.notification.permission.BADGE_ICON" />

@ -25,9 +25,6 @@
<uses-permission
android:name="android.permission.USE_CREDENTIALS"
android:maxSdkVersion="22" />
<uses-permission
android:name="android.permission.READ_PROFILE"
android:maxSdkVersion="22" />
<!-- https://github.com/leolin310148/ShortcutBadger/pull/368 -->
<uses-permission android:name="com.vivo.notification.permission.BADGE_ICON" />

@ -25,9 +25,6 @@
<uses-permission
android:name="android.permission.USE_CREDENTIALS"
android:maxSdkVersion="22" />
<uses-permission
android:name="android.permission.READ_PROFILE"
android:maxSdkVersion="22" />
<!-- https://github.com/leolin310148/ShortcutBadger/pull/368 -->
<uses-permission android:name="com.vivo.notification.permission.BADGE_ICON" />

@ -23,9 +23,6 @@
<uses-permission
android:name="android.permission.USE_CREDENTIALS"
android:maxSdkVersion="22" />
<uses-permission
android:name="android.permission.READ_PROFILE"
android:maxSdkVersion="22" />
<!-- https://github.com/leolin310148/ShortcutBadger/pull/368 -->
<uses-permission android:name="com.vivo.notification.permission.BADGE_ICON" />

@ -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);

@ -23,9 +23,6 @@
<uses-permission
android:name="android.permission.USE_CREDENTIALS"
android:maxSdkVersion="22" />
<uses-permission
android:name="android.permission.READ_PROFILE"
android:maxSdkVersion="22" />
<!-- https://github.com/leolin310148/ShortcutBadger/pull/368 -->
<uses-permission android:name="com.vivo.notification.permission.BADGE_ICON" />

Loading…
Cancel
Save