Skip to content

Commit afd266d

Browse files
committed
fix(core): remove getApplicationContext() invoke in onBaseContextAttached in ApplicatoinLike
1 parent 5e3b4e8 commit afd266d

File tree

5 files changed

+4
-4
lines changed

5 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repositories {
2121

2222
```
2323
dependencies {
24-
compile("com.tencent.tinker:tinker-server-android:0.3.1")
24+
compile("com.tencent.tinker:tinker-server-android:0.3.2")
2525
}
2626
```
2727

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ org.gradle.daemon=true
22
org.gradle.configureondemand=true
33

44
TINKER_VERSION=1.7.5
5-
VERSION_NAME=0.3.1
5+
VERSION_NAME=0.3.2
66
GROUP=com.tencent.tinker
77
POM_DESCRIPTION=A server client for tencent tinker hot patch
88
POM_URL=https://github.com/simpleton/tinker_server_client

tinker-server-android/src/main/java/com/tencent/tinker/app/TinkerServerManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public class TinkerServerManager {
6565
*/
6666
public static void installTinkerServer(Context context, Tinker tinker,
6767
int hours, String appKey, String appVersion, String channel) {
68-
context = context.getApplicationContext();
6968
final boolean debug = Debugger.getInstance(context).isDebug();
7069
TinkerLog.w(TAG, String.format("installTinkerServer, debug value: %s appVersion: %s, channel: %s",
7170
String.valueOf(debug), appVersion, channel)

tinker-server-sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies {
1111
compile("com.tencent.tinker:tinker-android-lib:${TINKER_VERSION}") { changing = true }
1212
provided("com.tencent.tinker:tinker-android-anno:${TINKER_VERSION}") { changing = true }
1313

14-
compile("com.tencent.tinker:tinker-server-android:0.3.1") { changing = true }
14+
compile("com.tencent.tinker:tinker-server-android:0.3.2") { changing = true }
1515

1616
/* use for developer */
1717
// compile("com.tencent.tinker:tinker-android-loader:${TINKER_VERSION}") { changing = true }

tinker-server-sample/src/main/java/tinker/sample/android/app/SampleApplicationLike.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,6 @@ public void onBaseContextAttached(Context base) {
9898
);
9999
//开始检查是否有补丁,这里配置的是每隔访问3小时服务器是否有更新。
100100
TinkerServerManager.checkTinkerUpdate(false);
101+
//其他初始化,请避免这样的调用getApplication().getApplicationContext()
101102
}
102103
}

0 commit comments

Comments
 (0)