mirror of
https://gitlab.com/xynngh/YetAnotherCallBlocker.git
synced 2025-06-05 22:19:12 +02:00
Fix main activity crash due to missing call log permission
This commit is contained in:
@@ -8,6 +8,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import dummydomain.yetanothercallblocker.PermissionHelper;
|
||||||
|
|
||||||
public class CallLogHelper {
|
public class CallLogHelper {
|
||||||
|
|
||||||
private static final String[] QUERY_PROJECTION = new String[]{
|
private static final String[] QUERY_PROJECTION = new String[]{
|
||||||
@@ -17,6 +19,10 @@ public class CallLogHelper {
|
|||||||
|
|
||||||
public static List<CallLogItem> loadCalls(Context context, Long anchorId, boolean before,
|
public static List<CallLogItem> loadCalls(Context context, Long anchorId, boolean before,
|
||||||
int limit) {
|
int limit) {
|
||||||
|
if (!PermissionHelper.hasCallLogPermission(context)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
boolean reverseOrder = false;
|
boolean reverseOrder = false;
|
||||||
|
|
||||||
String selection;
|
String selection;
|
||||||
|
Reference in New Issue
Block a user