APKPure.apk(点击下载) / i.java


package e.g.a.z.k;

import android.app.Activity;
import android.text.SpannableStringBuilder;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.apkpure.aegon.R;
import com.apkpure.aegon.app.newcard.model.AppCardData;
import com.apkpure.proto.nano.OpenConfigProtos;
import e.g.a.i0.n0;
import e.g.a.i0.p1;
import e.g.a.m0.s;
import e.g.a.m0.t;
import i.b.c.h;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import o.m;
import o.s.c.j;
import o.y.l;

public final class i {

    /* renamed from: a  reason: collision with root package name */
    public static final i f7690a = new i();

    public static final class a extends t {
        public final /* synthetic */ Activity c;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public a(Activity activity) {
            super(activity);
            this.c = activity;
        }

        public void onClick(View view) {
            j.e(view, "widget");
            n0.f0(this.c);
        }
    }

    public static final class b extends t {
        public final /* synthetic */ Activity c;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public b(Activity activity) {
            super(activity);
            this.c = activity;
        }

        public void onClick(View view) {
            j.e(view, "widget");
            Activity activity = this.c;
            OpenConfigProtos.OpenConfig openConfig = new OpenConfigProtos.OpenConfig();
            openConfig.title = activity.getString(R.string.arg_RES_2131821243);
            openConfig.type = "WebPage";
            openConfig.url = "https://api.pureapk.com/m/v2/page/terms-service.html";
            HashMap hashMap = new HashMap();
            String string = activity.getString(R.string.arg_RES_2131821618);
            j.d(string, "activity.getString(R.str…prv_screen_term_services)");
            hashMap.put("eventId", string);
            hashMap.put("currentPage", "");
            openConfig.eventInfoV2 = hashMap;
            n0.M(activity, openConfig);
        }
    }

    public static final class c extends t {
        public final /* synthetic */ Activity c;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public c(Activity activity) {
            super(activity);
            this.c = activity;
        }

        public void onClick(View view) {
            j.e(view, "widget");
            n0.f0(this.c);
        }
    }

    public static final class d extends t {
        public final /* synthetic */ Activity c;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public d(Activity activity) {
            super(activity);
            this.c = activity;
        }

        public void onClick(View view) {
            j.e(view, "widget");
            Activity activity = this.c;
            OpenConfigProtos.OpenConfig openConfig = new OpenConfigProtos.OpenConfig();
            openConfig.title = activity.getString(R.string.arg_RES_2131821243);
            openConfig.type = "WebPage";
            openConfig.url = "https://api.pureapk.com/m/v2/page/terms-service.html";
            HashMap hashMap = new HashMap();
            String string = activity.getString(R.string.arg_RES_2131821618);
            j.d(string, "activity.getString(R.str…prv_screen_term_services)");
            hashMap.put("eventId", string);
            hashMap.put("currentPage", "");
            openConfig.eventInfoV2 = hashMap;
            n0.M(activity, openConfig);
        }
    }

    public final Map<String, Object> a(Activity activity) {
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        if (activity instanceof e.g.a.t.b.a) {
            e.g.a.t.b.a aVar = (e.g.a.t.b.a) activity;
            linkedHashMap.put(AppCardData.KEY_SCENE, Long.valueOf(aVar.v1()));
            linkedHashMap.put("source_scene", Long.valueOf(aVar.f7122e.sourceScene));
        }
        return linkedHashMap;
    }

