正在查看: Hopscotch v9.7.2 应用的 DynamicConfig.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Hopscotch v9.7.2 应用的 DynamicConfig.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.microsoft.clarity.models;
import android.content.Context;
import android.content.SharedPreferences;
import com.microsoft.clarity.m.h;
import com.microsoft.clarity.models.ingest.IngestConfigs;
import com.microsoft.clarity.models.project.ScreenNameFilter;
import com.microsoft.clarity.models.project.UrlFilter;
import com.payu.custombrowser.util.CBConstant;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt;
import kotlin.collections.h0;
import kotlin.collections.j0;
import kotlin.collections.x;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.text.r;
import org.jetbrains.annotations.NotNull;
import org.json.JSONArray;
@Metadata
@SourceDebugExtension({"SMAP\nDynamicConfig.kt\nKotlin\n*S Kotlin\n*F\n+ 1 DynamicConfig.kt\ncom/microsoft/clarity/models/DynamicConfig\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 SerializationUtils.kt\ncom/microsoft/clarity/utils/SerializationUtils\n*L\n1#1,229:1\n766#2:230\n857#2,2:231\n1549#2:233\n1620#2,3:234\n766#2:237\n857#2,2:238\n1549#2:240\n1620#2,3:241\n766#2:244\n857#2,2:245\n1549#2:247\n1620#2,3:248\n766#2:251\n857#2,2:252\n1549#2:254\n1620#2,3:255\n766#2:258\n857#2,2:259\n1549#2:261\n1620#2,3:262\n766#2:265\n857#2,2:266\n1549#2:268\n1620#2,3:269\n766#2:272\n857#2,2:273\n1549#2:275\n1620#2,3:276\n766#2:279\n857#2,2:280\n1549#2:282\n1620#2,3:283\n1549#2:286\n1620#2,3:287\n766#2:290\n857#2,2:291\n1549#2:293\n1620#2,3:294\n766#2:297\n857#2,2:298\n1747#2,3:376\n1747#2,3:379\n47#3,19:300\n47#3,19:319\n47#3,19:338\n47#3,19:357\n*S KotlinDebug\n*F\n+ 1 DynamicConfig.kt\ncom/microsoft/clarity/models/DynamicConfig\n*L\n65#1:230\n65#1:231,2\n66#1:233\n66#1:234,3\n70#1:237\n70#1:238,2\n71#1:240\n71#1:241,3\n75#1:244\n75#1:245,2\n76#1:247\n76#1:248,3\n80#1:251\n80#1:252,2\n81#1:254\n81#1:255,3\n85#1:258\n85#1:259,2\n86#1:261\n86#1:262,3\n90#1:265\n90#1:266,2\n91#1:268\n91#1:269,3\n95#1:272\n95#1:273,2\n96#1:275\n96#1:276,3\n100#1:279\n100#1:280,2\n101#1:282\n101#1:283,3\n104#1:286\n104#1:287,3\n106#1:290\n106#1:291,2\n108#1:293\n108#1:294,3\n110#1:297\n110#1:298,2\n138#1:376,3\n156#1:379,3\n122#1:300,19\n126#1:319,19\n130#1:338,19\n134#1:357,19\n*E\n"})
public final class DynamicConfig {
@NotNull
public static final Companion Companion = new Companion(null);
private final boolean allowMeteredNetwork;
private final boolean disableForLowEndDevices;
private final boolean disableWebViewCapture;
@NotNull
private final String ingestUrl;
private final boolean isClarityActivated;
private final boolean leanMode;
@NotNull
private final Set<String> maskedClasses;
@NotNull
private final Set<String> maskedFragments;
@NotNull
private final Set<String> maskedIds;
@NotNull
private final Set<String> maskedScreens;
@NotNull
private final List<Integer> maskedViewIds;
@NotNull
private final MaskingMode maskingMode;
@NotNull
private final Set<String> nativeMaskSelectors;
@NotNull
private final Set<String> nativeUnmaskSelectors;
private final Long networkMaxDailyDataInMB;
@NotNull
private final SharedPreferences preferences;
private final String reportUrl;
@NotNull
private final List<ScreenNameFilter> screenCaptureAllowedScreens;
@NotNull
private final List<ScreenNameFilter> screenCaptureDisallowedScreens;
@NotNull
private final Set<String> unmaskedClasses;
@NotNull
private final Set<String> unmaskedFragments;
@NotNull
private final Set<String> unmaskedIds;
@NotNull
private final Set<String> unmaskedScreens;
@NotNull
private final List<Integer> unmaskedViewIds;
@NotNull
private final Set<String> webMaskSelectors;
@NotNull
private final Set<String> webUnmaskSelectors;
@NotNull
private final List<UrlFilter> webViewCaptureAllowedUrls;
@NotNull
private final List<UrlFilter> webViewCaptureDisallowedUrls;
@Metadata
@SourceDebugExtension({"SMAP\nDynamicConfig.kt\nKotlin\n*S Kotlin\n*F\n+ 1 DynamicConfig.kt\ncom/microsoft/clarity/models/DynamicConfig$Companion\n+ 2 SerializationUtils.kt\ncom/microsoft/clarity/utils/SerializationUtils\n*L\n1#1,229:1\n70#2:230\n70#2:231\n70#2:232\n70#2:233\n*S KotlinDebug\n*F\n+ 1 DynamicConfig.kt\ncom/microsoft/clarity/models/DynamicConfig$Companion\n*L\n218#1:230\n219#1:231\n220#1:232\n221#1:233\n*E\n"})
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@NotNull
public final SharedPreferences getPreferences(@NotNull Context context) {
Intrinsics.checkNotNullParameter(context, "context");
SharedPreferences sharedPreferences = context.getSharedPreferences("CLARITY_SHARED_PREFERENCES", 0);
Intrinsics.checkNotNullExpressionValue(sharedPreferences, "context.getSharedPrefere…le, Context.MODE_PRIVATE)");
return sharedPreferences;
}
public final boolean isFetched(@NotNull Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return getPreferences(context).contains("CLARITY_CONFIG_FETCHED");
}
public final void updateSharedPreferences(@NotNull Context context, @NotNull IngestConfigs ingestConfigs) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(ingestConfigs, "ingestConfigs");
SharedPreferences.Editor edit = getPreferences(context).edit();
edit.putBoolean("CLARITY_CONFIG_FETCHED", true);
edit.putBoolean("CLARITY_ACTIVATED", ingestConfigs.getActivate());
edit.putBoolean("LEAN_MODE_ACTIVATED", ingestConfigs.getLean());
edit.putString("REPORT_URL", ingestConfigs.getReportUrl());
edit.putString("INGEST_URL", ingestConfigs.getIngestUrl());
edit.putString("MASKING_MODE", ingestConfigs.getMaskingMode().toString());
edit.putStringSet("MASKED_WEB_ELEMENTS_LIST", ingestConfigs.getWebMaskSelectors());
edit.putStringSet("UNMASKED_WEB_ELEMENTS_LIST", ingestConfigs.getWebUnmaskSelectors());
edit.putStringSet("MASKED_NATIVE_LIST", ingestConfigs.getNativeMaskSelectors());
edit.putStringSet("UNMASKED_NATIVE_LIST", ingestConfigs.getNativeUnmaskSelectors());
edit.putBoolean("NETWORK_ALLOW_METERED", ingestConfigs.getNetwork().getAllowMeteredNetwork());
if (ingestConfigs.getNetwork().getMaxDataVolume() != null) {
edit.putLong("NETWORK_MAX_DAILY_DATA_VOLUME_MB", ingestConfigs.getNetwork().getMaxDataVolume().longValue());
} else {
edit.remove("NETWORK_MAX_DAILY_DATA_VOLUME_MB");
}
edit.putBoolean("LOW_END_DEVICES_DISABLE_RECORDINGS", ingestConfigs.getLowEndDevices().getDisableRecordings());
edit.putBoolean("WEBVIEW_CAPTURE_DISABLED", ingestConfigs.getWebViewCapture().getDisableCapture());
edit.putString("WEBVIEW_CAPTURE_ALLOWED_URLS", "[" + CollectionsKt.G(ingestConfigs.getWebViewCapture().getAllowedUrls(), ",", (String) null, (String) null, new Function1<UrlFilter, CharSequence>() {
@NotNull
public final CharSequence invoke(UrlFilter urlFilter) {
return String.valueOf(urlFilter);
}
public Object m11invoke(Object obj) {
return invoke((UrlFilter) obj);
}
}, 30) + ']');
edit.putString("WEBVIEW_CAPTURE_DISALLOWED_URLS", "[" + CollectionsKt.G(ingestConfigs.getWebViewCapture().getDisallowedUrls(), ",", (String) null, (String) null, new Function1<UrlFilter, CharSequence>() {
@NotNull
public final CharSequence invoke(UrlFilter urlFilter) {
return String.valueOf(urlFilter);
}
public Object m12invoke(Object obj) {
return invoke((UrlFilter) obj);
}
}, 30) + ']');
edit.putString("SCREEN_CAPTURE_ALLOWED_SCREENS", "[" + CollectionsKt.G(ingestConfigs.getScreenCapture().getAllowedScreens(), ",", (String) null, (String) null, new Function1<ScreenNameFilter, CharSequence>() {
@NotNull
public final CharSequence invoke(ScreenNameFilter screenNameFilter) {
return String.valueOf(screenNameFilter);
}
public Object m13invoke(Object obj) {
return invoke((ScreenNameFilter) obj);
}
}, 30) + ']');
edit.putString("SCREEN_CAPTURE_DISALLOWED_SCREENS", "[" + CollectionsKt.G(ingestConfigs.getScreenCapture().getDisallowedScreens(), ",", (String) null, (String) null, new Function1<ScreenNameFilter, CharSequence>() {
@NotNull
public final CharSequence invoke(ScreenNameFilter screenNameFilter) {
return String.valueOf(screenNameFilter);
}
public Object m14invoke(Object obj) {
return invoke((ScreenNameFilter) obj);
}
}, 30) + ']');
edit.apply();
h.b("Clarity shared preferences updated.");
}
private Companion() {
}
}
public DynamicConfig(@NotNull Context context) {
ArrayList arrayList;
ArrayList arrayList2;
ArrayList arrayList3;
ArrayList arrayList4;
Intrinsics.checkNotNullParameter(context, "context");
Companion companion = Companion;
SharedPreferences preferences = companion.getPreferences(context);
this.preferences = preferences;
if (!companion.isFetched(context)) {
throw new IllegalStateException("Dynamic config has not been fetched yet!");
}
String string = preferences.getString("MASKING_MODE", "Strict");
this.maskingMode = MaskingMode.valueOf(string != null ? string : "Strict");
Set<String> set = j0.a;
Set<String> stringSet = preferences.getStringSet("MASKED_WEB_ELEMENTS_LIST", set);
this.webMaskSelectors = stringSet == null ? set : stringSet;
Set<String> stringSet2 = preferences.getStringSet("UNMASKED_WEB_ELEMENTS_LIST", set);
this.webUnmaskSelectors = stringSet2 == null ? set : stringSet2;
Set<String> stringSet3 = preferences.getStringSet("MASKED_NATIVE_LIST", set);
stringSet3 = stringSet3 == null ? set : stringSet3;
this.nativeMaskSelectors = stringSet3;
Set<String> stringSet4 = preferences.getStringSet("UNMASKED_NATIVE_LIST", set);
this.nativeUnmaskSelectors = stringSet4 != null ? stringSet4 : set;
this.leanMode = preferences.getBoolean("LEAN_MODE_ACTIVATED", false);
this.isClarityActivated = preferences.getBoolean("CLARITY_ACTIVATED", false);
String string2 = preferences.getString("INGEST_URL", "https://www.clarity.ms/eus2/");
this.ingestUrl = string2 != null ? string2 : "https://www.clarity.ms/eus2/";
this.reportUrl = preferences.getString("REPORT_URL", null);
ArrayList arrayList5 = new ArrayList();
for (Object obj : stringSet3) {
String str = (String) obj;
Intrinsics.checkNotNullExpressionValue(str, "it");
if (r.o(str, ".", false)) {
arrayList5.add(obj);
}
}
ArrayList arrayList6 = new ArrayList(x.k(arrayList5, 10));
Iterator it = arrayList5.iterator();
while (it.hasNext()) {
String str2 = (String) it.next();
Intrinsics.checkNotNullExpressionValue(str2, "it");
arrayList6.add(kotlin.text.x.B(1, str2));
}
this.maskedClasses = CollectionsKt.a0(arrayList6);
Set<String> set2 = this.nativeUnmaskSelectors;
ArrayList arrayList7 = new ArrayList();
for (Object obj2 : set2) {
String str3 = (String) obj2;
Intrinsics.checkNotNullExpressionValue(str3, "it");
if (r.o(str3, ".", false)) {
arrayList7.add(obj2);
}
}
ArrayList arrayList8 = new ArrayList(x.k(arrayList7, 10));
Iterator it2 = arrayList7.iterator();
while (it2.hasNext()) {
String str4 = (String) it2.next();
Intrinsics.checkNotNullExpressionValue(str4, "it");
arrayList8.add(kotlin.text.x.B(1, str4));
}
this.unmaskedClasses = CollectionsKt.a0(arrayList8);
Set<String> set3 = this.nativeMaskSelectors;
ArrayList arrayList9 = new ArrayList();
for (Object obj3 : set3) {
String str5 = (String) obj3;
Intrinsics.checkNotNullExpressionValue(str5, "it");
if (r.o(str5, "&", false)) {
arrayList9.add(obj3);
}
}
ArrayList arrayList10 = new ArrayList(x.k(arrayList9, 10));
Iterator it3 = arrayList9.iterator();
while (it3.hasNext()) {
String str6 = (String) it3.next();
Intrinsics.checkNotNullExpressionValue(str6, "it");
arrayList10.add(kotlin.text.x.B(1, str6));
}
this.maskedScreens = CollectionsKt.a0(arrayList10);
Set<String> set4 = this.nativeUnmaskSelectors;
ArrayList arrayList11 = new ArrayList();
for (Object obj4 : set4) {
String str7 = (String) obj4;
Intrinsics.checkNotNullExpressionValue(str7, "it");
if (r.o(str7, "&", false)) {
arrayList11.add(obj4);
}
}
ArrayList arrayList12 = new ArrayList(x.k(arrayList11, 10));
Iterator it4 = arrayList11.iterator();
while (it4.hasNext()) {
String str8 = (String) it4.next();
Intrinsics.checkNotNullExpressionValue(str8, "it");
arrayList12.add(kotlin.text.x.B(1, str8));
}
this.unmaskedScreens = CollectionsKt.a0(arrayList12);
Set<String> set5 = this.nativeMaskSelectors;
ArrayList arrayList13 = new ArrayList();
for (Object obj5 : set5) {
String str9 = (String) obj5;
Intrinsics.checkNotNullExpressionValue(str9, "it");
if (r.o(str9, CBConstant.DEFAULT_PAYMENT_URLS, false)) {
arrayList13.add(obj5);
}
}
ArrayList arrayList14 = new ArrayList(x.k(arrayList13, 10));
Iterator it5 = arrayList13.iterator();
while (it5.hasNext()) {
String str10 = (String) it5.next();
Intrinsics.checkNotNullExpressionValue(str10, "it");
arrayList14.add(kotlin.text.x.B(1, str10));
}
this.maskedFragments = CollectionsKt.a0(arrayList14);
Set<String> set6 = this.nativeUnmaskSelectors;
ArrayList arrayList15 = new ArrayList();
for (Object obj6 : set6) {
String str11 = (String) obj6;
Intrinsics.checkNotNullExpressionValue(str11, "it");
if (r.o(str11, CBConstant.DEFAULT_PAYMENT_URLS, false)) {
arrayList15.add(obj6);
}
}
ArrayList arrayList16 = new ArrayList(x.k(arrayList15, 10));
Iterator it6 = arrayList15.iterator();
while (it6.hasNext()) {
String str12 = (String) it6.next();
Intrinsics.checkNotNullExpressionValue(str12, "it");
arrayList16.add(kotlin.text.x.B(1, str12));
}
this.unmaskedFragments = CollectionsKt.a0(arrayList16);
Set<String> set7 = this.nativeMaskSelectors;
ArrayList arrayList17 = new ArrayList();
for (Object obj7 : set7) {
String str13 = (String) obj7;
Intrinsics.checkNotNullExpressionValue(str13, "it");
if (r.o(str13, "#", false)) {
arrayList17.add(obj7);
}
}
ArrayList arrayList18 = new ArrayList(x.k(arrayList17, 10));
Iterator it7 = arrayList17.iterator();
while (it7.hasNext()) {
String str14 = (String) it7.next();
Intrinsics.checkNotNullExpressionValue(str14, "it");
arrayList18.add(kotlin.text.x.B(1, str14));
}
this.maskedIds = CollectionsKt.a0(arrayList18);
Set<String> set8 = this.nativeUnmaskSelectors;
ArrayList arrayList19 = new ArrayList();
for (Object obj8 : set8) {
String str15 = (String) obj8;
Intrinsics.checkNotNullExpressionValue(str15, "it");
if (r.o(str15, "#", false)) {
arrayList19.add(obj8);
}
}
ArrayList arrayList20 = new ArrayList(x.k(arrayList19, 10));
Iterator it8 = arrayList19.iterator();
while (it8.hasNext()) {
String str16 = (String) it8.next();
Intrinsics.checkNotNullExpressionValue(str16, "it");
arrayList20.add(kotlin.text.x.B(1, str16));
}
this.unmaskedIds = CollectionsKt.a0(arrayList20);
Set<String> set9 = this.maskedIds;
ArrayList arrayList21 = new ArrayList(x.k(set9, 10));
Iterator<T> it9 = set9.iterator();
while (it9.hasNext()) {
arrayList21.add(Integer.valueOf(context.getResources().getIdentifier((String) it9.next(), "id", context.getPackageName())));
}
ArrayList arrayList22 = new ArrayList();
Iterator it10 = arrayList21.iterator();
while (it10.hasNext()) {
Object next = it10.next();
if (((Number) next).intValue() != 0) {
arrayList22.add(next);
}
}
this.maskedViewIds = arrayList22;
Set<String> set10 = this.unmaskedIds;
ArrayList arrayList23 = new ArrayList(x.k(set10, 10));
Iterator<T> it11 = set10.iterator();
while (it11.hasNext()) {
arrayList23.add(Integer.valueOf(context.getResources().getIdentifier((String) it11.next(), "id", context.getPackageName())));
}
ArrayList arrayList24 = new ArrayList();
Iterator it12 = arrayList23.iterator();
while (it12.hasNext()) {
Object next2 = it12.next();
if (((Number) next2).intValue() != 0) {
arrayList24.add(next2);
}
}
this.unmaskedViewIds = arrayList24;
this.allowMeteredNetwork = this.preferences.getBoolean("NETWORK_ALLOW_METERED", false);
this.networkMaxDailyDataInMB = this.preferences.contains("NETWORK_MAX_DAILY_DATA_VOLUME_MB") ? Long.valueOf(this.preferences.getLong("NETWORK_MAX_DAILY_DATA_VOLUME_MB", 0L)) : null;
this.disableForLowEndDevices = this.preferences.getBoolean("LOW_END_DEVICES_DISABLE_RECORDINGS", false);
this.disableWebViewCapture = this.preferences.getBoolean("WEBVIEW_CAPTURE_DISABLED", false);
if (this.preferences.contains("WEBVIEW_CAPTURE_ALLOWED_URLS")) {
String string3 = this.preferences.getString("WEBVIEW_CAPTURE_ALLOWED_URLS", null);
UrlFilter.Companion companion2 = UrlFilter.Companion;
if (string3 == null) {
arrayList = new ArrayList();
} else {
JSONArray jSONArray = new JSONArray(string3);
arrayList = new ArrayList();
int length = jSONArray.length();
for (int i = 0; i < length; i++) {
String jSONObject = jSONArray.getJSONObject(i).toString();
Intrinsics.checkNotNullExpressionValue(jSONObject, "it.getJSONObject(i).toString()");
arrayList.add(companion2.fromJson(jSONObject));
}
}
} else {
arrayList = h0.a;
}
this.webViewCaptureAllowedUrls = arrayList;
if (this.preferences.contains("WEBVIEW_CAPTURE_DISALLOWED_URLS")) {
String string4 = this.preferences.getString("WEBVIEW_CAPTURE_DISALLOWED_URLS", null);
UrlFilter.Companion companion3 = UrlFilter.Companion;
if (string4 == null) {
arrayList2 = new ArrayList();
} else {
JSONArray jSONArray2 = new JSONArray(string4);
arrayList2 = new ArrayList();
int length2 = jSONArray2.length();
for (int i2 = 0; i2 < length2; i2++) {
String jSONObject2 = jSONArray2.getJSONObject(i2).toString();
Intrinsics.checkNotNullExpressionValue(jSONObject2, "it.getJSONObject(i).toString()");
arrayList2.add(companion3.fromJson(jSONObject2));
}
}
} else {
arrayList2 = h0.a;
}
this.webViewCaptureDisallowedUrls = arrayList2;
if (this.preferences.contains("SCREEN_CAPTURE_ALLOWED_SCREENS")) {
String string5 = this.preferences.getString("SCREEN_CAPTURE_ALLOWED_SCREENS", null);
ScreenNameFilter.Companion companion4 = ScreenNameFilter.Companion;
if (string5 == null) {
arrayList3 = new ArrayList();
} else {
JSONArray jSONArray3 = new JSONArray(string5);
arrayList3 = new ArrayList();
int length3 = jSONArray3.length();
for (int i3 = 0; i3 < length3; i3++) {
String jSONObject3 = jSONArray3.getJSONObject(i3).toString();
Intrinsics.checkNotNullExpressionValue(jSONObject3, "it.getJSONObject(i).toString()");
arrayList3.add(companion4.fromJson(jSONObject3));
}
}
} else {
arrayList3 = h0.a;
}
this.screenCaptureAllowedScreens = arrayList3;
if (this.preferences.contains("SCREEN_CAPTURE_DISALLOWED_SCREENS")) {
String string6 = this.preferences.getString("SCREEN_CAPTURE_DISALLOWED_SCREENS", null);
ScreenNameFilter.Companion companion5 = ScreenNameFilter.Companion;
if (string6 == null) {
arrayList4 = new ArrayList();
} else {
JSONArray jSONArray4 = new JSONArray(string6);
arrayList4 = new ArrayList();
int length4 = jSONArray4.length();
for (int i4 = 0; i4 < length4; i4++) {
String jSONObject4 = jSONArray4.getJSONObject(i4).toString();
Intrinsics.checkNotNullExpressionValue(jSONObject4, "it.getJSONObject(i).toString()");
arrayList4.add(companion5.fromJson(jSONObject4));
}
}
} else {
arrayList4 = h0.a;
}
this.screenCaptureDisallowedScreens = arrayList4;
}
public final boolean getAllowMeteredNetwork() {
return this.allowMeteredNetwork;
}
public final boolean getDisableForLowEndDevices() {
return this.disableForLowEndDevices;
}
public final boolean getDisableWebViewCapture() {
return this.disableWebViewCapture;
}
@NotNull
public final String getIngestUrl() {
return this.ingestUrl;
}
public final boolean getLeanMode() {
return this.leanMode;
}
@NotNull
public final Set<String> getMaskedClasses() {
return this.maskedClasses;
}
@NotNull
public final Set<String> getMaskedFragments() {
return this.maskedFragments;
}
@NotNull
public final Set<String> getMaskedIds() {
return this.maskedIds;
}
@NotNull
public final Set<String> getMaskedScreens() {
return this.maskedScreens;
}
@NotNull
public final List<Integer> getMaskedViewIds() {
return this.maskedViewIds;
}
@NotNull
public final MaskingMode getMaskingMode() {
return this.maskingMode;
}
public final Long getNetworkMaxDailyDataInMB() {
return this.networkMaxDailyDataInMB;
}
public final String getReportUrl() {
return this.reportUrl;
}
@NotNull
public final List<ScreenNameFilter> getScreenCaptureAllowedScreens() {
return this.screenCaptureAllowedScreens;
}
@NotNull
public final List<ScreenNameFilter> getScreenCaptureDisallowedScreens() {
return this.screenCaptureDisallowedScreens;
}
@NotNull
public final Set<String> getUnmaskedClasses() {
return this.unmaskedClasses;
}
@NotNull
public final Set<String> getUnmaskedFragments() {
return this.unmaskedFragments;
}
@NotNull
public final Set<String> getUnmaskedIds() {
return this.unmaskedIds;
}
@NotNull
public final Set<String> getUnmaskedScreens() {
return this.unmaskedScreens;
}
@NotNull
public final List<Integer> getUnmaskedViewIds() {
return this.unmaskedViewIds;
}
@NotNull
public final Set<String> getWebMaskSelectors() {
return this.webMaskSelectors;
}
@NotNull
public final Set<String> getWebUnmaskSelectors() {
return this.webUnmaskSelectors;
}
@NotNull
public final List<UrlFilter> getWebViewCaptureAllowedUrls() {
return this.webViewCaptureAllowedUrls;
}
@NotNull
public final List<UrlFilter> getWebViewCaptureDisallowedUrls() {
return this.webViewCaptureDisallowedUrls;
}
public final boolean isAllowedUrl$sdk_prodRelease(@NotNull String str) {
URL url;
Intrinsics.checkNotNullParameter(str, "urlString");
List<UrlFilter> list = this.webViewCaptureDisallowedUrls;
if (!(list instanceof Collection) || !list.isEmpty()) {
Iterator<T> it = list.iterator();
while (it.hasNext()) {
if (((UrlFilter) it.next()).matches(str)) {
return false;
}
}
}
try {
url = new URL(str);
} catch (Exception e) {
h.e("Failed to parse URL " + str + " because of " + e + '.');
url = null;
}
if (url == null) {
return true;
}
String host = url.getHost();
if (!Intrinsics.areEqual(url.getProtocol(), "file") && !Intrinsics.areEqual(host, "appassets.androidplatform.net") && !Intrinsics.areEqual(host, "localhost") && !this.webViewCaptureAllowedUrls.isEmpty()) {
List<UrlFilter> list2 = this.webViewCaptureAllowedUrls;
if ((list2 instanceof Collection) && list2.isEmpty()) {
return false;
}
for (UrlFilter urlFilter : list2) {
if (!Intrinsics.areEqual(urlFilter.getUrl(), CBConstant.DEFAULT_PAYMENT_URLS) && !urlFilter.matches(str)) {
}
}
return false;
}
return true;
}
public final boolean isClarityActivated() {
return this.isClarityActivated;
}
}