Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e6e87d6

Browse filesBrowse files
author
Blankj
committed
see 05/30 log
1 parent b398fd2 commit e6e87d6
Copy full SHA for e6e87d6

11 files changed

+144-124Lines changed: 144 additions & 124 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README-CN.md‎

Copy file name to clipboardExpand all lines: README-CN.md
+3-4Lines changed: 3 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ sp2px, px2sp : sp与px互转
121121

122122
* ### 崩溃相关→[CrashUtils.java][crash.java]
123123
```
124-
getInstance: 获取单例
125-
init : 初始化
124+
init: 初始化
126125
```
127126

128127
* ### 设备相关→[DeviceUtils.java][device.java][Demo][device.demo]
@@ -648,7 +647,7 @@ getEntries : 获取压缩文件中的文件对象
648647

649648
Gradle:
650649
``` groovy
651-
compile 'com.blankj:utilcode:1.6.3'
650+
compile 'com.blankj:utilcode:1.6.4'
652651
```
653652

654653

@@ -670,7 +669,7 @@ Utils.init(context);
670669

671670

672671

673-
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.6.3-brightgreen.svg
672+
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.6.4-brightgreen.svg
674673
[auc]: https://github.com/Blankj/AndroidUtilCode
675674

676675
[apisvg]: https://img.shields.io/badge/API-15+-brightgreen.svg
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+2-3Lines changed: 2 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ sp2px, px2sp
121121

122122
* ### About Crash→[CrashUtils.java][crash.java]
123123
```
124-
getInstance
125124
init
126125
```
127126

@@ -648,7 +647,7 @@ getEntries
648647

649648
Gradle:
650649
``` groovy
651-
compile 'com.blankj:utilcode:1.6.3'
650+
compile 'com.blankj:utilcode:1.6.4'
652651
```
653652

654653

@@ -670,7 +669,7 @@ Utils.init(context);
670669

671670

672671

673-
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.6.3-brightgreen.svg
672+
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.6.4-brightgreen.svg
674673
[auc]: https://github.com/Blankj/AndroidUtilCode
675674

676675
[apisvg]: https://img.shields.io/badge/API-15+-brightgreen.svg
Collapse file

‎app/build.gradle‎

Copy file name to clipboardExpand all lines: app/build.gradle
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010
applicationId "com.blankj.androidutilcode"
1111
minSdkVersion 15
1212
targetSdkVersion 16
13-
versionCode 35
14-
versionName "1.6.3"
13+
versionCode 36
14+
versionName "1.6.4"
1515
}
1616

1717
if (signPropertiesFile.exists()) {
Collapse file

‎app/src/main/java/com/blankj/androidutilcode/UtilsApp.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/com/blankj/androidutilcode/UtilsApp.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ public static void initLog() {
5353
}
5454

5555
private void initCrash() {
56-
CrashUtils.getInstance().init();
56+
CrashUtils.init();
5757
}
5858

5959
private void initAssets() {
6060
if (!FileUtils.isFileExists(Config.getTestApkPath())) {
6161
try {
62-
FileIOUtils.writeFileFromIS(Config.getTestApkPath(), getAssets().open("test_install.apk"), false);
62+
FileIOUtils.writeFileFromIS(Config.getTestApkPath(), getAssets().open("test_install"), false);
6363
} catch (IOException e) {
6464
e.printStackTrace();
6565
}
Collapse file

‎update_log.md‎

Copy file name to clipboardExpand all lines: update_log.md
+3-1Lines changed: 3 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
* 17/05/27 完善CacheUtils,发布1.6.2
1+
* 17/05/30 完善CrashUtils,发布1.6.4
2+
* 17/05/28 修复CacheUtils的bug,发布1.6.3
3+
* 17/05/27 修复CacheUtils的bug,发布1.6.2
24
* 17/05/26 完善CacheUtils,发布1.6.0和1.6.1
35
* 17/05/25 完善FileIOUtils和CacheUtils
46
* 17/05/23 新增读取文件到字符数组中两种方式
Collapse file

‎utilcode/build.gradle‎

Copy file name to clipboardExpand all lines: utilcode/build.gradle
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ android {
2626

2727
defaultConfig {
2828
minSdkVersion 15
29-
versionCode 35
30-
versionName "1.6.3"
29+
versionCode 36
30+
versionName "1.6.4"
3131
}
3232

3333
buildTypes {
Collapse file

‎utilcode/src/main/java/com/blankj/utilcode/util/CacheUtils.java‎

Copy file name to clipboardExpand all lines: utilcode/src/main/java/com/blankj/utilcode/util/CacheUtils.java
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ private long removeOldest() {
720720

721721
private static class CacheHelper {
722722

723-
static final int timeInfoLen = 17;
723+
static final int timeInfoLen = 14;
724724

725725
private static byte[] newByteArrayWithTime(int second, byte[] data) {
726726
byte[] time = createDueTime(second).getBytes();
@@ -737,7 +737,7 @@ private static byte[] newByteArrayWithTime(int second, byte[] data) {
737737
* @return _$millis$_
738738
*/
739739
private static String createDueTime(int second) {
740-
return String.format(Locale.getDefault(), "_$%013d$_", System.currentTimeMillis() + second * 1000);
740+
return String.format(Locale.getDefault(), "_$%010d$_", System.currentTimeMillis() / 1000 + second);
741741
}
742742

743743
private static boolean isDue(byte[] data) {
@@ -747,9 +747,9 @@ private static boolean isDue(byte[] data) {
747747

748748
private static long getDueTime(byte[] data) {
749749
if (hasTimeInfo(data)) {
750-
String millis = new String(copyOfRange(data, 2, 15));
750+
String millis = new String(copyOfRange(data, 2, 12));
751751
try {
752-
return Long.parseLong(millis);
752+
return Long.parseLong(millis) * 1000;
753753
} catch (NumberFormatException e) {
754754
return -1;
755755
}
@@ -777,8 +777,8 @@ private static boolean hasTimeInfo(byte[] data) {
777777
&& data.length >= timeInfoLen
778778
&& data[0] == '_'
779779
&& data[1] == '$'
780-
&& data[15] == '$'
781-
&& data[16] == '_';
780+
&& data[12] == '$'
781+
&& data[13] == '_';
782782
}
783783

784784
private static void writeFileFromBytes(File file, byte[] bytes) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.