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

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


package com.tencent.mtt.browser.hometab.operation;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.SystemClock;
import android.view.View;
import android.widget.ImageView;
import com.tencent.common.task.QBTask;
import com.tencent.mtt.ContextHolder;
import com.tencent.mtt.base.hometab.IToolbarOperationService;
import com.tencent.mtt.browser.db.pub.ToolBarOperationBean;
import com.tencent.mtt.browser.db.pub.ToolBarOperationBeanExt;
import com.tencent.mtt.newskin.SimpleSkinBuilder;
import com.tencent.mtt.operation.res.IToolBarOperationIconListener;
import com.tencent.mtt.qbcontext.core.QBContext;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.Callable;
import qb.a.g;

public class HomeToolbarOpTester {

    private static BroadcastReceiver f41871a = null;

    private static int f41872b = 1;

    static class AnonymousClass1 extends BroadcastReceiver {
        AnonymousClass1() {
        }

        @Override
        public void onReceive(Context context, Intent intent) {
            final ToolBarOperationBean b2 = HomeToolbarOpTester.b(intent.getIntExtra("opType", 1), intent.getIntExtra("tabItemId", 100), intent.getStringExtra("statKey"));
            QBTask.b((Callable) new Callable<Object>() {
                @Override
                public Object call() throws Exception {
                    ((IToolbarOperationService) QBContext.getInstance().getService(IToolbarOperationService.class)).updateOperations(b2);
                    return null;
                }
            });
        }
    }

    private static String a(int i) {
        return i == 100 ? "qb://tab/home" : i == 101 ? "qb://tab/video" : i == 102 ? "qb://tab/usercenter" : i == 103 ? "qb://tab/file" : i == 105 ? "qb://tab/now" : i == 108 ? "qb://tab/coronavirusfeeds" : "qb://tab/home";
    }

    public static void a() {
    }

