Set contact info in download phase

This commit is contained in:
M66B
2018-12-07 15:23:17 +01:00
parent 1d99a40216
commit 35407bf289
5 changed files with 12 additions and 11 deletions

View File

@@ -201,7 +201,7 @@ public class EntityMessage implements Serializable {
}
}
void getAvatar(Context context) {
boolean setContactInfo(Context context) {
if (ContextCompat.checkSelfPermission(context, Manifest.permission.READ_CONTACTS)
== PackageManager.PERMISSION_GRANTED) {
this.avatar = null;
@@ -234,6 +234,8 @@ public class EntityMessage implements Serializable {
if (!TextUtils.isEmpty(displayName))
((InternetAddress) this.from[i]).setPersonal(displayName);
return true;
}
} finally {
if (cursor != null)
@@ -244,6 +246,8 @@ public class EntityMessage implements Serializable {
Log.e(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
}
}
return false;
}
static String getQuote(Context context, long id) throws IOException {