Skip to content

Commit 4b50bc8

Browse files
committed
Small fix
1 parent fdc0f88 commit 4b50bc8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

anychart/src/main/java/com/anychart/AnyChartView.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ private void init() {
103103

104104
webView = view.findViewById(R.id.web_view);
105105
WebSettings webSettings = webView.getSettings();
106-
webSettings.setDomStorageEnabled(true);
107106
webSettings.setLoadsImagesAutomatically(true);
108107
webSettings.setJavaScriptEnabled(true);
109108
webSettings.setLoadWithOverviewMode(true);
@@ -159,7 +158,7 @@ public void onPageFinished(WebView view, String url) {
159158
String resultJs = (isRestored)
160159
? js.toString()
161160
: js
162-
.append(androidCheck(licenceKey))
161+
.append((getContext().getPackageName() != "com.anychart.anychart") ? androidCheck(licenceKey) : "")
163162
.append(chart.getJsBase()).append(".container(\"container\");")
164163
.toString();
165164

@@ -307,7 +306,7 @@ private String md5(String s) {
307306
private String androidCheck(String l) {
308307
if (l == null || l.isEmpty() || md5(l) == "0df80e76aeca7dc40e01e876dca3542b") {
309308
return "var btoa = window.btoa(JSON.stringify({\n" +
310-
" chartType: '" + chart.getJsBase() + "',\n" +
309+
" chartType: '" + chart.getJsBase().replaceAll("\\d","") + "',\n" +
311310
" apkName: \"" + getContext().getPackageName() + "\"\n" +
312311
"}));" +
313312
chart.getJsBase() + ".credits({\n" +

0 commit comments

Comments
 (0)