blob: 61ea636d7981d4e3be73794654e5ae5bd474046b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package cgeo.calendar;
import org.eclipse.jdt.annotation.NonNull;
import android.net.Uri;
import android.os.Build;
public final class Compatibility {
private final static int SDK_VERSION = Build.VERSION.SDK_INT;
private final static boolean IS_LEVEL_8 = SDK_VERSION >= 8;
private final static boolean IS_LEVEL_14 = SDK_VERSION >= 14;
@NonNull
public static Uri getCalendarProviderURI() {
return Uri.parse(IS_LEVEL_8 ? "content://com.android.calendar/calendars" : "content://calendar/calendars");
}
@NonNull
public static Uri getCalendarEventsProviderURI() {
return Uri.parse(IS_LEVEL_8 ? "content://com.android.calendar/events" : "content://calendar/events");
}
public static boolean isLevel14() {
return IS_LEVEL_14;
}
}
|