GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix:修复一个crash问题 · equalll/AndroidHttpCapture@94bc36e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • app
    • build.gradle
    • src/main/java/cn/darkal/networkdiagnosis
      • Fragment
        • WebViewFragment.java
      • Utils
        • ProxyUtils.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎app/build.gradle‎

Copy file name to clipboardExpand all lines: app/build.gradle
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ android {
2626
minSdkVersion 14
2727
targetSdkVersion 22
2828
versionCode 25
29-
versionName "2.4.25"
29+
versionName "2.4.26"
3030
// Enabling multidex support.
3131
multiDexEnabled true
3232
resConfigs "zh"
Collapse file

‎app/src/main/java/cn/darkal/networkdiagnosis/Fragment/WebViewFragment.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/cn/darkal/networkdiagnosis/Fragment/WebViewFragment.java
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,13 @@ public void onReceive(Context context, Intent intent) {
272272
}
273273

274274
public void loadUrl(String url) {
275-
if (!isSetProxy) {
276-
ProxyUtils.setProxy(webView, "127.0.0.1", SysApplication.proxyPort);
277-
Log.e("~~~~", "initProxyWebView()");
278-
isSetProxy = true;
279-
}
280275
if (webView != null) {
276+
if (!isSetProxy) {
277+
ProxyUtils.setProxy(webView, "127.0.0.1", SysApplication.proxyPort);
278+
Log.e("~~~~", "initProxyWebView()");
279+
isSetProxy = true;
280+
}
281+
281282
if (!url.startsWith("http://") && !url.startsWith("https://")) {
282283
url = "http://" + url;
283284
}
Collapse file

‎app/src/main/java/cn/darkal/networkdiagnosis/Utils/ProxyUtils.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/cn/darkal/networkdiagnosis/Utils/ProxyUtils.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static boolean setProxy(WebView webview, String host, int port) {
3535
} else if (sdkInt < Build.VERSION_CODES.LOLLIPOP) {
3636
return setProxyKK(webview, host, port, "android.app.Application");
3737
} else {
38-
return webview.getContext() != null && setProxyLollipop(webview.getContext(), host, port);
38+
return webview != null && setProxyLollipop(webview.getContext(), host, port);
3939
}
4040
}
4141

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.