PicWish v1.6.8版本的 MD5 值为:7e8bab240f03cf6dad8952f8374c4ed1

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


package t0;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.text.SpannableStringBuilder;
import android.text.TextPaint;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.view.View;
import android.widget.TextView;
import c6.k4;
import com.apowersoft.account.base.R$color;
import com.apowersoft.account.base.R$string;
import com.apowersoft.account.ui.AccountPolicyActivity;
import i0.c;
public final class a {
    public static String f12921a = "https://www.apowersoft.com/terms?isapp=1&nocache=1";
    public static String f12922b = "https://www.apowersoft.com/privacy?isapp=1";

    public class C0245a extends ClickableSpan {
        public final Activity f12923l;
        public final String[] f12924m;
        public final int f12925n;
        public final TextView f12926o;

        public C0245a(Activity activity, String[] strArr, int i10, TextView textView) {
            this.f12923l = activity;
            this.f12924m = strArr;
            this.f12925n = i10;
            this.f12926o = textView;
        }

        @Override
        public final void onClick(View view) {
            a.c(this.f12923l, this.f12924m[1], a.f12921a, c.a.f8687a.f8683l);
        }

        @Override
        public final void updateDrawState(TextPaint textPaint) {
            textPaint.setColor(this.f12925n);
            this.f12926o.postInvalidate();
        }
    }

    public class b extends ClickableSpan {
        public final Activity f12927l;
        public final String[] f12928m;
        public final int f12929n;
        public final TextView f12930o;

        public b(Activity activity, String[] strArr, int i10, TextView textView) {
            this.f12927l = activity;
            this.f12928m = strArr;
            this.f12929n = i10;
            this.f12930o = textView;
        }

        @Override
        public final void onClick(View view) {
            a.c(this.f12927l, this.f12928m[3], a.f12922b, c.a.f8687a.f8683l);
        }

        @Override
        public final void updateDrawState(TextPaint textPaint) {
            textPaint.setColor(this.f12929n);
            this.f12930o.postInvalidate();
        }
    }

    public class c extends ClickableSpan {
        public final Activity f12931l;
        public final String f12932m;
        public final String f12933n;
        public final int f12934o;
        public final TextView p;

        public c(Activity activity, String str, String str2, int i10, TextView textView) {
            this.f12931l = activity;
            this.f12932m = str;
            this.f12933n = str2;
            this.f12934o = i10;
            this.p = textView;
        }

        @Override
        public final void onClick(View view) {
            a.c(this.f12931l, this.f12932m, this.f12933n, false);
        }

        @Override
        public final void updateDrawState(TextPaint textPaint) {
            textPaint.setColor(this.f12934o);
            this.p.postInvalidate();
        }
    }

    public static void a(Activity activity, TextView textView) {
        b(activity, textView, activity.getString(R$string.account_policy), null, null);
    }

    public static void b(Activity activity, TextView textView, String str, String str2, String str3) {
        String str4;
        int i10;
        int i11;
        int i12;
        if (str2 != null) {
            str4 = str + "、#" + str2 + "#";
        } else {
            str4 = str;
        }
        if (k4.m()) {
            textView.setTextColor(Color.parseColor("#8C8B99"));
        } else {
            textView.setTextColor(Color.parseColor("#000000"));
        }
        String[] split = str4.split("#");
        if (split.length < 4) {
            return;
        }
        String replace = str4.replace("#", "");
        int length = split[0].length();
        int length2 = split[1].length() + length;
        int length3 = split[2].length() + length2;
        int length4 = split[3].length() + length3;
        if (split.length >= 6) {
            int length5 = split[4].length() + length4;
            int length6 = split[5].length() + length5;
            if (length6 > replace.length()) {
                length6 = replace.length();
            }
            int i13 = length6;
            i11 = length5;
            i10 = length4;
            i12 = i13;
        } else {
            if (length4 > replace.length()) {
                length4 = replace.length();
            }
            i10 = length4;
            i11 = 0;
            i12 = 0;
        }
        int color = activity.getResources().getColor(R$color.account_text_color_privacy);
        SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(replace);
        spannableStringBuilder.setSpan(new C0245a(activity, split, color, textView), length, length2, 33);
        spannableStringBuilder.setSpan(new b(activity, split, color, textView), length3, i10, 33);
        if (i11 > 0 && i12 > 0) {
            spannableStringBuilder.setSpan(new c(activity, str2, str3, color, textView), i11, i12, 33);
        }
        textView.setText(spannableStringBuilder);
        textView.setMovementMethod(LinkMovementMethod.getInstance());
    }

    public static void c(Activity activity, String str, String str2, boolean z10) {
        Intent intent = new Intent(activity, AccountPolicyActivity.class);
        intent.putExtra(AccountPolicyActivity.DISABLE_HYPER_LINK_KEY, z10);
        intent.putExtra(AccountPolicyActivity.TITLE_KEY, str);
        intent.putExtra(AccountPolicyActivity.URL_KEY, str2);
        activity.startActivity(intent);
    }
}