百度手机卫士 v5.12.0版本的 MD5 值为:e6b73ca73976681820201475f735614c

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


package dxoptimizer;

import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.text.TextUtils;
import cn.opda.a.phonoalbumshoushou.R;
import com.dianxinos.lib.apkdownloader.DownloadInfo;
import com.dianxinos.optimizer.module.supermode.PermissionMgrGuideActivity;
import com.dianxinos.optimizer.module.supermode.SupermodeActivity;
import java.io.File;
import java.util.List;
import org.json.JSONObject;

public class gfm {
    private static boolean b = false;
    private static final gee c = new gfs();
    private Context a;

    public gfm(Context context) {
        this.a = context.getApplicationContext();
    }

    public static void a(Context context) {
        JSONObject jSONObject = new JSONObject();
        try {
            if (hdu.b()) {
                jSONObject.put("ehs_en", true);
                jSONObject.put("ehs_rt", hdu.c());
            } else {
                jSONObject.put("ehs_en", false);
            }
        } catch (Exception e) {
            if (b) {
                hcq.c("SupermodeMgr", "JSONObject status exp !");
            }
        }
        hek.a(context).d("ehs", jSONObject);
    }

    public void a() {
        if (!c()) {
            if (!h()) {
                gfl.a(this.a, System.currentTimeMillis());
                g();
                return;
            }
            return;
        }
        if (!e(this.a) && hcw.c(this.a) && hcw.a(this.a) == 1 && hep.e() && hdu.c() && !gfl.n(this.a)) {
            guu.a().b(new gfn(this));
        }
    }

    public void f() {
        if (b) {
            hcq.a("SupermodeMgr", "downloadPermissionApkBg!");
        }
        DownloadInfo[] downloadInfoArr = {new DownloadInfo()};
        downloadInfoArr[0].a = "authority";
        downloadInfoArr[0].c = this.a.getString(R.string.enhance_permission_apk_name);
        downloadInfoArr[0].b = "com.dianxinos.superuser";
        downloadInfoArr[0].j = hbt.l;
        downloadInfoArr[0].g = "http://dxurl.cn/own/yhds/yhds-yinsi";
        downloadInfoArr[0].m = "pak";
        ays a = bqx.a(this.a);
        String a2 = downloadInfoArr[0].a();
        if (brv.a(this.a, downloadInfoArr[0].a, downloadInfoArr[0].b) == 6 && new File(a2).exists()) {
            a(a2);
        } else {
            brv.a(this.a, downloadInfoArr[0].f, false, (bpa) new gfo(this, a, downloadInfoArr, a2));
        }
    }

    public void a(String str) {
        if (!gfl.o(this.a)) {
            if (!gfl.m(this.a)) {
                gfl.g(this.a, true);
                Intent intent = new Intent(this.a, (Class<?>) PermissionMgrGuideActivity.class);
                intent.putExtra("extra.from", 0);
                hcx.a(this.a, 6, "", this.a.getString(R.string.supermode_notify_permisssion_title), this.a.getString(R.string.supermode_notify_permisssion_des), PendingIntent.getActivity(this.a, 0, intent, 134217728), 56);
                hek.a(this.a).c("ehc", "ehc_p_s", 1);
                return;
            }
            return;
        }
        guu.a().b(new gfq(this, str));
    }

    private void g() {
        if (!gfl.b(this.a) && c(this.a)) {
            gfl.a(this.a, true);
            Intent intent = new Intent(this.a, (Class<?>) SupermodeActivity.class);
            intent.putExtra("extra.from", 0);
            intent.putExtra("extra.data", true);
            String q = gfl.q(this.a);
            if (TextUtils.isEmpty(q)) {
                q = this.a.getString(R.string.authority_notification_title);
            }
            String r = gfl.r(this.a);
            if (TextUtils.isEmpty(r)) {
                r = this.a.getString(R.string.authority_notification_msg);
            }
            hcx.a(this.a, 6, "", q, r, PendingIntent.getActivity(this.a, 0, intent, 134217728), 41);
            hek.a(this.a).c("aty", "aty_nf", 1);
            hek.a(this.a).a(5);
        }
    }

    private boolean h() {
        boolean z = System.currentTimeMillis() - gfl.a(this.a) < 86400000;
        if (b) {
            hcq.a("SupermodeMgr", "hasCheckToday = " + z);
        }
        return z;
    }

    public static void b(Context context) {
        Intent intent = new Intent(context, (Class<?>) SupermodeActivity.class);
        intent.putExtra("extra.data", true);
        context.startActivity(intent);
    }

    public static boolean b() {
        String a = ll.a("ro.product.cpu.abi", "");
        if (b) {
            hcq.a("SupermodeMgr", "cpu abi = " + a);
        }
        if (TextUtils.isEmpty(a)) {
            return false;
        }
        return a.startsWith("armeabi");
    }

    public static boolean c() {
        return hdu.b();
    }

    public static boolean c(Context context) {
        return gfl.p(context);
    }

    public static void d(Context context) {
        if (b) {
            hcq.a("SupermodeMgr", "startSdkRootBackbroundIfPossible");
        }
        if (!hcw.c(context) || System.currentTimeMillis() - gfl.l(context) < 10800000) {
            if (b) {
                hcq.a("SupermodeMgr", "isNetworkAvaialble = false or < 3h, return!");
                return;
            }
            return;
        }
        Context applicationContext = context.getApplicationContext();
        if (b() && gfl.d(applicationContext)) {
            boolean a = gfu.a(gfl.c(applicationContext));
            if (b) {
                hcq.a("SupermodeMgr", "startSdkRootBackbroundIfPossible isSupport = " + a);
            }
            if (a) {
                if (b) {
                    hcq.a("SupermodeMgr", "startSdkRootBackbroundIfPossible : run root()");
                }
                hek.a(applicationContext).c("ehc", "ehc_sdk_bg_s", 1);
                gfl.b(context, System.currentTimeMillis());
                guu.a().b(new gfr(applicationContext));
            }
        }
    }

    public static boolean e(Context context) {
        List<ResolveInfo> queryIntentActivities = context.getPackageManager().queryIntentActivities(new Intent("com.dianxinos.superuser.action.VIEW_PERMS"), 0);
        return queryIntentActivities != null && queryIntentActivities.size() > 0;
    }
}