aboutsummaryrefslogtreecommitdiffstats
path: root/cgeo-calendar/src/cgeo/calendar/Compatibility.java
diff options
context:
space:
mode:
Diffstat (limited to 'cgeo-calendar/src/cgeo/calendar/Compatibility.java')
-rw-r--r--cgeo-calendar/src/cgeo/calendar/Compatibility.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/cgeo-calendar/src/cgeo/calendar/Compatibility.java b/cgeo-calendar/src/cgeo/calendar/Compatibility.java
index 8813f41..61ea636 100644
--- a/cgeo-calendar/src/cgeo/calendar/Compatibility.java
+++ b/cgeo-calendar/src/cgeo/calendar/Compatibility.java
@@ -1,23 +1,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 sdkVersion = Build.VERSION.SDK_INT;
- private final static boolean isLevel8 = sdkVersion >= 8;
- private final static boolean isLevel14 = sdkVersion >= 14;
+ 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(isLevel8 ? "content://com.android.calendar/calendars" : "content://calendar/calendars");
+ return Uri.parse(IS_LEVEL_8 ? "content://com.android.calendar/calendars" : "content://calendar/calendars");
}
+ @NonNull
public static Uri getCalendarEventsProviderURI() {
- return Uri.parse(isLevel8 ? "content://com.android.calendar/events" : "content://calendar/events");
+ return Uri.parse(IS_LEVEL_8 ? "content://com.android.calendar/events" : "content://calendar/events");
}
public static boolean isLevel14() {
- return isLevel14;
+ return IS_LEVEL_14;
}
}