True Phone v2.0.22版本的 MD5 值为:6529e5770da53174edfaf6fae8d4f259

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


package com.hb.dialer.prefs;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.PackageInfo;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
import java.util.HashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class HbAboutPreference extends o02 {
    public static final HashMap<String, String> d = new HashMap<>();
    public final String c;

    static {
        ir1.e("rate_app", "Rate app");
    }

    public HbAboutPreference(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        if (attributeSet != null) {
            this.c = fd.a("http://schemas.android.com/apk/res/android", context, attributeSet).b("text");
        }
        if (f42.e(this.c)) {
            this.c = "%app_name_full%";
        }
    }

    @Override
    public final void onPrepareDialogBuilder(AlertDialog.Builder builder) {
        String str;
        String str2;
        super.onPrepareDialogBuilder(builder);
        Context context = getContext();
        CharSequence title = getTitle();
        String a = ir1.a("rate_app");
        int i = f42.a;
        String a2 = ws1.a();
        Context context2 = xg.a;
        try {
            PackageInfo packageInfo = context2.getPackageManager().getPackageInfo(context2.getPackageName(), 0);
            str = packageInfo.versionName + " rev " + packageInfo.versionCode;
        } catch (Exception e) {
            e.printStackTrace();
            str = "unknown";
        }
        String replace = this.c.replace("%app_name%", a2).replace("%app_name_full%", m1.j(a2, " ", str)).replace("%app_version%", str).replace("%company_name%", ir1.d(xg.a, "license_company_name", "COMPANY")).replace("%privacy_url%", ir1.d(xg.a, "license_privacy_url", "http://privacy")).replace("<pro>", "").replace("</pro>", "").replace("<lite>", "").replace("</lite>", "");
        Pattern compile = Pattern.compile("%R\\.(string|internal)\\.(.*?)%");
        StringBuffer stringBuffer = new StringBuffer(replace.length() * 2);
        Matcher matcher = compile.matcher(replace);
        while (matcher.find()) {
            String group = matcher.group(1);
            String group2 = matcher.group(2);
            if ("string".equals(group)) {
                str2 = ir1.d(context, group2, group2);
            } else if (!"internal".equals(group) || (str2 = d.get(group2)) == null) {
                str2 = "";
            }
            matcher.appendReplacement(stringBuffer, str2);
        }
        matcher.appendTail(stringBuffer);
        builder.setMessage(ud2.g(stringBuffer.toString())).setNegativeButton((CharSequence) null, (DialogInterface.OnClickListener) null).setNeutralButton(17039370, (DialogInterface.OnClickListener) null).setPositiveButton(a, new ml1(1, context));
        if (title != null) {
            builder.setTitle(title);
        }
    }

    @Override
    public final void showDialog(Bundle bundle) {
        super.showDialog(bundle);
        View findViewById = getDialog().findViewById(d.a(16908299, "com.android.internal.R.id.message"));
        if (findViewById instanceof TextView) {
            ((TextView) findViewById).setMovementMethod(LinkMovementMethod.getInstance());
        }
    }
}