    public final void b(Activity activity, o.s.b.a<m> aVar) {
        j.e(activity, "activity");
        j.e(aVar, "positive");
        s sVar = new s(activity, true);
        sVar.f13954a.d = activity.getString(R.string.arg_RES_2131821855);
        sVar.D(activity.getString(R.string.arg_RES_2131820920));
        sVar.G(R.string.arg_RES_2131821219, new b(activity, aVar));
        sVar.E(R.string.arg_RES_2131821225, new a(activity));
        h n2 = sVar.n();
        b bVar = new b(activity);
        a aVar2 = new a(activity);
        TextView textView = (TextView) n2.findViewById(R.id.arg_RES_2131297702);
        String string = activity.getString(R.string.arg_RES_2131820920);
        j.d(string, "activity.getString(R.str…f_service_privacy_policy)");
        String string2 = activity.getString(R.string.arg_RES_2131820919);
        j.d(string2, "activity.getString(R.str…log_terms_of_service_key)");
        String string3 = activity.getString(R.string.arg_RES_2131820911);
        j.d(string3, "activity.getString(R.str…ialog_privacy_policy_key)");
        SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(string);
        try {
            int l2 = l.l(string, string2, 0, false, 6);
            int l3 = l.l(string, string3, 0, false, 6);
            spannableStringBuilder.setSpan(bVar, l2, string2.length() + l2, 33);
            spannableStringBuilder.setSpan(aVar2, l3, string3.length() + l3, 33);
        } catch (Exception unused) {
        }
        if (textView != null) {
            textView.setText(spannableStringBuilder);
        }
        if (textView != null) {
            textView.setMovementMethod(LinkMovementMethod.getInstance());
        }
        if (textView != null) {
            textView.setHighlightColor(0);
        }
        Button d2 = n2.d(-1);
        if (d2 != null) {
            d2.setTextColor(p1.i(activity, R.attr.arg_RES_2130968870));
        }
        if (d2 != null) {
            d2.setTextSize(14.0f);
        }
        if (d2 != null) {
            d2.setAllCaps(false);
        }
        Button d3 = n2.d(-2);
        if (d3 != null) {
            d3.setTextColor(p1.i(activity, R.attr.arg_RES_2130969942));
        }
        if (d3 != null) {
            d3.setTextSize(14.0f);
        }
        if (d3 != null) {
            d3.setAllCaps(false);
        }
        Map<String, Object> a2 = a(activity);
        a2.put("eid", "pop");
        a2.put("pop_type", "private_policy_pop");
        e.g.a.h0.b.h.p("imp", a2);
        Map<String, Object> a3 = a(activity);
        a3.put("eid", "agree_continue_button");
        a3.put("pop_type", "private_policy_pop");
        e.g.a.h0.b.h.p("imp", a3);
        Map<String, Object> a4 = a(activity);
        a4.put("eid", "disagree_button");
        a4.put("pop_type", "private_policy_pop");
        e.g.a.h0.b.h.p("imp", a4);
    }

    public final void c(Activity activity, TextView textView) {
        j.e(activity, "activity");
        j.e(textView, "textView");
        c cVar = new c(activity);
        String string = activity.getString(R.string.arg_RES_2131821236);
        j.d(string, "activity.getString(R.string.login_privacy_policy)");
        String string2 = activity.getString(R.string.arg_RES_2131821237);
        j.d(string2, "activity.getString(R.str…login_privacy_policy_key)");
        SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(string);
        try {
            int l2 = l.l(string, string2, 0, false, 6);
            spannableStringBuilder.setSpan(cVar, l2, string2.length() + l2, 33);
        } catch (Exception unused) {
        }
        textView.setText(spannableStringBuilder);
        textView.setMovementMethod(LinkMovementMethod.getInstance());
        textView.setHighlightColor(0);
    }

    public final void d(Activity activity, TextView textView) {
        j.e(activity, "activity");
        j.e(textView, "textView");
        d dVar = new d(activity);
        String string = activity.getString(R.string.arg_RES_2131821242);
        j.d(string, "activity.getString(R.str…g.login_terms_of_service)");
        String string2 = activity.getString(R.string.arg_RES_2131821243);
        j.d(string2, "activity.getString(R.str…gin_terms_of_service_key)");
        SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(string);
        try {
            int l2 = l.l(string, string2, 0, false, 6);
            spannableStringBuilder.setSpan(dVar, l2, string2.length() + l2, 33);
        } catch (Exception unused) {
        }
        textView.setText(spannableStringBuilder);
        textView.setMovementMethod(LinkMovementMethod.getInstance());
        textView.setHighlightColor(0);
    }
}