Warkop v5.73.0版本的 MD5 值为:a4330ec2d6f5e146f59fc7622f3cdb45
以下内容为反编译后的 b.java 源代码,内容仅作参考
package ue;
import android.content.Context;
import android.text.Html;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.style.URLSpan;
import androidx.annotation.NonNull;
import java.lang.ref.WeakReference;
import java.util.LinkedHashSet;
import java.util.Set;
public class b {
private final WeakReference<Context> f157668a;
private final Set<ue.a> f157669b = new LinkedHashSet();
private final String f157670c;
private final boolean f157671d;
private final boolean f157672e;
private final boolean f157673f;
public static class a {
private final WeakReference<Context> f157674a;
private boolean f157675b = true;
private boolean f157676c = true;
private boolean f157677d = true;
private String[] f157678e;
public a(@NonNull Context context) {
this.f157674a = new WeakReference<>(context);
}
private String b(String[] strArr) {
StringBuilder sb5 = new StringBuilder();
for (String str : strArr) {
if (!str.isEmpty()) {
sb5.append(str);
}
}
return sb5.toString();
}
@NonNull
public b a() {
String[] strArr = this.f157678e;
if (strArr != null) {
b bVar = new b(this.f157674a, b(strArr), this.f157675b, this.f157676c, this.f157677d);
bVar.f();
return bVar;
}
throw new IllegalStateException("Using builder without providing attribution data");
}
@NonNull
public a c(String... strArr) {
this.f157678e = strArr;
return this;
}
@NonNull
public a d(boolean z15) {
this.f157676c = z15;
return this;
}
@NonNull
public a e(boolean z15) {
this.f157675b = z15;
return this;
}
}
b(WeakReference<Context> weakReference, String str, boolean z15, boolean z16, boolean z17) {
this.f157668a = weakReference;
this.f157670c = str;
this.f157671d = z15;
this.f157672e = z16;
this.f157673f = z17;
}
private static Spanned a(String str) {
return Html.fromHtml(str, 0);
}
private boolean c(@NonNull String str) {
if (d(str) && e(str)) {
return true;
}
return false;
}
private boolean d(@NonNull String str) {
if (!this.f157671d && ue.a.f157665c.contains(str)) {
return false;
}
return true;
}
private boolean e(@NonNull String str) {
if (!this.f157673f && str.equals("https://www.mapbox.com/about/maps/")) {
return false;
}
return true;
}
@NonNull
private String g(SpannableStringBuilder spannableStringBuilder, URLSpan uRLSpan) {
int spanStart = spannableStringBuilder.getSpanStart(uRLSpan);
int spanEnd = spannableStringBuilder.getSpanEnd(uRLSpan);
char[] cArr = new char[spanEnd - spanStart];
spannableStringBuilder.getChars(spanStart, spanEnd, cArr, 0);
return j(String.valueOf(cArr));
}
private void h() {
SpannableStringBuilder spannableStringBuilder = (SpannableStringBuilder) a(this.f157670c);
for (URLSpan uRLSpan : (URLSpan[]) spannableStringBuilder.getSpans(0, spannableStringBuilder.length(), URLSpan.class)) {
i(spannableStringBuilder, uRLSpan);
}
}
private void i(@NonNull SpannableStringBuilder spannableStringBuilder, @NonNull URLSpan uRLSpan) {
String url = uRLSpan.getURL();
if (c(url)) {
this.f157669b.add(new ue.a(g(spannableStringBuilder, uRLSpan), url));
}
}
@NonNull
private String j(@NonNull String str) {
if (!this.f157672e && str.startsWith("© ")) {
return str.substring(2, str.length());
}
return str;
}
@NonNull
public Set<ue.a> b() {
return this.f157669b;
}
protected void f() {
h();
}
}