- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
65 lines
1.7 KiB
Java
65 lines
1.7 KiB
Java
package com.iab.omid.library.fyber.internal;
|
|
|
|
import android.view.View;
|
|
import androidx.annotation.Nullable;
|
|
import com.iab.omid.library.fyber.adsession.FriendlyObstructionPurpose;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.regex.Pattern;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class f {
|
|
private static final Pattern b = Pattern.compile("^[a-zA-Z0-9 ]+$");
|
|
private final List<e> a = new ArrayList();
|
|
|
|
private void a(View view) {
|
|
if (view == null) {
|
|
throw new IllegalArgumentException("FriendlyObstruction is null");
|
|
}
|
|
}
|
|
|
|
private void a(String str) {
|
|
if (str != null) {
|
|
if (str.length() > 50) {
|
|
throw new IllegalArgumentException("FriendlyObstruction has detailed reason over 50 characters in length");
|
|
}
|
|
if (!b.matcher(str).matches()) {
|
|
throw new IllegalArgumentException("FriendlyObstruction has detailed reason that contains characters not in [a-z][A-Z][0-9] or space");
|
|
}
|
|
}
|
|
}
|
|
|
|
private e b(View view) {
|
|
for (e eVar : this.a) {
|
|
if (eVar.c().get() == view) {
|
|
return eVar;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public List<e> a() {
|
|
return this.a;
|
|
}
|
|
|
|
public void a(View view, FriendlyObstructionPurpose friendlyObstructionPurpose, @Nullable String str) {
|
|
a(view);
|
|
a(str);
|
|
if (b(view) == null) {
|
|
this.a.add(new e(view, friendlyObstructionPurpose, str));
|
|
}
|
|
}
|
|
|
|
public void b() {
|
|
this.a.clear();
|
|
}
|
|
|
|
public void c(View view) {
|
|
a(view);
|
|
e b2 = b(view);
|
|
if (b2 != null) {
|
|
this.a.remove(b2);
|
|
}
|
|
}
|
|
}
|