aboutsummaryrefslogtreecommitdiffstats
path: root/cgeo-calendar/src/cgeo/calendar/Compatibility.java
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-05-08 17:10:06 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-11 23:55:58 +0200
commit8ff62c5f34db48aa15c7252c40fea3381bba0952 (patch)
tree2a0ffd9bcf9a2648c45f170426cf86fb319509f2 /cgeo-calendar/src/cgeo/calendar/Compatibility.java
parent1d2b34e71a01d6af118ed89258ad0ecb983e1a9c (diff)
parent59b8b2e26a7fff6072c4d5d96f51035dc900e0bc (diff)
downloadcgeo-8ff62c5f34db48aa15c7252c40fea3381bba0952.zip
cgeo-8ff62c5f34db48aa15c7252c40fea3381bba0952.tar.gz
cgeo-8ff62c5f34db48aa15c7252c40fea3381bba0952.tar.bz2
merge upstream
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;
}
}