diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 68bc9c08d..1aaf3e588 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,6 +5,7 @@ - - + \ No newline at end of file diff --git a/EhViewer.iml b/EhViewer.iml index 8d4928417..2c937318b 100644 --- a/EhViewer.iml +++ b/EhViewer.iml @@ -1,9 +1,10 @@ - + @@ -15,5 +16,4 @@ - - + \ No newline at end of file diff --git a/app/app.iml b/app/app.iml index 4fc7e1434..9648c37ef 100644 --- a/app/app.iml +++ b/app/app.iml @@ -1,5 +1,5 @@ - + @@ -12,8 +12,9 @@ - - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index cb8d1a2ba..d945a94c5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 21 - buildToolsVersion "21.1.2" + compileSdkVersion 22 + buildToolsVersion "22" defaultConfig { applicationId "com.hippo.ehviewer" minSdkVersion 14 - targetSdkVersion 21 + targetSdkVersion 22 versionCode 36 versionName "0.6.12" } @@ -25,7 +25,7 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:support-v4:21.0.3' - compile 'com.android.support:recyclerview-v7:21.0.3' + compile 'com.android.support:support-v4:22.0.0' + compile 'com.android.support:recyclerview-v7:22.0.0' compile 'com.github.japgolly.android:svg-android:2.0.6' } diff --git a/app/src/main/java/com/hippo/ehviewer/util/DateUtils.java b/app/src/main/java/com/hippo/ehviewer/util/DateUtils.java index a6f8b22cd..6e8e4cefe 100644 --- a/app/src/main/java/com/hippo/ehviewer/util/DateUtils.java +++ b/app/src/main/java/com/hippo/ehviewer/util/DateUtils.java @@ -16,17 +16,15 @@ package com.hippo.ehviewer.util; -import android.text.format.DateFormat; - public final class DateUtils { - @SuppressWarnings("deprecation") + public static final char QUOTE = '\''; + public static final char SECONDS = 's'; + public static boolean hasSeconds(CharSequence inFormat) { - return hasDesignator(inFormat, DateFormat.SECONDS); + return hasDesignator(inFormat, SECONDS); } - - @SuppressWarnings("deprecation") public static boolean hasDesignator(CharSequence inFormat, char designator) { if (inFormat == null) return false; @@ -39,7 +37,7 @@ public final class DateUtils { count = 1; c = inFormat.charAt(i); - if (c == DateFormat.QUOTE) { + if (c == QUOTE) { count = skipQuotedText(inFormat, i, length); } else if (c == designator) { return true; @@ -49,9 +47,8 @@ public final class DateUtils { return false; } - @SuppressWarnings("deprecation") private static int skipQuotedText(CharSequence s, int i, int len) { - if (i + 1 < len && s.charAt(i + 1) == DateFormat.QUOTE) { + if (i + 1 < len && s.charAt(i + 1) == QUOTE) { return 2; } @@ -62,10 +59,10 @@ public final class DateUtils { while (i < len) { char c = s.charAt(i); - if (c == DateFormat.QUOTE) { + if (c == QUOTE) { count++; // QUOTEQUOTE -> QUOTE - if (i + 1 < len && s.charAt(i + 1) == DateFormat.QUOTE) { + if (i + 1 < len && s.charAt(i + 1) == QUOTE) { i++; } else { break;