LiveTVGO v1.2.0版本的 MD5 值为:da2e0ec7ae0953637fc1e793d4a4faed
以下内容为反编译后的 MetaData.java 源代码,内容仅作参考
package com.startapp.sdk.adsbase.remoteconfig;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Build;
import com.google.android.exoplayer2.extractor.ts.PsExtractor;
import com.startapp.common.Constants;
import com.startapp.common.a;
import com.startapp.sdk.adsbase.AdsConstants;
import com.startapp.sdk.adsbase.consent.ConsentConfig;
import com.startapp.sdk.adsbase.infoevents.AnalyticsConfig;
import com.startapp.sdk.adsbase.infoevents.InfoEventCategory;
import com.startapp.sdk.adsbase.j;
import com.startapp.sdk.adsbase.j.u;
import com.startapp.sdk.adsbase.model.AdPreferences;
import com.startapp.sdk.adsbase.remoteconfig.MetaDataRequest;
import com.startapp.sdk.insight.NetworkTestsMetaData;
import com.startapp.sdk.triggeredlinks.TriggeredLinksMetadata;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
public class MetaData implements Serializable {
private static final Object a;
private static Set<String> b = null;
private static String c = null;
private static String d = null;
private static int[] e = null;
private static Set<String> f = null;
private static volatile MetaData g = null;
private static com.startapp.sdk.adsbase.remoteconfig.a j = null;
private static final long serialVersionUID = 1;
private long IABDisplayImpressionDelayInSeconds;
private long IABVideoImpressionDelayInSeconds;
private boolean SupportIABViewability;
private String adPlatformBannerHostSecured;
public String adPlatformHostSecured;
private String adPlatformNativeHostSecured;
private String adPlatformOverlayHostSecured;
private String adPlatformReturnHostSecured;
private String adPlatformSplashHostSecured;
private boolean alwaysSendToken;
@com.startapp.common.parser.d(a = true)
public AnalyticsConfig analytics;
private String assetsBaseUrlSecured;
@com.startapp.common.parser.d(a = true)
private BluetoothConfig btConfig;
private boolean chromeCustomeTabsExternal;
private boolean chromeCustomeTabsInternal;
private boolean compressionEnabled;
@com.startapp.common.parser.d(a = true)
private ConsentConfig consentDetails;
private boolean disableSendAdvertisingId;
private boolean dns;
private transient boolean h;
private transient boolean i;
private boolean inAppBrowser;
@com.startapp.common.parser.d(b = HashSet.class)
private Set<String> installersList;
@com.startapp.common.parser.d(b = HashSet.class)
private Set<Integer> invalidForRetry;
private boolean isToken1Mandatory;
private transient List<b> k;
@com.startapp.common.parser.d(a = true)
private LocationConfig location;
private String metadataUpdateVersion;
@com.startapp.common.parser.d(a = true)
private NetworkDiagnosticConfig netDiag;
@com.startapp.common.parser.d(a = true)
private NetworkTestsMetaData networkTests;
private int notVisibleBannerReloadInterval;
private boolean omSdkEnabled;
private int[] periodicEventIntMin;
private boolean periodicInfoEventEnabled;
private boolean periodicMetaDataEnabled;
private int periodicMetaDataIntervalInMinutes;
private int periodicThresholdMin;
@com.startapp.common.parser.d(b = HashSet.class)
private Set<String> preInstalledPackages;
private String profileId;
@com.startapp.common.parser.d(a = true)
private RscMetadata rsc;
@com.startapp.common.parser.d(a = true)
private SensorsConfig sensorsConfig;
private int sessionMaxBackgroundTime;
private boolean simpleToken2;
private int stopAutoLoadAmount;
private int stopAutoLoadPreCacheAmount;
public String trackDownloadHost;
@com.startapp.common.parser.d(a = true)
private TriggeredLinksMetadata triggeredLinks;
private boolean trueNetEnabled;
private long userAgentDelayInSeconds;
private boolean userAgentEnabled;
private boolean webViewSecured;
@com.startapp.common.parser.d(a = true)
private SimpleTokenConfig SimpleToken = new SimpleTokenConfig();
public String metaDataHostSecured = c;
static {
MetaData.class.getSimpleName();
a = new Object();
b = new HashSet(Arrays.asList(Constants.a));
c = "https://adsmetadata.startappservice.com/1.5/";
d = "https://req.startappservice.com/1.5/";
e = new int[]{60, 60, PsExtractor.VIDEO_STREAM_MASK};
f = new HashSet(Arrays.asList("com.facebook.katana", "com.yandex.browser"));
g = new MetaData();
}
public final NetworkDiagnosticConfig a() {
return this.netDiag;
}
public final RscMetadata b() {
return this.rsc;
}
public final NetworkTestsMetaData c() {
return this.networkTests;
}
public final TriggeredLinksMetadata d() {
return this.triggeredLinks;
}
public MetaData() {
String str = d;
this.adPlatformHostSecured = str;
this.trackDownloadHost = str;
this.sessionMaxBackgroundTime = 1800;
this.profileId = null;
this.installersList = b;
this.preInstalledPackages = f;
this.simpleToken2 = true;
this.alwaysSendToken = true;
this.isToken1Mandatory = true;
this.compressionEnabled = false;
this.periodicMetaDataEnabled = false;
this.periodicMetaDataIntervalInMinutes = 360;
this.periodicInfoEventEnabled = false;
this.periodicEventIntMin = e;
this.periodicThresholdMin = 5;
this.inAppBrowser = true;
this.SupportIABViewability = true;
this.IABDisplayImpressionDelayInSeconds = 1L;
this.IABVideoImpressionDelayInSeconds = 2L;
this.userAgentDelayInSeconds = 5L;
this.userAgentEnabled = true;
this.sensorsConfig = new SensorsConfig();
this.btConfig = new BluetoothConfig();
this.assetsBaseUrlSecured = "";
this.invalidForRetry = com.startapp.sdk.adsbase.d.c.a;
this.notVisibleBannerReloadInterval = 3600;
this.analytics = new AnalyticsConfig();
this.location = new LocationConfig();
this.h = false;
this.i = false;
this.k = new ArrayList();
this.metadataUpdateVersion = AdsConstants.c;
this.dns = false;
this.stopAutoLoadAmount = 3;
this.stopAutoLoadPreCacheAmount = 3;
this.trueNetEnabled = false;
this.webViewSecured = true;
this.omSdkEnabled = false;
this.chromeCustomeTabsInternal = true;
this.chromeCustomeTabsExternal = true;
this.disableSendAdvertisingId = false;
this.networkTests = new NetworkTestsMetaData();
}
public final SimpleTokenConfig e() {
return this.SimpleToken;
}
public final ConsentConfig f() {
return this.consentDetails;
}
public static void a(Context context) {
MetaData metaData = (MetaData) com.startapp.common.b.d.a(context, "StartappMetadata");
MetaData metaData2 = new MetaData();
if (metaData != null) {
boolean a2 = u.a(metaData, metaData2);
if (!(!AdsConstants.c.equals(metaData.metadataUpdateVersion)) && a2) {
new com.startapp.sdk.adsbase.infoevents.e(InfoEventCategory.ERROR).f("metadata_null").a(context);
}
metaData.h = false;
metaData.i = false;
metaData.k = new ArrayList();
g = metaData;
} else {
g = metaData2;
}
g.R();
}
public static void a(Context context, MetaData metaData, MetaDataRequest.RequestReason requestReason, boolean z) {
ArrayList<b> arrayList;
synchronized (a) {
if (g.k != null) {
arrayList = new ArrayList(g.k);
g.k.clear();
} else {
arrayList = null;
}
metaData.k = g.k;
metaData.R();
metaData.metadataUpdateVersion = AdsConstants.c;
com.startapp.common.b.d.b(context, "StartappMetadata", metaData);
metaData.h = false;
metaData.i = true;
if (!u.b(g, metaData)) {
z = true;
}
g = metaData;
if (u.h(context)) {
j.b(context, "totalSessions", Integer.valueOf(j.a(context, "totalSessions", (Integer) 0).intValue() + 1));
}
j = null;
}
if (arrayList != null) {
for (b bVar : arrayList) {
bVar.a(requestReason, z);
}
}
}
public static void g() {
ArrayList<b> arrayList;
synchronized (a) {
if (g.k != null) {
arrayList = new ArrayList(g.k);
g.k.clear();
} else {
arrayList = null;
}
g.h = false;
}
if (arrayList != null) {
for (b bVar : arrayList) {
bVar.a();
}
}
}
public static boolean b(Context context) {
return context.getFileStreamPath("StartappMetadata").exists();
}
public final void a(Context context, AdPreferences adPreferences, MetaDataRequest.RequestReason requestReason, boolean z, b bVar, boolean z2) {
if (!z && bVar != null) {
bVar.a(requestReason, false);
}
synchronized (a) {
if (g.i && !z2) {
if (!z || bVar == null) {
return;
}
bVar.a(requestReason, false);
return;
}
if (!g.h || z2) {
this.h = true;
this.i = false;
if (j != null) {
j.b();
}
com.startapp.sdk.adsbase.remoteconfig.a aVar = new com.startapp.sdk.adsbase.remoteconfig.a(context, adPreferences, requestReason);
j = aVar;
aVar.a();
}
if (z && bVar != null) {
g.a(bVar);
}
}
}
public final void a(b bVar) {
synchronized (a) {
this.k.add(bVar);
}
}
public static Object h() {
return a;
}
public final boolean i() {
return this.i;
}
public final void j() {
this.i = true;
}
public final String k() {
String str = this.assetsBaseUrlSecured;
return str != null ? str : "";
}
public final boolean l() {
return this.periodicMetaDataEnabled;
}
public final int m() {
return this.periodicMetaDataIntervalInMinutes;
}
public final boolean n() {
return this.periodicInfoEventEnabled;
}
public final int c(Context context) {
int[] iArr = this.periodicEventIntMin;
if (iArr == null || iArr.length < 3) {
this.periodicEventIntMin = e;
}
if (com.startapp.common.b.b.a(context, "android.permission.ACCESS_FINE_LOCATION")) {
int i = this.periodicEventIntMin[0];
return i <= 0 ? e[0] : i;
} else if (com.startapp.common.b.b.a(context, "android.permission.ACCESS_COARSE_LOCATION")) {
int i2 = this.periodicEventIntMin[1];
return i2 <= 0 ? e[1] : i2;
} else {
return this.periodicEventIntMin[2];
}
}
public final int o() {
return this.periodicThresholdMin;
}
public final Set<Integer> p() {
return this.invalidForRetry;
}
public final String q() {
String str = this.adPlatformHostSecured;
return str != null ? str : d;
}
static class AnonymousClass1 {
static final int[] a;
static {
int[] iArr = new int[AdPreferences.Placement.values().length];
a = iArr;
try {
iArr[AdPreferences.Placement.INAPP_BANNER.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[AdPreferences.Placement.INAPP_OVERLAY.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[AdPreferences.Placement.INAPP_NATIVE.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[AdPreferences.Placement.INAPP_RETURN.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[AdPreferences.Placement.INAPP_SPLASH.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
}
}
public final String a(AdPreferences.Placement placement) {
int i = AnonymousClass1.a[placement.ordinal()];
if (i == 1) {
String str = this.adPlatformBannerHostSecured;
return str != null ? str : q();
} else if (i == 2) {
String str2 = this.adPlatformOverlayHostSecured;
return str2 != null ? str2 : q();
} else if (i == 3) {
String str3 = this.adPlatformNativeHostSecured;
return str3 != null ? str3 : q();
} else if (i == 4) {
String str4 = this.adPlatformReturnHostSecured;
return str4 != null ? str4 : q();
} else if (i == 5) {
String str5 = this.adPlatformSplashHostSecured;
return str5 != null ? str5 : q();
} else {
return q();
}
}
public final long s() {
return TimeUnit.SECONDS.toMillis(this.sessionMaxBackgroundTime);
}
public final Set<String> t() {
return this.installersList;
}
public final Set<String> u() {
Set<String> set = this.preInstalledPackages;
if (set == null) {
set = f;
}
return Collections.unmodifiableSet(set);
}
public final boolean v() {
return this.alwaysSendToken;
}
public final boolean w() {
return this.isToken1Mandatory;
}
public final boolean x() {
return this.compressionEnabled;
}
public final boolean y() {
return u.a(256L) && this.inAppBrowser;
}
public final String z() {
return this.profileId;
}
public final SensorsConfig A() {
return this.sensorsConfig;
}
public final BluetoothConfig B() {
return this.btConfig;
}
public final LocationConfig C() {
return this.location;
}
public final int D() {
return this.notVisibleBannerReloadInterval;
}
public static MetaData E() {
return g;
}
public final long F() {
return this.IABDisplayImpressionDelayInSeconds;
}
public final long G() {
return this.IABVideoImpressionDelayInSeconds;
}
public final long H() {
return this.userAgentDelayInSeconds;
}
public final boolean I() {
return this.userAgentEnabled;
}
public final boolean J() {
return this.SupportIABViewability;
}
private void R() {
this.adPlatformHostSecured = a(this.adPlatformHostSecured, d);
this.metaDataHostSecured = a(this.metaDataHostSecured, c);
this.adPlatformBannerHostSecured = a(this.adPlatformBannerHostSecured, (String) null);
this.adPlatformSplashHostSecured = a(this.adPlatformSplashHostSecured, (String) null);
this.adPlatformReturnHostSecured = a(this.adPlatformReturnHostSecured, (String) null);
this.adPlatformOverlayHostSecured = a(this.adPlatformOverlayHostSecured, (String) null);
this.adPlatformNativeHostSecured = a(this.adPlatformNativeHostSecured, (String) null);
}
public final boolean K() {
return !this.dns;
}
public final int L() {
return this.stopAutoLoadAmount;
}
public final int M() {
return this.stopAutoLoadPreCacheAmount;
}
public final boolean N() {
return this.chromeCustomeTabsInternal;
}
public final boolean O() {
return this.chromeCustomeTabsExternal;
}
public final boolean P() {
return this.disableSendAdvertisingId;
}
private static String a(String str, String str2) {
return str != null ? str.replace("%AdPlatformProtocol%", "1.5") : str2;
}
public static void a(Context context, String str) {
if (str == null || str.equals("")) {
return;
}
if (!com.startapp.sdk.adsbase.j.a.a(context, "close_button", ".png") && !u.a()) {
new com.startapp.common.a(str + "close_button.png", new a(context, "close_button"), 0).a();
}
if (u.a(256L)) {
String[] strArr = AdsConstants.f;
for (int i = 0; i < 6; i++) {
String str2 = strArr[i];
if (!com.startapp.sdk.adsbase.j.a.a(context, str2, ".png")) {
new com.startapp.common.a(str + str2 + ".png", new a(context, str2), 0).a();
}
}
}
if (u.a(64L)) {
String[] strArr2 = AdsConstants.g;
for (int i2 = 0; i2 < 3; i2++) {
String str3 = strArr2[i2];
if (!com.startapp.sdk.adsbase.j.a.a(context, str3, ".png")) {
new com.startapp.common.a(str + str3 + ".png", new a(context, str3), 0).a();
}
}
if (com.startapp.sdk.adsbase.j.a.a(context, "logo", ".png")) {
return;
}
new com.startapp.common.a(str + "logo.png", new a(context, "logo"), 0).a();
} else if (u.a(32L)) {
String[] strArr3 = AdsConstants.g;
for (int i3 = 0; i3 < 3; i3++) {
String str4 = strArr3[i3];
if (!com.startapp.sdk.adsbase.j.a.a(context, str4, ".png")) {
new com.startapp.common.a(str + str4 + ".png", new a(context, str4), 0).a();
}
}
}
}
public final boolean Q() {
return this.omSdkEnabled;
}
public static class a implements a.InterfaceC0074a {
private Context a;
private String b;
public a(Context context, String str) {
this.a = context;
this.b = str;
}
@Override
public final void a(Bitmap bitmap, int i) {
if (bitmap != null) {
com.startapp.sdk.adsbase.j.a.a(this.a, bitmap, this.b, ".png");
}
}
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj != null && getClass() == obj.getClass()) {
MetaData metaData = (MetaData) obj;
if (this.sessionMaxBackgroundTime == metaData.sessionMaxBackgroundTime && this.simpleToken2 == metaData.simpleToken2 && this.alwaysSendToken == metaData.alwaysSendToken && this.isToken1Mandatory == metaData.isToken1Mandatory && this.compressionEnabled == metaData.compressionEnabled && this.periodicMetaDataEnabled == metaData.periodicMetaDataEnabled && this.periodicMetaDataIntervalInMinutes == metaData.periodicMetaDataIntervalInMinutes && this.periodicInfoEventEnabled == metaData.periodicInfoEventEnabled && this.periodicThresholdMin == metaData.periodicThresholdMin && this.inAppBrowser == metaData.inAppBrowser && this.SupportIABViewability == metaData.SupportIABViewability && this.IABDisplayImpressionDelayInSeconds == metaData.IABDisplayImpressionDelayInSeconds && this.IABVideoImpressionDelayInSeconds == metaData.IABVideoImpressionDelayInSeconds && this.userAgentDelayInSeconds == metaData.userAgentDelayInSeconds && this.userAgentEnabled == metaData.userAgentEnabled && this.notVisibleBannerReloadInterval == metaData.notVisibleBannerReloadInterval && this.dns == metaData.dns && this.stopAutoLoadAmount == metaData.stopAutoLoadAmount && this.stopAutoLoadPreCacheAmount == metaData.stopAutoLoadPreCacheAmount && this.trueNetEnabled == metaData.trueNetEnabled && this.webViewSecured == metaData.webViewSecured && this.omSdkEnabled == metaData.omSdkEnabled && this.chromeCustomeTabsInternal == metaData.chromeCustomeTabsInternal && this.chromeCustomeTabsExternal == metaData.chromeCustomeTabsExternal && this.disableSendAdvertisingId == metaData.disableSendAdvertisingId && u.b(this.SimpleToken, metaData.SimpleToken) && u.b(this.consentDetails, metaData.consentDetails) && u.b(this.metaDataHostSecured, metaData.metaDataHostSecured) && u.b(this.adPlatformHostSecured, metaData.adPlatformHostSecured) && u.b(this.trackDownloadHost, metaData.trackDownloadHost) && u.b(this.adPlatformBannerHostSecured, metaData.adPlatformBannerHostSecured) && u.b(this.adPlatformSplashHostSecured, metaData.adPlatformSplashHostSecured) && u.b(this.adPlatformReturnHostSecured, metaData.adPlatformReturnHostSecured) && u.b(this.adPlatformOverlayHostSecured, metaData.adPlatformOverlayHostSecured) && u.b(this.adPlatformNativeHostSecured, metaData.adPlatformNativeHostSecured) && u.b(this.profileId, metaData.profileId) && u.b(this.installersList, metaData.installersList) && u.b(this.preInstalledPackages, metaData.preInstalledPackages) && Arrays.equals(this.periodicEventIntMin, metaData.periodicEventIntMin) && u.b(this.sensorsConfig, metaData.sensorsConfig) && u.b(this.btConfig, metaData.btConfig) && u.b(this.assetsBaseUrlSecured, metaData.assetsBaseUrlSecured) && u.b(this.invalidForRetry, metaData.invalidForRetry) && u.b(this.analytics, metaData.analytics) && u.b(this.location, metaData.location) && u.b(this.metadataUpdateVersion, metaData.metadataUpdateVersion) && u.b(this.networkTests, metaData.networkTests) && u.b(this.triggeredLinks, metaData.triggeredLinks) && u.b(this.rsc, metaData.rsc) && u.b(this.netDiag, metaData.netDiag)) {
return true;
}
}
return false;
}
public int hashCode() {
return u.a(this.SimpleToken, this.consentDetails, this.metaDataHostSecured, this.adPlatformHostSecured, this.trackDownloadHost, this.adPlatformBannerHostSecured, this.adPlatformSplashHostSecured, this.adPlatformReturnHostSecured, this.adPlatformOverlayHostSecured, this.adPlatformNativeHostSecured, Integer.valueOf(this.sessionMaxBackgroundTime), this.profileId, this.installersList, this.preInstalledPackages, Boolean.valueOf(this.simpleToken2), Boolean.valueOf(this.alwaysSendToken), Boolean.valueOf(this.isToken1Mandatory), Boolean.valueOf(this.compressionEnabled), Boolean.valueOf(this.periodicMetaDataEnabled), Integer.valueOf(this.periodicMetaDataIntervalInMinutes), Boolean.valueOf(this.periodicInfoEventEnabled), this.periodicEventIntMin, Integer.valueOf(this.periodicThresholdMin), Boolean.valueOf(this.inAppBrowser), Boolean.valueOf(this.SupportIABViewability), Long.valueOf(this.IABDisplayImpressionDelayInSeconds), Long.valueOf(this.IABVideoImpressionDelayInSeconds), Long.valueOf(this.userAgentDelayInSeconds), Boolean.valueOf(this.userAgentEnabled), this.sensorsConfig, this.btConfig, this.assetsBaseUrlSecured, this.invalidForRetry, Integer.valueOf(this.notVisibleBannerReloadInterval), this.analytics, this.location, this.metadataUpdateVersion, Boolean.valueOf(this.dns), Integer.valueOf(this.stopAutoLoadAmount), Integer.valueOf(this.stopAutoLoadPreCacheAmount), Boolean.valueOf(this.trueNetEnabled), Boolean.valueOf(this.webViewSecured), Boolean.valueOf(this.omSdkEnabled), Boolean.valueOf(this.chromeCustomeTabsInternal), Boolean.valueOf(this.chromeCustomeTabsExternal), Boolean.valueOf(this.disableSendAdvertisingId), this.networkTests, this.triggeredLinks, this.rsc, this.netDiag);
}
public final String r() {
int indexOf;
String q = g.q();
String str = (Build.VERSION.SDK_INT > 26 || this.webViewSecured) ? "https" : "http";
if (q.startsWith(str + "://") || (indexOf = q.indexOf(58)) == -1) {
return q;
}
return str + q.substring(indexOf);
}
}