Skip to content

Commit

Permalink
Fix syntax and util.Log import
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasMerz committed Apr 22, 2021
1 parent 69da7ab commit 5b8af79
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Licensed to the Apache Software Foundation (ASF) under one
import android.graphics.Bitmap;
import android.net.Uri;
import android.net.http.SslError;
import android.util.Log;
import android.webkit.ClientCertRequest;
import android.webkit.HttpAuthHandler;
import android.webkit.MimeTypeMap;
Expand All @@ -50,7 +49,6 @@ Licensed to the Apache Software Foundation (ASF) under one

import androidx.webkit.WebViewAssetLoader;


/**
* This class is the WebViewClient that implements callbacks for our web view.
* The kind of callbacks that happen here are regarding the rendering of the
Expand Down Expand Up @@ -91,8 +89,9 @@ public SystemWebViewClient(SystemWebViewEngine parentEngine) {
}
}

if (path.isEmpty())
if (path.isEmpty()) {
path = "index.html";
}
InputStream is = parentEngine.webView.getContext().getAssets().open("www/" + path, AssetManager.ACCESS_STREAMING);
String mimeType = "text/html";
String extension = MimeTypeMap.getFileExtensionFromUrl(path);
Expand All @@ -110,7 +109,7 @@ public SystemWebViewClient(SystemWebViewEngine parentEngine) {
return new WebResourceResponse(mimeType, null, is);
} catch (Exception e) {
e.printStackTrace();
Log.e(TAG, e.getMessage());
LOG.e(TAG, e.getMessage());
}
return null;
});
Expand Down

0 comments on commit 5b8af79

Please sign in to comment.