QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685

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


package com.tencent.mtt.browser.innerexperience;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.text.TextUtils;
import android.widget.RemoteViews;
import com.tencent.common.task.QBTask;
import com.tencent.common.utils.UrlUtils;
import com.tencent.mtt.ContextHolder;
import com.tencent.mtt.R;
import com.tencent.mtt.base.notification.facade.INotificationBuilder;
import com.tencent.mtt.base.notification.facade.INotify;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.wup.GUIDManager;
import com.tencent.mtt.compliance.MethodDelegate;
import com.tencent.mtt.qbcontext.core.QBContext;
import com.tencent.mtt.qbinfo.IQConfigure;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.concurrent.Callable;
import qb.a.g;

public class InnerExperienceNotification {
    private PendingIntent a(String str) {
        Intent intent = new Intent("android.intent.action.VIEW");
        if (!TextUtils.isEmpty(str) && UrlUtils.isWebUrl(str)) {
            intent.setPackage("com.tencent.mtt");
        }
        intent.setFlags(33554432);
        intent.setData(Uri.parse(str));
        try {
            return PendingIntent.getActivity(ContextHolder.getAppContext(), 0, intent, 134217728);
        } catch (SecurityException unused) {
            return null;
        }
    }

    public void b() {
        try {
            Notification b2 = d().b();
            ((INotify) QBContext.getInstance().getService(INotify.class)).saveNotificationId(1);
            NotificationManager c2 = c();
            if (c2 != null) {
                c2.notify(1, b2);
            }
        } catch (Throwable unused) {
        }
    }

    private NotificationManager c() {
        return (NotificationManager) ContextHolder.getAppContext().getSystemService("notification");
    }

    private INotificationBuilder d() {
        INotificationBuilder createNotificationBuider = ((INotify) QBContext.getInstance().getService(INotify.class)).createNotificationBuider();
        try {
            createNotificationBuider.b(g.f85885c);
        } catch (Throwable unused) {
        }
        createNotificationBuider.a(MttResources.p(g.bW));
        createNotificationBuider.a(System.currentTimeMillis());
        createNotificationBuider.c(true);
        createNotificationBuider.e("点击可下载最新体验包");
        RemoteViews remoteViews = new RemoteViews(ContextHolder.getAppContext().getPackageName(), R.layout.qk);
        remoteViews.setOnClickPendingIntent(R.id.tv_download, a(f()));
        remoteViews.setOnClickPendingIntent(R.id.tv_feedback, a(g()));
        remoteViews.setOnClickPendingIntent(R.id.tv_debug_window, a(e()));
        createNotificationBuider.a(remoteViews);
        return createNotificationBuider;
    }

    private String e() {
        return "qb://debugtest/debugdialog";
    }

    private String f() {
        Intent intent;
        ResolveInfo resolveInfo = null;
        try {
            intent = Intent.parseUri("bkdevopsapp://bkdevopsapp/app/project/buildDetail/qqbrowser-android/p-f76df511b0cc4394bfc618ac4a530835/latestSucceeded/archiveTab", 1);
            try {
                resolveInfo = ContextHolder.getAppContext().getPackageManager().resolveActivity(intent, 0);
            } catch (Exception unused) {
            }
        } catch (Exception unused2) {
            intent = null;
        }
        return (intent == null || resolveInfo == null) ? "https://bkdevops.qq.com/app/download/devops_app_download.html" : "bkdevopsapp://bkdevopsapp/app/project/buildDetail/qqbrowser-android/p-f76df511b0cc4394bfc618ac4a530835/latestSucceeded/archiveTab";
    }

    private String g() {
        String str;
        try {
            str = RsaUtil.a(RsaUtil.a(URLEncoder.encode("userid=" + GUIDManager.a().f() + "&version=" + IQConfigure.g + "&hardware=" + MethodDelegate.getModel(), "UTF-8").getBytes("UTF-8"), "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtTSFtdiNEXxARqleIkr+H4nBAoM5mOmYLyfV5JqMiri9kaQ5164ek1aBT7B+XjDn+9WeVKgUIdtRagOfujGnJcEXnSBZLFU2rkfuRKfwn0y6d6omzKQcnqBL9NZ9VVYg/fbosh8w7yr6qMboXuNBpU1PKolcouAtRWzWGtQB9aiDwTcyiWYy5ziKEByPQUeZ9syIsgV9qUVTqZ2WsLD1p+XP9Zw32HhwMQHlie8YR6Jhe6l//wxCC7ISlvgtY6z5NSJmig6ivVapWoIjAa2t6n7TsYIkFKDnIStNkUxIsZ16ORWijnCJ9YA4GPiACxO0O3TrCSyG/SsA4xyeh2FKTQIDAQAB"));
        } catch (UnsupportedEncodingException unused) {
            str = "";
        }
        return UrlUtils.addParamsToUrl(UrlUtils.addParamsToUrl(UrlUtils.addParamsToUrl("https://h5.aisee.qq.com/submit", "appid=867eb5a475"), "pid=1"), "data=" + str);
    }

    public void a() {
        QBTask.c(new Callable<Object>() {
            @Override
            public Object call() throws Exception {
                InnerExperienceNotification.this.b();
                return null;
            }
        });
    }
}