OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.excelliance.user.account.model;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.text.SpannableString;
import android.text.TextPaint;
import android.text.style.ClickableSpan;
import android.view.View;
import androidx.annotation.NonNull;
import com.excelliance.user.account.R;
import com.excelliance.user.account.f.h;
import com.tencent.open.SocialConstants;
public class a {
private String f15582a = "中国移动";
private String f15583b = "https://wap.cmpassport.com/resources/html/contract.html";
private SpannableString c = null;
public SpannableString a(Context context) {
if (this.c == null) {
if (com.excean.ab_builder.c.a.K(context) && h.a().c(context)) {
d(context);
} else {
c(context);
}
}
return this.c;
}
public SpannableString b(Context context) {
if (this.c == null) {
d(context);
}
return this.c;
}
private void c(final Context context) {
String string = context.getResources().getString(R.string.account_agree_protocol);
String f = f(context);
if (f == null) {
f = context.getResources().getString(R.string.app_name);
}
String format = String.format(context.getResources().getString(R.string.account_privacy_protocol), f);
String format2 = String.format(context.getResources().getString(R.string.account_service_protocol), f);
String format3 = String.format(string, format, format2);
SpannableString spannableString = new SpannableString(format3);
ClickableSpan clickableSpan = new ClickableSpan() {
@Override
public void onClick(@NonNull View view) {
Intent intent = new Intent();
intent.setComponent(new ComponentName(context.getPackageName(), "com.excelliance.kxqp.gs.ui.question.CommonWebViewActivity"));
intent.putExtra(SocialConstants.PARAM_URL, "https://h5.ourplay.com.cn/privacy-new/");
context.startActivity(intent);
}
@Override
public void updateDrawState(@NonNull TextPaint textPaint) {
super.updateDrawState(textPaint);
textPaint.setUnderlineText(true);
if (com.excelliance.user.account.router.a.a.f15594a.getDisplayNewTheme(context)) {
textPaint.setColor(context.getResources().getColor(R.color.account_new_main_color));
} else {
textPaint.setColor(Color.parseColor("#249D57"));
}
}
};
int indexOf = format3.indexOf("《");
if (indexOf >= 0 && indexOf < format3.length() - 1) {
spannableString.setSpan(clickableSpan, indexOf, format.length() + indexOf, 17);
}
ClickableSpan clickableSpan2 = new ClickableSpan() {
@Override
public void onClick(@NonNull View view) {
Intent intent = new Intent();
intent.setComponent(new ComponentName(context.getPackageName(), "com.excelliance.kxqp.gs.ui.question.CommonWebViewActivity"));
intent.putExtra(SocialConstants.PARAM_URL, "https://h5.ourplay.com.cn/html/agreement/index.html");
context.startActivity(intent);
}
@Override
public void updateDrawState(@NonNull TextPaint textPaint) {
super.updateDrawState(textPaint);
textPaint.setUnderlineText(true);
if (com.excelliance.user.account.router.a.a.f15594a.getDisplayNewTheme(context)) {
textPaint.setColor(context.getResources().getColor(R.color.account_new_main_color));
} else {
textPaint.setColor(Color.parseColor("#249D57"));
}
}
};
int lastIndexOf = format3.lastIndexOf("《");
if (lastIndexOf >= 0 && lastIndexOf < format3.length() - 1) {
spannableString.setSpan(clickableSpan2, lastIndexOf, format2.length() + lastIndexOf, 17);
}
this.c = spannableString;
}
private void d(final Context context) {
String string = context.getResources().getString(R.string.account_agree_protocols);
String f = f(context);
if (f == null) {
f = context.getResources().getString(R.string.app_name);
}
e(context);
String format = String.format(context.getResources().getString(R.string.account_privacy_protocol), f);
String format2 = String.format(context.getResources().getString(R.string.account_service_protocol), f);
String format3 = String.format(context.getResources().getString(R.string.account_service_protocol), this.f15582a);
String format4 = String.format(string, format, format2, format3);
SpannableString spannableString = new SpannableString(format4);
ClickableSpan clickableSpan = new ClickableSpan() {
@Override
public void onClick(@NonNull View view) {
Intent intent = new Intent();
intent.setComponent(new ComponentName(context.getPackageName(), "com.excelliance.kxqp.gs.ui.question.CommonWebViewActivity"));
intent.putExtra(SocialConstants.PARAM_URL, "https://h5.ourplay.com.cn/privacy-new/");
context.startActivity(intent);
}
@Override
public void updateDrawState(@NonNull TextPaint textPaint) {
super.updateDrawState(textPaint);
textPaint.setUnderlineText(true);
if (com.excelliance.user.account.router.a.a.f15594a.getDisplayNewTheme(context)) {
textPaint.setColor(context.getResources().getColor(R.color.account_new_main_color));
} else {
textPaint.setColor(Color.parseColor("#249D57"));
}
}
};
int indexOf = format4.indexOf("《");
if (indexOf >= 0 && indexOf < format4.length() - 1) {
spannableString.setSpan(clickableSpan, indexOf, format.length() + indexOf, 17);
}
ClickableSpan clickableSpan2 = new ClickableSpan() {
@Override
public void onClick(@NonNull View view) {
Intent intent = new Intent();
intent.setComponent(new ComponentName(context.getPackageName(), "com.excelliance.kxqp.gs.ui.question.CommonWebViewActivity"));
intent.putExtra(SocialConstants.PARAM_URL, "https://h5.ourplay.com.cn/html/agreement/index.html");
context.startActivity(intent);
}
@Override
public void updateDrawState(@NonNull TextPaint textPaint) {
super.updateDrawState(textPaint);
textPaint.setUnderlineText(true);
if (com.excelliance.user.account.router.a.a.f15594a.getDisplayNewTheme(context)) {
textPaint.setColor(context.getResources().getColor(R.color.account_new_main_color));
} else {
textPaint.setColor(Color.parseColor("#249D57"));
}
}
};
int indexOf2 = format4.indexOf("《", indexOf + 1);
if (indexOf2 >= 0 && indexOf2 < format4.length() - 1) {
spannableString.setSpan(clickableSpan2, indexOf2, format2.length() + indexOf2, 17);
}
ClickableSpan clickableSpan3 = new ClickableSpan() {
@Override
public void onClick(@NonNull View view) {
Intent intent = new Intent();
intent.setComponent(new ComponentName(context.getPackageName(), "com.excelliance.kxqp.gs.ui.question.CommonWebViewActivity"));
intent.putExtra(SocialConstants.PARAM_URL, a.this.f15583b);
context.startActivity(intent);
}
@Override
public void updateDrawState(@NonNull TextPaint textPaint) {
super.updateDrawState(textPaint);
textPaint.setUnderlineText(true);
if (com.excelliance.user.account.router.a.a.f15594a.getDisplayNewTheme(context)) {
textPaint.setColor(context.getResources().getColor(R.color.account_new_main_color));
} else {
textPaint.setColor(Color.parseColor("#249D57"));
}
}
};
int lastIndexOf = format4.lastIndexOf("《");
if (lastIndexOf >= 0 && lastIndexOf < format4.length() - 1) {
spannableString.setSpan(clickableSpan3, lastIndexOf, format3.length() + lastIndexOf, 17);
}
this.c = spannableString;
}
private void e(Context context) {
String a2 = h.a().a(context);
if ("1".equals(a2)) {
this.f15583b = "中国移动";
this.f15583b = "https://wap.cmpassport.com/resources/html/contract.html";
} else if ("2".equals(a2)) {
this.f15583b = "中国联通";
this.f15583b = "https://opencloud.wostore.cn/authz/resource/html/disclaimer.html?fromsdk=true";
} else if ("3".equals(a2)) {
this.f15583b = "中国电信";
this.f15583b = "https://e.189.cn/sdk/agreement/detail.do";
} else {
this.f15583b = "未知";
this.f15583b = "未知";
}
}
private String f(Context context) {
if (context == null) {
return null;
}
try {
PackageManager packageManager = context.getPackageManager();
return packageManager.getApplicationLabel(packageManager.getApplicationInfo(context.getPackageName(), 0)).toString();
} catch (Throwable unused) {
return null;
}
}
}