    public static ToolBarOperationBean b(int i, int i2, String str) {
        String str2;
        ToolBarOperationBean toolBarOperationBean = new ToolBarOperationBean();
        toolBarOperationBean.f36331b = "" + System.currentTimeMillis();
        ToolBarOperationBean toolBarOperationBean2 = toolBarOperationBean;
        if (i != 1) {
            if (i == 2) {
                if (i2 == 102) {
                    int i3 = f41872b;
                    if (i3 < 4) {
                        toolBarOperationBean.t = true;
                        toolBarOperationBean.g = i3 == 2 ? "0" : "5";
                        toolBarOperationBean.f36331b = "commom_number_item";
                    } else {
                        toolBarOperationBean.g = "7";
                    }
                    f41872b++;
                    toolBarOperationBean2 = toolBarOperationBean;
                } else {
                    str2 = "8";
                    toolBarOperationBean.g = str2;
                    toolBarOperationBean2 = toolBarOperationBean;
                }
            } else if (i == 3) {
                str2 = "这是一条测试气泡";
                toolBarOperationBean.g = str2;
                toolBarOperationBean2 = toolBarOperationBean;
            } else if (i == 6) {
                toolBarOperationBean.o = "#ff0000";
                toolBarOperationBean.i = "https://rmpad.imtt.qq.com/rmptest/RMP_1578983448488.png";
                toolBarOperationBean.x = true;
                toolBarOperationBean.y = Color.parseColor("#80000000");
                toolBarOperationBean2 = toolBarOperationBean;
            } else if (i == 7) {
                ToolBarOperationBeanExt toolBarOperationBeanExt = new ToolBarOperationBeanExt();
                toolBarOperationBeanExt.g = "文件下载中\n点击下方查看";
                toolBarOperationBeanExt.q = true;
                toolBarOperationBeanExt.p = 6000;
                toolBarOperationBeanExt.U = g.f85884b;
                toolBarOperationBean2 = toolBarOperationBeanExt;
            } else if (i == 8) {
                ToolBarOperationBeanExt toolBarOperationBeanExt2 = new ToolBarOperationBeanExt();
                toolBarOperationBeanExt2.f36333d = 8;
                toolBarOperationBeanExt2.f36332c = 103;
                toolBarOperationBeanExt2.f36331b = String.valueOf(System.currentTimeMillis());
                toolBarOperationBeanExt2.ac = new IToolBarOperationIconListener() {
                    @Override
                    public void a() {
                    }

                    @Override
                    public void b() {
                    }

                    @Override
                    public void c() {
                    }

                    @Override
                    public View d() {
                        ImageView imageView = new ImageView(ContextHolder.getAppContext());
                        SimpleSkinBuilder.a(imageView).g(g.f85884b).f();
                        return imageView;
                    }
                };
                toolBarOperationBean2 = toolBarOperationBeanExt2;
            } else if (i == 10) {
                ToolBarOperationBeanExt toolBarOperationBeanExt3 = new ToolBarOperationBeanExt();
                toolBarOperationBeanExt3.f36333d = 9;
                toolBarOperationBeanExt3.f36332c = 103;
                toolBarOperationBeanExt3.f36331b = String.valueOf(System.currentTimeMillis());
                toolBarOperationBeanExt3.U = g.f85884b;
                toolBarOperationBeanExt3.g = "这是标题";
                toolBarOperationBean2 = toolBarOperationBeanExt3;
            } else if (i == 11 || i == 12) {
                ToolBarOperationBeanExt toolBarOperationBeanExt4 = new ToolBarOperationBeanExt();
                toolBarOperationBeanExt4.U = g.f85884b;
                toolBarOperationBeanExt4.p = 2000;
                toolBarOperationBeanExt4.q = true;
                toolBarOperationBeanExt4.f36333d = 12;
                toolBarOperationBeanExt4.f36332c = 103;
                String str3 = "file_" + SystemClock.elapsedRealtime();
                toolBarOperationBeanExt4.f36331b = str3;
                toolBarOperationBeanExt4.x = true;
                toolBarOperationBeanExt4.w = true;
                toolBarOperationBeanExt4.g = "文件title";
                toolBarOperationBeanExt4.h = "文件的长长长内容";
                ToolBarOperationBeanExt toolBarOperationBeanExt5 = new ToolBarOperationBeanExt();
                toolBarOperationBeanExt5.f36333d = 3;
                toolBarOperationBeanExt5.f36332c = 103;
                toolBarOperationBeanExt5.f36331b = str3;
                toolBarOperationBeanExt5.z = toolBarOperationBeanExt4.z;
                toolBarOperationBeanExt5.w = true;
                toolBarOperationBeanExt5.g = toolBarOperationBeanExt4.g;
                toolBarOperationBeanExt4.A = toolBarOperationBeanExt5;
                toolBarOperationBeanExt4.B = true;
                toolBarOperationBean2 = toolBarOperationBeanExt4;
            } else if (i == 13) {
                ToolBarOperationBeanExt toolBarOperationBeanExt6 = new ToolBarOperationBeanExt();
                toolBarOperationBeanExt6.f36333d = 9;
                toolBarOperationBeanExt6.f36332c = 103;
                toolBarOperationBeanExt6.f36331b = String.valueOf(System.currentTimeMillis());
                toolBarOperationBeanExt6.U = g.f85884b;
                toolBarOperationBeanExt6.g = "这是标题";
                toolBarOperationBeanExt6.h = "文件的长长长内容";
                toolBarOperationBean2 = toolBarOperationBeanExt6;
            } else {
                if (i != 15 && i != 101 && i != 102) {
                    toolBarOperationBean2 = toolBarOperationBean;
                }
                ToolBarOperationBeanExt toolBarOperationBeanExt7 = new ToolBarOperationBeanExt();
                toolBarOperationBeanExt7.f36333d = Integer.valueOf(i);
                toolBarOperationBeanExt7.f36332c = 103;
                toolBarOperationBeanExt7.i = "https://rmpad.imtt.qq.com/rmptest/RMP_1578983448488.png";
                toolBarOperationBeanExt7.f36331b = String.valueOf(System.currentTimeMillis());
                toolBarOperationBeanExt7.U = g.f85884b;
                toolBarOperationBeanExt7.g = "一胎三胞:总裁爹地请签收签收总裁爹地";
                toolBarOperationBeanExt7.h = "推荐指数XXXXXX";
                toolBarOperationBeanExt7.p = 5000;
                toolBarOperationBeanExt7.q = true;
                toolBarOperationBean2 = toolBarOperationBeanExt7;
            }
        }
        toolBarOperationBean2.K = b();
        toolBarOperationBean2.L = b();
        toolBarOperationBean2.f36333d = Integer.valueOf(i);
        toolBarOperationBean2.f36332c = Integer.valueOf(i2);
        toolBarOperationBean2.m = false;
        toolBarOperationBean2.z = a(i2);
        toolBarOperationBean2.j = toolBarOperationBean2.z;
        toolBarOperationBean2.D = str;
        return toolBarOperationBean2;
    }

    private static HashMap<Integer, ArrayList<String>> b() {
        HashMap<Integer, ArrayList<String>> hashMap = new HashMap<>();
        ArrayList<String> arrayList = new ArrayList<>();
        arrayList.add("https://m.baidu.com");
        arrayList.add("https://m.qq.com");
        hashMap.put(1, arrayList);
        hashMap.put(0, arrayList);
        return hashMap;
    }
}