Refactoring

pull/147/head
M66B 6 years ago
parent 4f1ef39c08
commit 978a5b6fb3

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

Loading…
Cancel
Save