Skip to content

Commit d049f20

Browse files
committed
see 08/25 log
1 parent 63941ed commit d049f20

File tree

13 files changed

+131
-56
lines changed

13 files changed

+131
-56
lines changed

README-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
4343

44-
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.19.1-brightgreen.svg
44+
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.19.2-brightgreen.svg
4545
[auc]: https://github.com/Blankj/AndroidUtilCode
4646

4747
[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If this project helps you a lot and you want to support the project's developmen
4141

4242
[logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
4343

44-
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.19.1-brightgreen.svg
44+
[aucsvg]: https://img.shields.io/badge/AndroidUtilCode-v1.19.2-brightgreen.svg
4545
[auc]: https://github.com/Blankj/AndroidUtilCode
4646

4747
[apisvg]: https://img.shields.io/badge/API-14+-brightgreen.svg

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ protected void attachBaseContext(Context base) {
3636
@Override
3737
public void onCreate() {
3838
super.onCreate();
39-
LogUtils.e();
4039
sInstance = this;
41-
com.blankj.subutil.util.Utils.init(this);
4240
initLeakCanary();
4341
initLog();
4442
initCrash();

config.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ ext {
66
compileSdkVersion: 27,
77
minSdkVersion : 14,
88
targetSdkVersion : 27,
9-
versionCode : 1_019_001,
10-
versionName : '1.19.1'// E.g 1.9.72 => 1,009,072
9+
versionCode : 1_019_002,
10+
versionName : '1.19.2'// E.g 1.9.72 => 1,009,072
1111
]
1212

1313
versionConfig = [
@@ -167,7 +167,7 @@ def configAppDependencies(Project pro) {
167167
// LeakCanary
168168
debugImplementation depConfig.leakcanary.android
169169
releaseImplementation depConfig.leakcanary.android_no_op
170-
// implementation 'com.blankj:utilcode:1.19.1'
170+
// implementation 'com.blankj:utilcode:1.19.2'
171171
}
172172
}
173173

subutil/src/main/AndroidManifest.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
<manifest package="com.blankj.subutil" />
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.blankj.subutil">
3+
4+
<application>
5+
<provider
6+
android:name=".util.Utils$ContentProvider4SubUtil"
7+
android:authorities="${applicationId}.subutil.content.provider"
8+
android:exported="false"
9+
android:multiprocess="true" />
10+
</application>
11+
</manifest>

subutil/src/main/java/com/blankj/subutil/util/Utils.java

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22

33
import android.annotation.SuppressLint;
44
import android.app.Application;
5+
import android.content.ContentProvider;
6+
import android.content.ContentValues;
57
import android.content.Context;
8+
import android.database.Cursor;
9+
import android.net.Uri;
610
import android.support.annotation.NonNull;
11+
import android.support.annotation.Nullable;
12+
import android.support.v4.content.FileProvider;
713

814
import java.lang.reflect.InvocationTargetException;
915

@@ -97,4 +103,42 @@ private static Application getApplicationByReflect() {
97103
}
98104
throw new NullPointerException("u should init first");
99105
}
106+
107+
108+
public static final class ContentProvider4SubUtil extends ContentProvider {
109+
110+
@Override
111+
public boolean onCreate() {
112+
Utils.init(getContext());
113+
return true;
114+
}
115+
116+
@Nullable
117+
@Override
118+
public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) {
119+
return null;
120+
}
121+
122+
@Nullable
123+
@Override
124+
public String getType(@NonNull Uri uri) {
125+
return null;
126+
}
127+
128+
@Nullable
129+
@Override
130+
public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) {
131+
return null;
132+
}
133+
134+
@Override
135+
public int delete(@NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) {
136+
return 0;
137+
}
138+
139+
@Override
140+
public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) {
141+
return 0;
142+
}
143+
}
100144
}

update_log.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* 18/08/24 新增 ScreenUtils#restoreAdaptScreen,利用 FileProvider4UtilCode 不再需要初始化,发布 1.19.2
12
* 18/08/23 修复适配后 ToastUtils 原生 Toast 尺寸发生改变的问题,修复 KeyboardUtils#fixSoftInputLeaks,发布 1.19.1
23
* 18/08/10 修复 ScreenUtils#adaptxx 导致获取状态栏和导航栏尺寸不对问题,发布 1.19.0
34
* 18/08/09 新增 IntentUtils#isIntentAvailable,ToastUtils 传入空显示 null,发布 1.18.6

utilcode/README-CN.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,10 @@
22

33
Gradle:
44
```groovy
5-
implementation 'com.blankj:utilcode:1.19.1'
5+
implementation 'com.blankj:utilcode:1.19.2'
66
```
77

88

9-
## How to use
10-
11-
```java
12-
// init it in the function of onCreate in ur Application
13-
Utils.init(application);
14-
```
15-
16-
17-
## Proguard
18-
19-
U needn't do anything, because I add `consumerProguardFiles 'proguard-rules.pro'` in build.gradle.
20-
21-
229
## APIs
2310

2411
* ### Activity 相关 -> [ActivityUtils.java][activity.java] -> [Demo][activity.demo]
@@ -543,6 +530,7 @@ isTablet : 判断是否是平板
543530
adaptScreen4VerticalSlide : 适配垂直滑动的屏幕
544531
adaptScreen4HorizontalSlide: 适配水平滑动的屏幕
545532
cancelAdaptScreen : 取消适配屏幕
533+
restoreAdaptScreen : 恢复适配屏幕
546534
isAdaptScreen : 是否适配屏幕
547535
```
548536

utilcode/README.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,10 @@
22

33
Gradle:
44
```groovy
5-
implementation 'com.blankj:utilcode:1.19.1'
5+
implementation 'com.blankj:utilcode:1.19.2'
66
```
77

88

9-
## How to use
10-
11-
```java
12-
// init it in the function of onCreate in ur Application
13-
Utils.init(application);
14-
```
15-
16-
17-
## Proguard
18-
19-
U needn't do anything, because I add `consumerProguardFiles 'proguard-rules.pro'` in build.gradle.
20-
21-
229
## APIs
2310

2411
* ### About Activity -> [ActivityUtils.java][activity.java] -> [Demo][activity.demo]
@@ -543,6 +530,7 @@ isTablet
543530
adaptScreen4VerticalSlide
544531
adaptScreen4HorizontalSlide
545532
cancelAdaptScreen
533+
restoreAdaptScreen
546534
isAdaptScreen
547535
```
548536

utilcode/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
android:windowSoftInputMode="stateHidden|stateAlwaysHidden" />
1111

1212
<provider
13-
android:name=".util.Utils$FileProvider4Util"
13+
android:name=".util.Utils$FileProvider4UtilCode"
1414
android:authorities="${applicationId}.utilcode.provider"
1515
android:exported="false"
1616
android:grantUriPermissions="true"

0 commit comments

Comments
 (0)