Skip to content

Commit bc7c17a

Browse files
committed
Android:APIJSONTest 解决 UnitAutoApp 中 getCurrentActivity 不是当前的
1 parent bb12a28 commit bc7c17a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

APIJSON-Android/APIJSONTest/app/src/main/java/apijson/demo/application/DemoApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ public void setCurrentActivity(Activity activity) {
368368
if (sCurrentActivityWeakRef == null || ! activity.equals(sCurrentActivityWeakRef.get())) {
369369
sCurrentActivityWeakRef = new WeakReference<>(activity);
370370
}
371+
372+
UnitAutoApp.setCurrentActivity(activity);
371373
}
372374

373375

0 commit comments

Comments
 (0)