trying to avoid rejectedexection

This commit is contained in:
iNPUTmice 2014-09-07 15:11:40 +02:00
parent 04665b59c8
commit 27ad80afc2
1 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package eu.siacs.conversations.utils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.RejectedExecutionException;
import android.content.Context; import android.content.Context;
import android.content.CursorLoader; import android.content.CursorLoader;
@ -67,7 +68,13 @@ public class PhoneHelper {
} }
} }
}); });
mCursorLoader.startLoading(); try {
mCursorLoader.startLoading();
} catch (RejectedExecutionException e) {
if (listener != null) {
listener.onPhoneContactsLoaded(phoneContacts);
}
}
} }
public static Uri getSefliUri(Context context) { public static Uri getSefliUri(Context context) {