Skip to content

Commit 417b27d

Browse files
committed
change the uninitial warning log level to error
1 parent 97b4bdf commit 417b27d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Step 2. Add the dependency in the form
1717

1818
```gradle
1919
dependencies {
20-
compile 'com.github.vilyever:AndroidContextHolder:1.0.0'
20+
compile 'com.github.vilyever:AndroidContextHolder:1.0.1'
2121
}
2222
```
2323

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
1919

20-
release_version=1.0.0
20+
release_version=1.0.1

vdcontextholder/src/main/java/com/vilyever/vdcontextholder/VDContextHolder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static Context getContext() {
3636
Application application = (Application) Class.forName("android.app.ActivityThread")
3737
.getMethod("currentApplication").invoke(null, (Object[]) null);
3838
if (application != null) {
39-
Log.d(VDContextHolder.class.getName(), "ContextHolder is not initialed, it is recommend to initial with application context.");
39+
Log.e(VDContextHolder.class.getName(), "ContextHolder is not initialed, it is recommend to initial with application context.");
4040
return application;
4141
}
4242
}
@@ -48,7 +48,7 @@ public static Context getContext() {
4848
Application application = (Application) Class.forName("android.app.AppGlobals")
4949
.getMethod("getInitialApplication").invoke(null, (Object[]) null);
5050
if (application != null) {
51-
Log.d(VDContextHolder.class.getName(), "ContextHolder is not initialed, it is recommend to initial with application context.");
51+
Log.e(VDContextHolder.class.getName(), "ContextHolder is not initialed, it is recommend to initial with application context.");
5252
return application;
5353
}
5454
}
@@ -61,7 +61,7 @@ public static Context getContext() {
6161
.getMethod("systemMain").invoke(null, (Object[]) null);
6262
Context context = (Context) activityThread.getClass().getMethod("getSystemContext").invoke(activityThread, (Object[]) null);
6363
if (context != null) {
64-
Log.d(VDContextHolder.class.getName(), "ContextHolder is not initialed, it is recommend to initial with application context.");
64+
Log.e(VDContextHolder.class.getName(), "ContextHolder is not initialed, it is recommend to initial with application context.");
6565
return context;
6666
}
6767
}

0 commit comments

Comments
 (0)