Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit 4718575

Browse files
committed
Initialize AndroidacyAPI before hook
1 parent ded15c0 commit 4718575

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/com/fox2code/mmm/androidacy/AndroidacyActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ public void run() {
282282
IntentHelper.openCustomTab(this, downloadUrl);
283283
}
284284
});
285+
this.androidacyWebAPI = new AndroidacyWebAPI(this, allowInstall);
285286
XHooks.onWebViewInitialize(this.webView, allowInstall);
286-
this.webView.addJavascriptInterface(androidacyWebAPI =
287-
new AndroidacyWebAPI(this, allowInstall), "mmm");
287+
this.webView.addJavascriptInterface(this.androidacyWebAPI, "mmm");
288288
if (compatLevel != 0) androidacyWebAPI.notifyCompatModeRaw(compatLevel);
289289
HashMap<String, String> headers = new HashMap<>();
290290
headers.put("Accept-Language", this.getResources()

0 commit comments

Comments
 (0)