Refactoring

This commit is contained in:
M66B 2018-12-23 17:16:17 +00:00
parent 4f1ef39c08
commit 978a5b6fb3
1 changed files with 2 additions and 1 deletions

View File

@ -646,7 +646,8 @@ public class ServiceSynchronize extends LifecycleService {
if (cursor.moveToNext()) {
if (true || Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
Uri uri = ContactsContract.Contacts.getLookupUri(
cursor.getLong(0), cursor.getString(1));
cursor.getLong(cursor.getColumnIndex(ContactsContract.Contacts._ID)),
cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY)));
InputStream is = ContactsContract.Contacts.openContactPhotoInputStream(
getContentResolver(), uri);
mbuilder.setLargeIcon(BitmapFactory.decodeStream(is));