Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
package com.unity3d.ads.core.configuration;
import com.unity3d.ads.core.data.repository.SessionRepository;
import com.unity3d.services.core.configuration.ConfigurationReader;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.StateFlowKt;
/* loaded from: classes4.dex */
public final class AlternativeFlowReader {
private final ConfigurationReader configurationReader;
private final MutableStateFlow isAlternativeFlowEnabled;
private final MutableStateFlow isAlternativeFlowRead;
private final SessionRepository sessionRepository;
public AlternativeFlowReader(ConfigurationReader configurationReader, SessionRepository sessionRepository) {
Intrinsics.checkNotNullParameter(configurationReader, "configurationReader");
Intrinsics.checkNotNullParameter(sessionRepository, "sessionRepository");
this.configurationReader = configurationReader;
this.sessionRepository = sessionRepository;
Boolean bool = Boolean.FALSE;
this.isAlternativeFlowRead = StateFlowKt.MutableStateFlow(bool);
this.isAlternativeFlowEnabled = StateFlowKt.MutableStateFlow(bool);
}
public final boolean invoke() {
if (!((Boolean) this.isAlternativeFlowRead.getValue()).booleanValue()) {
this.isAlternativeFlowEnabled.setValue(Boolean.valueOf(this.configurationReader.getCurrentConfiguration().getExperiments().isBoldSdkNextSessionEnabled() || this.sessionRepository.getNativeConfiguration().getFeatureFlags().getBoldSdkNextSessionEnabled()));
this.isAlternativeFlowRead.setValue(Boolean.TRUE);
}
return ((Boolean) this.isAlternativeFlowEnabled.getValue()).booleanValue();
}
}

View File

@@ -0,0 +1,26 @@
package com.unity3d.ads.core.configuration;
import com.unity3d.services.core.misc.JsonStorage;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class GameServerIdReader extends MetadataReader<String> {
public static final Companion Companion = new Companion(null);
public static final String PLAYER_SERVER_ID_KEY = "player.server_id.value";
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public GameServerIdReader(JsonStorage jsonStorage) {
super(jsonStorage, PLAYER_SERVER_ID_KEY);
Intrinsics.checkNotNullParameter(jsonStorage, "jsonStorage");
}
}

View File

@@ -0,0 +1,53 @@
package com.unity3d.ads.core.configuration;
import com.google.android.gms.ads.RequestConfiguration;
import com.unity3d.services.core.misc.JsonStorage;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nMetadataReader.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MetadataReader.kt\ncom/unity3d/ads/core/configuration/MetadataReader\n*L\n1#1,24:1\n8#1,6:25\n*S KotlinDebug\n*F\n+ 1 MetadataReader.kt\ncom/unity3d/ads/core/configuration/MetadataReader\n*L\n17#1:25,6\n*E\n"})
/* loaded from: classes4.dex */
public abstract class MetadataReader<T> {
private final JsonStorage jsonStorage;
private final String key;
public final JsonStorage getJsonStorage() {
return this.jsonStorage;
}
public final String getKey() {
return this.key;
}
public MetadataReader(JsonStorage jsonStorage, String key) {
Intrinsics.checkNotNullParameter(jsonStorage, "jsonStorage");
Intrinsics.checkNotNullParameter(key, "key");
this.jsonStorage = jsonStorage;
this.key = key;
}
public final /* synthetic */ <T> T read(T t) {
T t2 = (T) getJsonStorage().get(getKey());
if (t2 == null) {
return t;
}
Intrinsics.reifiedOperationMarker(3, RequestConfiguration.MAX_AD_CONTENT_RATING_T);
return t2;
}
/* JADX WARN: Multi-variable type inference failed */
public final /* synthetic */ <T> T readAndDelete(T t) {
Object obj = getJsonStorage().get(getKey());
if (obj != 0) {
Intrinsics.checkNotNullExpressionValue(obj, "get(key)");
Intrinsics.reifiedOperationMarker(3, RequestConfiguration.MAX_AD_CONTENT_RATING_T);
t = obj;
}
Object obj2 = getJsonStorage().get(getKey());
if (obj2 != null) {
Intrinsics.checkNotNullExpressionValue(obj2, "get(key)");
getJsonStorage().delete(getKey());
}
return t;
}
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.ads.core.data.datasource;
/* loaded from: classes4.dex */
public interface AnalyticsDataSource {
String getUserId();
}

View File

@@ -0,0 +1,12 @@
package com.unity3d.ads.core.data.datasource;
import com.unity3d.services.core.preferences.AndroidPreferences;
import com.unity3d.services.core.properties.ClientProperties;
/* loaded from: classes4.dex */
public final class AndroidAnalyticsDataSource implements AnalyticsDataSource {
@Override // com.unity3d.ads.core.data.datasource.AnalyticsDataSource
public String getUserId() {
return AndroidPreferences.getString(ClientProperties.getAppName() + ".v2.playerprefs", "unity.cloud_userid");
}
}

View File

@@ -0,0 +1,72 @@
package com.unity3d.ads.core.data.datasource;
import androidx.datastore.core.CorruptionException;
import com.google.protobuf.ByteString;
import com.unity3d.ads.datastore.ByteStringStoreKt;
import com.unity3d.ads.datastore.ByteStringStoreOuterClass;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.flow.FlowCollector;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.AndroidByteStringDataSource$get$2", f = "AndroidByteStringDataSource.kt", l = {18}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nAndroidByteStringDataSource.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidByteStringDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidByteStringDataSource$get$2\n+ 2 ByteStringStoreKt.kt\ncom/unity3d/ads/datastore/ByteStringStoreKtKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,33:1\n8#2:34\n1#3:35\n*S KotlinDebug\n*F\n+ 1 AndroidByteStringDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidByteStringDataSource$get$2\n*L\n18#1:34\n18#1:35\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidByteStringDataSource$get$2 extends SuspendLambda implements Function3 {
private /* synthetic */ Object L$0;
/* synthetic */ Object L$1;
int label;
public AndroidByteStringDataSource$get$2(Continuation continuation) {
super(3, continuation);
}
@Override // kotlin.jvm.functions.Function3
public final Object invoke(FlowCollector flowCollector, Throwable th, Continuation continuation) {
AndroidByteStringDataSource$get$2 androidByteStringDataSource$get$2 = new AndroidByteStringDataSource$get$2(continuation);
androidByteStringDataSource$get$2.L$0 = flowCollector;
androidByteStringDataSource$get$2.L$1 = th;
return androidByteStringDataSource$get$2.invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
FlowCollector flowCollector = (FlowCollector) this.L$0;
Throwable th = (Throwable) this.L$1;
if (th instanceof CorruptionException) {
ByteStringStoreKt.Dsl.Companion companion = ByteStringStoreKt.Dsl.Companion;
ByteStringStoreOuterClass.ByteStringStore.Builder newBuilder = ByteStringStoreOuterClass.ByteStringStore.newBuilder();
Intrinsics.checkNotNullExpressionValue(newBuilder, "newBuilder()");
ByteStringStoreKt.Dsl _create = companion._create(newBuilder);
ByteString EMPTY = ByteString.EMPTY;
Intrinsics.checkNotNullExpressionValue(EMPTY, "EMPTY");
_create.setData(EMPTY);
ByteStringStoreOuterClass.ByteStringStore _build = _create._build();
this.L$0 = null;
this.label = 1;
if (flowCollector.emit(_build, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
throw th;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,50 @@
package com.unity3d.ads.core.data.datasource;
import com.google.protobuf.ByteString;
import com.unity3d.ads.datastore.ByteStringStoreOuterClass;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.AndroidByteStringDataSource$set$2", f = "AndroidByteStringDataSource.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidByteStringDataSource$set$2 extends SuspendLambda implements Function2 {
final /* synthetic */ ByteString $data;
/* synthetic */ Object L$0;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidByteStringDataSource$set$2(ByteString byteString, Continuation continuation) {
super(2, continuation);
this.$data = byteString;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
AndroidByteStringDataSource$set$2 androidByteStringDataSource$set$2 = new AndroidByteStringDataSource$set$2(this.$data, continuation);
androidByteStringDataSource$set$2.L$0 = obj;
return androidByteStringDataSource$set$2;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(ByteStringStoreOuterClass.ByteStringStore byteStringStore, Continuation continuation) {
return ((AndroidByteStringDataSource$set$2) create(byteStringStore, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
ByteStringStoreOuterClass.ByteStringStore build = ((ByteStringStoreOuterClass.ByteStringStore) this.L$0).toBuilder().setData(this.$data).build();
Intrinsics.checkNotNullExpressionValue(build, "currentData.toBuilder()\n…\n .build()");
return build;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,33 @@
package com.unity3d.ads.core.data.datasource;
import androidx.datastore.core.DataStore;
import com.google.protobuf.ByteString;
import com.unity3d.ads.datastore.ByteStringStoreOuterClass;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.FlowKt;
/* loaded from: classes4.dex */
public final class AndroidByteStringDataSource implements ByteStringDataSource {
private final DataStore<ByteStringStoreOuterClass.ByteStringStore> dataStore;
public AndroidByteStringDataSource(DataStore<ByteStringStoreOuterClass.ByteStringStore> dataStore) {
Intrinsics.checkNotNullParameter(dataStore, "dataStore");
this.dataStore = dataStore;
}
@Override // com.unity3d.ads.core.data.datasource.ByteStringDataSource
public Object get(Continuation continuation) {
return FlowKt.first(FlowKt.m4143catch(this.dataStore.getData(), new AndroidByteStringDataSource$get$2(null)), continuation);
}
@Override // com.unity3d.ads.core.data.datasource.ByteStringDataSource
public Object set(ByteString byteString, Continuation continuation) {
Object coroutine_suspended;
Object updateData = this.dataStore.updateData(new AndroidByteStringDataSource$set$2(byteString, null), continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return updateData == coroutine_suspended ? updateData : Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,167 @@
package com.unity3d.ads.core.data.datasource;
import com.unity3d.ads.core.domain.privacy.FlattenerRulesUseCase;
import com.unity3d.services.core.device.reader.JsonStorageKeyNames;
import com.unity3d.services.core.misc.JsonFlattener;
import com.unity3d.services.core.misc.JsonStorage;
import csdk.gluads.Consts;
import gatewayprotocol.v1.DeveloperConsentKt;
import gatewayprotocol.v1.DeveloperConsentOptionKt;
import gatewayprotocol.v1.DeveloperConsentOuterClass;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import org.json.JSONObject;
@SourceDebugExtension({"SMAP\nAndroidDeveloperConsentDataSource.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidDeveloperConsentDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidDeveloperConsentDataSource\n+ 2 DeveloperConsentKt.kt\ngatewayprotocol/v1/DeveloperConsentKtKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 4 Iterators.kt\nkotlin/collections/CollectionsKt__IteratorsKt\n+ 5 DeveloperConsentOptionKt.kt\ngatewayprotocol/v1/DeveloperConsentOptionKtKt\n*L\n1#1,89:1\n8#2:90\n1#3:91\n1#3:93\n1#3:96\n32#4:92\n33#4:94\n8#5:95\n*S KotlinDebug\n*F\n+ 1 AndroidDeveloperConsentDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidDeveloperConsentDataSource\n*L\n29#1:90\n29#1:91\n53#1:96\n37#1:92\n37#1:94\n53#1:95\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidDeveloperConsentDataSource implements DeveloperConsentDataSource {
private final FlattenerRulesUseCase flattenerRulesUseCase;
private final JsonStorage publicStorage;
private final DeveloperConsentOuterClass.DeveloperConsentOption createDeveloperConsentOption(String str, boolean z) {
DeveloperConsentOptionKt.Dsl.Companion companion = DeveloperConsentOptionKt.Dsl.Companion;
DeveloperConsentOuterClass.DeveloperConsentOption.Builder newBuilder = DeveloperConsentOuterClass.DeveloperConsentOption.newBuilder();
Intrinsics.checkNotNullExpressionValue(newBuilder, "newBuilder()");
DeveloperConsentOptionKt.Dsl _create = companion._create(newBuilder);
_create.setType(getDeveloperConsentType(str));
if (_create.getType() == DeveloperConsentOuterClass.DeveloperConsentType.DEVELOPER_CONSENT_TYPE_CUSTOM) {
_create.setCustomType(str);
}
_create.setValue(getDeveloperConsentChoice(Boolean.valueOf(z)));
return _create._build();
}
@Override // com.unity3d.ads.core.data.datasource.DeveloperConsentDataSource
public DeveloperConsentOuterClass.DeveloperConsent getDeveloperConsent() {
DeveloperConsentKt.Dsl.Companion companion = DeveloperConsentKt.Dsl.Companion;
DeveloperConsentOuterClass.DeveloperConsent.Builder newBuilder = DeveloperConsentOuterClass.DeveloperConsent.newBuilder();
Intrinsics.checkNotNullExpressionValue(newBuilder, "newBuilder()");
DeveloperConsentKt.Dsl _create = companion._create(newBuilder);
_create.addAllOptions(_create.getOptions(), developerConsentList());
return _create._build();
}
public AndroidDeveloperConsentDataSource(FlattenerRulesUseCase flattenerRulesUseCase, JsonStorage publicStorage) {
Intrinsics.checkNotNullParameter(flattenerRulesUseCase, "flattenerRulesUseCase");
Intrinsics.checkNotNullParameter(publicStorage, "publicStorage");
this.flattenerRulesUseCase = flattenerRulesUseCase;
this.publicStorage = publicStorage;
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x0054, code lost:
if (r5 != false) goto L16;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private final java.util.List<gatewayprotocol.v1.DeveloperConsentOuterClass.DeveloperConsentOption> developerConsentList() {
/*
r9 = this;
java.util.ArrayList r0 = new java.util.ArrayList
r0.<init>()
org.json.JSONObject r1 = r9.fetchData()
java.util.Iterator r2 = r1.keys()
java.lang.String r3 = "data.keys()"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r2, r3)
L12:
boolean r3 = r2.hasNext()
if (r3 == 0) goto L6a
java.lang.Object r3 = r2.next()
java.lang.String r3 = (java.lang.String) r3
java.lang.Object r4 = r1.get(r3)
boolean r5 = r4 instanceof java.lang.Boolean
java.lang.String r6 = "storedValue"
java.lang.String r7 = "key"
if (r5 == 0) goto L3b
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r3, r7)
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r4, r6)
java.lang.Boolean r4 = (java.lang.Boolean) r4
boolean r4 = r4.booleanValue()
gatewayprotocol.v1.DeveloperConsentOuterClass$DeveloperConsentOption r3 = r9.createDeveloperConsentOption(r3, r4)
goto L64
L3b:
boolean r5 = r4 instanceof java.lang.String
r8 = 0
if (r5 == 0) goto L57
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r4, r6)
java.lang.String r4 = (java.lang.String) r4
java.lang.String r5 = "true"
r6 = 1
boolean r5 = kotlin.text.StringsKt.equals(r4, r5, r6)
if (r5 != 0) goto L59
java.lang.String r5 = "false"
boolean r5 = kotlin.text.StringsKt.equals(r4, r5, r6)
if (r5 == 0) goto L57
goto L59
L57:
r3 = r8
goto L64
L59:
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r3, r7)
boolean r4 = java.lang.Boolean.parseBoolean(r4)
gatewayprotocol.v1.DeveloperConsentOuterClass$DeveloperConsentOption r3 = r9.createDeveloperConsentOption(r3, r4)
L64:
if (r3 == 0) goto L12
r0.add(r3)
goto L12
L6a:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.core.data.datasource.AndroidDeveloperConsentDataSource.developerConsentList():java.util.List");
}
private final JSONObject fetchData() {
if (this.publicStorage.getData() != null) {
JSONObject flattenJson = new JsonFlattener(this.publicStorage.getData()).flattenJson(Consts.STRING_PERIOD, this.flattenerRulesUseCase.invoke());
Intrinsics.checkNotNullExpressionValue(flattenJson, "flattener.flattenJson(\".… flattenerRulesUseCase())");
return flattenJson;
}
return new JSONObject();
}
/* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
private final DeveloperConsentOuterClass.DeveloperConsentType getDeveloperConsentType(String str) {
if (str == null) {
return DeveloperConsentOuterClass.DeveloperConsentType.DEVELOPER_CONSENT_TYPE_UNSPECIFIED;
}
switch (str.hashCode()) {
case -1998919769:
if (str.equals("user.nonbehavioral")) {
return DeveloperConsentOuterClass.DeveloperConsentType.DEVELOPER_CONSENT_TYPE_NON_BEHAVIORAL;
}
break;
case -1078801183:
if (str.equals("pipl.consent")) {
return DeveloperConsentOuterClass.DeveloperConsentType.DEVELOPER_CONSENT_TYPE_PIPL_CONSENT;
}
break;
case -5454905:
if (str.equals(JsonStorageKeyNames.USER_NON_BEHAVIORAL_KEY)) {
return DeveloperConsentOuterClass.DeveloperConsentType.DEVELOPER_CONSENT_TYPE_NON_BEHAVIORAL;
}
break;
case 194451659:
if (str.equals("gdpr.consent")) {
return DeveloperConsentOuterClass.DeveloperConsentType.DEVELOPER_CONSENT_TYPE_GDPR_CONSENT;
}
break;
case 519433140:
if (str.equals("privacy.consent")) {
return DeveloperConsentOuterClass.DeveloperConsentType.DEVELOPER_CONSENT_TYPE_PRIVACY_CONSENT;
}
break;
case 2033752033:
if (str.equals("privacy.useroveragelimit")) {
return DeveloperConsentOuterClass.DeveloperConsentType.DEVELOPER_CONSENT_TYPE_USER_OVER_AGE_LIMIT;
}
break;
}
return DeveloperConsentOuterClass.DeveloperConsentType.DEVELOPER_CONSENT_TYPE_CUSTOM;
}
private final DeveloperConsentOuterClass.DeveloperConsentChoice getDeveloperConsentChoice(Boolean bool) {
return Intrinsics.areEqual(bool, Boolean.TRUE) ? DeveloperConsentOuterClass.DeveloperConsentChoice.DEVELOPER_CONSENT_CHOICE_TRUE : Intrinsics.areEqual(bool, Boolean.FALSE) ? DeveloperConsentOuterClass.DeveloperConsentChoice.DEVELOPER_CONSENT_CHOICE_FALSE : DeveloperConsentOuterClass.DeveloperConsentChoice.DEVELOPER_CONSENT_CHOICE_UNSPECIFIED;
}
}

View File

@@ -0,0 +1,120 @@
package com.unity3d.ads.core.data.datasource;
import android.database.ContentObserver;
import android.provider.Settings;
import com.unity3d.ads.core.data.datasource.VolumeSettingsChange;
import com.unity3d.mediation.LevelPlayAdError;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Ref;
import kotlinx.coroutines.channels.ChannelsKt;
import kotlinx.coroutines.channels.ProduceKt;
import kotlinx.coroutines.channels.ProducerScope;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.AndroidDynamicDeviceInfoDataSource$volumeSettingsChange$1", f = "AndroidDynamicDeviceInfoDataSource.kt", l = {LevelPlayAdError.ERROR_CODE_IS_LOAD_FAILED_ALREADY_CALLED}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidDynamicDeviceInfoDataSource$volumeSettingsChange$1 extends SuspendLambda implements Function2 {
private /* synthetic */ Object L$0;
int label;
final /* synthetic */ AndroidDynamicDeviceInfoDataSource this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidDynamicDeviceInfoDataSource$volumeSettingsChange$1(AndroidDynamicDeviceInfoDataSource androidDynamicDeviceInfoDataSource, Continuation continuation) {
super(2, continuation);
this.this$0 = androidDynamicDeviceInfoDataSource;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
AndroidDynamicDeviceInfoDataSource$volumeSettingsChange$1 androidDynamicDeviceInfoDataSource$volumeSettingsChange$1 = new AndroidDynamicDeviceInfoDataSource$volumeSettingsChange$1(this.this$0, continuation);
androidDynamicDeviceInfoDataSource$volumeSettingsChange$1.L$0 = obj;
return androidDynamicDeviceInfoDataSource$volumeSettingsChange$1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(ProducerScope producerScope, Continuation continuation) {
return ((AndroidDynamicDeviceInfoDataSource$volumeSettingsChange$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r4v5, types: [android.database.ContentObserver, com.unity3d.ads.core.data.datasource.AndroidDynamicDeviceInfoDataSource$volumeSettingsChange$1$contentObserver$1] */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
double streamVolume;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
final ProducerScope producerScope = (ProducerScope) this.L$0;
final Ref.DoubleRef doubleRef = new Ref.DoubleRef();
streamVolume = this.this$0.getStreamVolume(3);
doubleRef.element = streamVolume;
ChannelsKt.trySendBlocking(producerScope, new VolumeSettingsChange.VolumeChange(streamVolume));
final Ref.IntRef intRef = new Ref.IntRef();
int ringerMode = this.this$0.getRingerMode();
intRef.element = ringerMode;
ChannelsKt.trySendBlocking(producerScope, new VolumeSettingsChange.MuteChange(ringerMode == 0));
final AndroidDynamicDeviceInfoDataSource androidDynamicDeviceInfoDataSource = this.this$0;
final ?? r4 = new ContentObserver() { // from class: com.unity3d.ads.core.data.datasource.AndroidDynamicDeviceInfoDataSource$volumeSettingsChange$1$contentObserver$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(null);
}
@Override // android.database.ContentObserver
public void onChange(boolean z) {
double streamVolume2;
super.onChange(z);
streamVolume2 = AndroidDynamicDeviceInfoDataSource.this.getStreamVolume(3);
Ref.DoubleRef doubleRef2 = doubleRef;
if (streamVolume2 != doubleRef2.element) {
doubleRef2.element = streamVolume2;
ChannelsKt.trySendBlocking(producerScope, new VolumeSettingsChange.VolumeChange(streamVolume2));
}
int ringerMode2 = AndroidDynamicDeviceInfoDataSource.this.getRingerMode();
Ref.IntRef intRef2 = intRef;
if (ringerMode2 != intRef2.element) {
intRef2.element = ringerMode2;
ChannelsKt.trySendBlocking(producerScope, new VolumeSettingsChange.MuteChange(ringerMode2 == 0));
}
}
};
this.this$0.getContext().getContentResolver().registerContentObserver(Settings.System.CONTENT_URI, true, r4);
final AndroidDynamicDeviceInfoDataSource androidDynamicDeviceInfoDataSource2 = this.this$0;
Function0 function0 = new Function0() { // from class: com.unity3d.ads.core.data.datasource.AndroidDynamicDeviceInfoDataSource$volumeSettingsChange$1.1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public /* bridge */ /* synthetic */ Object invoke() {
m3724invoke();
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: collision with other method in class */
public final void m3724invoke() {
AndroidDynamicDeviceInfoDataSource.this.getContext().getContentResolver().unregisterContentObserver(r4);
}
};
this.label = 1;
if (ProduceKt.awaitClose(producerScope, function0, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,600 @@
package com.unity3d.ads.core.data.datasource;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Resources;
import android.media.AudioManager;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;
import android.os.Build;
import android.os.Environment;
import android.os.LocaleList;
import android.os.SystemClock;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import androidx.annotation.RequiresApi;
import com.applovin.sdk.AppLovinEventTypes;
import com.ironsource.r8;
import com.unity3d.services.core.device.AdvertisingId;
import com.unity3d.services.core.device.Device;
import com.unity3d.services.core.device.OpenAdvertisingId;
import com.unity3d.services.core.log.DeviceLog;
import gatewayprotocol.v1.DynamicDeviceInfoKt;
import gatewayprotocol.v1.DynamicDeviceInfoOuterClass;
import gatewayprotocol.v1.NetworkCapabilityTransportsOuterClass;
import java.io.File;
import java.io.RandomAccessFile;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.MapsKt__MapsKt;
import kotlin.io.CloseableKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.math.MathKt__MathJVMKt;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.FlowKt;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.StateFlowKt;
@SourceDebugExtension({"SMAP\nAndroidDynamicDeviceInfoDataSource.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidDynamicDeviceInfoDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidDynamicDeviceInfoDataSource\n+ 2 DynamicDeviceInfoKt.kt\ngatewayprotocol/v1/DynamicDeviceInfoKtKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 4 DynamicDeviceInfoKt.kt\ngatewayprotocol/v1/DynamicDeviceInfoKt\n+ 5 StateFlow.kt\nkotlinx/coroutines/flow/StateFlowKt\n+ 6 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,749:1\n8#2:750\n1#3:751\n1#3:753\n1#3:759\n754#4:752\n230#5,5:754\n11335#6:760\n11670#6,3:761\n*S KotlinDebug\n*F\n+ 1 AndroidDynamicDeviceInfoDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidDynamicDeviceInfoDataSource\n*L\n55#1:750\n55#1:751\n75#1:753\n75#1:752\n161#1:754,5\n673#1:760\n673#1:761,3\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidDynamicDeviceInfoDataSource implements DynamicDeviceInfoDataSource {
public static final Companion Companion = new Companion(null);
public static final String DIRECTORY_MEM_INFO = "/proc/meminfo";
public static final String DIRECTORY_MODE_READ = "r";
public static final String DIRECTORY_PROCESS_INFO = "/proc/self/stat";
public static final String INTENT_USB_STATE = "android.hardware.usb.action.USB_STATE";
public static final String KEY_STAT_CONTENT = "stat";
public static final String USB_EXTRA_CONNECTED = "connected";
private final Context context;
private final LifecycleDataSource lifecycleDataSource;
private final MutableStateFlow reportedWarning;
private final Flow volumeSettingsChange;
public /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
public static final /* synthetic */ int[] $EnumSwitchMapping$1;
static {
int[] iArr = new int[Device.MemoryInfoType.values().length];
try {
iArr[Device.MemoryInfoType.TOTAL_MEMORY.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[Device.MemoryInfoType.FREE_MEMORY.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
$EnumSwitchMapping$0 = iArr;
int[] iArr2 = new int[DynamicDeviceInfoOuterClass.ConnectionType.values().length];
try {
iArr2[DynamicDeviceInfoOuterClass.ConnectionType.CONNECTION_TYPE_WIFI.ordinal()] = 1;
} catch (NoSuchFieldError unused3) {
}
try {
iArr2[DynamicDeviceInfoOuterClass.ConnectionType.CONNECTION_TYPE_CELLULAR.ordinal()] = 2;
} catch (NoSuchFieldError unused4) {
}
try {
iArr2[DynamicDeviceInfoOuterClass.ConnectionType.CONNECTION_TYPE_UNSPECIFIED.ordinal()] = 3;
} catch (NoSuchFieldError unused5) {
}
$EnumSwitchMapping$1 = iArr2;
}
}
public final Context getContext() {
return this.context;
}
@Override // com.unity3d.ads.core.data.datasource.DynamicDeviceInfoDataSource
public Flow getVolumeSettingsChange() {
return this.volumeSettingsChange;
}
@Override // com.unity3d.ads.core.data.datasource.DynamicDeviceInfoDataSource
public DynamicDeviceInfoOuterClass.DynamicDeviceInfo fetch() {
DynamicDeviceInfoKt.Dsl.Companion companion = DynamicDeviceInfoKt.Dsl.Companion;
DynamicDeviceInfoOuterClass.DynamicDeviceInfo.Builder newBuilder = DynamicDeviceInfoOuterClass.DynamicDeviceInfo.newBuilder();
Intrinsics.checkNotNullExpressionValue(newBuilder, "newBuilder()");
DynamicDeviceInfoKt.Dsl _create = companion._create(newBuilder);
_create.setLanguage(getLanguage());
_create.setNetworkOperator(getNetworkOperator());
_create.setNetworkOperatorName(getNetworkOperatorName());
_create.setFreeDiskSpace(getUsableSpace(this.context.getExternalFilesDir(null)));
_create.setFreeRamMemory(getFreeMemory());
_create.setWiredHeadset(isWiredHeadsetOn());
_create.setTimeZone(getTimeZone());
_create.setTimeZoneOffset(getTimeZoneOffset());
_create.setLimitedTracking(isLimitAdTrackingEnabled());
_create.setLimitedOpenAdTracking(isLimitOpenAdTrackingEnabled());
_create.setBatteryLevel(getBatteryLevel());
_create.setBatteryStatus(getBatteryStatus());
_create.setConnectionType(getConnectionType());
_create.setAndroid(fetchAndroidDynamicDeviceInfo());
_create.setAppActive(isAppActive());
_create.setScreenWidth(getScreenWidth());
_create.setScreenHeight(getScreenHeight());
return _create._build();
}
public AndroidDynamicDeviceInfoDataSource(Context context, LifecycleDataSource lifecycleDataSource) {
Map emptyMap;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(lifecycleDataSource, "lifecycleDataSource");
this.context = context;
this.lifecycleDataSource = lifecycleDataSource;
emptyMap = MapsKt__MapsKt.emptyMap();
this.reportedWarning = StateFlowKt.MutableStateFlow(emptyMap);
this.volumeSettingsChange = FlowKt.callbackFlow(new AndroidDynamicDeviceInfoDataSource$volumeSettingsChange$1(this, null));
}
private final DynamicDeviceInfoOuterClass.DynamicDeviceInfo.Android fetchAndroidDynamicDeviceInfo() {
DynamicDeviceInfoKt dynamicDeviceInfoKt = DynamicDeviceInfoKt.INSTANCE;
DynamicDeviceInfoKt.AndroidKt.Dsl.Companion companion = DynamicDeviceInfoKt.AndroidKt.Dsl.Companion;
DynamicDeviceInfoOuterClass.DynamicDeviceInfo.Android.Builder newBuilder = DynamicDeviceInfoOuterClass.DynamicDeviceInfo.Android.newBuilder();
Intrinsics.checkNotNullExpressionValue(newBuilder, "newBuilder()");
DynamicDeviceInfoKt.AndroidKt.Dsl _create = companion._create(newBuilder);
_create.setNetworkConnected(isActiveNetworkConnected());
_create.setNetworkType(getNetworkType());
_create.setNetworkMetered(getNetworkMetered());
_create.setTelephonyManagerNetworkType(getNetworkType());
_create.setAdbEnabled(isAdbEnabled());
_create.setUsbConnected(isUSBConnected());
_create.setVolume(getStreamVolume(3));
_create.setMaxVolume(getStreamMaxVolume(3));
_create.setDeviceElapsedRealtime(getElapsedRealtime());
_create.setDeviceUpTime(getUptime());
_create.setAirplaneMode(getAirplaneMode());
_create.setChargingType(getChargingType());
_create.setStayOnWhilePluggedIn(getStayOnWhilePluggedIn());
_create.setSdCardPresent(getIsSdCardPresent());
_create.setNetworkCapabilityTransports(getNetworkCapabilityTransports());
return _create._build();
}
private final String getLanguage() {
String locale = Locale.getDefault().toString();
Intrinsics.checkNotNullExpressionValue(locale, "getDefault().toString()");
return locale;
}
private final String getTimeZone() {
try {
String displayName = TimeZone.getDefault().getDisplayName(false, 0, Locale.US);
Intrinsics.checkNotNullExpressionValue(displayName, "{\n TimeZone.g…ORT, Locale.US)\n }");
return displayName;
} catch (AssertionError e) {
DeviceLog.error("Could not read timeZone information: %s", e.getMessage());
return "";
}
}
private final long getTimeZoneOffset() {
return TimeZone.getDefault().getOffset(System.currentTimeMillis()) / 1000;
}
private final boolean isUsingWifi() {
ConnectivityManager connectivityManager = getConnectivityManager();
if (connectivityManager == null) {
return false;
}
TelephonyManager telephonyManager = getTelephonyManager();
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
return activeNetworkInfo != null && connectivityManager.getBackgroundDataSetting() && activeNetworkInfo.isConnected() && telephonyManager != null && activeNetworkInfo.getType() == 1 && activeNetworkInfo.isConnected();
}
private final DynamicDeviceInfoOuterClass.ConnectionType getConnectionType() {
if (isUsingWifi()) {
return DynamicDeviceInfoOuterClass.ConnectionType.CONNECTION_TYPE_WIFI;
}
if (isActiveNetworkConnected()) {
return DynamicDeviceInfoOuterClass.ConnectionType.CONNECTION_TYPE_CELLULAR;
}
return DynamicDeviceInfoOuterClass.ConnectionType.CONNECTION_TYPE_UNSPECIFIED;
}
@SuppressLint({"MissingPermission"})
private final int getNetworkType() {
Object value;
Map plus;
TelephonyManager telephonyManager = getTelephonyManager();
if (telephonyManager == null) {
return -1;
}
try {
return telephonyManager.getNetworkType();
} catch (SecurityException unused) {
if (Intrinsics.areEqual(((Map) this.reportedWarning.getValue()).get("getNetworkType"), Boolean.TRUE)) {
return -1;
}
MutableStateFlow mutableStateFlow = this.reportedWarning;
do {
value = mutableStateFlow.getValue();
plus = MapsKt__MapsKt.plus((Map) value, TuplesKt.to("getNetworkType", Boolean.TRUE));
} while (!mutableStateFlow.compareAndSet(value, plus));
DeviceLog.warning("Unity Ads was not able to get current network type due to missing permission");
return -1;
}
}
private final boolean getNetworkMetered() {
ConnectivityManager connectivityManager = getConnectivityManager();
return connectivityManager != null && connectivityManager.isActiveNetworkMetered();
}
private final String getNetworkOperator() {
TelephonyManager telephonyManager = getTelephonyManager();
String networkOperator = telephonyManager != null ? telephonyManager.getNetworkOperator() : null;
return networkOperator == null ? "" : networkOperator;
}
private final String getNetworkOperatorName() {
TelephonyManager telephonyManager = getTelephonyManager();
String networkOperatorName = telephonyManager != null ? telephonyManager.getNetworkOperatorName() : null;
return networkOperatorName == null ? "" : networkOperatorName;
}
public final String getNetworkCountryISO() {
TelephonyManager telephonyManager = getTelephonyManager();
String networkCountryIso = telephonyManager != null ? telephonyManager.getNetworkCountryIso() : null;
return networkCountryIso == null ? "" : networkCountryIso;
}
private final int getScreenWidth() {
DisplayMetrics displayMetrics;
Resources resources = this.context.getResources();
if (resources == null || (displayMetrics = resources.getDisplayMetrics()) == null) {
return -1;
}
return displayMetrics.widthPixels;
}
private final int getScreenHeight() {
DisplayMetrics displayMetrics;
Resources resources = this.context.getResources();
if (resources == null || (displayMetrics = resources.getDisplayMetrics()) == null) {
return -1;
}
return displayMetrics.heightPixels;
}
private final boolean isActiveNetworkConnected() {
ConnectivityManager connectivityManager = getConnectivityManager();
NetworkInfo activeNetworkInfo = connectivityManager != null ? connectivityManager.getActiveNetworkInfo() : null;
return activeNetworkInfo != null && activeNetworkInfo.isConnected();
}
private final boolean isWiredHeadsetOn() {
AudioManager audioManager = getAudioManager();
return audioManager != null && audioManager.isWiredHeadsetOn();
}
@Override // com.unity3d.ads.core.data.datasource.DynamicDeviceInfoDataSource
public int getRingerMode() {
AudioManager audioManager = getAudioManager();
if (audioManager != null) {
return audioManager.getRingerMode();
}
return -2;
}
/* JADX INFO: Access modifiers changed from: private */
public final double getStreamVolume(int i) {
return getAudioManager() != null ? r0.getStreamVolume(i) : -2;
}
public final double getStreamMaxVolume(int i) {
return getAudioManager() != null ? r0.getStreamMaxVolume(i) : -2;
}
public final int getScreenBrightness() {
return Settings.System.getInt(this.context.getContentResolver(), "screen_brightness", -1);
}
private final long getFreeSpace(File file) {
int roundToInt;
if (file == null || !file.exists()) {
return -1L;
}
roundToInt = MathKt__MathJVMKt.roundToInt(file.getFreeSpace() / 1024);
return roundToInt;
}
private final long getUsableSpace(File file) {
int roundToInt;
if (file == null || !file.exists()) {
return -1L;
}
roundToInt = MathKt__MathJVMKt.roundToInt(file.getUsableSpace() / 1024);
return roundToInt;
}
private final double getBatteryLevel() {
if (this.context.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED")) == null) {
return -1.0d;
}
return r0.getIntExtra(AppLovinEventTypes.USER_COMPLETED_LEVEL, 0) / r0.getIntExtra("scale", 0);
}
private final int getBatteryStatus() {
Intent registerReceiver = this.context.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
if (registerReceiver != null) {
return registerReceiver.getIntExtra("status", 0);
}
return -1;
}
public final long getTotalMemory() {
return getMemoryInfo(Device.MemoryInfoType.TOTAL_MEMORY);
}
public final long getFreeMemory() {
return getMemoryInfo(Device.MemoryInfoType.FREE_MEMORY);
}
private final long getMemoryInfo(Device.MemoryInfoType memoryInfoType) {
int i = WhenMappings.$EnumSwitchMapping$0[memoryInfoType.ordinal()];
int i2 = 1;
if (i != 1) {
i2 = 2;
if (i != 2) {
i2 = -1;
}
}
RandomAccessFile randomAccessFile = new RandomAccessFile(DIRECTORY_MEM_INFO, "r");
String str = null;
for (int i3 = 0; i3 < i2; i3++) {
try {
str = randomAccessFile.readLine();
} finally {
}
}
Unit unit = Unit.INSTANCE;
CloseableKt.closeFinally(randomAccessFile, null);
return getMemoryValueFromString(str);
}
private final long getMemoryValueFromString(String str) {
if (str == null) {
return -1L;
}
Matcher matcher = Pattern.compile("(\\d+)").matcher(str);
String str2 = null;
while (matcher.find()) {
str2 = matcher.group(1);
}
if (str2 != null) {
return Long.parseLong(str2);
}
return -1L;
}
private final boolean isAdbEnabled() {
return adbStatus();
}
private final boolean adbStatus() {
Boolean bool;
try {
boolean z = true;
if (1 != Settings.Global.getInt(this.context.getContentResolver(), "adb_enabled", 0)) {
z = false;
}
bool = Boolean.valueOf(z);
} catch (Exception e) {
DeviceLog.exception("Problems fetching adb enabled status", e);
bool = null;
}
if (bool != null) {
return bool.booleanValue();
}
return false;
}
private final boolean isUSBConnected() {
Intent registerReceiver = this.context.registerReceiver(null, new IntentFilter(INTENT_USB_STATE));
if (registerReceiver != null) {
return registerReceiver.getBooleanExtra(USB_EXTRA_CONNECTED, false);
}
return false;
}
private final long getUptime() {
return SystemClock.uptimeMillis();
}
private final long getElapsedRealtime() {
return SystemClock.elapsedRealtime();
}
public final Map<String, String> getProcessInfo() {
HashMap hashMap = new HashMap();
RandomAccessFile randomAccessFile = new RandomAccessFile(DIRECTORY_PROCESS_INFO, "r");
try {
String statContent = randomAccessFile.readLine();
Intrinsics.checkNotNullExpressionValue(statContent, "statContent");
hashMap.put(KEY_STAT_CONTENT, statContent);
Unit unit = Unit.INSTANCE;
CloseableKt.closeFinally(randomAccessFile, null);
return hashMap;
} finally {
}
}
private final boolean isLimitAdTrackingEnabled() {
return AdvertisingId.getLimitedAdTracking();
}
private final boolean isLimitOpenAdTrackingEnabled() {
return OpenAdvertisingId.getLimitedOpenAdTracking();
}
private final boolean isAppActive() {
return this.lifecycleDataSource.appIsForeground();
}
private final long getEventTimeStamp() {
return System.currentTimeMillis() / 1000;
}
private final TelephonyManager getTelephonyManager() {
Object systemService = this.context.getSystemService("phone");
if (systemService instanceof TelephonyManager) {
return (TelephonyManager) systemService;
}
return null;
}
private final ConnectivityManager getConnectivityManager() {
Object systemService = this.context.getSystemService("connectivity");
if (systemService instanceof ConnectivityManager) {
return (ConnectivityManager) systemService;
}
return null;
}
private final AudioManager getAudioManager() {
Object systemService = this.context.getSystemService("audio");
if (systemService instanceof AudioManager) {
return (AudioManager) systemService;
}
return null;
}
@Override // com.unity3d.ads.core.data.datasource.DynamicDeviceInfoDataSource
public boolean hasInternet() {
return hasInternetConnectionM();
}
private final boolean hasInternetConnection() {
NetworkInfo activeNetworkInfo;
ConnectivityManager connectivityManager = getConnectivityManager();
return (connectivityManager == null || (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) == null || !activeNetworkInfo.isConnected()) ? false : true;
}
@RequiresApi(api = 23)
private final boolean hasInternetConnectionM() {
NetworkCapabilities networkCapabilities;
ConnectivityManager connectivityManager = getConnectivityManager();
return connectivityManager != null && (networkCapabilities = connectivityManager.getNetworkCapabilities(connectivityManager.getActiveNetwork())) != null && networkCapabilities.hasCapability(12) && networkCapabilities.hasCapability(16);
}
@Override // com.unity3d.ads.core.data.datasource.DynamicDeviceInfoDataSource
public String getOrientation() {
return getScreenHeight() > getScreenWidth() ? "portrait" : "landscape";
}
@Override // com.unity3d.ads.core.data.datasource.DynamicDeviceInfoDataSource
public String getConnectionTypeStr() {
int i = WhenMappings.$EnumSwitchMapping$1[getConnectionType().ordinal()];
return i != 1 ? i != 2 ? "none" : r8.g : "wifi";
}
@Override // com.unity3d.ads.core.data.datasource.DynamicDeviceInfoDataSource
public int getCurrentUiTheme() {
return this.context.getResources().getConfiguration().uiMode;
}
@Override // com.unity3d.ads.core.data.datasource.DynamicDeviceInfoDataSource
public List<String> getLocaleList() {
LocaleList locales = this.context.getResources().getConfiguration().getLocales();
Intrinsics.checkNotNullExpressionValue(locales, "context.resources.configuration.locales");
int size = locales.size();
ArrayList arrayList = new ArrayList(size);
for (int i = 0; i < size; i++) {
String locale = locales.get(i).toString();
Intrinsics.checkNotNullExpressionValue(locale, "locales[it].toString()");
arrayList.add(locale);
}
return arrayList;
}
private final boolean getAirplaneMode() {
try {
return Settings.Global.getInt(this.context.getContentResolver(), "airplane_mode_on", 0) != 0;
} catch (Throwable th) {
DeviceLog.error("Problems fetching airplane mode status", th.getMessage());
return false;
}
}
public final int getChargingType() {
Intent registerReceiver = this.context.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
if (registerReceiver != null) {
return registerReceiver.getIntExtra("plugged", -1);
}
return -1;
}
public final boolean getStayOnWhilePluggedIn() {
try {
return Settings.Global.getInt(this.context.getContentResolver(), "stay_on_while_plugged_in", 0) != 0;
} catch (Throwable th) {
DeviceLog.error("Problems fetching stay on while plugged in status", th.getMessage());
return false;
}
}
public final boolean getIsSdCardPresent() {
return Intrinsics.areEqual(Environment.getExternalStorageState(), "mounted");
}
public final NetworkCapabilityTransportsOuterClass.NetworkCapabilityTransports getNetworkCapabilityTransports() {
Network activeNetwork;
NetworkCapabilityTransportsOuterClass.NetworkCapabilityTransports.Builder result = NetworkCapabilityTransportsOuterClass.NetworkCapabilityTransports.newBuilder();
if (Build.VERSION.SDK_INT < 31) {
NetworkCapabilityTransportsOuterClass.NetworkCapabilityTransports build = result.build();
Intrinsics.checkNotNullExpressionValue(build, "result.build()");
return build;
}
Object systemService = this.context.getSystemService("connectivity");
ConnectivityManager connectivityManager = systemService instanceof ConnectivityManager ? (ConnectivityManager) systemService : null;
if (connectivityManager == null || (activeNetwork = connectivityManager.getActiveNetwork()) == null) {
NetworkCapabilityTransportsOuterClass.NetworkCapabilityTransports build2 = result.build();
Intrinsics.checkNotNullExpressionValue(build2, "result.build()");
return build2;
}
NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(activeNetwork);
if (networkCapabilities == null) {
NetworkCapabilityTransportsOuterClass.NetworkCapabilityTransports build3 = result.build();
Intrinsics.checkNotNullExpressionValue(build3, "result.build()");
return build3;
}
boolean hasTransport = networkCapabilities.hasTransport(1);
Intrinsics.checkNotNullExpressionValue(result, "result");
result.setWifi(hasTransport);
result.setCellular(networkCapabilities.hasTransport(0));
result.setVpn(networkCapabilities.hasTransport(4));
result.setEthernet(networkCapabilities.hasTransport(3));
result.setWifiAware(networkCapabilities.hasTransport(5));
result.setLowpan(networkCapabilities.hasTransport(6));
result.setBluetooth(networkCapabilities.hasTransport(2));
NetworkCapabilityTransportsOuterClass.NetworkCapabilityTransports build4 = result.build();
Intrinsics.checkNotNullExpressionValue(build4, "result.build()");
return build4;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,26 @@
package com.unity3d.ads.core.data.datasource;
import com.ironsource.un;
/* loaded from: classes4.dex */
public enum AndroidKnownStore {
GOOGLE("com.android.vending"),
GOOGLE_MARKET(un.a),
AMAZON("com.amazon.venezia"),
SAMSUNG("com.sec.android.app.samsungapps"),
XIAOMI("com.xiaomi.market"),
HUAWEI("com.huawei.appmarket"),
OPPO("com.oppo.market"),
VIVO("com.bbk.appstore"),
UNKNOWN("unknown");
private final String packageName;
public final String getPackageName() {
return this.packageName;
}
AndroidKnownStore(String str) {
this.packageName = str;
}
}

View File

@@ -0,0 +1,31 @@
package com.unity3d.ads.core.data.datasource;
import com.unity3d.ads.core.domain.privacy.FlattenerRulesUseCase;
import com.unity3d.services.core.misc.JsonFlattener;
import com.unity3d.services.core.misc.JsonStorage;
import csdk.gluads.Consts;
import kotlin.jvm.internal.Intrinsics;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public final class AndroidLegacyUserConsentDataSource implements LegacyUserConsentDataSource {
private final FlattenerRulesUseCase flattenerRulesUseCase;
private final JsonStorage privateStorage;
public AndroidLegacyUserConsentDataSource(FlattenerRulesUseCase flattenerRulesUseCase, JsonStorage privateStorage) {
Intrinsics.checkNotNullParameter(flattenerRulesUseCase, "flattenerRulesUseCase");
Intrinsics.checkNotNullParameter(privateStorage, "privateStorage");
this.flattenerRulesUseCase = flattenerRulesUseCase;
this.privateStorage = privateStorage;
}
@Override // com.unity3d.ads.core.data.datasource.LegacyUserConsentDataSource
public String getPrivacyData() {
JSONObject flattenJson;
JSONObject data = this.privateStorage.getData();
if (data == null || (flattenJson = new JsonFlattener(data).flattenJson(Consts.STRING_PERIOD, this.flattenerRulesUseCase.invoke())) == null) {
return null;
}
return flattenJson.toString();
}
}

View File

@@ -0,0 +1,45 @@
package com.unity3d.ads.core.data.datasource;
import androidx.lifecycle.ProcessLifecycleOwner;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.AndroidLifecycleDataSource$registerAppLifecycle$1", f = "AndroidLifecycleDataSource.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidLifecycleDataSource$registerAppLifecycle$1 extends SuspendLambda implements Function2 {
int label;
final /* synthetic */ AndroidLifecycleDataSource this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidLifecycleDataSource$registerAppLifecycle$1(AndroidLifecycleDataSource androidLifecycleDataSource, Continuation continuation) {
super(2, continuation);
this.this$0 = androidLifecycleDataSource;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidLifecycleDataSource$registerAppLifecycle$1(this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidLifecycleDataSource$registerAppLifecycle$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
ProcessLifecycleOwner.Companion.get().getLifecycle().addObserver(this.this$0);
return Unit.INSTANCE;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,60 @@
package com.unity3d.ads.core.data.datasource;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleEventObserver;
import androidx.lifecycle.LifecycleOwner;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.StateFlowKt;
/* loaded from: classes4.dex */
public final class AndroidLifecycleDataSource implements LifecycleDataSource, LifecycleEventObserver {
private final MutableStateFlow appActive = StateFlowKt.MutableStateFlow(Boolean.TRUE);
public /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[Lifecycle.Event.values().length];
try {
iArr[Lifecycle.Event.ON_STOP.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[Lifecycle.Event.ON_START.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
$EnumSwitchMapping$0 = iArr;
}
}
public AndroidLifecycleDataSource() {
registerAppLifecycle();
}
private final void registerAppLifecycle() {
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.MainScope(), null, null, new AndroidLifecycleDataSource$registerAppLifecycle$1(this, null), 3, null);
}
@Override // com.unity3d.ads.core.data.datasource.LifecycleDataSource
public boolean appIsForeground() {
return ((Boolean) this.appActive.getValue()).booleanValue();
}
@Override // androidx.lifecycle.LifecycleEventObserver
public void onStateChanged(LifecycleOwner source, Lifecycle.Event event) {
Intrinsics.checkNotNullParameter(source, "source");
Intrinsics.checkNotNullParameter(event, "event");
MutableStateFlow mutableStateFlow = this.appActive;
int i = WhenMappings.$EnumSwitchMapping$0[event.ordinal()];
boolean z = true;
if (i == 1) {
z = false;
} else if (i != 2) {
z = ((Boolean) this.appActive.getValue()).booleanValue();
}
mutableStateFlow.setValue(Boolean.valueOf(z));
}
}

View File

@@ -0,0 +1,21 @@
package com.unity3d.ads.core.data.datasource;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ts.PsExtractor;
import com.unity3d.ads.core.data.model.CacheError;
import com.unity3d.ads.core.data.model.CacheResult;
import com.unity3d.ads.core.data.model.CacheSource;
import com.unity3d.ads.core.data.model.CachedFile;
import java.io.File;
import kotlin.coroutines.Continuation;
/* loaded from: classes4.dex */
public final class AndroidLocalCacheDataSource implements CacheDataSource {
@Override // com.unity3d.ads.core.data.datasource.CacheDataSource
public Object getFile(File file, String str, String str2, Integer num, Continuation continuation) {
File file2 = new File(file, str);
if (file2.exists()) {
return new CacheResult.Success(new CachedFile("", str2 == null ? "" : str2, str, file2, null, 0L, null, 0, PsExtractor.VIDEO_STREAM_MASK, null), CacheSource.LOCAL);
}
return new CacheResult.Failure(CacheError.FILE_NOT_FOUND, CacheSource.LOCAL);
}
}

View File

@@ -0,0 +1,41 @@
package com.unity3d.ads.core.data.datasource;
import com.unity3d.services.core.misc.JsonStorage;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AndroidMediationDataSource implements MediationDataSource {
public static final Companion Companion = new Companion(null);
private static final String MEDIATION_NAME = "name";
public static final String MEDIATION_NAME_KEY = "mediation.name.value";
private static final String MEDIATION_STORAGE_NAME = "mediation";
private static final String MEDIATION_VALUE = "value";
private static final String MEDIATION_VERSION = "version";
public static final String MEDIATION_VERSION_KEY = "mediation.version.value";
private final JsonStorage publicStorage;
public AndroidMediationDataSource(JsonStorage publicStorage) {
Intrinsics.checkNotNullParameter(publicStorage, "publicStorage");
this.publicStorage = publicStorage;
}
@Override // com.unity3d.ads.core.data.datasource.MediationDataSource
public String getName() {
return (String) this.publicStorage.get(MEDIATION_NAME_KEY);
}
@Override // com.unity3d.ads.core.data.datasource.MediationDataSource
public String getVersion() {
return (String) this.publicStorage.get(MEDIATION_VERSION_KEY);
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,66 @@
package com.unity3d.ads.core.data.datasource;
import android.content.Context;
import com.unity3d.ads.core.extensions.ProtobufExtensionsKt;
import com.unity3d.services.core.device.AdvertisingId;
import com.unity3d.services.core.device.OpenAdvertisingId;
import gatewayprotocol.v1.AllowedPiiOuterClass;
import gatewayprotocol.v1.PiiKt;
import gatewayprotocol.v1.PiiOuterClass;
import java.util.UUID;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.StateFlowKt;
@SourceDebugExtension({"SMAP\nAndroidPrivacyDeviceInfoDataSource.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidPrivacyDeviceInfoDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidPrivacyDeviceInfoDataSource\n+ 2 PiiKt.kt\ngatewayprotocol/v1/PiiKtKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,45:1\n8#2:46\n1#3:47\n*S KotlinDebug\n*F\n+ 1 AndroidPrivacyDeviceInfoDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidPrivacyDeviceInfoDataSource\n*L\n28#1:46\n28#1:47\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidPrivacyDeviceInfoDataSource implements PrivacyDeviceInfoDataSource {
private final Context context;
private final MutableStateFlow idfaInitialized;
public AndroidPrivacyDeviceInfoDataSource(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
this.context = context;
this.idfaInitialized = StateFlowKt.MutableStateFlow(Boolean.FALSE);
}
@Override // com.unity3d.ads.core.data.datasource.PrivacyDeviceInfoDataSource
public PiiOuterClass.Pii fetch(AllowedPiiOuterClass.AllowedPii allowed) {
Intrinsics.checkNotNullParameter(allowed, "allowed");
if (!((Boolean) this.idfaInitialized.getValue()).booleanValue()) {
this.idfaInitialized.setValue(Boolean.TRUE);
AdvertisingId.init(this.context);
OpenAdvertisingId.init(this.context);
}
PiiKt.Dsl.Companion companion = PiiKt.Dsl.Companion;
PiiOuterClass.Pii.Builder newBuilder = PiiOuterClass.Pii.newBuilder();
Intrinsics.checkNotNullExpressionValue(newBuilder, "newBuilder()");
PiiKt.Dsl _create = companion._create(newBuilder);
if (allowed.getIdfa()) {
String advertisingTrackingId = getAdvertisingTrackingId();
if (advertisingTrackingId.length() > 0) {
UUID fromString = UUID.fromString(advertisingTrackingId);
Intrinsics.checkNotNullExpressionValue(fromString, "fromString(adId)");
_create.setAdvertisingId(ProtobufExtensionsKt.toByteString(fromString));
}
String openAdvertisingTrackingId = getOpenAdvertisingTrackingId();
if (openAdvertisingTrackingId.length() > 0) {
UUID fromString2 = UUID.fromString(openAdvertisingTrackingId);
Intrinsics.checkNotNullExpressionValue(fromString2, "fromString(openAdId)");
_create.setOpenAdvertisingTrackingId(ProtobufExtensionsKt.toByteString(fromString2));
}
}
return _create._build();
}
private final String getAdvertisingTrackingId() {
String advertisingTrackingId = AdvertisingId.getAdvertisingTrackingId();
return advertisingTrackingId == null ? "" : advertisingTrackingId;
}
private final String getOpenAdvertisingTrackingId() {
String openAdvertisingTrackingId = OpenAdvertisingId.getOpenAdvertisingTrackingId();
return openAdvertisingTrackingId == null ? "" : openAdvertisingTrackingId;
}
}

View File

@@ -0,0 +1,30 @@
package com.unity3d.ads.core.data.datasource;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.AndroidRemoteCacheDataSource", f = "AndroidRemoteCacheDataSource.kt", l = {26}, m = "getFile")
/* loaded from: classes4.dex */
public final class AndroidRemoteCacheDataSource$getFile$1 extends ContinuationImpl {
Object L$0;
Object L$1;
Object L$2;
Object L$3;
int label;
/* synthetic */ Object result;
final /* synthetic */ AndroidRemoteCacheDataSource this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidRemoteCacheDataSource$getFile$1(AndroidRemoteCacheDataSource androidRemoteCacheDataSource, Continuation continuation) {
super(continuation);
this.this$0 = androidRemoteCacheDataSource;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.getFile(null, null, null, null, this);
}
}

View File

@@ -0,0 +1,154 @@
package com.unity3d.ads.core.data.datasource;
import com.unity3d.services.core.network.core.HttpClient;
import com.unity3d.services.core.network.model.HttpRequest;
import java.io.File;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AndroidRemoteCacheDataSource implements CacheDataSource {
private final HttpClient httpClient;
public AndroidRemoteCacheDataSource(HttpClient httpClient) {
Intrinsics.checkNotNullParameter(httpClient, "httpClient");
this.httpClient = httpClient;
}
/* JADX WARN: Removed duplicated region for block: B:12:0x0094 */
/* JADX WARN: Removed duplicated region for block: B:16:0x00a8 */
/* JADX WARN: Removed duplicated region for block: B:19:0x00b0 */
/* JADX WARN: Removed duplicated region for block: B:21:0x009a */
/* JADX WARN: Removed duplicated region for block: B:24:0x004c */
/* JADX WARN: Removed duplicated region for block: B:8:0x002b */
@Override // com.unity3d.ads.core.data.datasource.CacheDataSource
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object getFile(java.io.File r17, java.lang.String r18, java.lang.String r19, java.lang.Integer r20, kotlin.coroutines.Continuation r21) {
/*
r16 = this;
r0 = r16
r1 = r19
r2 = r20
r3 = r21
boolean r4 = r3 instanceof com.unity3d.ads.core.data.datasource.AndroidRemoteCacheDataSource$getFile$1
if (r4 == 0) goto L1b
r4 = r3
com.unity3d.ads.core.data.datasource.AndroidRemoteCacheDataSource$getFile$1 r4 = (com.unity3d.ads.core.data.datasource.AndroidRemoteCacheDataSource$getFile$1) r4
int r5 = r4.label
r6 = -2147483648(0xffffffff80000000, float:-0.0)
r7 = r5 & r6
if (r7 == 0) goto L1b
int r5 = r5 - r6
r4.label = r5
goto L20
L1b:
com.unity3d.ads.core.data.datasource.AndroidRemoteCacheDataSource$getFile$1 r4 = new com.unity3d.ads.core.data.datasource.AndroidRemoteCacheDataSource$getFile$1
r4.<init>(r0, r3)
L20:
java.lang.Object r3 = r4.result
java.lang.Object r5 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r6 = r4.label
r7 = 1
if (r6 == 0) goto L4c
if (r6 != r7) goto L44
java.lang.Object r1 = r4.L$3
java.io.File r1 = (java.io.File) r1
java.lang.Object r2 = r4.L$2
java.lang.Integer r2 = (java.lang.Integer) r2
java.lang.Object r5 = r4.L$1
java.lang.String r5 = (java.lang.String) r5
java.lang.Object r4 = r4.L$0
java.lang.String r4 = (java.lang.String) r4
kotlin.ResultKt.throwOnFailure(r3)
r10 = r1
r9 = r4
r8 = r5
goto L76
L44:
java.lang.IllegalStateException r1 = new java.lang.IllegalStateException
java.lang.String r2 = "call to 'resume' before 'invoke' with coroutine"
r1.<init>(r2)
throw r1
L4c:
kotlin.ResultKt.throwOnFailure(r3)
if (r1 != 0) goto L5b
com.unity3d.ads.core.data.model.CacheResult$Failure r1 = new com.unity3d.ads.core.data.model.CacheResult$Failure
com.unity3d.ads.core.data.model.CacheError r2 = com.unity3d.ads.core.data.model.CacheError.MALFORMED_URL
com.unity3d.ads.core.data.model.CacheSource r3 = com.unity3d.ads.core.data.model.CacheSource.REMOTE
r1.<init>(r2, r3)
return r1
L5b:
java.io.File r3 = r16.setupFile(r17, r18)
r6 = r18
r4.L$0 = r6
r4.L$1 = r1
r4.L$2 = r2
r4.L$3 = r3
r4.label = r7
java.lang.Object r4 = r0.downloadFile(r1, r3, r2, r4)
if (r4 != r5) goto L72
return r5
L72:
r8 = r1
r10 = r3
r3 = r4
r9 = r6
L76:
com.unity3d.services.core.network.model.HttpResponse r3 = (com.unity3d.services.core.network.model.HttpResponse) r3
java.lang.String r1 = "?"
r4 = 0
r5 = 2
java.lang.String r1 = kotlin.text.StringsKt.substringBefore$default(r8, r1, r4, r5, r4)
java.lang.String r6 = "."
java.lang.String r11 = kotlin.text.StringsKt.substringAfterLast$default(r1, r6, r4, r5, r4)
com.unity3d.ads.core.data.model.CachedFile r1 = new com.unity3d.ads.core.data.model.CachedFile
java.lang.String r7 = ""
long r12 = r3.getContentSize()
java.lang.String r14 = r3.getProtocol()
if (r2 == 0) goto L9a
int r2 = r2.intValue()
L98:
r15 = r2
goto L9e
L9a:
r2 = 2147483647(0x7fffffff, float:NaN)
goto L98
L9e:
r6 = r1
r6.<init>(r7, r8, r9, r10, r11, r12, r14, r15)
boolean r2 = com.unity3d.services.core.network.model.HttpResponseKt.isSuccessful(r3)
if (r2 == 0) goto Lb0
com.unity3d.ads.core.data.model.CacheResult$Success r2 = new com.unity3d.ads.core.data.model.CacheResult$Success
com.unity3d.ads.core.data.model.CacheSource r3 = com.unity3d.ads.core.data.model.CacheSource.REMOTE
r2.<init>(r1, r3)
goto Lb9
Lb0:
com.unity3d.ads.core.data.model.CacheResult$Failure r2 = new com.unity3d.ads.core.data.model.CacheResult$Failure
com.unity3d.ads.core.data.model.CacheError r1 = com.unity3d.ads.core.data.model.CacheError.NETWORK_ERROR
com.unity3d.ads.core.data.model.CacheSource r3 = com.unity3d.ads.core.data.model.CacheSource.REMOTE
r2.<init>(r1, r3)
Lb9:
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.core.data.datasource.AndroidRemoteCacheDataSource.getFile(java.io.File, java.lang.String, java.lang.String, java.lang.Integer, kotlin.coroutines.Continuation):java.lang.Object");
}
/* JADX INFO: Access modifiers changed from: private */
public final Object downloadFile(String str, File file, Integer num, Continuation continuation) {
return this.httpClient.execute(new HttpRequest(str, null, null, null, null, null, null, null, null, 0, 0, 0, 0, false, null, file, num != null ? num.intValue() : Integer.MAX_VALUE, 32766, null), continuation);
}
private final File setupFile(File file, String str) {
File file2 = new File(file, str);
if (!file2.exists()) {
file2.createNewFile();
} else {
file2.delete();
file2.createNewFile();
}
return file2;
}
}

View File

@@ -0,0 +1,5 @@
package com.unity3d.ads.core.data.datasource;
/* loaded from: classes4.dex */
public abstract /* synthetic */ class AndroidStaticDeviceInfoDataSource$$ExternalSyntheticApiModelOutline0 {
}

View File

@@ -0,0 +1,28 @@
package com.unity3d.ads.core.data.datasource;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource", f = "AndroidStaticDeviceInfoDataSource.kt", l = {97}, m = "fetch")
/* loaded from: classes4.dex */
public final class AndroidStaticDeviceInfoDataSource$fetch$1 extends ContinuationImpl {
Object L$0;
Object L$1;
int label;
/* synthetic */ Object result;
final /* synthetic */ AndroidStaticDeviceInfoDataSource this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidStaticDeviceInfoDataSource$fetch$1(AndroidStaticDeviceInfoDataSource androidStaticDeviceInfoDataSource, Continuation continuation) {
super(continuation);
this.this$0 = androidStaticDeviceInfoDataSource;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.fetch(null, this);
}
}

View File

@@ -0,0 +1,28 @@
package com.unity3d.ads.core.data.datasource;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource", f = "AndroidStaticDeviceInfoDataSource.kt", l = {492}, m = "getGPUModel")
/* loaded from: classes4.dex */
public final class AndroidStaticDeviceInfoDataSource$getGPUModel$1 extends ContinuationImpl {
int label;
/* synthetic */ Object result;
final /* synthetic */ AndroidStaticDeviceInfoDataSource this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidStaticDeviceInfoDataSource$getGPUModel$1(AndroidStaticDeviceInfoDataSource androidStaticDeviceInfoDataSource, Continuation continuation) {
super(continuation);
this.this$0 = androidStaticDeviceInfoDataSource;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object gPUModel;
this.result = obj;
this.label |= Integer.MIN_VALUE;
gPUModel = this.this$0.getGPUModel(this);
return gPUModel;
}
}

View File

@@ -0,0 +1,958 @@
package com.unity3d.ads.core.data.datasource;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.content.res.Resources;
import android.hardware.Sensor;
import android.hardware.SensorManager;
import android.media.MediaCodecInfo;
import android.media.MediaCodecList;
import android.os.Build;
import android.os.SystemClock;
import android.os.ext.SdkExtensions;
import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import android.webkit.WebSettings;
import com.facebook.internal.security.CertificateUtil;
import com.unity3d.ads.core.data.model.StorageType;
import com.unity3d.services.UnityAdsConstants;
import com.unity3d.services.core.device.AdvertisingId;
import com.unity3d.services.core.device.Device;
import com.unity3d.services.core.device.OpenAdvertisingId;
import com.unity3d.services.core.log.DeviceLog;
import com.unity3d.services.core.misc.Utilities;
import com.unity3d.services.core.preferences.AndroidPreferences;
import com.unity3d.services.core.properties.ClientProperties;
import com.unity3d.services.core.properties.SdkProperties;
import gatewayprotocol.v1.StaticDeviceInfoKt;
import gatewayprotocol.v1.StaticDeviceInfoOuterClass;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.RandomAccessFile;
import java.security.MessageDigest;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.ListIterator;
import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.security.auth.x500.X500Principal;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.coroutines.Continuation;
import kotlin.io.CloseableKt;
import kotlin.io.FilesKt__FileReadWriteKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.math.MathKt__MathJVMKt;
import kotlin.text.Regex;
import kotlin.text.StringsKt__StringsJVMKt;
@SourceDebugExtension({"SMAP\nAndroidStaticDeviceInfoDataSource.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidStaticDeviceInfoDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidStaticDeviceInfoDataSource\n+ 2 StaticDeviceInfoKt.kt\ngatewayprotocol/v1/StaticDeviceInfoKtKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 4 StaticDeviceInfoKt.kt\ngatewayprotocol/v1/StaticDeviceInfoKt$Dsl\n+ 5 StaticDeviceInfoKt.kt\ngatewayprotocol/v1/StaticDeviceInfoKt\n+ 6 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 7 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n*L\n1#1,857:1\n8#2:858\n1294#2:862\n1#3:859\n1#3:863\n1#3:867\n1#3:868\n364#4,2:860\n364#4,2:864\n560#5:866\n731#6,9:869\n37#7,2:878\n*S KotlinDebug\n*F\n+ 1 AndroidStaticDeviceInfoDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidStaticDeviceInfoDataSource\n*L\n69#1:858\n99#1:862\n69#1:859\n99#1:863\n114#1:867\n82#1:860,2\n102#1:864,2\n114#1:866\n306#1:869,9\n307#1:878,2\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidStaticDeviceInfoDataSource implements StaticDeviceInfoDataSource {
public static final String ALGORITHM_SHA1 = "SHA-1";
public static final String APP_VERSION_FAKE = "FakeVersionName";
public static final String BINARY_SU = "su";
public static final String CERTIFICATE_TYPE_X509 = "X.509";
public static final Companion Companion = new Companion(null);
public static final String ENVIRONMENT_VARIABLE_PATH = "PATH";
public static final String PLATFORM_ANDROID = "android";
public static final String STORE_GOOGLE = "google";
private final X500Principal DEBUG_CERT;
private final AnalyticsDataSource analyticsDataSource;
private final Context context;
private final ByteStringDataSource glInfoStore;
private StaticDeviceInfoOuterClass.StaticDeviceInfo staticDeviceInfo;
private final StoreDataSource storeDataSource;
public /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
public static final /* synthetic */ int[] $EnumSwitchMapping$1;
static {
int[] iArr = new int[Device.MemoryInfoType.values().length];
try {
iArr[Device.MemoryInfoType.TOTAL_MEMORY.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[Device.MemoryInfoType.FREE_MEMORY.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
$EnumSwitchMapping$0 = iArr;
int[] iArr2 = new int[StorageType.values().length];
try {
iArr2[StorageType.INTERNAL.ordinal()] = 1;
} catch (NoSuchFieldError unused3) {
}
try {
iArr2[StorageType.EXTERNAL.ordinal()] = 2;
} catch (NoSuchFieldError unused4) {
}
$EnumSwitchMapping$1 = iArr2;
}
}
private final int getApiLevel() {
return Build.VERSION.SDK_INT;
}
private final String getPlatform() {
return "android";
}
private final int getVersionCode() {
return 41203;
}
private final String getVersionName() {
return "4.12.3";
}
@Override // com.unity3d.ads.core.data.datasource.StaticDeviceInfoDataSource
public StaticDeviceInfoOuterClass.StaticDeviceInfo fetchCached() {
return this.staticDeviceInfo;
}
public final Context getContext() {
return this.context;
}
public AndroidStaticDeviceInfoDataSource(Context context, ByteStringDataSource glInfoStore, AnalyticsDataSource analyticsDataSource, StoreDataSource storeDataSource) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(glInfoStore, "glInfoStore");
Intrinsics.checkNotNullParameter(analyticsDataSource, "analyticsDataSource");
Intrinsics.checkNotNullParameter(storeDataSource, "storeDataSource");
this.context = context;
this.glInfoStore = glInfoStore;
this.analyticsDataSource = analyticsDataSource;
this.storeDataSource = storeDataSource;
this.DEBUG_CERT = new X500Principal("CN=Android Debug,O=Android,C=US");
StaticDeviceInfoKt.Dsl.Companion companion = StaticDeviceInfoKt.Dsl.Companion;
StaticDeviceInfoOuterClass.StaticDeviceInfo.Builder newBuilder = StaticDeviceInfoOuterClass.StaticDeviceInfo.newBuilder();
Intrinsics.checkNotNullExpressionValue(newBuilder, "newBuilder()");
StaticDeviceInfoKt.Dsl _create = companion._create(newBuilder);
_create.setBundleId(getAppName());
_create.setBundleVersion(getAppVersion());
_create.setAppDebuggable(isAppDebuggable());
_create.setRooted(isRooted());
_create.setOsVersion(getOsVersion());
_create.setDeviceMake(getManufacturer());
_create.setDeviceModel(getModel());
_create.setWebviewUa(getWebViewUserAgent());
_create.setScreenDensity(getScreenDensity());
_create.setScreenWidth(getScreenWidth());
_create.setScreenHeight(getScreenHeight());
_create.setScreenSize(getScreenLayout());
_create.addAllStores(_create.getStores(), getStores$default(this, null, 1, null));
_create.setTotalDiskSpace(getTotalSpace(getFileForStorageType(StorageType.EXTERNAL)));
_create.setTotalRamMemory(getTotalMemory());
_create.setCpuModel(getCPUModel());
_create.setCpuCount(getCPUCount());
_create.setAndroid(fetchAndroidStaticDeviceInfo());
this.staticDeviceInfo = _create._build();
}
/* JADX WARN: Removed duplicated region for block: B:21:0x0039 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@Override // com.unity3d.ads.core.data.datasource.StaticDeviceInfoDataSource
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object fetch(java.util.List<java.lang.String> r5, kotlin.coroutines.Continuation r6) {
/*
r4 = this;
boolean r0 = r6 instanceof com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource$fetch$1
if (r0 == 0) goto L13
r0 = r6
com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource$fetch$1 r0 = (com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource$fetch$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource$fetch$1 r0 = new com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource$fetch$1
r0.<init>(r4, r6)
L18:
java.lang.Object r6 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L39
if (r2 != r3) goto L31
java.lang.Object r5 = r0.L$1
java.util.List r5 = (java.util.List) r5
java.lang.Object r0 = r0.L$0
com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource r0 = (com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource) r0
kotlin.ResultKt.throwOnFailure(r6)
goto L5c
L31:
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
r5.<init>(r6)
throw r5
L39:
kotlin.ResultKt.throwOnFailure(r6)
gatewayprotocol.v1.StaticDeviceInfoOuterClass$StaticDeviceInfo r6 = r4.staticDeviceInfo
java.lang.String r6 = r6.getGpuModel()
if (r6 == 0) goto L4e
int r6 = r6.length()
if (r6 != 0) goto L4b
goto L4e
L4b:
gatewayprotocol.v1.StaticDeviceInfoOuterClass$StaticDeviceInfo r5 = r4.staticDeviceInfo
return r5
L4e:
r0.L$0 = r4
r0.L$1 = r5
r0.label = r3
java.lang.Object r6 = r4.getGPUModel(r0)
if (r6 != r1) goto L5b
return r1
L5b:
r0 = r4
L5c:
java.lang.String r6 = (java.lang.String) r6
if (r6 == 0) goto L98
int r1 = r6.length()
if (r1 != 0) goto L67
goto L98
L67:
gatewayprotocol.v1.StaticDeviceInfoOuterClass$StaticDeviceInfo r1 = r0.staticDeviceInfo
gatewayprotocol.v1.StaticDeviceInfoKt$Dsl$Companion r2 = gatewayprotocol.v1.StaticDeviceInfoKt.Dsl.Companion
com.google.protobuf.GeneratedMessageLite$Builder r1 = r1.toBuilder()
java.lang.String r3 = "this.toBuilder()"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r1, r3)
gatewayprotocol.v1.StaticDeviceInfoOuterClass$StaticDeviceInfo$Builder r1 = (gatewayprotocol.v1.StaticDeviceInfoOuterClass.StaticDeviceInfo.Builder) r1
gatewayprotocol.v1.StaticDeviceInfoKt$Dsl r1 = r2._create(r1)
r1.setGpuModel(r6)
com.google.protobuf.kotlin.DslList r6 = r1.getStores()
r1.clearStores(r6)
com.google.protobuf.kotlin.DslList r6 = r1.getStores()
java.util.List r5 = r0.getStores(r5)
java.lang.Iterable r5 = (java.lang.Iterable) r5
r1.addAllStores(r6, r5)
gatewayprotocol.v1.StaticDeviceInfoOuterClass$StaticDeviceInfo r5 = r1._build()
r0.staticDeviceInfo = r5
return r5
L98:
gatewayprotocol.v1.StaticDeviceInfoOuterClass$StaticDeviceInfo r5 = r0.staticDeviceInfo
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource.fetch(java.util.List, kotlin.coroutines.Continuation):java.lang.Object");
}
private final StaticDeviceInfoOuterClass.StaticDeviceInfo.Android fetchAndroidStaticDeviceInfo() {
StaticDeviceInfoKt staticDeviceInfoKt = StaticDeviceInfoKt.INSTANCE;
StaticDeviceInfoKt.AndroidKt.Dsl.Companion companion = StaticDeviceInfoKt.AndroidKt.Dsl.Companion;
StaticDeviceInfoOuterClass.StaticDeviceInfo.Android.Builder newBuilder = StaticDeviceInfoOuterClass.StaticDeviceInfo.Android.newBuilder();
Intrinsics.checkNotNullExpressionValue(newBuilder, "newBuilder()");
StaticDeviceInfoKt.AndroidKt.Dsl _create = companion._create(newBuilder);
_create.setApiLevel(getApiLevel());
_create.setVersionCode(getVersionCode());
_create.setAndroidFingerprint(getFingerprint());
_create.setAppInstaller(getInstallerPackageName());
_create.setApkDeveloperSigningCertificateHash(getCertificateFingerprint());
_create.setBuildBoard(getBoard());
_create.setBuildBrand(getBrand());
_create.setBuildDevice(getDevice());
_create.setBuildDisplay(getDisplay());
_create.setBuildFingerprint(getFingerprint());
_create.setBuildHardware(getHardware());
_create.setBuildHost(getHost());
_create.setBuildBootloader(getBootloader());
_create.setBuildProduct(getProduct());
_create.setExtensionVersion(getExtensionVersion());
String buildId = getBuildId();
if (buildId != null) {
_create.setBuildId(buildId);
}
_create.setPhoneType(getPhoneType());
_create.setSimOperator(getSimOperator());
return _create._build();
}
@Override // com.unity3d.ads.core.data.datasource.StaticDeviceInfoDataSource
public String getOsVersion() {
String str = Build.VERSION.RELEASE;
return str == null ? "" : str;
}
@Override // com.unity3d.ads.core.data.datasource.StaticDeviceInfoDataSource
public String getManufacturer() {
String str = Build.MANUFACTURER;
return str == null ? "" : str;
}
@Override // com.unity3d.ads.core.data.datasource.StaticDeviceInfoDataSource
public String getModel() {
String str = Build.MODEL;
return str == null ? "" : str;
}
private final int getScreenLayout() {
return this.context.getResources().getConfiguration().screenLayout;
}
public final String getAdvertisingTrackingId() {
String advertisingTrackingId = AdvertisingId.getAdvertisingTrackingId();
return advertisingTrackingId == null ? "" : advertisingTrackingId;
}
private final String getOpenAdvertisingTrackingId() {
String openAdvertisingTrackingId = OpenAdvertisingId.getOpenAdvertisingTrackingId();
return openAdvertisingTrackingId == null ? "" : openAdvertisingTrackingId;
}
public final boolean isLimitOpenAdTrackingEnabled() {
return OpenAdvertisingId.getLimitedOpenAdTracking();
}
@Override // com.unity3d.ads.core.data.datasource.StaticDeviceInfoDataSource
public Object getIdfi(Continuation continuation) {
String string = AndroidPreferences.getString(UnityAdsConstants.Preferences.PREF_NAME_IDFI, UnityAdsConstants.Preferences.PREF_KEY_IDFI);
if (string == null) {
string = null;
}
if (string != null) {
return string;
}
String uuid = UUID.randomUUID().toString();
AndroidPreferences.setString(UnityAdsConstants.Preferences.PREF_NAME_IDFI, UnityAdsConstants.Preferences.PREF_KEY_IDFI, uuid);
return uuid;
}
@Override // com.unity3d.ads.core.data.datasource.StaticDeviceInfoDataSource
public String getAnalyticsUserId() {
return this.analyticsDataSource.getUserId();
}
@Override // com.unity3d.ads.core.data.datasource.StaticDeviceInfoDataSource
public long getSystemBootTime() {
return (System.currentTimeMillis() - SystemClock.elapsedRealtime()) / 1000;
}
@Override // com.unity3d.ads.core.data.datasource.StaticDeviceInfoDataSource
public Object getAuid(Continuation continuation) {
String string = AndroidPreferences.getString(UnityAdsConstants.Preferences.PREF_NAME_AUID, "auid");
if (string == null) {
return null;
}
return string;
}
private final float getDisplayMetricDensity() {
DisplayMetrics displayMetrics;
Resources resources = this.context.getResources();
if (resources == null || (displayMetrics = resources.getDisplayMetrics()) == null) {
return 0.0f;
}
return displayMetrics.density;
}
private final int getScreenDensity() {
DisplayMetrics displayMetrics;
Resources resources = this.context.getResources();
if (resources == null || (displayMetrics = resources.getDisplayMetrics()) == null) {
return -1;
}
return displayMetrics.densityDpi;
}
private final int getScreenWidth() {
DisplayMetrics displayMetrics;
Resources resources = this.context.getResources();
if (resources == null || (displayMetrics = resources.getDisplayMetrics()) == null) {
return -1;
}
return displayMetrics.widthPixels;
}
private final int getScreenHeight() {
DisplayMetrics displayMetrics;
Resources resources = this.context.getResources();
if (resources == null || (displayMetrics = resources.getDisplayMetrics()) == null) {
return -1;
}
return displayMetrics.heightPixels;
}
private final boolean isRooted() {
try {
return searchPathForBinary("su");
} catch (Exception e) {
DeviceLog.exception("Rooted check failed", e);
return false;
}
}
private final boolean searchPathForBinary(String str) {
List split;
List emptyList;
String[] strArr;
File[] listFiles;
String str2 = System.getenv(ENVIRONMENT_VARIABLE_PATH);
if (str2 != null && (split = new Regex(CertificateUtil.DELIMITER).split(str2, 0)) != null) {
if (!split.isEmpty()) {
ListIterator listIterator = split.listIterator(split.size());
while (listIterator.hasPrevious()) {
if (((String) listIterator.previous()).length() != 0) {
emptyList = CollectionsKt___CollectionsKt.take(split, listIterator.nextIndex() + 1);
break;
}
}
}
emptyList = CollectionsKt__CollectionsKt.emptyList();
if (emptyList != null && (strArr = (String[]) emptyList.toArray(new String[0])) != null) {
for (String str3 : strArr) {
File file = new File(str3);
if (file.exists() && file.isDirectory() && (listFiles = file.listFiles()) != null) {
for (File file2 : listFiles) {
if (Intrinsics.areEqual(file2.getName(), str)) {
return true;
}
}
}
}
}
}
return false;
}
@SuppressLint({"PackageManagerGetSignatures"})
private final String getCertificateFingerprint() {
try {
Signature[] signatureArr = this.context.getPackageManager().getPackageInfo(this.context.getPackageName(), 64).signatures;
if (signatureArr == null) {
return "";
}
if (!(!(signatureArr.length == 0))) {
return "";
}
Certificate generateCertificate = CertificateFactory.getInstance(CERTIFICATE_TYPE_X509).generateCertificate(new ByteArrayInputStream(signatureArr[0].toByteArray()));
Intrinsics.checkNotNull(generateCertificate, "null cannot be cast to non-null type java.security.cert.X509Certificate");
String hexString = Utilities.toHexString(MessageDigest.getInstance(ALGORITHM_SHA1).digest(((X509Certificate) generateCertificate).getEncoded()));
Intrinsics.checkNotNullExpressionValue(hexString, "toHexString(publicKey)");
return hexString;
} catch (Exception e) {
DeviceLog.exception("Exception when signing certificate fingerprint", e);
return "";
}
}
public final String getBoard() {
String str = Build.BOARD;
return str == null ? "" : str;
}
public final String getBootloader() {
String str = Build.BOOTLOADER;
return str == null ? "" : str;
}
public final String getBrand() {
String str = Build.BRAND;
return str == null ? "" : str;
}
public final String getDisplay() {
String str = Build.DISPLAY;
return str == null ? "" : str;
}
public final String getDevice() {
String str = Build.DEVICE;
return str == null ? "" : str;
}
public final String getHardware() {
String str = Build.HARDWARE;
return str == null ? "" : str;
}
public final String getHost() {
String str = Build.HOST;
return str == null ? "" : str;
}
public final String getProduct() {
String str = Build.PRODUCT;
return str == null ? "" : str;
}
private final String getFingerprint() {
String str = Build.FINGERPRINT;
return str == null ? "" : str;
}
private final String getInstallerPackageName() {
String installerPackageName = this.context.getPackageManager().getInstallerPackageName(this.context.getPackageName());
return installerPackageName == null ? "" : installerPackageName;
}
public final List<String> getSupportedAbis() {
if (getApiLevel() < 21) {
return getOldAbiList();
}
return getNewAbiList();
}
public final List<Sensor> getSensorList() {
Object systemService = this.context.getSystemService("sensor");
Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.hardware.SensorManager");
List<Sensor> sensorList = ((SensorManager) systemService).getSensorList(-1);
Intrinsics.checkNotNullExpressionValue(sensorList, "sensorManager.getSensorList(Sensor.TYPE_ALL)");
return sensorList;
}
private final String getCPUModel() {
List readLines$default;
String str;
if (Build.VERSION.SDK_INT >= 31) {
str = Build.SOC_MODEL;
Intrinsics.checkNotNullExpressionValue(str, "{\n Build.SOC_MODEL\n }");
return str;
}
try {
readLines$default = FilesKt__FileReadWriteKt.readLines$default(new File("/proc/cpuinfo"), null, 1, null);
return (String) CollectionsKt___CollectionsKt.last(readLines$default);
} catch (FileNotFoundException e) {
DeviceLog.exception("Error reading CPU model", e);
return "";
}
}
private final long getCPUCount() {
return Runtime.getRuntime().availableProcessors();
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Removed duplicated region for block: B:15:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object getGPUModel(kotlin.coroutines.Continuation r5) {
/*
r4 = this;
boolean r0 = r5 instanceof com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource$getGPUModel$1
if (r0 == 0) goto L13
r0 = r5
com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource$getGPUModel$1 r0 = (com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource$getGPUModel$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource$getGPUModel$1 r0 = new com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource$getGPUModel$1
r0.<init>(r4, r5)
L18:
java.lang.Object r5 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r5)
goto L3f
L29:
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
r5.<init>(r0)
throw r5
L31:
kotlin.ResultKt.throwOnFailure(r5)
com.unity3d.ads.core.data.datasource.ByteStringDataSource r5 = r4.glInfoStore
r0.label = r3
java.lang.Object r5 = r5.get(r0)
if (r5 != r1) goto L3f
return r1
L3f:
com.unity3d.ads.datastore.ByteStringStoreOuterClass$ByteStringStore r5 = (com.unity3d.ads.datastore.ByteStringStoreOuterClass.ByteStringStore) r5
com.google.protobuf.ByteString r5 = r5.getData()
java.nio.charset.Charset r0 = kotlin.text.Charsets.ISO_8859_1
java.lang.String r5 = r5.toString(r0)
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource.getGPUModel(kotlin.coroutines.Continuation):java.lang.Object");
}
public final String getBuildId() {
return Build.ID;
}
public final String getBuildVersionIncremental() {
return Build.VERSION.INCREMENTAL;
}
private final List<String> getOldAbiList() {
ArrayList arrayList = new ArrayList();
String CPU_ABI = Build.CPU_ABI;
Intrinsics.checkNotNullExpressionValue(CPU_ABI, "CPU_ABI");
arrayList.add(CPU_ABI);
String CPU_ABI2 = Build.CPU_ABI2;
Intrinsics.checkNotNullExpressionValue(CPU_ABI2, "CPU_ABI2");
arrayList.add(CPU_ABI2);
return arrayList;
}
@TargetApi(21)
private final ArrayList<String> getNewAbiList() {
List listOf;
ArrayList<String> arrayList = new ArrayList<>();
String[] SUPPORTED_ABIS = Build.SUPPORTED_ABIS;
Intrinsics.checkNotNullExpressionValue(SUPPORTED_ABIS, "SUPPORTED_ABIS");
listOf = CollectionsKt__CollectionsKt.listOf(Arrays.copyOf(SUPPORTED_ABIS, SUPPORTED_ABIS.length));
arrayList.addAll(listOf);
return arrayList;
}
private final String getWebViewUserAgent() {
try {
String defaultUserAgent = WebSettings.getDefaultUserAgent(this.context);
Intrinsics.checkNotNullExpressionValue(defaultUserAgent, "{\n WebSettings.ge…tUserAgent(context)\n }");
return defaultUserAgent;
} catch (Exception e) {
DeviceLog.exception("Exception getting webview user agent", e);
return "";
}
}
private final List<String> getStores(List<String> list) {
return this.storeDataSource.fetchStores(list);
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ List getStores$default(AndroidStaticDeviceInfoDataSource androidStaticDeviceInfoDataSource, List list, int i, Object obj) {
if ((i & 1) != 0) {
list = CollectionsKt__CollectionsKt.emptyList();
}
return androidStaticDeviceInfoDataSource.getStores(list);
}
private final long getAppStartTime() {
return SdkProperties.getInitializationTimeEpoch();
}
private final boolean isTestMode() {
return SdkProperties.isTestMode();
}
private final String getGameId() {
String gameId = ClientProperties.getGameId();
return gameId == null ? "" : gameId;
}
public final long getTotalMemory() {
return getMemoryInfo(Device.MemoryInfoType.TOTAL_MEMORY);
}
private final long getMemoryInfo(Device.MemoryInfoType memoryInfoType) {
String str;
FileNotFoundException e;
int i = WhenMappings.$EnumSwitchMapping$0[memoryInfoType.ordinal()];
int i2 = 1;
if (i != 1) {
i2 = 2;
if (i != 2) {
throw new NoWhenBranchMatchedException();
}
}
try {
RandomAccessFile randomAccessFile = new RandomAccessFile(AndroidDynamicDeviceInfoDataSource.DIRECTORY_MEM_INFO, "r");
str = null;
for (int i3 = 0; i3 < i2; i3++) {
try {
try {
str = randomAccessFile.readLine();
} finally {
}
} catch (FileNotFoundException e2) {
e = e2;
DeviceLog.exception("Error reading memory info", e);
return getMemoryValueFromString(str);
}
}
Unit unit = Unit.INSTANCE;
CloseableKt.closeFinally(randomAccessFile, null);
} catch (FileNotFoundException e3) {
str = null;
e = e3;
}
return getMemoryValueFromString(str);
}
private final long getMemoryValueFromString(String str) {
if (str == null) {
return 0L;
}
Matcher matcher = Pattern.compile("(\\d+)").matcher(str);
String str2 = null;
while (matcher.find()) {
str2 = matcher.group(1);
}
if (str2 != null) {
return Long.parseLong(str2);
}
return -1L;
}
public final long getTotalSpace(File file) {
int roundToInt;
if (file == null || !file.exists()) {
return -1L;
}
roundToInt = MathKt__MathJVMKt.roundToInt(file.getTotalSpace() / 1024);
return roundToInt;
}
private final File getFileForStorageType(StorageType storageType) {
int i = WhenMappings.$EnumSwitchMapping$1[storageType.ordinal()];
if (i == 1) {
return this.context.getCacheDir();
}
if (i == 2) {
return this.context.getExternalCacheDir();
}
DeviceLog.error("Unhandled storagetype: " + storageType);
return null;
}
@Override // com.unity3d.ads.core.data.datasource.StaticDeviceInfoDataSource
public String getAppName() {
String packageName = this.context.getPackageName();
Intrinsics.checkNotNullExpressionValue(packageName, "context.packageName");
return packageName;
}
private final String getAppVersion() {
String packageName = this.context.getPackageName();
PackageManager packageManager = this.context.getPackageManager();
try {
String str = packageManager.getPackageInfo(packageName, 0).versionName == null ? APP_VERSION_FAKE : packageManager.getPackageInfo(packageName, 0).versionName;
Intrinsics.checkNotNullExpressionValue(str, "{\n if (pm.get…e\n }\n }");
return str;
} catch (PackageManager.NameNotFoundException e) {
DeviceLog.exception("Error getting package info", e);
return "";
}
}
private final boolean isAppDebuggable() {
boolean z;
PackageManager packageManager = this.context.getPackageManager();
Intrinsics.checkNotNullExpressionValue(packageManager, "context.packageManager");
String packageName = this.context.getPackageName();
Intrinsics.checkNotNullExpressionValue(packageName, "context.packageName");
boolean z2 = true;
try {
ApplicationInfo applicationInfo = packageManager.getApplicationInfo(packageName, 0);
Intrinsics.checkNotNullExpressionValue(applicationInfo, "pm.getApplicationInfo(pkgName, 0)");
int i = applicationInfo.flags & 2;
applicationInfo.flags = i;
if (i != 0) {
z = true;
z2 = false;
} else {
z2 = false;
z = false;
}
} catch (PackageManager.NameNotFoundException e) {
DeviceLog.exception("Could not find name", e);
z = false;
}
if (z2) {
try {
Signature[] signatures = packageManager.getPackageInfo(packageName, 64).signatures;
Intrinsics.checkNotNullExpressionValue(signatures, "signatures");
for (Signature signature : signatures) {
Certificate generateCertificate = CertificateFactory.getInstance(CERTIFICATE_TYPE_X509).generateCertificate(new ByteArrayInputStream(signature.toByteArray()));
Intrinsics.checkNotNull(generateCertificate, "null cannot be cast to non-null type java.security.cert.X509Certificate");
z = Intrinsics.areEqual(((X509Certificate) generateCertificate).getSubjectX500Principal(), this.DEBUG_CERT);
if (z) {
break;
}
}
} catch (PackageManager.NameNotFoundException e2) {
DeviceLog.exception("Could not find name", e2);
} catch (CertificateException e3) {
DeviceLog.exception("Certificate exception", e3);
}
}
return z;
}
private final int getExtensionVersion() {
int extensionVersion;
if (Build.VERSION.SDK_INT < 30) {
return -1;
}
extensionVersion = SdkExtensions.getExtensionVersion(30);
return extensionVersion;
}
public final boolean hasX264Decoder() {
return !selectAllDecodeCodecs("video/avc").isEmpty();
}
public final boolean hasX265Decoder() {
return !selectAllDecodeCodecs("video/hevc").isEmpty();
}
private final List<MediaCodecInfo> selectAllDecodeCodecs(String str) {
boolean equals;
ArrayList arrayList = new ArrayList();
int codecCount = MediaCodecList.getCodecCount();
for (int i = 0; i < codecCount; i++) {
MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(i);
if (!codecInfo.isEncoder()) {
for (String str2 : codecInfo.getSupportedTypes()) {
equals = StringsKt__StringsJVMKt.equals(str2, str, true);
if (equals) {
Intrinsics.checkNotNullExpressionValue(codecInfo, "codecInfo");
if (isHardwareAccelerated(codecInfo, str)) {
arrayList.add(codecInfo);
}
}
}
}
}
return arrayList;
}
private final boolean isHardwareAccelerated(MediaCodecInfo mediaCodecInfo, String str) {
if (getApiLevel() >= 29) {
return isHardwareAcceleratedV29(mediaCodecInfo);
}
return !isSoftwareOnly(mediaCodecInfo, str);
}
@TargetApi(29)
private final boolean isHardwareAcceleratedV29(MediaCodecInfo mediaCodecInfo) {
boolean isHardwareAccelerated;
isHardwareAccelerated = mediaCodecInfo.isHardwareAccelerated();
return isHardwareAccelerated;
}
/* JADX WARN: Code restructure failed: missing block: B:15:0x0050, code lost:
if (r5 == false) goto L17;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private final boolean isSoftwareOnly(android.media.MediaCodecInfo r4, java.lang.String r5) {
/*
r3 = this;
int r5 = r3.getApiLevel()
r0 = 29
if (r5 < r0) goto Ld
boolean r4 = r3.isSoftwareOnlyV29(r4)
return r4
Ld:
java.lang.String r4 = r4.getName()
java.lang.String r5 = "codecInfo.name"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r4, r5)
java.util.Locale r5 = java.util.Locale.ROOT
java.lang.String r0 = "ROOT"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r5, r0)
java.lang.String r4 = r4.toLowerCase(r5)
java.lang.String r5 = "this as java.lang.String).toLowerCase(locale)"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r4, r5)
java.lang.String r5 = "arc."
r0 = 0
r1 = 2
r2 = 0
boolean r5 = kotlin.text.StringsKt.startsWith$default(r4, r5, r0, r1, r2)
if (r5 == 0) goto L32
goto L7b
L32:
java.lang.String r5 = "omx.google."
boolean r5 = kotlin.text.StringsKt.startsWith$default(r4, r5, r0, r1, r2)
if (r5 != 0) goto L7a
java.lang.String r5 = "omx.ffmpeg."
boolean r5 = kotlin.text.StringsKt.startsWith$default(r4, r5, r0, r1, r2)
if (r5 != 0) goto L7a
java.lang.String r5 = "omx.sec."
boolean r5 = kotlin.text.StringsKt.startsWith$default(r4, r5, r0, r1, r2)
if (r5 == 0) goto L52
java.lang.String r5 = ".sw."
boolean r5 = kotlin.text.StringsKt.contains$default(r4, r5, r0, r1, r2)
if (r5 != 0) goto L7a
L52:
java.lang.String r5 = "omx.qcom.video.decoder.hevcswvdec"
boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual(r4, r5)
if (r5 != 0) goto L7a
java.lang.String r5 = "c2.android."
boolean r5 = kotlin.text.StringsKt.startsWith$default(r4, r5, r0, r1, r2)
if (r5 != 0) goto L7a
java.lang.String r5 = "c2.google."
boolean r5 = kotlin.text.StringsKt.startsWith$default(r4, r5, r0, r1, r2)
if (r5 != 0) goto L7a
java.lang.String r5 = "omx."
boolean r5 = kotlin.text.StringsKt.startsWith$default(r4, r5, r0, r1, r2)
if (r5 != 0) goto L7b
java.lang.String r5 = "c2."
boolean r4 = kotlin.text.StringsKt.startsWith$default(r4, r5, r0, r1, r2)
if (r4 != 0) goto L7b
L7a:
r0 = 1
L7b:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.core.data.datasource.AndroidStaticDeviceInfoDataSource.isSoftwareOnly(android.media.MediaCodecInfo, java.lang.String):boolean");
}
@TargetApi(29)
private final boolean isSoftwareOnlyV29(MediaCodecInfo mediaCodecInfo) {
boolean isSoftwareOnly;
isSoftwareOnly = mediaCodecInfo.isSoftwareOnly();
return isSoftwareOnly;
}
private final int getPhoneType() {
Object systemService = this.context.getSystemService("phone");
Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.telephony.TelephonyManager");
return ((TelephonyManager) systemService).getPhoneType();
}
private final String getSimOperator() {
Object systemService = this.context.getSystemService("phone");
Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.telephony.TelephonyManager");
String simOperator = ((TelephonyManager) systemService).getSimOperator();
Intrinsics.checkNotNullExpressionValue(simOperator, "telephonyManager.simOperator");
return simOperator;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,55 @@
package com.unity3d.ads.core.data.datasource;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nAndroidStoreDataSource.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidStoreDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidStoreDataSource\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,32:1\n11335#2:33\n11670#2,3:34\n766#3:37\n857#3,2:38\n*S KotlinDebug\n*F\n+ 1 AndroidStoreDataSource.kt\ncom/unity3d/ads/core/data/datasource/AndroidStoreDataSource\n*L\n14#1:33\n14#1:34,3\n16#1:37\n16#1:38,2\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidStoreDataSource implements StoreDataSource {
private final Context context;
public AndroidStoreDataSource(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
this.context = context;
}
@Override // com.unity3d.ads.core.data.datasource.StoreDataSource
public List<String> fetchStores(List<String> additionalStores) {
List distinct;
PackageInfo packageInfo;
PackageManager.PackageInfoFlags of;
Intrinsics.checkNotNullParameter(additionalStores, "additionalStores");
AndroidKnownStore[] values = AndroidKnownStore.values();
ArrayList arrayList = new ArrayList(values.length);
for (AndroidKnownStore androidKnownStore : values) {
arrayList.add(androidKnownStore.getPackageName());
}
distinct = CollectionsKt___CollectionsKt.distinct(CollectionsKt___CollectionsKt.plus((Collection) arrayList, (Iterable) additionalStores));
PackageManager packageManager = this.context.getPackageManager();
ArrayList arrayList2 = new ArrayList();
for (Object obj : distinct) {
String str = (String) obj;
try {
if (Build.VERSION.SDK_INT >= 33) {
of = PackageManager.PackageInfoFlags.of(0L);
packageInfo = packageManager.getPackageInfo(str, of);
} else {
packageInfo = packageManager.getPackageInfo(str, 0);
}
if (packageInfo != null) {
arrayList2.add(obj);
}
} catch (PackageManager.NameNotFoundException unused) {
}
}
return arrayList2;
}
}

View File

@@ -0,0 +1,25 @@
package com.unity3d.ads.core.data.datasource;
import com.unity3d.services.core.preferences.AndroidPreferences;
import com.unity3d.services.core.properties.ClientProperties;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* loaded from: classes4.dex */
public final class AndroidTcfDataSource implements TcfDataSource {
public static final Companion Companion = new Companion(null);
public static final String TCF_TCSTRING_KEY = "IABTCF_TCString";
@Override // com.unity3d.ads.core.data.datasource.TcfDataSource
public String getTcfString() {
return AndroidPreferences.getString(ClientProperties.getAppName() + "_settings", "IABTCF_TCString");
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,11 @@
package com.unity3d.ads.core.data.datasource;
import com.google.protobuf.ByteString;
import kotlin.coroutines.Continuation;
/* loaded from: classes4.dex */
public interface ByteStringDataSource {
Object get(Continuation continuation);
Object set(ByteString byteString, Continuation continuation);
}

View File

@@ -0,0 +1,25 @@
package com.unity3d.ads.core.data.datasource;
import java.io.File;
import kotlin.coroutines.Continuation;
/* loaded from: classes4.dex */
public interface CacheDataSource {
Object getFile(File file, String str, String str2, Integer num, Continuation continuation);
public static final class DefaultImpls {
public static /* synthetic */ Object getFile$default(CacheDataSource cacheDataSource, File file, String str, String str2, Integer num, Continuation continuation, int i, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: getFile");
}
if ((i & 4) != 0) {
str2 = null;
}
String str3 = str2;
if ((i & 8) != 0) {
num = Integer.MAX_VALUE;
}
return cacheDataSource.getFile(file, str, str3, num, continuation);
}
}
}

View File

@@ -0,0 +1,8 @@
package com.unity3d.ads.core.data.datasource;
import gatewayprotocol.v1.DeveloperConsentOuterClass;
/* loaded from: classes4.dex */
public interface DeveloperConsentDataSource {
DeveloperConsentOuterClass.DeveloperConsent getDeveloperConsent();
}

View File

@@ -0,0 +1,24 @@
package com.unity3d.ads.core.data.datasource;
import gatewayprotocol.v1.DynamicDeviceInfoOuterClass;
import java.util.List;
import kotlinx.coroutines.flow.Flow;
/* loaded from: classes4.dex */
public interface DynamicDeviceInfoDataSource {
DynamicDeviceInfoOuterClass.DynamicDeviceInfo fetch();
String getConnectionTypeStr();
int getCurrentUiTheme();
List<String> getLocaleList();
String getOrientation();
int getRingerMode();
Flow getVolumeSettingsChange();
boolean hasInternet();
}

View File

@@ -0,0 +1,48 @@
package com.unity3d.ads.core.data.datasource;
import androidx.datastore.core.DataMigration;
import com.google.protobuf.ByteString;
import com.unity3d.ads.core.domain.GetOpenGLRendererInfo;
import com.unity3d.ads.datastore.ByteStringStoreOuterClass;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.Boxing;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class FetchGLInfoDataMigration implements DataMigration<ByteStringStoreOuterClass.ByteStringStore> {
private final GetOpenGLRendererInfo getOpenGLRendererInfo;
public FetchGLInfoDataMigration(GetOpenGLRendererInfo getOpenGLRendererInfo) {
Intrinsics.checkNotNullParameter(getOpenGLRendererInfo, "getOpenGLRendererInfo");
this.getOpenGLRendererInfo = getOpenGLRendererInfo;
}
@Override // androidx.datastore.core.DataMigration
public Object cleanUp(Continuation continuation) {
return Unit.INSTANCE;
}
@Override // androidx.datastore.core.DataMigration
public Object shouldMigrate(ByteStringStoreOuterClass.ByteStringStore byteStringStore, Continuation continuation) {
return Boxing.boxBoolean(byteStringStore.getData().isEmpty());
}
@Override // androidx.datastore.core.DataMigration
public Object migrate(ByteStringStoreOuterClass.ByteStringStore byteStringStore, Continuation continuation) {
ByteString byteString;
try {
byteString = gatherOpenGLRendererInfo();
} catch (Exception unused) {
byteString = ByteString.EMPTY;
Intrinsics.checkNotNullExpressionValue(byteString, "{\n ByteString.EMPTY\n }");
}
ByteStringStoreOuterClass.ByteStringStore build = ByteStringStoreOuterClass.ByteStringStore.newBuilder().setData(byteString).build();
Intrinsics.checkNotNullExpressionValue(build, "newBuilder()\n …rer)\n .build()");
return build;
}
private final ByteString gatherOpenGLRendererInfo() {
return this.getOpenGLRendererInfo.invoke();
}
}

View File

@@ -0,0 +1,49 @@
package com.unity3d.ads.core.data.datasource;
import android.content.Context;
import androidx.datastore.core.DataMigration;
import com.unity3d.ads.datastore.ByteStringStoreOuterClass;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.Boxing;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class ForcefulPreservingByteStringPreferenceMigration implements DataMigration<ByteStringStoreOuterClass.ByteStringStore> {
private final Context context;
private final GetByteStringData getByteStringData;
private final String key;
private final String name;
public ForcefulPreservingByteStringPreferenceMigration(Context context, String name, String key, GetByteStringData getByteStringData) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(getByteStringData, "getByteStringData");
this.context = context;
this.name = name;
this.key = key;
this.getByteStringData = getByteStringData;
}
@Override // androidx.datastore.core.DataMigration
public Object cleanUp(Continuation continuation) {
return Unit.INSTANCE;
}
@Override // androidx.datastore.core.DataMigration
public Object shouldMigrate(ByteStringStoreOuterClass.ByteStringStore byteStringStore, Continuation continuation) {
return Boxing.boxBoolean(true);
}
@Override // androidx.datastore.core.DataMigration
public Object migrate(ByteStringStoreOuterClass.ByteStringStore byteStringStore, Continuation continuation) {
String string = this.context.getSharedPreferences(this.name, 0).getString(this.key, null);
if (string == null || string.length() == 0) {
return byteStringStore;
}
ByteStringStoreOuterClass.ByteStringStore build = ByteStringStoreOuterClass.ByteStringStore.newBuilder().setData(this.getByteStringData.invoke(string)).build();
Intrinsics.checkNotNullExpressionValue(build, "newBuilder()\n …\n .build()");
return build;
}
}

View File

@@ -0,0 +1,8 @@
package com.unity3d.ads.core.data.datasource;
import com.google.protobuf.ByteString;
/* loaded from: classes4.dex */
public interface GetByteStringData {
ByteString invoke(String str);
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.ads.core.data.datasource;
/* loaded from: classes4.dex */
public interface LegacyUserConsentDataSource {
String getPrivacyData();
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.ads.core.data.datasource;
/* loaded from: classes4.dex */
public interface LifecycleDataSource {
boolean appIsForeground();
}

View File

@@ -0,0 +1,8 @@
package com.unity3d.ads.core.data.datasource;
/* loaded from: classes4.dex */
public interface MediationDataSource {
String getName();
String getVersion();
}

View File

@@ -0,0 +1,49 @@
package com.unity3d.ads.core.data.datasource;
import android.content.Context;
import androidx.datastore.core.DataMigration;
import com.unity3d.ads.datastore.ByteStringStoreOuterClass;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.Boxing;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class PreservingByteStringPreferenceMigration implements DataMigration<ByteStringStoreOuterClass.ByteStringStore> {
private final Context context;
private final GetByteStringData getByteStringData;
private final String key;
private final String name;
public PreservingByteStringPreferenceMigration(Context context, String name, String key, GetByteStringData getByteStringData) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(getByteStringData, "getByteStringData");
this.context = context;
this.name = name;
this.key = key;
this.getByteStringData = getByteStringData;
}
@Override // androidx.datastore.core.DataMigration
public Object cleanUp(Continuation continuation) {
return Unit.INSTANCE;
}
@Override // androidx.datastore.core.DataMigration
public Object shouldMigrate(ByteStringStoreOuterClass.ByteStringStore byteStringStore, Continuation continuation) {
return Boxing.boxBoolean(byteStringStore.getData().isEmpty());
}
@Override // androidx.datastore.core.DataMigration
public Object migrate(ByteStringStoreOuterClass.ByteStringStore byteStringStore, Continuation continuation) {
String string;
if (!byteStringStore.getData().isEmpty() || (string = this.context.getSharedPreferences(this.name, 0).getString(this.key, null)) == null || string.length() == 0) {
return byteStringStore;
}
ByteStringStoreOuterClass.ByteStringStore build = ByteStringStoreOuterClass.ByteStringStore.newBuilder().setData(this.getByteStringData.invoke(string)).build();
Intrinsics.checkNotNullExpressionValue(build, "newBuilder()\n … .build()");
return build;
}
}

View File

@@ -0,0 +1,23 @@
package com.unity3d.ads.core.data.datasource;
import gatewayprotocol.v1.AllowedPiiOuterClass;
import gatewayprotocol.v1.PiiOuterClass;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public interface PrivacyDeviceInfoDataSource {
PiiOuterClass.Pii fetch(AllowedPiiOuterClass.AllowedPii allowedPii);
public static final class DefaultImpls {
public static /* synthetic */ PiiOuterClass.Pii fetch$default(PrivacyDeviceInfoDataSource privacyDeviceInfoDataSource, AllowedPiiOuterClass.AllowedPii allowedPii, int i, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: fetch");
}
if ((i & 1) != 0) {
allowedPii = AllowedPiiOuterClass.AllowedPii.getDefaultInstance();
Intrinsics.checkNotNullExpressionValue(allowedPii, "getDefaultInstance()");
}
return privacyDeviceInfoDataSource.fetch(allowedPii);
}
}
}

View File

@@ -0,0 +1,28 @@
package com.unity3d.ads.core.data.datasource;
import gatewayprotocol.v1.StaticDeviceInfoOuterClass;
import java.util.List;
import kotlin.coroutines.Continuation;
/* loaded from: classes4.dex */
public interface StaticDeviceInfoDataSource {
Object fetch(List<String> list, Continuation continuation);
StaticDeviceInfoOuterClass.StaticDeviceInfo fetchCached();
String getAnalyticsUserId();
String getAppName();
Object getAuid(Continuation continuation);
Object getIdfi(Continuation continuation);
String getManufacturer();
String getModel();
String getOsVersion();
long getSystemBootTime();
}

View File

@@ -0,0 +1,8 @@
package com.unity3d.ads.core.data.datasource;
import java.util.List;
/* loaded from: classes4.dex */
public interface StoreDataSource {
List<String> fetchStores(List<String> list);
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.ads.core.data.datasource;
/* loaded from: classes4.dex */
public interface TcfDataSource {
String getTcfString();
}

View File

@@ -0,0 +1,62 @@
package com.unity3d.ads.core.data.datasource;
import androidx.datastore.core.CorruptionException;
import com.unity3d.ads.datastore.UniversalRequestStoreOuterClass;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.FlowCollector;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.UniversalRequestDataSource$get$2", f = "UniversalRequestDataSource.kt", l = {16}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class UniversalRequestDataSource$get$2 extends SuspendLambda implements Function3 {
private /* synthetic */ Object L$0;
/* synthetic */ Object L$1;
int label;
public UniversalRequestDataSource$get$2(Continuation continuation) {
super(3, continuation);
}
@Override // kotlin.jvm.functions.Function3
public final Object invoke(FlowCollector flowCollector, Throwable th, Continuation continuation) {
UniversalRequestDataSource$get$2 universalRequestDataSource$get$2 = new UniversalRequestDataSource$get$2(continuation);
universalRequestDataSource$get$2.L$0 = flowCollector;
universalRequestDataSource$get$2.L$1 = th;
return universalRequestDataSource$get$2.invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
FlowCollector flowCollector = (FlowCollector) this.L$0;
Throwable th = (Throwable) this.L$1;
if (th instanceof CorruptionException) {
UniversalRequestStoreOuterClass.UniversalRequestStore defaultInstance = UniversalRequestStoreOuterClass.UniversalRequestStore.getDefaultInstance();
Intrinsics.checkNotNullExpressionValue(defaultInstance, "getDefaultInstance()");
this.L$0 = null;
this.label = 1;
if (flowCollector.emit(defaultInstance, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
throw th;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,51 @@
package com.unity3d.ads.core.data.datasource;
import com.unity3d.ads.datastore.UniversalRequestStoreOuterClass;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.UniversalRequestDataSource$remove$2", f = "UniversalRequestDataSource.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class UniversalRequestDataSource$remove$2 extends SuspendLambda implements Function2 {
final /* synthetic */ String $key;
/* synthetic */ Object L$0;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public UniversalRequestDataSource$remove$2(String str, Continuation continuation) {
super(2, continuation);
this.$key = str;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
UniversalRequestDataSource$remove$2 universalRequestDataSource$remove$2 = new UniversalRequestDataSource$remove$2(this.$key, continuation);
universalRequestDataSource$remove$2.L$0 = obj;
return universalRequestDataSource$remove$2;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(UniversalRequestStoreOuterClass.UniversalRequestStore universalRequestStore, Continuation continuation) {
return ((UniversalRequestDataSource$remove$2) create(universalRequestStore, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
UniversalRequestStoreOuterClass.UniversalRequestStore.Builder builder = ((UniversalRequestStoreOuterClass.UniversalRequestStore) this.L$0).toBuilder();
builder.removeUniversalRequestMap(this.$key);
UniversalRequestStoreOuterClass.UniversalRequestStore build = builder.build();
Intrinsics.checkNotNullExpressionValue(build, "dataBuilder.build()");
return build;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,54 @@
package com.unity3d.ads.core.data.datasource;
import com.google.protobuf.ByteString;
import com.unity3d.ads.datastore.UniversalRequestStoreOuterClass;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.UniversalRequestDataSource$set$2", f = "UniversalRequestDataSource.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class UniversalRequestDataSource$set$2 extends SuspendLambda implements Function2 {
final /* synthetic */ ByteString $data;
final /* synthetic */ String $key;
/* synthetic */ Object L$0;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public UniversalRequestDataSource$set$2(String str, ByteString byteString, Continuation continuation) {
super(2, continuation);
this.$key = str;
this.$data = byteString;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
UniversalRequestDataSource$set$2 universalRequestDataSource$set$2 = new UniversalRequestDataSource$set$2(this.$key, this.$data, continuation);
universalRequestDataSource$set$2.L$0 = obj;
return universalRequestDataSource$set$2;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(UniversalRequestStoreOuterClass.UniversalRequestStore universalRequestStore, Continuation continuation) {
return ((UniversalRequestDataSource$set$2) create(universalRequestStore, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
UniversalRequestStoreOuterClass.UniversalRequestStore.Builder builder = ((UniversalRequestStoreOuterClass.UniversalRequestStore) this.L$0).toBuilder();
builder.putUniversalRequestMap(this.$key, this.$data);
UniversalRequestStoreOuterClass.UniversalRequestStore build = builder.build();
Intrinsics.checkNotNullExpressionValue(build, "dataBuilder.build()");
return build;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,38 @@
package com.unity3d.ads.core.data.datasource;
import androidx.datastore.core.DataStore;
import com.google.protobuf.ByteString;
import com.unity3d.ads.datastore.UniversalRequestStoreOuterClass;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.FlowKt;
/* loaded from: classes4.dex */
public final class UniversalRequestDataSource {
private final DataStore<UniversalRequestStoreOuterClass.UniversalRequestStore> universalRequestStore;
public UniversalRequestDataSource(DataStore<UniversalRequestStoreOuterClass.UniversalRequestStore> universalRequestStore) {
Intrinsics.checkNotNullParameter(universalRequestStore, "universalRequestStore");
this.universalRequestStore = universalRequestStore;
}
public final Object get(Continuation continuation) {
return FlowKt.first(FlowKt.m4143catch(this.universalRequestStore.getData(), new UniversalRequestDataSource$get$2(null)), continuation);
}
public final Object set(String str, ByteString byteString, Continuation continuation) {
Object coroutine_suspended;
Object updateData = this.universalRequestStore.updateData(new UniversalRequestDataSource$set$2(str, byteString, null), continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return updateData == coroutine_suspended ? updateData : Unit.INSTANCE;
}
public final Object remove(String str, Continuation continuation) {
Object coroutine_suspended;
Object updateData = this.universalRequestStore.updateData(new UniversalRequestDataSource$remove$2(str, null), continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return updateData == coroutine_suspended ? updateData : Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,103 @@
package com.unity3d.ads.core.data.datasource;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* loaded from: classes4.dex */
public abstract class VolumeSettingsChange {
public /* synthetic */ VolumeSettingsChange(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static final class MuteChange extends VolumeSettingsChange {
private final boolean isMuted;
public static /* synthetic */ MuteChange copy$default(MuteChange muteChange, boolean z, int i, Object obj) {
if ((i & 1) != 0) {
z = muteChange.isMuted;
}
return muteChange.copy(z);
}
public final boolean component1() {
return this.isMuted;
}
public final MuteChange copy(boolean z) {
return new MuteChange(z);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof MuteChange) && this.isMuted == ((MuteChange) obj).isMuted;
}
public int hashCode() {
boolean z = this.isMuted;
if (z) {
return 1;
}
return z ? 1 : 0;
}
public final boolean isMuted() {
return this.isMuted;
}
public String toString() {
return "MuteChange(isMuted=" + this.isMuted + ')';
}
public MuteChange(boolean z) {
super(null);
this.isMuted = z;
}
}
private VolumeSettingsChange() {
}
public static final class VolumeChange extends VolumeSettingsChange {
private final double volume;
public static /* synthetic */ VolumeChange copy$default(VolumeChange volumeChange, double d, int i, Object obj) {
if ((i & 1) != 0) {
d = volumeChange.volume;
}
return volumeChange.copy(d);
}
public final double component1() {
return this.volume;
}
public final VolumeChange copy(double d) {
return new VolumeChange(d);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof VolumeChange) && Double.compare(this.volume, ((VolumeChange) obj).volume) == 0;
}
public final double getVolume() {
return this.volume;
}
public int hashCode() {
return Double.hashCode(this.volume);
}
public String toString() {
return "VolumeChange(volume=" + this.volume + ')';
}
public VolumeChange(double d) {
super(null);
this.volume = d;
}
}
}

View File

@@ -0,0 +1,62 @@
package com.unity3d.ads.core.data.datasource;
import androidx.datastore.core.CorruptionException;
import com.unity3d.ads.datastore.WebviewConfigurationStore;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.FlowCollector;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.WebviewConfigurationDataSource$get$2", f = "WebviewConfigurationDataSource.kt", l = {15}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class WebviewConfigurationDataSource$get$2 extends SuspendLambda implements Function3 {
private /* synthetic */ Object L$0;
/* synthetic */ Object L$1;
int label;
public WebviewConfigurationDataSource$get$2(Continuation continuation) {
super(3, continuation);
}
@Override // kotlin.jvm.functions.Function3
public final Object invoke(FlowCollector flowCollector, Throwable th, Continuation continuation) {
WebviewConfigurationDataSource$get$2 webviewConfigurationDataSource$get$2 = new WebviewConfigurationDataSource$get$2(continuation);
webviewConfigurationDataSource$get$2.L$0 = flowCollector;
webviewConfigurationDataSource$get$2.L$1 = th;
return webviewConfigurationDataSource$get$2.invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
FlowCollector flowCollector = (FlowCollector) this.L$0;
Throwable th = (Throwable) this.L$1;
if (th instanceof CorruptionException) {
WebviewConfigurationStore.WebViewConfigurationStore defaultInstance = WebviewConfigurationStore.WebViewConfigurationStore.getDefaultInstance();
Intrinsics.checkNotNullExpressionValue(defaultInstance, "getDefaultInstance()");
this.L$0 = null;
this.label = 1;
if (flowCollector.emit(defaultInstance, this) == coroutine_suspended) {
return coroutine_suspended;
}
} else {
throw th;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,43 @@
package com.unity3d.ads.core.data.datasource;
import com.unity3d.ads.datastore.WebviewConfigurationStore;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
@DebugMetadata(c = "com.unity3d.ads.core.data.datasource.WebviewConfigurationDataSource$set$2", f = "WebviewConfigurationDataSource.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class WebviewConfigurationDataSource$set$2 extends SuspendLambda implements Function2 {
final /* synthetic */ WebviewConfigurationStore.WebViewConfigurationStore $data;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public WebviewConfigurationDataSource$set$2(WebviewConfigurationStore.WebViewConfigurationStore webViewConfigurationStore, Continuation continuation) {
super(2, continuation);
this.$data = webViewConfigurationStore;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new WebviewConfigurationDataSource$set$2(this.$data, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(WebviewConfigurationStore.WebViewConfigurationStore webViewConfigurationStore, Continuation continuation) {
return ((WebviewConfigurationDataSource$set$2) create(webViewConfigurationStore, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
return this.$data;
}
}

View File

@@ -0,0 +1,30 @@
package com.unity3d.ads.core.data.datasource;
import androidx.datastore.core.DataStore;
import com.unity3d.ads.datastore.WebviewConfigurationStore;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.FlowKt;
/* loaded from: classes4.dex */
public final class WebviewConfigurationDataSource {
private final DataStore<WebviewConfigurationStore.WebViewConfigurationStore> webviewConfigurationStore;
public WebviewConfigurationDataSource(DataStore<WebviewConfigurationStore.WebViewConfigurationStore> webviewConfigurationStore) {
Intrinsics.checkNotNullParameter(webviewConfigurationStore, "webviewConfigurationStore");
this.webviewConfigurationStore = webviewConfigurationStore;
}
public final Object get(Continuation continuation) {
return FlowKt.first(FlowKt.m4143catch(this.webviewConfigurationStore.getData(), new WebviewConfigurationDataSource$get$2(null)), continuation);
}
public final Object set(WebviewConfigurationStore.WebViewConfigurationStore webViewConfigurationStore, Continuation continuation) {
Object coroutine_suspended;
Object updateData = this.webviewConfigurationStore.updateData(new WebviewConfigurationDataSource$set$2(webViewConfigurationStore, null), continuation);
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
return updateData == coroutine_suspended ? updateData : Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,77 @@
package com.unity3d.ads.core.data.manager;
import android.content.Context;
import android.webkit.WebView;
import com.iab.omid.library.unity3d.Omid;
import com.iab.omid.library.unity3d.adsession.AdEvents;
import com.iab.omid.library.unity3d.adsession.AdSession;
import com.iab.omid.library.unity3d.adsession.AdSessionConfiguration;
import com.iab.omid.library.unity3d.adsession.AdSessionContext;
import com.iab.omid.library.unity3d.adsession.CreativeType;
import com.iab.omid.library.unity3d.adsession.ImpressionType;
import com.iab.omid.library.unity3d.adsession.Owner;
import com.iab.omid.library.unity3d.adsession.Partner;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AndroidOmidManager implements OmidManager {
@Override // com.unity3d.ads.core.data.manager.OmidManager
public boolean isActive() {
return Omid.isActive();
}
@Override // com.unity3d.ads.core.data.manager.OmidManager
public String getVersion() {
String version = Omid.getVersion();
Intrinsics.checkNotNullExpressionValue(version, "getVersion()");
return version;
}
@Override // com.unity3d.ads.core.data.manager.OmidManager
public void activate(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
Omid.activate(context);
}
@Override // com.unity3d.ads.core.data.manager.OmidManager
public AdSessionContext createHtmlAdSessionContext(Partner partner, WebView webView, String str, String str2) {
AdSessionContext createHtmlAdSessionContext = AdSessionContext.createHtmlAdSessionContext(partner, webView, str, str2);
Intrinsics.checkNotNullExpressionValue(createHtmlAdSessionContext, "createHtmlAdSessionConte…customReferenceData\n )");
return createHtmlAdSessionContext;
}
@Override // com.unity3d.ads.core.data.manager.OmidManager
public AdSessionContext createJavaScriptAdSessionContext(Partner partner, WebView webView, String str, String str2) {
AdSessionContext createJavascriptAdSessionContext = AdSessionContext.createJavascriptAdSessionContext(partner, webView, str, str2);
Intrinsics.checkNotNullExpressionValue(createJavascriptAdSessionContext, "createJavascriptAdSessio…customReferenceData\n )");
return createJavascriptAdSessionContext;
}
@Override // com.unity3d.ads.core.data.manager.OmidManager
public AdSessionConfiguration createAdSessionConfiguration(CreativeType creativeType, ImpressionType impressionType, Owner owner, Owner mediaEventsOwner, boolean z) {
Intrinsics.checkNotNullParameter(creativeType, "creativeType");
Intrinsics.checkNotNullParameter(impressionType, "impressionType");
Intrinsics.checkNotNullParameter(owner, "owner");
Intrinsics.checkNotNullParameter(mediaEventsOwner, "mediaEventsOwner");
AdSessionConfiguration createAdSessionConfiguration = AdSessionConfiguration.createAdSessionConfiguration(creativeType, impressionType, owner, mediaEventsOwner, z);
Intrinsics.checkNotNullExpressionValue(createAdSessionConfiguration, "createAdSessionConfigura…VerificationScripts\n )");
return createAdSessionConfiguration;
}
@Override // com.unity3d.ads.core.data.manager.OmidManager
public AdSession createAdSession(AdSessionConfiguration adSessionConfiguration, AdSessionContext context) {
Intrinsics.checkNotNullParameter(adSessionConfiguration, "adSessionConfiguration");
Intrinsics.checkNotNullParameter(context, "context");
AdSession createAdSession = AdSession.createAdSession(adSessionConfiguration, context);
Intrinsics.checkNotNullExpressionValue(createAdSession, "createAdSession(adSessionConfiguration, context)");
return createAdSession;
}
@Override // com.unity3d.ads.core.data.manager.OmidManager
public AdEvents createAdEvents(AdSession adSession) {
Intrinsics.checkNotNullParameter(adSession, "adSession");
AdEvents createAdEvents = AdEvents.createAdEvents(adSession);
Intrinsics.checkNotNullExpressionValue(createAdEvents, "createAdEvents(adSession)");
return createAdEvents;
}
}

View File

@@ -0,0 +1,11 @@
package com.unity3d.ads.core.data.manager;
import com.unity3d.services.core.properties.SdkProperties;
/* loaded from: classes4.dex */
public final class AndroidSDKPropertiesManager implements SDKPropertiesManager {
@Override // com.unity3d.ads.core.data.manager.SDKPropertiesManager
public void setInitialized(boolean z) {
SdkProperties.setInitialized(z);
}
}

View File

@@ -0,0 +1,5 @@
package com.unity3d.ads.core.data.manager;
/* loaded from: classes4.dex */
public final class AndroidSDKPropertiesManagerKt {
}

View File

@@ -0,0 +1,68 @@
package com.unity3d.ads.core.data.manager;
import android.content.Context;
import com.unity3d.services.core.device.Storage;
import com.unity3d.services.core.device.StorageManager;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AndroidStorageManager implements StorageManager {
public static final Companion Companion = new Companion(null);
private static final String KEY_INITIALIZED = "configuration.hasInitialized";
@Override // com.unity3d.ads.core.data.manager.StorageManager
public boolean init(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return com.unity3d.services.core.device.StorageManager.init(context);
}
@Override // com.unity3d.ads.core.data.manager.StorageManager
public void initStorage(StorageManager.StorageType type) {
Intrinsics.checkNotNullParameter(type, "type");
com.unity3d.services.core.device.StorageManager.initStorage(type);
}
@Override // com.unity3d.ads.core.data.manager.StorageManager
public Storage getStorage(StorageManager.StorageType type) {
Intrinsics.checkNotNullParameter(type, "type");
Storage storage = com.unity3d.services.core.device.StorageManager.getStorage(type);
Intrinsics.checkNotNullExpressionValue(storage, "getStorage(type)");
return storage;
}
@Override // com.unity3d.ads.core.data.manager.StorageManager
public boolean hasStorage(StorageManager.StorageType type) {
Intrinsics.checkNotNullParameter(type, "type");
return com.unity3d.services.core.device.StorageManager.hasStorage(type);
}
@Override // com.unity3d.ads.core.data.manager.StorageManager
public void addStorageLocation(StorageManager.StorageType type, String fileName) {
Intrinsics.checkNotNullParameter(type, "type");
Intrinsics.checkNotNullParameter(fileName, "fileName");
com.unity3d.services.core.device.StorageManager.addStorageLocation(type, fileName);
}
@Override // com.unity3d.ads.core.data.manager.StorageManager
public void removeStorage(StorageManager.StorageType type) {
Intrinsics.checkNotNullParameter(type, "type");
com.unity3d.services.core.device.StorageManager.removeStorage(type);
}
@Override // com.unity3d.ads.core.data.manager.StorageManager
public void hasInitialized() {
Storage storage = getStorage(StorageManager.StorageType.PRIVATE);
storage.set(KEY_INITIALIZED, Boolean.TRUE);
storage.writeStorage();
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,5 @@
package com.unity3d.ads.core.data.manager;
/* loaded from: classes4.dex */
public final class AndroidStorageManagerKt {
}

View File

@@ -0,0 +1,31 @@
package com.unity3d.ads.core.data.manager;
import android.content.Context;
import android.webkit.WebView;
import com.iab.omid.library.unity3d.adsession.AdEvents;
import com.iab.omid.library.unity3d.adsession.AdSession;
import com.iab.omid.library.unity3d.adsession.AdSessionConfiguration;
import com.iab.omid.library.unity3d.adsession.AdSessionContext;
import com.iab.omid.library.unity3d.adsession.CreativeType;
import com.iab.omid.library.unity3d.adsession.ImpressionType;
import com.iab.omid.library.unity3d.adsession.Owner;
import com.iab.omid.library.unity3d.adsession.Partner;
/* loaded from: classes4.dex */
public interface OmidManager {
void activate(Context context);
AdEvents createAdEvents(AdSession adSession);
AdSession createAdSession(AdSessionConfiguration adSessionConfiguration, AdSessionContext adSessionContext);
AdSessionConfiguration createAdSessionConfiguration(CreativeType creativeType, ImpressionType impressionType, Owner owner, Owner owner2, boolean z);
AdSessionContext createHtmlAdSessionContext(Partner partner, WebView webView, String str, String str2);
AdSessionContext createJavaScriptAdSessionContext(Partner partner, WebView webView, String str, String str2);
String getVersion();
boolean isActive();
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.ads.core.data.manager;
/* loaded from: classes4.dex */
public interface SDKPropertiesManager {
void setInitialized(boolean z);
}

View File

@@ -0,0 +1,22 @@
package com.unity3d.ads.core.data.manager;
import android.content.Context;
import com.unity3d.services.core.device.Storage;
import com.unity3d.services.core.device.StorageManager;
/* loaded from: classes4.dex */
public interface StorageManager {
void addStorageLocation(StorageManager.StorageType storageType, String str);
Storage getStorage(StorageManager.StorageType storageType);
void hasInitialized();
boolean hasStorage(StorageManager.StorageType storageType);
boolean init(Context context);
void initStorage(StorageManager.StorageType storageType);
void removeStorage(StorageManager.StorageType storageType);
}

View File

@@ -0,0 +1,147 @@
package com.unity3d.ads.core.data.manager;
import com.unity3d.ads.core.data.model.exception.TransactionException;
import com.unity3d.ads.core.domain.SendDiagnosticEvent;
import com.unity3d.services.store.StoreMonitor;
import com.unity3d.services.store.gpbl.BillingResultResponseCode;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.PurchaseBridge;
import com.unity3d.services.store.gpbl.listeners.BillingInitializationListener;
import com.unity3d.services.store.gpbl.listeners.PurchasesResponseListener;
import java.util.List;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.DebugProbesKt;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.CancellableContinuation;
import kotlinx.coroutines.CancellableContinuationImpl;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.core.data.manager.TransactionEventManager$invoke$1", f = "TransactionEventManager.kt", l = {123}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nTransactionEventManager.kt\nKotlin\n*S Kotlin\n*F\n+ 1 TransactionEventManager.kt\ncom/unity3d/ads/core/data/manager/TransactionEventManager$invoke$1\n+ 2 CancellableContinuation.kt\nkotlinx/coroutines/CancellableContinuationKt\n*L\n1#1,122:1\n314#2,11:123\n*S KotlinDebug\n*F\n+ 1 TransactionEventManager.kt\ncom/unity3d/ads/core/data/manager/TransactionEventManager$invoke$1\n*L\n39#1:123,11\n*E\n"})
/* loaded from: classes4.dex */
public final class TransactionEventManager$invoke$1 extends SuspendLambda implements Function2 {
Object L$0;
int label;
final /* synthetic */ TransactionEventManager this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public TransactionEventManager$invoke$1(TransactionEventManager transactionEventManager, Continuation continuation) {
super(2, continuation);
this.this$0 = transactionEventManager;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new TransactionEventManager$invoke$1(this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((TransactionEventManager$invoke$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
SendDiagnosticEvent sendDiagnosticEvent;
StoreMonitor storeMonitor;
Continuation intercepted;
StoreMonitor storeMonitor2;
Object coroutine_suspended2;
StoreMonitor storeMonitor3;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
try {
} catch (TransactionException unused) {
sendDiagnosticEvent = this.this$0.sendDiagnosticEvent;
SendDiagnosticEvent.DefaultImpls.invoke$default(sendDiagnosticEvent, "billing_service_unavailable", null, null, null, null, 30, null);
}
if (i == 0) {
ResultKt.throwOnFailure(obj);
storeMonitor = this.this$0.storeMonitor;
if (!storeMonitor.isInitialized()) {
final TransactionEventManager transactionEventManager = this.this$0;
this.L$0 = transactionEventManager;
this.label = 1;
intercepted = IntrinsicsKt__IntrinsicsJvmKt.intercepted(this);
final CancellableContinuationImpl cancellableContinuationImpl = new CancellableContinuationImpl(intercepted, 1);
cancellableContinuationImpl.initCancellability();
storeMonitor2 = transactionEventManager.storeMonitor;
storeMonitor2.initialize(new BillingInitializationListener() { // from class: com.unity3d.ads.core.data.manager.TransactionEventManager$invoke$1$1$1
private final void tryResume() {
if (CancellableContinuation.this.isActive()) {
CancellableContinuation cancellableContinuation = CancellableContinuation.this;
Result.Companion companion = Result.Companion;
cancellableContinuation.resumeWith(Result.m4060constructorimpl(Unit.INSTANCE));
}
}
private final void tryResumeWithException(Exception exc) {
if (CancellableContinuation.this.isActive()) {
CancellableContinuation cancellableContinuation = CancellableContinuation.this;
Result.Companion companion = Result.Companion;
cancellableContinuation.resumeWith(Result.m4060constructorimpl(ResultKt.createFailure(exc)));
}
}
@Override // com.unity3d.services.store.gpbl.listeners.BillingInitializationListener
public void onIsAlreadyInitialized() {
tryResume();
}
@Override // com.unity3d.services.store.gpbl.listeners.BillingClientStateListener
public void onBillingSetupFinished(BillingResultBridge billingResult) {
Intrinsics.checkNotNullParameter(billingResult, "billingResult");
if (billingResult.getResponseCode() != BillingResultResponseCode.OK) {
tryResumeWithException(new TransactionException("Billing setup failed"));
} else {
tryResume();
}
}
@Override // com.unity3d.services.store.gpbl.listeners.BillingClientStateListener
public void onBillingServiceDisconnected() {
tryResumeWithException(new TransactionException("Billing service disconnected"));
}
@Override // com.unity3d.services.store.gpbl.listeners.PurchaseUpdatedResponseListener
public void onPurchaseUpdated(BillingResultBridge billingResult, List<? extends PurchaseBridge> list) {
Intrinsics.checkNotNullParameter(billingResult, "billingResult");
transactionEventManager.onPurchasesReceived(billingResult, list);
}
});
Object result = cancellableContinuationImpl.getResult();
coroutine_suspended2 = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (result == coroutine_suspended2) {
DebugProbesKt.probeCoroutineSuspended(this);
}
if (result == coroutine_suspended) {
return coroutine_suspended;
}
}
return Unit.INSTANCE;
}
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
storeMonitor3 = this.this$0.storeMonitor;
final TransactionEventManager transactionEventManager2 = this.this$0;
storeMonitor3.getPurchases(42, "inapp", new PurchasesResponseListener() { // from class: com.unity3d.ads.core.data.manager.TransactionEventManager$invoke$1$$ExternalSyntheticLambda0
@Override // com.unity3d.services.store.gpbl.listeners.PurchasesResponseListener
public final void onPurchaseResponse(BillingResultBridge billingResultBridge, List list) {
TransactionEventManager.access$onPurchasesReceived(TransactionEventManager.this, billingResultBridge, list);
}
});
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,91 @@
package com.unity3d.ads.core.data.manager;
import com.unity3d.ads.core.domain.events.GetTransactionData;
import com.unity3d.services.store.gpbl.BillingResultResponseCode;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.PurchaseBridge;
import com.unity3d.services.store.gpbl.bridges.SkuDetailsBridge;
import java.util.ArrayList;
import java.util.List;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.CompletableDeferred;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.core.data.manager.TransactionEventManager$onPurchasesReceived$1", f = "TransactionEventManager.kt", l = {92, 109, 112}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nTransactionEventManager.kt\nKotlin\n*S Kotlin\n*F\n+ 1 TransactionEventManager.kt\ncom/unity3d/ads/core/data/manager/TransactionEventManager$onPurchasesReceived$1\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n*L\n1#1,122:1\n1549#2:123\n1620#2,3:124\n1864#2,3:127\n1549#2:132\n1620#2,3:133\n37#3,2:130\n*S KotlinDebug\n*F\n+ 1 TransactionEventManager.kt\ncom/unity3d/ads/core/data/manager/TransactionEventManager$onPurchasesReceived$1\n*L\n89#1:123\n89#1:124,3\n90#1:127,3\n100#1:132\n100#1:133,3\n109#1:130,2\n*E\n"})
/* loaded from: classes4.dex */
public final class TransactionEventManager$onPurchasesReceived$1 extends SuspendLambda implements Function2 {
final /* synthetic */ List<PurchaseBridge> $purchases;
int I$0;
int I$1;
long J$0;
Object L$0;
Object L$1;
Object L$2;
Object L$3;
Object L$4;
int label;
final /* synthetic */ TransactionEventManager this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
/* JADX WARN: Multi-variable type inference failed */
public TransactionEventManager$onPurchasesReceived$1(List<? extends PurchaseBridge> list, TransactionEventManager transactionEventManager, Continuation continuation) {
super(2, continuation);
this.$purchases = list;
this.this$0 = transactionEventManager;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new TransactionEventManager$onPurchasesReceived$1(this.$purchases, this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((TransactionEventManager$onPurchasesReceived$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:16:0x017b */
/* JADX WARN: Removed duplicated region for block: B:22:0x0104 */
/* JADX WARN: Removed duplicated region for block: B:26:0x009f */
/* JADX WARN: Removed duplicated region for block: B:33:0x0149 */
/* JADX WARN: Removed duplicated region for block: B:36:0x0131 */
/* JADX WARN: Type inference failed for: r14v7, types: [java.util.List] */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:32:0x00de -> B:20:0x00ed). Please report as a decompilation issue!!! */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r21) {
/*
Method dump skipped, instructions count: 412
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.core.data.manager.TransactionEventManager$onPurchasesReceived$1.invokeSuspend(java.lang.Object):java.lang.Object");
}
/* JADX INFO: Access modifiers changed from: private */
public static final void invokeSuspend$lambda$3$lambda$2(List list, int i, List list2, TransactionEventManager transactionEventManager, PurchaseBridge purchaseBridge, BillingResultBridge billingResultBridge, List list3) {
GetTransactionData getTransactionData;
if (list3 == null || billingResultBridge.getResponseCode() != BillingResultResponseCode.OK) {
((CompletableDeferred) list.get(i)).complete(Unit.INSTANCE);
return;
}
List<SkuDetailsBridge> list4 = list3;
ArrayList arrayList = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(list4, 10));
for (SkuDetailsBridge skuDetailsBridge : list4) {
getTransactionData = transactionEventManager.getTransactionData;
arrayList.add(getTransactionData.invoke(purchaseBridge, skuDetailsBridge));
}
list2.addAll(arrayList);
((CompletableDeferred) list.get(i)).complete(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,69 @@
package com.unity3d.ads.core.data.manager;
import com.unity3d.ads.core.data.datasource.ByteStringDataSource;
import com.unity3d.ads.core.data.repository.TransactionEventRepository;
import com.unity3d.ads.core.domain.SendDiagnosticEvent;
import com.unity3d.ads.core.domain.events.GetTransactionData;
import com.unity3d.ads.core.domain.events.GetTransactionRequest;
import com.unity3d.services.store.StoreMonitor;
import com.unity3d.services.store.gpbl.BillingResultResponseCode;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.PurchaseBridge;
import java.util.List;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScope;
/* loaded from: classes4.dex */
public final class TransactionEventManager {
public static final Companion Companion = new Companion(null);
private static final String INAPP = "inapp";
private static final int dummyOperationId = 42;
private final GetTransactionData getTransactionData;
private final GetTransactionRequest getTransactionRequest;
private final ByteStringDataSource iapTransactionStore;
private final CoroutineScope scope;
private final SendDiagnosticEvent sendDiagnosticEvent;
private final StoreMonitor storeMonitor;
private final TransactionEventRepository transactionEventRepository;
public TransactionEventManager(CoroutineScope scope, StoreMonitor storeMonitor, GetTransactionData getTransactionData, GetTransactionRequest getTransactionRequest, TransactionEventRepository transactionEventRepository, ByteStringDataSource iapTransactionStore, SendDiagnosticEvent sendDiagnosticEvent) {
Intrinsics.checkNotNullParameter(scope, "scope");
Intrinsics.checkNotNullParameter(storeMonitor, "storeMonitor");
Intrinsics.checkNotNullParameter(getTransactionData, "getTransactionData");
Intrinsics.checkNotNullParameter(getTransactionRequest, "getTransactionRequest");
Intrinsics.checkNotNullParameter(transactionEventRepository, "transactionEventRepository");
Intrinsics.checkNotNullParameter(iapTransactionStore, "iapTransactionStore");
Intrinsics.checkNotNullParameter(sendDiagnosticEvent, "sendDiagnosticEvent");
this.scope = scope;
this.storeMonitor = storeMonitor;
this.getTransactionData = getTransactionData;
this.getTransactionRequest = getTransactionRequest;
this.transactionEventRepository = transactionEventRepository;
this.iapTransactionStore = iapTransactionStore;
this.sendDiagnosticEvent = sendDiagnosticEvent;
}
public final void invoke() {
BuildersKt__Builders_commonKt.launch$default(this.scope, null, null, new TransactionEventManager$invoke$1(this, null), 3, null);
}
/* JADX INFO: Access modifiers changed from: private */
public final void onPurchasesReceived(BillingResultBridge billingResultBridge, List<? extends PurchaseBridge> list) {
List<? extends PurchaseBridge> list2;
if (billingResultBridge.getResponseCode() != BillingResultResponseCode.OK || (list2 = list) == null || list2.isEmpty()) {
return;
}
BuildersKt__Builders_commonKt.launch$default(this.scope, null, null, new TransactionEventManager$onPurchasesReceived$1(list, this, null), 3, null);
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,64 @@
package com.unity3d.ads.core.data.model;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AdData {
private final String data;
/* renamed from: box-impl, reason: not valid java name */
public static final /* synthetic */ AdData m3726boximpl(String str) {
return new AdData(str);
}
/* renamed from: constructor-impl, reason: not valid java name */
public static String m3727constructorimpl(String data) {
Intrinsics.checkNotNullParameter(data, "data");
return data;
}
/* renamed from: equals-impl, reason: not valid java name */
public static boolean m3728equalsimpl(String str, Object obj) {
return (obj instanceof AdData) && Intrinsics.areEqual(str, ((AdData) obj).m3732unboximpl());
}
/* renamed from: equals-impl0, reason: not valid java name */
public static final boolean m3729equalsimpl0(String str, String str2) {
return Intrinsics.areEqual(str, str2);
}
/* renamed from: hashCode-impl, reason: not valid java name */
public static int m3730hashCodeimpl(String str) {
return str.hashCode();
}
/* renamed from: toString-impl, reason: not valid java name */
public static String m3731toStringimpl(String str) {
return "AdData(data=" + str + ')';
}
public boolean equals(Object obj) {
return m3728equalsimpl(this.data, obj);
}
public final String getData() {
return this.data;
}
public int hashCode() {
return m3730hashCodeimpl(this.data);
}
public String toString() {
return m3731toStringimpl(this.data);
}
/* renamed from: unbox-impl, reason: not valid java name */
public final /* synthetic */ String m3732unboximpl() {
return this.data;
}
private /* synthetic */ AdData(String str) {
this.data = str;
}
}

View File

@@ -0,0 +1,64 @@
package com.unity3d.ads.core.data.model;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AdDataRefreshToken {
private final String data;
/* renamed from: box-impl, reason: not valid java name */
public static final /* synthetic */ AdDataRefreshToken m3733boximpl(String str) {
return new AdDataRefreshToken(str);
}
/* renamed from: constructor-impl, reason: not valid java name */
public static String m3734constructorimpl(String data) {
Intrinsics.checkNotNullParameter(data, "data");
return data;
}
/* renamed from: equals-impl, reason: not valid java name */
public static boolean m3735equalsimpl(String str, Object obj) {
return (obj instanceof AdDataRefreshToken) && Intrinsics.areEqual(str, ((AdDataRefreshToken) obj).m3739unboximpl());
}
/* renamed from: equals-impl0, reason: not valid java name */
public static final boolean m3736equalsimpl0(String str, String str2) {
return Intrinsics.areEqual(str, str2);
}
/* renamed from: hashCode-impl, reason: not valid java name */
public static int m3737hashCodeimpl(String str) {
return str.hashCode();
}
/* renamed from: toString-impl, reason: not valid java name */
public static String m3738toStringimpl(String str) {
return "AdDataRefreshToken(data=" + str + ')';
}
public boolean equals(Object obj) {
return m3735equalsimpl(this.data, obj);
}
public final String getData() {
return this.data;
}
public int hashCode() {
return m3737hashCodeimpl(this.data);
}
public String toString() {
return m3738toStringimpl(this.data);
}
/* renamed from: unbox-impl, reason: not valid java name */
public final /* synthetic */ String m3739unboximpl() {
return this.data;
}
private /* synthetic */ AdDataRefreshToken(String str) {
this.data = str;
}
}

View File

@@ -0,0 +1,147 @@
package com.unity3d.ads.core.data.model;
import com.google.protobuf.ByteString;
import com.unity3d.ads.UnityAdsLoadOptions;
import com.unity3d.ads.adplayer.AdPlayer;
import gatewayprotocol.v1.DiagnosticEventRequestOuterClass;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AdObject {
private final AdPlayer adPlayer;
private final DiagnosticEventRequestOuterClass.DiagnosticAdType adType;
private final Boolean isHeaderBidding;
private final UnityAdsLoadOptions loadOptions;
private final ByteString opportunityId;
private final String placementId;
private String playerServerId;
private ByteString trackingToken;
public final ByteString component1() {
return this.opportunityId;
}
public final String component2() {
return this.placementId;
}
public final ByteString component3() {
return this.trackingToken;
}
public final AdPlayer component4() {
return this.adPlayer;
}
public final String component5() {
return this.playerServerId;
}
public final UnityAdsLoadOptions component6() {
return this.loadOptions;
}
public final Boolean component7() {
return this.isHeaderBidding;
}
public final DiagnosticEventRequestOuterClass.DiagnosticAdType component8() {
return this.adType;
}
public final AdObject copy(ByteString opportunityId, String placementId, ByteString trackingToken, AdPlayer adPlayer, String str, UnityAdsLoadOptions loadOptions, Boolean bool, DiagnosticEventRequestOuterClass.DiagnosticAdType adType) {
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(trackingToken, "trackingToken");
Intrinsics.checkNotNullParameter(loadOptions, "loadOptions");
Intrinsics.checkNotNullParameter(adType, "adType");
return new AdObject(opportunityId, placementId, trackingToken, adPlayer, str, loadOptions, bool, adType);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof AdObject)) {
return false;
}
AdObject adObject = (AdObject) obj;
return Intrinsics.areEqual(this.opportunityId, adObject.opportunityId) && Intrinsics.areEqual(this.placementId, adObject.placementId) && Intrinsics.areEqual(this.trackingToken, adObject.trackingToken) && Intrinsics.areEqual(this.adPlayer, adObject.adPlayer) && Intrinsics.areEqual(this.playerServerId, adObject.playerServerId) && Intrinsics.areEqual(this.loadOptions, adObject.loadOptions) && Intrinsics.areEqual(this.isHeaderBidding, adObject.isHeaderBidding) && this.adType == adObject.adType;
}
public final AdPlayer getAdPlayer() {
return this.adPlayer;
}
public final DiagnosticEventRequestOuterClass.DiagnosticAdType getAdType() {
return this.adType;
}
public final UnityAdsLoadOptions getLoadOptions() {
return this.loadOptions;
}
public final ByteString getOpportunityId() {
return this.opportunityId;
}
public final String getPlacementId() {
return this.placementId;
}
public final String getPlayerServerId() {
return this.playerServerId;
}
public final ByteString getTrackingToken() {
return this.trackingToken;
}
public int hashCode() {
int hashCode = ((((this.opportunityId.hashCode() * 31) + this.placementId.hashCode()) * 31) + this.trackingToken.hashCode()) * 31;
AdPlayer adPlayer = this.adPlayer;
int hashCode2 = (hashCode + (adPlayer == null ? 0 : adPlayer.hashCode())) * 31;
String str = this.playerServerId;
int hashCode3 = (((hashCode2 + (str == null ? 0 : str.hashCode())) * 31) + this.loadOptions.hashCode()) * 31;
Boolean bool = this.isHeaderBidding;
return ((hashCode3 + (bool != null ? bool.hashCode() : 0)) * 31) + this.adType.hashCode();
}
public final Boolean isHeaderBidding() {
return this.isHeaderBidding;
}
public final void setPlayerServerId(String str) {
this.playerServerId = str;
}
public final void setTrackingToken(ByteString byteString) {
Intrinsics.checkNotNullParameter(byteString, "<set-?>");
this.trackingToken = byteString;
}
public String toString() {
return "AdObject(opportunityId=" + this.opportunityId + ", placementId=" + this.placementId + ", trackingToken=" + this.trackingToken + ", adPlayer=" + this.adPlayer + ", playerServerId=" + this.playerServerId + ", loadOptions=" + this.loadOptions + ", isHeaderBidding=" + this.isHeaderBidding + ", adType=" + this.adType + ')';
}
public AdObject(ByteString opportunityId, String placementId, ByteString trackingToken, AdPlayer adPlayer, String str, UnityAdsLoadOptions loadOptions, Boolean bool, DiagnosticEventRequestOuterClass.DiagnosticAdType adType) {
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(trackingToken, "trackingToken");
Intrinsics.checkNotNullParameter(loadOptions, "loadOptions");
Intrinsics.checkNotNullParameter(adType, "adType");
this.opportunityId = opportunityId;
this.placementId = placementId;
this.trackingToken = trackingToken;
this.adPlayer = adPlayer;
this.playerServerId = str;
this.loadOptions = loadOptions;
this.isHeaderBidding = bool;
this.adType = adType;
}
public /* synthetic */ AdObject(ByteString byteString, String str, ByteString byteString2, AdPlayer adPlayer, String str2, UnityAdsLoadOptions unityAdsLoadOptions, Boolean bool, DiagnosticEventRequestOuterClass.DiagnosticAdType diagnosticAdType, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(byteString, str, byteString2, (i & 8) != 0 ? null : adPlayer, (i & 16) != 0 ? null : str2, unityAdsLoadOptions, (i & 64) != 0 ? null : bool, diagnosticAdType);
}
}

View File

@@ -0,0 +1,45 @@
package com.unity3d.ads.core.data.model;
import androidx.datastore.core.CorruptionException;
import androidx.datastore.core.Serializer;
import com.google.protobuf.InvalidProtocolBufferException;
import com.unity3d.ads.datastore.ByteStringStoreOuterClass;
import java.io.InputStream;
import java.io.OutputStream;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class ByteStringSerializer implements Serializer<ByteStringStoreOuterClass.ByteStringStore> {
private final ByteStringStoreOuterClass.ByteStringStore defaultValue;
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.datastore.core.Serializer
public ByteStringStoreOuterClass.ByteStringStore getDefaultValue() {
return this.defaultValue;
}
public ByteStringSerializer() {
ByteStringStoreOuterClass.ByteStringStore defaultInstance = ByteStringStoreOuterClass.ByteStringStore.getDefaultInstance();
Intrinsics.checkNotNullExpressionValue(defaultInstance, "getDefaultInstance()");
this.defaultValue = defaultInstance;
}
@Override // androidx.datastore.core.Serializer
public Object readFrom(InputStream inputStream, Continuation continuation) {
try {
ByteStringStoreOuterClass.ByteStringStore parseFrom = ByteStringStoreOuterClass.ByteStringStore.parseFrom(inputStream);
Intrinsics.checkNotNullExpressionValue(parseFrom, "parseFrom(input)");
return parseFrom;
} catch (InvalidProtocolBufferException e) {
throw new CorruptionException("Cannot read proto.", e);
}
}
@Override // androidx.datastore.core.Serializer
public Object writeTo(ByteStringStoreOuterClass.ByteStringStore byteStringStore, OutputStream outputStream, Continuation continuation) {
byteStringStore.writeTo(outputStream);
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,23 @@
package com.unity3d.ads.core.data.model;
/* loaded from: classes4.dex */
public enum CacheError {
FILE_IO_CREATE,
FILE_IO_ERROR,
FILE_NOT_FOUND,
FILE_ALREADY_CACHING,
NOT_CACHING,
JSON_ERROR,
NO_INTERNET,
MALFORMED_URL,
NETWORK_ERROR,
ILLEGAL_STATE,
INVALID_ARGUMENT,
UNSUPPORTED_ENCODING,
FILE_STATE_WRONG,
CACHE_DIRECTORY_NULL,
CACHE_DIRECTORY_TYPE_NULL,
CACHE_DIRECTORY_EXISTS,
CACHE_DIRECTORY_DOESNT_EXIST,
UNKNOWN_ERROR
}

View File

@@ -0,0 +1,148 @@
package com.unity3d.ads.core.data.model;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class CacheResult {
public /* synthetic */ CacheResult(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static final class Success extends CacheResult {
private final CachedFile cachedFile;
private final CacheSource source;
public static /* synthetic */ Success copy$default(Success success, CachedFile cachedFile, CacheSource cacheSource, int i, Object obj) {
if ((i & 1) != 0) {
cachedFile = success.cachedFile;
}
if ((i & 2) != 0) {
cacheSource = success.source;
}
return success.copy(cachedFile, cacheSource);
}
public final CachedFile component1() {
return this.cachedFile;
}
public final CacheSource component2() {
return this.source;
}
public final Success copy(CachedFile cachedFile, CacheSource source) {
Intrinsics.checkNotNullParameter(cachedFile, "cachedFile");
Intrinsics.checkNotNullParameter(source, "source");
return new Success(cachedFile, source);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Success)) {
return false;
}
Success success = (Success) obj;
return Intrinsics.areEqual(this.cachedFile, success.cachedFile) && this.source == success.source;
}
public final CachedFile getCachedFile() {
return this.cachedFile;
}
public final CacheSource getSource() {
return this.source;
}
public int hashCode() {
return (this.cachedFile.hashCode() * 31) + this.source.hashCode();
}
public String toString() {
return "Success(cachedFile=" + this.cachedFile + ", source=" + this.source + ')';
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public Success(CachedFile cachedFile, CacheSource source) {
super(null);
Intrinsics.checkNotNullParameter(cachedFile, "cachedFile");
Intrinsics.checkNotNullParameter(source, "source");
this.cachedFile = cachedFile;
this.source = source;
}
}
private CacheResult() {
}
public static final class Failure extends CacheResult {
private final CacheError error;
private final CacheSource source;
public static /* synthetic */ Failure copy$default(Failure failure, CacheError cacheError, CacheSource cacheSource, int i, Object obj) {
if ((i & 1) != 0) {
cacheError = failure.error;
}
if ((i & 2) != 0) {
cacheSource = failure.source;
}
return failure.copy(cacheError, cacheSource);
}
public final CacheError component1() {
return this.error;
}
public final CacheSource component2() {
return this.source;
}
public final Failure copy(CacheError error, CacheSource source) {
Intrinsics.checkNotNullParameter(error, "error");
Intrinsics.checkNotNullParameter(source, "source");
return new Failure(error, source);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Failure)) {
return false;
}
Failure failure = (Failure) obj;
return this.error == failure.error && this.source == failure.source;
}
public final CacheError getError() {
return this.error;
}
public final CacheSource getSource() {
return this.source;
}
public int hashCode() {
return (this.error.hashCode() * 31) + this.source.hashCode();
}
public String toString() {
return "Failure(error=" + this.error + ", source=" + this.source + ')';
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public Failure(CacheError error, CacheSource source) {
super(null);
Intrinsics.checkNotNullParameter(error, "error");
Intrinsics.checkNotNullParameter(source, "source");
this.error = error;
this.source = source;
}
public /* synthetic */ Failure(CacheError cacheError, CacheSource cacheSource, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(cacheError, (i & 2) != 0 ? CacheSource.LOCAL : cacheSource);
}
}
}

View File

@@ -0,0 +1,7 @@
package com.unity3d.ads.core.data.model;
/* loaded from: classes4.dex */
public enum CacheSource {
LOCAL,
REMOTE
}

View File

@@ -0,0 +1,131 @@
package com.unity3d.ads.core.data.model;
import java.io.File;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class CachedFile {
private final long contentLength;
private final String extension;
private final File file;
private final String name;
private final String objectId;
private final int priority;
private final String protocol;
private final String url;
public final String component1() {
return this.objectId;
}
public final String component2() {
return this.url;
}
public final String component3() {
return this.name;
}
public final File component4() {
return this.file;
}
public final String component5() {
return this.extension;
}
public final long component6() {
return this.contentLength;
}
public final String component7() {
return this.protocol;
}
public final int component8() {
return this.priority;
}
public final CachedFile copy(String objectId, String url, String name, File file, String str, long j, String protocol, int i) {
Intrinsics.checkNotNullParameter(objectId, "objectId");
Intrinsics.checkNotNullParameter(url, "url");
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(protocol, "protocol");
return new CachedFile(objectId, url, name, file, str, j, protocol, i);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof CachedFile)) {
return false;
}
CachedFile cachedFile = (CachedFile) obj;
return Intrinsics.areEqual(this.objectId, cachedFile.objectId) && Intrinsics.areEqual(this.url, cachedFile.url) && Intrinsics.areEqual(this.name, cachedFile.name) && Intrinsics.areEqual(this.file, cachedFile.file) && Intrinsics.areEqual(this.extension, cachedFile.extension) && this.contentLength == cachedFile.contentLength && Intrinsics.areEqual(this.protocol, cachedFile.protocol) && this.priority == cachedFile.priority;
}
public final long getContentLength() {
return this.contentLength;
}
public final String getExtension() {
return this.extension;
}
public final File getFile() {
return this.file;
}
public final String getName() {
return this.name;
}
public final String getObjectId() {
return this.objectId;
}
public final int getPriority() {
return this.priority;
}
public final String getProtocol() {
return this.protocol;
}
public final String getUrl() {
return this.url;
}
public int hashCode() {
int hashCode = ((((this.objectId.hashCode() * 31) + this.url.hashCode()) * 31) + this.name.hashCode()) * 31;
File file = this.file;
int hashCode2 = (hashCode + (file == null ? 0 : file.hashCode())) * 31;
String str = this.extension;
return ((((((hashCode2 + (str != null ? str.hashCode() : 0)) * 31) + Long.hashCode(this.contentLength)) * 31) + this.protocol.hashCode()) * 31) + Integer.hashCode(this.priority);
}
public String toString() {
return "CachedFile(objectId=" + this.objectId + ", url=" + this.url + ", name=" + this.name + ", file=" + this.file + ", extension=" + this.extension + ", contentLength=" + this.contentLength + ", protocol=" + this.protocol + ", priority=" + this.priority + ')';
}
public CachedFile(String objectId, String url, String name, File file, String str, long j, String protocol, int i) {
Intrinsics.checkNotNullParameter(objectId, "objectId");
Intrinsics.checkNotNullParameter(url, "url");
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(protocol, "protocol");
this.objectId = objectId;
this.url = url;
this.name = name;
this.file = file;
this.extension = str;
this.contentLength = j;
this.protocol = protocol;
this.priority = i;
}
public /* synthetic */ CachedFile(String str, String str2, String str3, File file, String str4, long j, String str5, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(str, str2, str3, (i2 & 8) != 0 ? null : file, (i2 & 16) != 0 ? "" : str4, (i2 & 32) != 0 ? -1L : j, (i2 & 64) != 0 ? "" : str5, (i2 & 128) != 0 ? Integer.MAX_VALUE : i);
}
}

View File

@@ -0,0 +1,64 @@
package com.unity3d.ads.core.data.model;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class ImpressionConfig {
private final String data;
/* renamed from: box-impl, reason: not valid java name */
public static final /* synthetic */ ImpressionConfig m3740boximpl(String str) {
return new ImpressionConfig(str);
}
/* renamed from: constructor-impl, reason: not valid java name */
public static String m3741constructorimpl(String data) {
Intrinsics.checkNotNullParameter(data, "data");
return data;
}
/* renamed from: equals-impl, reason: not valid java name */
public static boolean m3742equalsimpl(String str, Object obj) {
return (obj instanceof ImpressionConfig) && Intrinsics.areEqual(str, ((ImpressionConfig) obj).m3746unboximpl());
}
/* renamed from: equals-impl0, reason: not valid java name */
public static final boolean m3743equalsimpl0(String str, String str2) {
return Intrinsics.areEqual(str, str2);
}
/* renamed from: hashCode-impl, reason: not valid java name */
public static int m3744hashCodeimpl(String str) {
return str.hashCode();
}
/* renamed from: toString-impl, reason: not valid java name */
public static String m3745toStringimpl(String str) {
return "ImpressionConfig(data=" + str + ')';
}
public boolean equals(Object obj) {
return m3742equalsimpl(this.data, obj);
}
public final String getData() {
return this.data;
}
public int hashCode() {
return m3744hashCodeimpl(this.data);
}
public String toString() {
return m3745toStringimpl(this.data);
}
/* renamed from: unbox-impl, reason: not valid java name */
public final /* synthetic */ String m3746unboximpl() {
return this.data;
}
private /* synthetic */ ImpressionConfig(String str) {
this.data = str;
}
}

View File

@@ -0,0 +1,22 @@
package com.unity3d.ads.core.data.model;
import java.util.Locale;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public enum InitializationState {
NOT_INITIALIZED,
INITIALIZING,
INITIALIZED,
FAILED;
@Override // java.lang.Enum
public String toString() {
String str = super.toString();
Locale locale = Locale.getDefault();
Intrinsics.checkNotNullExpressionValue(locale, "getDefault()");
String lowerCase = str.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase(locale)");
return lowerCase;
}
}

View File

@@ -0,0 +1,43 @@
package com.unity3d.ads.core.data.model;
import com.unity3d.ads.UnityAds;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public interface Listeners {
public static final class DefaultImpls {
public static void onClick(Listeners listeners, String placementId) {
Intrinsics.checkNotNullParameter(placementId, "placementId");
}
public static void onComplete(Listeners listeners, String placementId, UnityAds.UnityAdsShowCompletionState state) {
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(state, "state");
}
public static void onError(Listeners listeners, String placementId, UnityAds.UnityAdsShowError error, String message) {
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(error, "error");
Intrinsics.checkNotNullParameter(message, "message");
}
public static void onLeftApplication(Listeners listeners, String placementId) {
Intrinsics.checkNotNullParameter(placementId, "placementId");
}
public static void onStart(Listeners listeners, String placementId) {
Intrinsics.checkNotNullParameter(placementId, "placementId");
}
}
void onClick(String str);
void onComplete(String str, UnityAds.UnityAdsShowCompletionState unityAdsShowCompletionState);
void onError(String str, UnityAds.UnityAdsShowError unityAdsShowError, String str2);
void onLeftApplication(String str);
void onStart(String str);
}

View File

@@ -0,0 +1,203 @@
package com.unity3d.ads.core.data.model;
import com.unity3d.ads.UnityAds;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class LoadResult {
public static final Companion Companion = new Companion(null);
public static final String MSG_AD_MARKUP_PARSING = "[UnityAds] Could not parse Ad Markup";
public static final String MSG_AD_OBJECT = "[UnityAds] Ad not found";
public static final String MSG_COMMUNICATION_FAILURE = "[UnityAds] Internal communication failure";
public static final String MSG_COMMUNICATION_FAILURE_WITH_DETAILS = "[UnityAds] Internal communication failure: %s";
public static final String MSG_COMMUNICATION_TIMEOUT = "[UnityAds] Internal communication timeout";
public static final String MSG_CREATE_REQUEST = "[UnityAds] Failed to create load request";
public static final String MSG_INIT_FAILED = "[UnityAds] SDK Initialization Failed";
public static final String MSG_INIT_FAILURE = "[UnityAds] SDK Initialization Failure";
public static final String MSG_NOT_INITIALIZED = "[UnityAds] SDK not initialized";
public static final String MSG_NO_FILL = "[UnityAds] No fill";
public static final String MSG_OPPORTUNITY_ID = "[UnityAds] Object ID cannot be null";
public static final String MSG_OPPORTUNITY_ID_USED = "[UnityAds] Object ID already used";
public static final String MSG_PLACEMENT_NULL = "[UnityAds] Placement ID cannot be null";
public static final String MSG_TIMEOUT = "[UnityAds] Timeout while loading ";
public /* synthetic */ LoadResult(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static final class Success extends LoadResult {
private final AdObject adObject;
public static /* synthetic */ Success copy$default(Success success, AdObject adObject, int i, Object obj) {
if ((i & 1) != 0) {
adObject = success.adObject;
}
return success.copy(adObject);
}
public final AdObject component1() {
return this.adObject;
}
public final Success copy(AdObject adObject) {
Intrinsics.checkNotNullParameter(adObject, "adObject");
return new Success(adObject);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof Success) && Intrinsics.areEqual(this.adObject, ((Success) obj).adObject);
}
public final AdObject getAdObject() {
return this.adObject;
}
public int hashCode() {
return this.adObject.hashCode();
}
public String toString() {
return "Success(adObject=" + this.adObject + ')';
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public Success(AdObject adObject) {
super(null);
Intrinsics.checkNotNullParameter(adObject, "adObject");
this.adObject = adObject;
}
}
private LoadResult() {
}
public static final class Failure extends LoadResult {
private final UnityAds.UnityAdsLoadError error;
private final String message;
private final String reason;
private final String reasonDebug;
private final Throwable throwable;
public static /* synthetic */ Failure copy$default(Failure failure, UnityAds.UnityAdsLoadError unityAdsLoadError, String str, Throwable th, String str2, String str3, int i, Object obj) {
if ((i & 1) != 0) {
unityAdsLoadError = failure.error;
}
if ((i & 2) != 0) {
str = failure.message;
}
String str4 = str;
if ((i & 4) != 0) {
th = failure.throwable;
}
Throwable th2 = th;
if ((i & 8) != 0) {
str2 = failure.reason;
}
String str5 = str2;
if ((i & 16) != 0) {
str3 = failure.reasonDebug;
}
return failure.copy(unityAdsLoadError, str4, th2, str5, str3);
}
public final UnityAds.UnityAdsLoadError component1() {
return this.error;
}
public final String component2() {
return this.message;
}
public final Throwable component3() {
return this.throwable;
}
public final String component4() {
return this.reason;
}
public final String component5() {
return this.reasonDebug;
}
public final Failure copy(UnityAds.UnityAdsLoadError error, String str, Throwable th, String reason, String str2) {
Intrinsics.checkNotNullParameter(error, "error");
Intrinsics.checkNotNullParameter(reason, "reason");
return new Failure(error, str, th, reason, str2);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Failure)) {
return false;
}
Failure failure = (Failure) obj;
return this.error == failure.error && Intrinsics.areEqual(this.message, failure.message) && Intrinsics.areEqual(this.throwable, failure.throwable) && Intrinsics.areEqual(this.reason, failure.reason) && Intrinsics.areEqual(this.reasonDebug, failure.reasonDebug);
}
public final UnityAds.UnityAdsLoadError getError() {
return this.error;
}
public final String getMessage() {
return this.message;
}
public final String getReason() {
return this.reason;
}
public final String getReasonDebug() {
return this.reasonDebug;
}
public final Throwable getThrowable() {
return this.throwable;
}
public int hashCode() {
int hashCode = this.error.hashCode() * 31;
String str = this.message;
int hashCode2 = (hashCode + (str == null ? 0 : str.hashCode())) * 31;
Throwable th = this.throwable;
int hashCode3 = (((hashCode2 + (th == null ? 0 : th.hashCode())) * 31) + this.reason.hashCode()) * 31;
String str2 = this.reasonDebug;
return hashCode3 + (str2 != null ? str2.hashCode() : 0);
}
public String toString() {
return "Failure(error=" + this.error + ", message=" + this.message + ", throwable=" + this.throwable + ", reason=" + this.reason + ", reasonDebug=" + this.reasonDebug + ')';
}
public /* synthetic */ Failure(UnityAds.UnityAdsLoadError unityAdsLoadError, String str, Throwable th, String str2, String str3, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(unityAdsLoadError, (i & 2) != 0 ? null : str, (i & 4) != 0 ? null : th, str2, (i & 16) != 0 ? null : str3);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public Failure(UnityAds.UnityAdsLoadError error, String str, Throwable th, String reason, String str2) {
super(null);
Intrinsics.checkNotNullParameter(error, "error");
Intrinsics.checkNotNullParameter(reason, "reason");
this.error = error;
this.message = str;
this.throwable = th;
this.reason = reason;
this.reasonDebug = str2;
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,82 @@
package com.unity3d.ads.core.data.model;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class OMData {
private final String partnerName;
private final String partnerVersion;
private final String version;
public static /* synthetic */ OMData copy$default(OMData oMData, String str, String str2, String str3, int i, Object obj) {
if ((i & 1) != 0) {
str = oMData.version;
}
if ((i & 2) != 0) {
str2 = oMData.partnerName;
}
if ((i & 4) != 0) {
str3 = oMData.partnerVersion;
}
return oMData.copy(str, str2, str3);
}
public final String component1() {
return this.version;
}
public final String component2() {
return this.partnerName;
}
public final String component3() {
return this.partnerVersion;
}
public final OMData copy(String version, String partnerName, String partnerVersion) {
Intrinsics.checkNotNullParameter(version, "version");
Intrinsics.checkNotNullParameter(partnerName, "partnerName");
Intrinsics.checkNotNullParameter(partnerVersion, "partnerVersion");
return new OMData(version, partnerName, partnerVersion);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof OMData)) {
return false;
}
OMData oMData = (OMData) obj;
return Intrinsics.areEqual(this.version, oMData.version) && Intrinsics.areEqual(this.partnerName, oMData.partnerName) && Intrinsics.areEqual(this.partnerVersion, oMData.partnerVersion);
}
public final String getPartnerName() {
return this.partnerName;
}
public final String getPartnerVersion() {
return this.partnerVersion;
}
public final String getVersion() {
return this.version;
}
public int hashCode() {
return (((this.version.hashCode() * 31) + this.partnerName.hashCode()) * 31) + this.partnerVersion.hashCode();
}
public String toString() {
return "OMData(version=" + this.version + ", partnerName=" + this.partnerName + ", partnerVersion=" + this.partnerVersion + ')';
}
public OMData(String version, String partnerName, String partnerVersion) {
Intrinsics.checkNotNullParameter(version, "version");
Intrinsics.checkNotNullParameter(partnerName, "partnerName");
Intrinsics.checkNotNullParameter(partnerVersion, "partnerVersion");
this.version = version;
this.partnerName = partnerName;
this.partnerVersion = partnerVersion;
}
}

View File

@@ -0,0 +1,91 @@
package com.unity3d.ads.core.data.model;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class OMResult {
public /* synthetic */ OMResult(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static final class Success extends OMResult {
public static final Success INSTANCE = new Success();
private Success() {
super(null);
}
}
private OMResult() {
}
public static final class Failure extends OMResult {
private final String reason;
private final String reasonDebug;
public static /* synthetic */ Failure copy$default(Failure failure, String str, String str2, int i, Object obj) {
if ((i & 1) != 0) {
str = failure.reason;
}
if ((i & 2) != 0) {
str2 = failure.reasonDebug;
}
return failure.copy(str, str2);
}
public final String component1() {
return this.reason;
}
public final String component2() {
return this.reasonDebug;
}
public final Failure copy(String reason, String str) {
Intrinsics.checkNotNullParameter(reason, "reason");
return new Failure(reason, str);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Failure)) {
return false;
}
Failure failure = (Failure) obj;
return Intrinsics.areEqual(this.reason, failure.reason) && Intrinsics.areEqual(this.reasonDebug, failure.reasonDebug);
}
public final String getReason() {
return this.reason;
}
public final String getReasonDebug() {
return this.reasonDebug;
}
public int hashCode() {
int hashCode = this.reason.hashCode() * 31;
String str = this.reasonDebug;
return hashCode + (str == null ? 0 : str.hashCode());
}
public String toString() {
return "Failure(reason=" + this.reason + ", reasonDebug=" + this.reasonDebug + ')';
}
public /* synthetic */ Failure(String str, String str2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, (i & 2) != 0 ? null : str2);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public Failure(String reason, String str) {
super(null);
Intrinsics.checkNotNullParameter(reason, "reason");
this.reason = reason;
this.reasonDebug = str;
}
}
}

View File

@@ -0,0 +1,166 @@
package com.unity3d.ads.core.data.model;
import com.iab.omid.library.unity3d.adsession.CreativeType;
import com.iab.omid.library.unity3d.adsession.ImpressionType;
import com.iab.omid.library.unity3d.adsession.Owner;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class OmidOptions {
private final CreativeType creativeType;
private final String customReferenceData;
private final Owner impressionOwner;
private final ImpressionType impressionType;
private final boolean isolateVerificationScripts;
private final Owner mediaEventsOwner;
private final Owner videoEventsOwner;
public OmidOptions() {
this(false, null, null, null, null, null, null, 127, null);
}
public static /* synthetic */ OmidOptions copy$default(OmidOptions omidOptions, boolean z, Owner owner, Owner owner2, String str, ImpressionType impressionType, CreativeType creativeType, Owner owner3, int i, Object obj) {
if ((i & 1) != 0) {
z = omidOptions.isolateVerificationScripts;
}
if ((i & 2) != 0) {
owner = omidOptions.impressionOwner;
}
Owner owner4 = owner;
if ((i & 4) != 0) {
owner2 = omidOptions.videoEventsOwner;
}
Owner owner5 = owner2;
if ((i & 8) != 0) {
str = omidOptions.customReferenceData;
}
String str2 = str;
if ((i & 16) != 0) {
impressionType = omidOptions.impressionType;
}
ImpressionType impressionType2 = impressionType;
if ((i & 32) != 0) {
creativeType = omidOptions.creativeType;
}
CreativeType creativeType2 = creativeType;
if ((i & 64) != 0) {
owner3 = omidOptions.mediaEventsOwner;
}
return omidOptions.copy(z, owner4, owner5, str2, impressionType2, creativeType2, owner3);
}
public final boolean component1() {
return this.isolateVerificationScripts;
}
public final Owner component2() {
return this.impressionOwner;
}
public final Owner component3() {
return this.videoEventsOwner;
}
public final String component4() {
return this.customReferenceData;
}
public final ImpressionType component5() {
return this.impressionType;
}
public final CreativeType component6() {
return this.creativeType;
}
public final Owner component7() {
return this.mediaEventsOwner;
}
public final OmidOptions copy(boolean z, Owner owner, Owner owner2, String str, ImpressionType impressionType, CreativeType creativeType, Owner owner3) {
return new OmidOptions(z, owner, owner2, str, impressionType, creativeType, owner3);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof OmidOptions)) {
return false;
}
OmidOptions omidOptions = (OmidOptions) obj;
return this.isolateVerificationScripts == omidOptions.isolateVerificationScripts && this.impressionOwner == omidOptions.impressionOwner && this.videoEventsOwner == omidOptions.videoEventsOwner && Intrinsics.areEqual(this.customReferenceData, omidOptions.customReferenceData) && this.impressionType == omidOptions.impressionType && this.creativeType == omidOptions.creativeType && this.mediaEventsOwner == omidOptions.mediaEventsOwner;
}
public final CreativeType getCreativeType() {
return this.creativeType;
}
public final String getCustomReferenceData() {
return this.customReferenceData;
}
public final Owner getImpressionOwner() {
return this.impressionOwner;
}
public final ImpressionType getImpressionType() {
return this.impressionType;
}
public final boolean getIsolateVerificationScripts() {
return this.isolateVerificationScripts;
}
public final Owner getMediaEventsOwner() {
return this.mediaEventsOwner;
}
public final Owner getVideoEventsOwner() {
return this.videoEventsOwner;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v1, types: [int] */
/* JADX WARN: Type inference failed for: r0v14 */
/* JADX WARN: Type inference failed for: r0v15 */
public int hashCode() {
boolean z = this.isolateVerificationScripts;
?? r0 = z;
if (z) {
r0 = 1;
}
int i = r0 * 31;
Owner owner = this.impressionOwner;
int hashCode = (i + (owner == null ? 0 : owner.hashCode())) * 31;
Owner owner2 = this.videoEventsOwner;
int hashCode2 = (hashCode + (owner2 == null ? 0 : owner2.hashCode())) * 31;
String str = this.customReferenceData;
int hashCode3 = (hashCode2 + (str == null ? 0 : str.hashCode())) * 31;
ImpressionType impressionType = this.impressionType;
int hashCode4 = (hashCode3 + (impressionType == null ? 0 : impressionType.hashCode())) * 31;
CreativeType creativeType = this.creativeType;
int hashCode5 = (hashCode4 + (creativeType == null ? 0 : creativeType.hashCode())) * 31;
Owner owner3 = this.mediaEventsOwner;
return hashCode5 + (owner3 != null ? owner3.hashCode() : 0);
}
public String toString() {
return "OmidOptions(isolateVerificationScripts=" + this.isolateVerificationScripts + ", impressionOwner=" + this.impressionOwner + ", videoEventsOwner=" + this.videoEventsOwner + ", customReferenceData=" + this.customReferenceData + ", impressionType=" + this.impressionType + ", creativeType=" + this.creativeType + ", mediaEventsOwner=" + this.mediaEventsOwner + ')';
}
public OmidOptions(boolean z, Owner owner, Owner owner2, String str, ImpressionType impressionType, CreativeType creativeType, Owner owner3) {
this.isolateVerificationScripts = z;
this.impressionOwner = owner;
this.videoEventsOwner = owner2;
this.customReferenceData = str;
this.impressionType = impressionType;
this.creativeType = creativeType;
this.mediaEventsOwner = owner3;
}
public /* synthetic */ OmidOptions(boolean z, Owner owner, Owner owner2, String str, ImpressionType impressionType, CreativeType creativeType, Owner owner3, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? false : z, (i & 2) != 0 ? null : owner, (i & 4) != 0 ? null : owner2, (i & 8) != 0 ? null : str, (i & 16) != 0 ? null : impressionType, (i & 32) != 0 ? null : creativeType, (i & 64) == 0 ? owner3 : null);
}
}

View File

@@ -0,0 +1,28 @@
package com.unity3d.ads.core.data.model;
import java.util.Locale;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public enum OperationType {
UNKNOWN,
INITIALIZATION,
LOAD,
LOAD_HEADER_BIDDING,
SHOW,
REFRESH,
PRIVACY_UPDATE,
INITIALIZATION_COMPLETED,
TRANSACTION_EVENT,
UNIVERSAL_EVENT;
@Override // java.lang.Enum
public String toString() {
String str = super.toString();
Locale locale = Locale.getDefault();
Intrinsics.checkNotNullExpressionValue(locale, "getDefault()");
String lowerCase = str.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase(locale)");
return lowerCase;
}
}

View File

@@ -0,0 +1,107 @@
package com.unity3d.ads.core.data.model;
import com.google.protobuf.ByteString;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class SessionChange {
public /* synthetic */ SessionChange(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static final class UserConsentChange extends SessionChange {
private final ByteString value;
public static /* synthetic */ UserConsentChange copy$default(UserConsentChange userConsentChange, ByteString byteString, int i, Object obj) {
if ((i & 1) != 0) {
byteString = userConsentChange.value;
}
return userConsentChange.copy(byteString);
}
public final ByteString component1() {
return this.value;
}
public final UserConsentChange copy(ByteString value) {
Intrinsics.checkNotNullParameter(value, "value");
return new UserConsentChange(value);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof UserConsentChange) && Intrinsics.areEqual(this.value, ((UserConsentChange) obj).value);
}
public final ByteString getValue() {
return this.value;
}
public int hashCode() {
return this.value.hashCode();
}
public String toString() {
return "UserConsentChange(value=" + this.value + ')';
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public UserConsentChange(ByteString value) {
super(null);
Intrinsics.checkNotNullParameter(value, "value");
this.value = value;
}
}
private SessionChange() {
}
public static final class PrivacyFsmChange extends SessionChange {
private final ByteString value;
public static /* synthetic */ PrivacyFsmChange copy$default(PrivacyFsmChange privacyFsmChange, ByteString byteString, int i, Object obj) {
if ((i & 1) != 0) {
byteString = privacyFsmChange.value;
}
return privacyFsmChange.copy(byteString);
}
public final ByteString component1() {
return this.value;
}
public final PrivacyFsmChange copy(ByteString value) {
Intrinsics.checkNotNullParameter(value, "value");
return new PrivacyFsmChange(value);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof PrivacyFsmChange) && Intrinsics.areEqual(this.value, ((PrivacyFsmChange) obj).value);
}
public final ByteString getValue() {
return this.value;
}
public int hashCode() {
return this.value.hashCode();
}
public String toString() {
return "PrivacyFsmChange(value=" + this.value + ')';
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public PrivacyFsmChange(ByteString value) {
super(null);
Intrinsics.checkNotNullParameter(value, "value");
this.value = value;
}
}
}

View File

@@ -0,0 +1,171 @@
package com.unity3d.ads.core.data.model;
import com.unity3d.ads.adplayer.model.ShowStatus;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class ShowEvent {
public /* synthetic */ ShowEvent(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static final class Started extends ShowEvent {
public static final Started INSTANCE = new Started();
private Started() {
super(null);
}
}
private ShowEvent() {
}
public static final class Clicked extends ShowEvent {
public static final Clicked INSTANCE = new Clicked();
private Clicked() {
super(null);
}
}
public static final class CancelTimeout extends ShowEvent {
public static final CancelTimeout INSTANCE = new CancelTimeout();
private CancelTimeout() {
super(null);
}
}
public static final class Completed extends ShowEvent {
private final ShowStatus status;
public static /* synthetic */ Completed copy$default(Completed completed, ShowStatus showStatus, int i, Object obj) {
if ((i & 1) != 0) {
showStatus = completed.status;
}
return completed.copy(showStatus);
}
public final ShowStatus component1() {
return this.status;
}
public final Completed copy(ShowStatus status) {
Intrinsics.checkNotNullParameter(status, "status");
return new Completed(status);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof Completed) && this.status == ((Completed) obj).status;
}
public final ShowStatus getStatus() {
return this.status;
}
public int hashCode() {
return this.status.hashCode();
}
public String toString() {
return "Completed(status=" + this.status + ')';
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public Completed(ShowStatus status) {
super(null);
Intrinsics.checkNotNullParameter(status, "status");
this.status = status;
}
}
public static final class Error extends ShowEvent {
private final int errorCode;
private final String message;
private final String reason;
public static /* synthetic */ Error copy$default(Error error, String str, int i, String str2, int i2, Object obj) {
if ((i2 & 1) != 0) {
str = error.message;
}
if ((i2 & 2) != 0) {
i = error.errorCode;
}
if ((i2 & 4) != 0) {
str2 = error.reason;
}
return error.copy(str, i, str2);
}
public final String component1() {
return this.message;
}
public final int component2() {
return this.errorCode;
}
public final String component3() {
return this.reason;
}
public final Error copy(String message, int i, String reason) {
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(reason, "reason");
return new Error(message, i, reason);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Error)) {
return false;
}
Error error = (Error) obj;
return Intrinsics.areEqual(this.message, error.message) && this.errorCode == error.errorCode && Intrinsics.areEqual(this.reason, error.reason);
}
public final int getErrorCode() {
return this.errorCode;
}
public final String getMessage() {
return this.message;
}
public final String getReason() {
return this.reason;
}
public int hashCode() {
return (((this.message.hashCode() * 31) + Integer.hashCode(this.errorCode)) * 31) + this.reason.hashCode();
}
public String toString() {
return "Error(message=" + this.message + ", errorCode=" + this.errorCode + ", reason=" + this.reason + ')';
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public Error(String message, int i, String reason) {
super(null);
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(reason, "reason");
this.message = message;
this.errorCode = i;
this.reason = reason;
}
}
public static final class LeftApplication extends ShowEvent {
public static final LeftApplication INSTANCE = new LeftApplication();
private LeftApplication() {
super(null);
}
}
}

View File

@@ -0,0 +1,7 @@
package com.unity3d.ads.core.data.model;
/* loaded from: classes4.dex */
public enum StorageType {
EXTERNAL,
INTERNAL
}

View File

@@ -0,0 +1,15 @@
package com.unity3d.ads.core.data.model;
/* loaded from: classes4.dex */
public enum UnityAdsShowResult {
NOT_INITIALIZED,
NOT_READY,
VIDEO_PLAYER_ERROR,
INVALID_ARGUMENT,
NO_CONNECTION,
ALREADY_SHOWING,
INTERNAL_ERROR,
TIMEOUT,
SUCCESS,
FAILURE
}

View File

@@ -0,0 +1,45 @@
package com.unity3d.ads.core.data.model;
import androidx.datastore.core.CorruptionException;
import androidx.datastore.core.Serializer;
import com.google.protobuf.InvalidProtocolBufferException;
import com.unity3d.ads.datastore.UniversalRequestStoreOuterClass;
import java.io.InputStream;
import java.io.OutputStream;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class UniversalRequestStoreSerializer implements Serializer<UniversalRequestStoreOuterClass.UniversalRequestStore> {
private final UniversalRequestStoreOuterClass.UniversalRequestStore defaultValue;
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.datastore.core.Serializer
public UniversalRequestStoreOuterClass.UniversalRequestStore getDefaultValue() {
return this.defaultValue;
}
public UniversalRequestStoreSerializer() {
UniversalRequestStoreOuterClass.UniversalRequestStore defaultInstance = UniversalRequestStoreOuterClass.UniversalRequestStore.getDefaultInstance();
Intrinsics.checkNotNullExpressionValue(defaultInstance, "getDefaultInstance()");
this.defaultValue = defaultInstance;
}
@Override // androidx.datastore.core.Serializer
public Object readFrom(InputStream inputStream, Continuation continuation) {
try {
UniversalRequestStoreOuterClass.UniversalRequestStore parseFrom = UniversalRequestStoreOuterClass.UniversalRequestStore.parseFrom(inputStream);
Intrinsics.checkNotNullExpressionValue(parseFrom, "parseFrom(input)");
return parseFrom;
} catch (InvalidProtocolBufferException e) {
throw new CorruptionException("Cannot read proto.", e);
}
}
@Override // androidx.datastore.core.Serializer
public Object writeTo(UniversalRequestStoreOuterClass.UniversalRequestStore universalRequestStore, OutputStream outputStream, Continuation continuation) {
universalRequestStore.writeTo(outputStream);
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,82 @@
package com.unity3d.ads.core.data.model;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class WebViewConfiguration {
private final List<String> additionalFiles;
private final String entryPoint;
private final int version;
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ WebViewConfiguration copy$default(WebViewConfiguration webViewConfiguration, int i, String str, List list, int i2, Object obj) {
if ((i2 & 1) != 0) {
i = webViewConfiguration.version;
}
if ((i2 & 2) != 0) {
str = webViewConfiguration.entryPoint;
}
if ((i2 & 4) != 0) {
list = webViewConfiguration.additionalFiles;
}
return webViewConfiguration.copy(i, str, list);
}
public final int component1() {
return this.version;
}
public final String component2() {
return this.entryPoint;
}
public final List<String> component3() {
return this.additionalFiles;
}
public final WebViewConfiguration copy(int i, String entryPoint, List<String> additionalFiles) {
Intrinsics.checkNotNullParameter(entryPoint, "entryPoint");
Intrinsics.checkNotNullParameter(additionalFiles, "additionalFiles");
return new WebViewConfiguration(i, entryPoint, additionalFiles);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof WebViewConfiguration)) {
return false;
}
WebViewConfiguration webViewConfiguration = (WebViewConfiguration) obj;
return this.version == webViewConfiguration.version && Intrinsics.areEqual(this.entryPoint, webViewConfiguration.entryPoint) && Intrinsics.areEqual(this.additionalFiles, webViewConfiguration.additionalFiles);
}
public final List<String> getAdditionalFiles() {
return this.additionalFiles;
}
public final String getEntryPoint() {
return this.entryPoint;
}
public final int getVersion() {
return this.version;
}
public int hashCode() {
return (((Integer.hashCode(this.version) * 31) + this.entryPoint.hashCode()) * 31) + this.additionalFiles.hashCode();
}
public String toString() {
return "WebViewConfiguration(version=" + this.version + ", entryPoint=" + this.entryPoint + ", additionalFiles=" + this.additionalFiles + ')';
}
public WebViewConfiguration(int i, String entryPoint, List<String> additionalFiles) {
Intrinsics.checkNotNullParameter(entryPoint, "entryPoint");
Intrinsics.checkNotNullParameter(additionalFiles, "additionalFiles");
this.version = i;
this.entryPoint = entryPoint;
this.additionalFiles = additionalFiles;
}
}

View File

@@ -0,0 +1,45 @@
package com.unity3d.ads.core.data.model;
import androidx.datastore.core.CorruptionException;
import androidx.datastore.core.Serializer;
import com.google.protobuf.InvalidProtocolBufferException;
import com.unity3d.ads.datastore.WebviewConfigurationStore;
import java.io.InputStream;
import java.io.OutputStream;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class WebViewConfigurationStoreSerializer implements Serializer<WebviewConfigurationStore.WebViewConfigurationStore> {
private final WebviewConfigurationStore.WebViewConfigurationStore defaultValue;
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.datastore.core.Serializer
public WebviewConfigurationStore.WebViewConfigurationStore getDefaultValue() {
return this.defaultValue;
}
public WebViewConfigurationStoreSerializer() {
WebviewConfigurationStore.WebViewConfigurationStore defaultInstance = WebviewConfigurationStore.WebViewConfigurationStore.getDefaultInstance();
Intrinsics.checkNotNullExpressionValue(defaultInstance, "getDefaultInstance()");
this.defaultValue = defaultInstance;
}
@Override // androidx.datastore.core.Serializer
public Object readFrom(InputStream inputStream, Continuation continuation) {
try {
WebviewConfigurationStore.WebViewConfigurationStore parseFrom = WebviewConfigurationStore.WebViewConfigurationStore.parseFrom(inputStream);
Intrinsics.checkNotNullExpressionValue(parseFrom, "parseFrom(input)");
return parseFrom;
} catch (InvalidProtocolBufferException e) {
throw new CorruptionException("Cannot read proto.", e);
}
}
@Override // androidx.datastore.core.Serializer
public Object writeTo(WebviewConfigurationStore.WebViewConfigurationStore webViewConfigurationStore, OutputStream outputStream, Continuation continuation) {
webViewConfigurationStore.writeTo(outputStream);
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,20 @@
package com.unity3d.ads.core.data.model.exception;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class ExposureException extends Exception {
private final Object[] parameters;
public final Object[] getParameters() {
return this.parameters;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ExposureException(String message, Object[] parameters) {
super(message);
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(parameters, "parameters");
this.parameters = parameters;
}
}

View File

@@ -0,0 +1,118 @@
package com.unity3d.ads.core.data.model.exception;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class GatewayException extends Exception {
public static final Companion Companion = new Companion(null);
public static final String GATEWAY_RESPONSE_DEPTH_INITIALIZATION = "initialization";
public static final String GATEWAY_RESPONSE_DEPTH_UNIVERSAL = "universal";
private final String message;
private final String reason;
private final String reasonDebug;
private final Throwable throwable;
public static /* synthetic */ GatewayException copy$default(GatewayException gatewayException, String str, Throwable th, String str2, String str3, int i, Object obj) {
if ((i & 1) != 0) {
str = gatewayException.getMessage();
}
if ((i & 2) != 0) {
th = gatewayException.throwable;
}
if ((i & 4) != 0) {
str2 = gatewayException.reason;
}
if ((i & 8) != 0) {
str3 = gatewayException.reasonDebug;
}
return gatewayException.copy(str, th, str2, str3);
}
public final String component1() {
return getMessage();
}
public final Throwable component2() {
return this.throwable;
}
public final String component3() {
return this.reason;
}
public final String component4() {
return this.reasonDebug;
}
public final GatewayException copy(String message, Throwable th, String reason, String str) {
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(reason, "reason");
return new GatewayException(message, th, reason, str);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof GatewayException)) {
return false;
}
GatewayException gatewayException = (GatewayException) obj;
return Intrinsics.areEqual(getMessage(), gatewayException.getMessage()) && Intrinsics.areEqual(this.throwable, gatewayException.throwable) && Intrinsics.areEqual(this.reason, gatewayException.reason) && Intrinsics.areEqual(this.reasonDebug, gatewayException.reasonDebug);
}
@Override // java.lang.Throwable
public String getMessage() {
return this.message;
}
public final String getReason() {
return this.reason;
}
public final String getReasonDebug() {
return this.reasonDebug;
}
public final Throwable getThrowable() {
return this.throwable;
}
public int hashCode() {
int hashCode = getMessage().hashCode() * 31;
Throwable th = this.throwable;
int hashCode2 = (((hashCode + (th == null ? 0 : th.hashCode())) * 31) + this.reason.hashCode()) * 31;
String str = this.reasonDebug;
return hashCode2 + (str != null ? str.hashCode() : 0);
}
@Override // java.lang.Throwable
public String toString() {
return "GatewayException(message=" + getMessage() + ", throwable=" + this.throwable + ", reason=" + this.reason + ", reasonDebug=" + this.reasonDebug + ')';
}
public /* synthetic */ GatewayException(String str, Throwable th, String str2, String str3, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, (i & 2) != 0 ? null : th, (i & 4) != 0 ? "gateway" : str2, (i & 8) != 0 ? null : str3);
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public GatewayException(String message, Throwable th, String reason, String str) {
super(message);
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(reason, "reason");
this.message = message;
this.throwable = th;
this.reason = reason;
this.reasonDebug = str;
}
}

View File

@@ -0,0 +1,137 @@
package com.unity3d.ads.core.data.model.exception;
import com.unity3d.ads.core.domain.InitializeAndroidBoldSDK;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.TimeoutCancellationException;
/* loaded from: classes4.dex */
public final class InitializationException extends Exception {
public static final Companion Companion = new Companion(null);
private final String message;
private final String reason;
private final String reasonDebug;
private final Throwable throwable;
public static /* synthetic */ InitializationException copy$default(InitializationException initializationException, String str, Throwable th, String str2, String str3, int i, Object obj) {
if ((i & 1) != 0) {
str = initializationException.getMessage();
}
if ((i & 2) != 0) {
th = initializationException.throwable;
}
if ((i & 4) != 0) {
str2 = initializationException.reason;
}
if ((i & 8) != 0) {
str3 = initializationException.reasonDebug;
}
return initializationException.copy(str, th, str2, str3);
}
public final String component1() {
return getMessage();
}
public final Throwable component2() {
return this.throwable;
}
public final String component3() {
return this.reason;
}
public final String component4() {
return this.reasonDebug;
}
public final InitializationException copy(String message, Throwable th, String reason, String str) {
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(reason, "reason");
return new InitializationException(message, th, reason, str);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof InitializationException)) {
return false;
}
InitializationException initializationException = (InitializationException) obj;
return Intrinsics.areEqual(getMessage(), initializationException.getMessage()) && Intrinsics.areEqual(this.throwable, initializationException.throwable) && Intrinsics.areEqual(this.reason, initializationException.reason) && Intrinsics.areEqual(this.reasonDebug, initializationException.reasonDebug);
}
@Override // java.lang.Throwable
public String getMessage() {
return this.message;
}
public final String getReason() {
return this.reason;
}
public final String getReasonDebug() {
return this.reasonDebug;
}
public final Throwable getThrowable() {
return this.throwable;
}
public int hashCode() {
int hashCode = getMessage().hashCode() * 31;
Throwable th = this.throwable;
int hashCode2 = (((hashCode + (th == null ? 0 : th.hashCode())) * 31) + this.reason.hashCode()) * 31;
String str = this.reasonDebug;
return hashCode2 + (str != null ? str.hashCode() : 0);
}
@Override // java.lang.Throwable
public String toString() {
return "InitializationException(message=" + getMessage() + ", throwable=" + this.throwable + ", reason=" + this.reason + ", reasonDebug=" + this.reasonDebug + ')';
}
public /* synthetic */ InitializationException(String str, Throwable th, String str2, String str3, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, (i & 2) != 0 ? null : th, (i & 4) != 0 ? "gateway" : str2, (i & 8) != 0 ? null : str3);
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final InitializationException parseFrom(Exception e) {
Intrinsics.checkNotNullParameter(e, "e");
if (e instanceof TimeoutCancellationException) {
return new InitializationException(InitializeAndroidBoldSDK.MSG_TIMEOUT, e, "timeout", e.getMessage());
}
if (e instanceof UnityAdsNetworkException) {
StringBuilder sb = new StringBuilder();
sb.append("network.");
UnityAdsNetworkException unityAdsNetworkException = (UnityAdsNetworkException) e;
sb.append(unityAdsNetworkException.getCode());
return new InitializationException(InitializeAndroidBoldSDK.MSG_NETWORK, e, sb.toString(), unityAdsNetworkException.getMessage());
}
if (!(e instanceof GatewayException)) {
return e instanceof InitializationException ? (InitializationException) e : new InitializationException(InitializeAndroidBoldSDK.MSG_UNKNOWN, e, "unknown", e.getMessage());
}
GatewayException gatewayException = (GatewayException) e;
return new InitializationException(InitializeAndroidBoldSDK.MSG_UNKNOWN, gatewayException.getThrowable(), gatewayException.getReason(), gatewayException.getReasonDebug());
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public InitializationException(String message, Throwable th, String reason, String str) {
super(message);
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(reason, "reason");
this.message = message;
this.throwable = th;
this.reason = reason;
this.reasonDebug = str;
}
}

View File

@@ -0,0 +1,19 @@
package com.unity3d.ads.core.data.model.exception;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class LoadException extends Exception {
private final int errorCode;
public final int getErrorCode() {
return this.errorCode;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LoadException(int i, String message) {
super(message);
Intrinsics.checkNotNullParameter(message, "message");
this.errorCode = i;
}
}

View File

@@ -0,0 +1,12 @@
package com.unity3d.ads.core.data.model.exception;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class TransactionException extends Exception {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public TransactionException(String message) {
super(message);
Intrinsics.checkNotNullParameter(message, "message");
}
}

View File

@@ -0,0 +1,157 @@
package com.unity3d.ads.core.data.model.exception;
import com.unity3d.ads.core.data.model.OperationType;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class UnityAdsNetworkException extends Exception {
private final String client;
private final Integer code;
private final Integer cronetCode;
private final String message;
private final String protocol;
private final OperationType type;
private final String url;
public static /* synthetic */ UnityAdsNetworkException copy$default(UnityAdsNetworkException unityAdsNetworkException, String str, OperationType operationType, Integer num, String str2, String str3, Integer num2, String str4, int i, Object obj) {
if ((i & 1) != 0) {
str = unityAdsNetworkException.getMessage();
}
if ((i & 2) != 0) {
operationType = unityAdsNetworkException.type;
}
OperationType operationType2 = operationType;
if ((i & 4) != 0) {
num = unityAdsNetworkException.code;
}
Integer num3 = num;
if ((i & 8) != 0) {
str2 = unityAdsNetworkException.url;
}
String str5 = str2;
if ((i & 16) != 0) {
str3 = unityAdsNetworkException.protocol;
}
String str6 = str3;
if ((i & 32) != 0) {
num2 = unityAdsNetworkException.cronetCode;
}
Integer num4 = num2;
if ((i & 64) != 0) {
str4 = unityAdsNetworkException.client;
}
return unityAdsNetworkException.copy(str, operationType2, num3, str5, str6, num4, str4);
}
public final String component1() {
return getMessage();
}
public final OperationType component2() {
return this.type;
}
public final Integer component3() {
return this.code;
}
public final String component4() {
return this.url;
}
public final String component5() {
return this.protocol;
}
public final Integer component6() {
return this.cronetCode;
}
public final String component7() {
return this.client;
}
public final UnityAdsNetworkException copy(String message, OperationType type, Integer num, String str, String str2, Integer num2, String str3) {
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(type, "type");
return new UnityAdsNetworkException(message, type, num, str, str2, num2, str3);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof UnityAdsNetworkException)) {
return false;
}
UnityAdsNetworkException unityAdsNetworkException = (UnityAdsNetworkException) obj;
return Intrinsics.areEqual(getMessage(), unityAdsNetworkException.getMessage()) && this.type == unityAdsNetworkException.type && Intrinsics.areEqual(this.code, unityAdsNetworkException.code) && Intrinsics.areEqual(this.url, unityAdsNetworkException.url) && Intrinsics.areEqual(this.protocol, unityAdsNetworkException.protocol) && Intrinsics.areEqual(this.cronetCode, unityAdsNetworkException.cronetCode) && Intrinsics.areEqual(this.client, unityAdsNetworkException.client);
}
public final String getClient() {
return this.client;
}
public final Integer getCode() {
return this.code;
}
public final Integer getCronetCode() {
return this.cronetCode;
}
@Override // java.lang.Throwable
public String getMessage() {
return this.message;
}
public final String getProtocol() {
return this.protocol;
}
public final OperationType getType() {
return this.type;
}
public final String getUrl() {
return this.url;
}
public int hashCode() {
int hashCode = ((getMessage().hashCode() * 31) + this.type.hashCode()) * 31;
Integer num = this.code;
int hashCode2 = (hashCode + (num == null ? 0 : num.hashCode())) * 31;
String str = this.url;
int hashCode3 = (hashCode2 + (str == null ? 0 : str.hashCode())) * 31;
String str2 = this.protocol;
int hashCode4 = (hashCode3 + (str2 == null ? 0 : str2.hashCode())) * 31;
Integer num2 = this.cronetCode;
int hashCode5 = (hashCode4 + (num2 == null ? 0 : num2.hashCode())) * 31;
String str3 = this.client;
return hashCode5 + (str3 != null ? str3.hashCode() : 0);
}
@Override // java.lang.Throwable
public String toString() {
return "UnityAdsNetworkException(message=" + getMessage() + ", type=" + this.type + ", code=" + this.code + ", url=" + this.url + ", protocol=" + this.protocol + ", cronetCode=" + this.cronetCode + ", client=" + this.client + ')';
}
public /* synthetic */ UnityAdsNetworkException(String str, OperationType operationType, Integer num, String str2, String str3, Integer num2, String str4, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, (i & 2) != 0 ? OperationType.UNKNOWN : operationType, (i & 4) != 0 ? null : num, (i & 8) != 0 ? null : str2, (i & 16) != 0 ? null : str3, (i & 32) != 0 ? null : num2, (i & 64) == 0 ? str4 : null);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public UnityAdsNetworkException(String message, OperationType type, Integer num, String str, String str2, Integer num2, String str3) {
super(message);
Intrinsics.checkNotNullParameter(message, "message");
Intrinsics.checkNotNullParameter(type, "type");
this.message = message;
this.type = type;
this.code = num;
this.url = str;
this.protocol = str2;
this.cronetCode = num2;
this.client = str3;
}
}

View File

@@ -0,0 +1,16 @@
package com.unity3d.ads.core.data.repository;
import com.google.protobuf.ByteString;
import com.unity3d.ads.core.data.model.AdObject;
import kotlin.coroutines.Continuation;
/* loaded from: classes4.dex */
public interface AdRepository {
Object addAd(ByteString byteString, AdObject adObject, Continuation continuation);
Object getAd(ByteString byteString, Continuation continuation);
Object hasOpportunityId(ByteString byteString, Continuation continuation);
Object removeAd(ByteString byteString, Continuation continuation);
}

View File

@@ -0,0 +1,35 @@
package com.unity3d.ads.core.data.repository;
import com.google.protobuf.ByteString;
import com.unity3d.ads.core.data.model.AdObject;
import java.util.concurrent.ConcurrentHashMap;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.Boxing;
/* loaded from: classes4.dex */
public final class AndroidAdRepository implements AdRepository {
private final ConcurrentHashMap<ByteString, AdObject> loadedAds = new ConcurrentHashMap<>();
@Override // com.unity3d.ads.core.data.repository.AdRepository
public Object addAd(ByteString byteString, AdObject adObject, Continuation continuation) {
this.loadedAds.put(byteString, adObject);
return Unit.INSTANCE;
}
@Override // com.unity3d.ads.core.data.repository.AdRepository
public Object getAd(ByteString byteString, Continuation continuation) {
return this.loadedAds.get(byteString);
}
@Override // com.unity3d.ads.core.data.repository.AdRepository
public Object removeAd(ByteString byteString, Continuation continuation) {
this.loadedAds.remove(byteString);
return Unit.INSTANCE;
}
@Override // com.unity3d.ads.core.data.repository.AdRepository
public Object hasOpportunityId(ByteString byteString, Continuation continuation) {
return Boxing.boxBoolean(this.loadedAds.containsKey(byteString));
}
}

View File

@@ -0,0 +1,55 @@
package com.unity3d.ads.core.data.repository;
import java.io.File;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.core.data.repository.AndroidCacheRepository$clearCache$2", f = "AndroidCacheRepository.kt", l = {}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nAndroidCacheRepository.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidCacheRepository.kt\ncom/unity3d/ads/core/data/repository/AndroidCacheRepository$clearCache$2\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,131:1\n13579#2,2:132\n*S KotlinDebug\n*F\n+ 1 AndroidCacheRepository.kt\ncom/unity3d/ads/core/data/repository/AndroidCacheRepository$clearCache$2\n*L\n89#1:132,2\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidCacheRepository$clearCache$2 extends SuspendLambda implements Function2 {
int label;
final /* synthetic */ AndroidCacheRepository this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidCacheRepository$clearCache$2(AndroidCacheRepository androidCacheRepository, Continuation continuation) {
super(2, continuation);
this.this$0 = androidCacheRepository;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidCacheRepository$clearCache$2(this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidCacheRepository$clearCache$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
File file;
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
file = this.this$0.cacheDir;
File[] listFiles = file.listFiles();
if (listFiles == null) {
return null;
}
for (File file2 : listFiles) {
file2.delete();
}
return Unit.INSTANCE;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,48 @@
package com.unity3d.ads.core.data.repository;
import com.unity3d.ads.core.extensions.FileExtensionsKt;
import java.io.File;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.Boxing;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.core.data.repository.AndroidCacheRepository$getCacheSize$2", f = "AndroidCacheRepository.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes4.dex */
public final class AndroidCacheRepository$getCacheSize$2 extends SuspendLambda implements Function2 {
int label;
final /* synthetic */ AndroidCacheRepository this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidCacheRepository$getCacheSize$2(AndroidCacheRepository androidCacheRepository, Continuation continuation) {
super(2, continuation);
this.this$0 = androidCacheRepository;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidCacheRepository$getCacheSize$2(this.this$0, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidCacheRepository$getCacheSize$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
File file;
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
file = this.this$0.cacheDir;
return Boxing.boxLong(FileExtensionsKt.getDirectorySize(file));
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,184 @@
package com.unity3d.ads.core.data.repository;
import com.unity3d.ads.core.data.datasource.CacheDataSource;
import com.unity3d.services.core.extensions.CoroutineExtensionsKt;
import com.unity3d.services.core.extensions.CoroutineExtensionsKt$memoize$2;
import java.io.File;
import java.util.Map;
import java.util.Set;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__MutableCollectionsKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.Boxing;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.Deferred;
@DebugMetadata(c = "com.unity3d.ads.core.data.repository.AndroidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1", f = "AndroidCacheRepository.kt", l = {50}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nCoroutineExtensions.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CoroutineExtensions.kt\ncom/unity3d/services/core/extensions/CoroutineExtensionsKt$memoize$2\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,51:1\n1#2:52\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1 extends SuspendLambda implements Function2 {
final /* synthetic */ String $filename$inlined;
final /* synthetic */ Object $key;
final /* synthetic */ int $priority$inlined;
final /* synthetic */ String $url$inlined;
private /* synthetic */ Object L$0;
int label;
final /* synthetic */ AndroidCacheRepository this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1(Object obj, Continuation continuation, AndroidCacheRepository androidCacheRepository, String str, String str2, int i) {
super(2, continuation);
this.$key = obj;
this.this$0 = androidCacheRepository;
this.$filename$inlined = str;
this.$url$inlined = str2;
this.$priority$inlined = i;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
AndroidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1 androidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1 = new AndroidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1(this.$key, continuation, this.this$0, this.$filename$inlined, this.$url$inlined, this.$priority$inlined);
androidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1.L$0 = obj;
return androidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@DebugMetadata(c = "com.unity3d.services.core.extensions.CoroutineExtensionsKt$memoize$2$1", f = "CoroutineExtensions.kt", l = {}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nCoroutineExtensions.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CoroutineExtensions.kt\ncom/unity3d/services/core/extensions/CoroutineExtensionsKt$memoize$2$1\n*L\n1#1,51:1\n*E\n"})
/* renamed from: com.unity3d.ads.core.data.repository.AndroidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1$2, reason: invalid class name */
public static final class AnonymousClass2 extends SuspendLambda implements Function2 {
int label;
public AnonymousClass2(Continuation continuation) {
super(2, continuation);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AnonymousClass2(continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AnonymousClass2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
Set<Map.Entry<Object, Deferred>> entrySet = CoroutineExtensionsKt.getDeferreds().entrySet();
Intrinsics.checkNotNullExpressionValue(entrySet, "deferreds.entries");
CollectionsKt__MutableCollectionsKt.removeAll(entrySet, CoroutineExtensionsKt$memoize$2.AnonymousClass1.C02531.INSTANCE);
CoroutineExtensionsKt.getDeferredsCleanLaunched().set(false);
return Unit.INSTANCE;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i != 0) {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
return obj;
}
ResultKt.throwOnFailure(obj);
CoroutineScope coroutineScope = (CoroutineScope) this.L$0;
Deferred deferred = CoroutineExtensionsKt.getDeferreds().get(this.$key);
if (deferred == null || !deferred.isActive()) {
deferred = null;
}
if (deferred == null) {
deferred = BuildersKt__Builders_commonKt.async$default(coroutineScope, null, null, new AnonymousClass1(null, this.this$0, this.$filename$inlined, this.$url$inlined, this.$priority$inlined), 3, null);
CoroutineExtensionsKt.getDeferreds().put(this.$key, deferred);
}
Deferred deferred2 = deferred;
if (CoroutineExtensionsKt.getDeferreds().size() > 100 && !CoroutineExtensionsKt.getDeferredsCleanLaunched().getAndSet(true)) {
BuildersKt__Builders_commonKt.launch$default(coroutineScope, null, null, new AnonymousClass2(null), 3, null);
}
this.label = 1;
Object await = deferred2.await(this);
return await == coroutine_suspended ? coroutine_suspended : await;
}
@DebugMetadata(c = "com.unity3d.ads.core.data.repository.AndroidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1$1", f = "AndroidCacheRepository.kt", l = {52}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nCoroutineExtensions.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CoroutineExtensions.kt\ncom/unity3d/services/core/extensions/CoroutineExtensionsKt$memoize$2$deferred$2\n+ 2 AndroidCacheRepository.kt\ncom/unity3d/ads/core/data/repository/AndroidCacheRepository$getFile$2\n*L\n1#1,51:1\n63#2:52\n*E\n"})
/* renamed from: com.unity3d.ads.core.data.repository.AndroidCacheRepository$getFile$2$invokeSuspend$$inlined$memoize$1$1, reason: invalid class name */
public static final class AnonymousClass1 extends SuspendLambda implements Function2 {
final /* synthetic */ String $filename$inlined;
final /* synthetic */ int $priority$inlined;
final /* synthetic */ String $url$inlined;
private /* synthetic */ Object L$0;
int label;
final /* synthetic */ AndroidCacheRepository this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AnonymousClass1(Continuation continuation, AndroidCacheRepository androidCacheRepository, String str, String str2, int i) {
super(2, continuation);
this.this$0 = androidCacheRepository;
this.$filename$inlined = str;
this.$url$inlined = str2;
this.$priority$inlined = i;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
AnonymousClass1 anonymousClass1 = new AnonymousClass1(continuation, this.this$0, this.$filename$inlined, this.$url$inlined, this.$priority$inlined);
anonymousClass1.L$0 = obj;
return anonymousClass1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
CacheDataSource cacheDataSource;
File file;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
cacheDataSource = this.this$0.remoteCacheDataSource;
file = this.this$0.cacheDir;
String str = this.$filename$inlined;
String str2 = this.$url$inlined;
Integer boxInt = Boxing.boxInt(this.$priority$inlined);
this.label = 1;
obj = cacheDataSource.getFile(file, str, str2, boxInt, this);
if (obj == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return obj;
}
}
}

View File

@@ -0,0 +1,93 @@
package com.unity3d.ads.core.data.repository;
import com.fyber.inneractive.sdk.bidder.TokenParametersOuterClass$TokenParameters;
import java.io.File;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.Boxing;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.CoroutineScope;
@DebugMetadata(c = "com.unity3d.ads.core.data.repository.AndroidCacheRepository$getFile$2", f = "AndroidCacheRepository.kt", l = {TokenParametersOuterClass$TokenParameters.DARKMODE_FIELD_NUMBER, 56, 132}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nAndroidCacheRepository.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidCacheRepository.kt\ncom/unity3d/ads/core/data/repository/AndroidCacheRepository$getFile$2\n+ 2 CoroutineExtensions.kt\ncom/unity3d/services/core/extensions/CoroutineExtensionsKt\n*L\n1#1,131:1\n37#2:132\n51#2:133\n*S KotlinDebug\n*F\n+ 1 AndroidCacheRepository.kt\ncom/unity3d/ads/core/data/repository/AndroidCacheRepository$getFile$2\n*L\n63#1:132\n63#1:133\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidCacheRepository$getFile$2 extends SuspendLambda implements Function2 {
final /* synthetic */ String $objectId;
final /* synthetic */ int $priority;
final /* synthetic */ String $url;
Object L$0;
int label;
final /* synthetic */ AndroidCacheRepository this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidCacheRepository$getFile$2(AndroidCacheRepository androidCacheRepository, String str, int i, String str2, Continuation continuation) {
super(2, continuation);
this.this$0 = androidCacheRepository;
this.$url = str;
this.$priority = i;
this.$objectId = str2;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AndroidCacheRepository$getFile$2(this.this$0, this.$url, this.$priority, this.$objectId, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AndroidCacheRepository$getFile$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Removed duplicated region for block: B:10:0x00d3 */
/* JADX WARN: Removed duplicated region for block: B:20:0x00cc A[RETURN] */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r24) {
/*
Method dump skipped, instructions count: 251
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.core.data.repository.AndroidCacheRepository$getFile$2.invokeSuspend(java.lang.Object):java.lang.Object");
}
@DebugMetadata(c = "com.unity3d.ads.core.data.repository.AndroidCacheRepository$getFile$2$1", f = "AndroidCacheRepository.kt", l = {}, m = "invokeSuspend")
/* renamed from: com.unity3d.ads.core.data.repository.AndroidCacheRepository$getFile$2$1, reason: invalid class name */
public static final class AnonymousClass1 extends SuspendLambda implements Function2 {
final /* synthetic */ File $newFile;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AnonymousClass1(File file, Continuation continuation) {
super(2, continuation);
this.$newFile = file;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
return new AnonymousClass1(this.$newFile, continuation);
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) {
return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
return Boxing.boxBoolean(this.$newFile.createNewFile());
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}
}

View File

@@ -0,0 +1,153 @@
package com.unity3d.ads.core.data.repository;
import android.content.Context;
import com.unity3d.ads.core.data.datasource.CacheDataSource;
import com.unity3d.ads.core.data.model.CacheError;
import com.unity3d.ads.core.data.model.CacheResult;
import com.unity3d.ads.core.data.model.CacheSource;
import com.unity3d.ads.core.data.model.CachedFile;
import com.unity3d.services.UnityAdsConstants;
import java.io.File;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.Boxing;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Charsets;
import kotlinx.coroutines.BuildersKt;
import kotlinx.coroutines.CoroutineDispatcher;
import okio.ByteString;
import org.json.JSONArray;
/* loaded from: classes4.dex */
public final class AndroidCacheRepository implements CacheRepository {
private final File cacheDir;
private final ConcurrentHashMap<String, CachedFile> cachedFiles;
private final Context context;
private final CoroutineDispatcher ioDispatcher;
private final CacheDataSource localCacheDataSource;
private final ConcurrentHashMap<String, Set<String>> neededFiles;
private final CacheDataSource remoteCacheDataSource;
private final String getCacheDirPath() {
return UnityAdsConstants.DefaultUrls.CACHE_DIR_NAME;
}
public final ConcurrentHashMap<String, CachedFile> getCachedFiles() {
return this.cachedFiles;
}
public final ConcurrentHashMap<String, Set<String>> getNeededFiles() {
return this.neededFiles;
}
public AndroidCacheRepository(CoroutineDispatcher ioDispatcher, CacheDataSource localCacheDataSource, CacheDataSource remoteCacheDataSource, Context context) {
Intrinsics.checkNotNullParameter(ioDispatcher, "ioDispatcher");
Intrinsics.checkNotNullParameter(localCacheDataSource, "localCacheDataSource");
Intrinsics.checkNotNullParameter(remoteCacheDataSource, "remoteCacheDataSource");
Intrinsics.checkNotNullParameter(context, "context");
this.ioDispatcher = ioDispatcher;
this.localCacheDataSource = localCacheDataSource;
this.remoteCacheDataSource = remoteCacheDataSource;
this.context = context;
this.cachedFiles = new ConcurrentHashMap<>();
this.neededFiles = new ConcurrentHashMap<>();
this.cacheDir = initCacheDir();
}
@Override // com.unity3d.ads.core.data.repository.CacheRepository
public Object getFile(String str, String str2, JSONArray jSONArray, int i, Continuation continuation) {
return BuildersKt.withContext(this.ioDispatcher, new AndroidCacheRepository$getFile$2(this, str, i, str2, null), continuation);
}
@Override // com.unity3d.ads.core.data.repository.CacheRepository
public CacheResult retrieveFile(String fileName) {
Intrinsics.checkNotNullParameter(fileName, "fileName");
CachedFile cachedFile = this.cachedFiles.get(fileName);
if (cachedFile != null) {
return new CacheResult.Success(cachedFile, CacheSource.LOCAL);
}
return new CacheResult.Failure(CacheError.FILE_NOT_FOUND, CacheSource.LOCAL);
}
@Override // com.unity3d.ads.core.data.repository.CacheRepository
public void removeFile(CachedFile cachedFile) {
Intrinsics.checkNotNullParameter(cachedFile, "cachedFile");
removeFileFromCache(cachedFile);
}
@Override // com.unity3d.ads.core.data.repository.CacheRepository
public Object doesFileExist(String str, Continuation continuation) {
return Boxing.boxBoolean(this.cachedFiles.containsKey(str));
}
public final String getFilename(String url) {
Intrinsics.checkNotNullParameter(url, "url");
return getHash(url);
}
@Override // com.unity3d.ads.core.data.repository.CacheRepository
public Object clearCache(Continuation continuation) {
return BuildersKt.withContext(this.ioDispatcher, new AndroidCacheRepository$clearCache$2(this, null), continuation);
}
@Override // com.unity3d.ads.core.data.repository.CacheRepository
public Object getCacheSize(Continuation continuation) {
return BuildersKt.withContext(this.ioDispatcher, new AndroidCacheRepository$getCacheSize$2(this, null), continuation);
}
private final void deleteFile(File file) {
if (file == null || !file.exists()) {
return;
}
file.delete();
}
/* JADX INFO: Access modifiers changed from: private */
public final String getHash(String str) {
byte[] bytes = str.getBytes(Charsets.UTF_8);
Intrinsics.checkNotNullExpressionValue(bytes, "this as java.lang.String).getBytes(charset)");
String hex = ByteString.of(Arrays.copyOf(bytes, bytes.length)).sha256().hex();
Intrinsics.checkNotNullExpressionValue(hex, "bytes.sha256().hex()");
return hex;
}
private final File initCacheDir() {
File file = new File(getCacheDirBase(), getCacheDirPath());
file.mkdirs();
return file;
}
private final File getCacheDirBase() {
File cacheDir = this.context.getCacheDir();
Intrinsics.checkNotNullExpressionValue(cacheDir, "context.cacheDir");
return cacheDir;
}
/* JADX INFO: Access modifiers changed from: private */
public final String getFilePath(String str) {
return this.cacheDir.getAbsolutePath() + File.separator + str;
}
/* JADX INFO: Access modifiers changed from: private */
public final void addFileToCache(CachedFile cachedFile) {
this.cachedFiles.put(cachedFile.getName(), cachedFile);
Set<String> set = this.neededFiles.get(cachedFile.getName());
if (set == null) {
set = new LinkedHashSet<>();
}
set.add(cachedFile.getObjectId());
this.neededFiles.put(cachedFile.getName(), set);
}
private final void removeFileFromCache(CachedFile cachedFile) {
this.cachedFiles.remove(cachedFile.getName());
Set<String> set = this.neededFiles.get(cachedFile.getName());
if (set != null) {
set.remove(cachedFile.getObjectId());
}
deleteFile(cachedFile.getFile());
}
}

View File

@@ -0,0 +1,121 @@
package com.unity3d.ads.core.data.repository;
import com.google.protobuf.ByteString;
import com.unity3d.ads.core.domain.GetSharedDataTimestamps;
import gatewayprotocol.v1.CampaignKt;
import gatewayprotocol.v1.CampaignStateKt;
import gatewayprotocol.v1.CampaignStateOuterClass;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.MapsKt__MapsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.StateFlowKt;
@SourceDebugExtension({"SMAP\nAndroidCampaignRepository.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AndroidCampaignRepository.kt\ncom/unity3d/ads/core/data/repository/AndroidCampaignRepository\n+ 2 StateFlow.kt\nkotlinx/coroutines/flow/StateFlowKt\n+ 3 CampaignKt.kt\ngatewayprotocol/v1/CampaignKtKt\n+ 4 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 5 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 6 CampaignStateKt.kt\ngatewayprotocol/v1/CampaignStateKtKt\n+ 7 CampaignStateKt.kt\ngatewayprotocol/v1/CampaignStateKt$Dsl\n*L\n1#1,50:1\n230#2,5:51\n230#2,5:58\n201#3:56\n201#3:63\n1#4:57\n1#4:64\n1#4:76\n3190#5,10:65\n8#6:75\n194#7,2:77\n95#7,2:79\n*S KotlinDebug\n*F\n+ 1 AndroidCampaignRepository.kt\ncom/unity3d/ads/core/data/repository/AndroidCampaignRepository\n*L\n19#1:51,5\n33#1:58,5\n24#1:56\n38#1:63\n24#1:57\n38#1:64\n45#1:76\n43#1:65,10\n45#1:75\n46#1:77,2\n47#1:79,2\n*E\n"})
/* loaded from: classes4.dex */
public final class AndroidCampaignRepository implements CampaignRepository {
private final MutableStateFlow campaigns;
private final GetSharedDataTimestamps getSharedDataTimestamps;
public AndroidCampaignRepository(GetSharedDataTimestamps getSharedDataTimestamps) {
Map emptyMap;
Intrinsics.checkNotNullParameter(getSharedDataTimestamps, "getSharedDataTimestamps");
this.getSharedDataTimestamps = getSharedDataTimestamps;
emptyMap = MapsKt__MapsKt.emptyMap();
this.campaigns = StateFlowKt.MutableStateFlow(emptyMap);
}
@Override // com.unity3d.ads.core.data.repository.CampaignRepository
public void setShowTimestamp(ByteString opportunityId) {
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
CampaignStateOuterClass.Campaign campaign = getCampaign(opportunityId);
if (campaign != null) {
CampaignKt.Dsl.Companion companion = CampaignKt.Dsl.Companion;
CampaignStateOuterClass.Campaign.Builder builder = campaign.toBuilder();
Intrinsics.checkNotNullExpressionValue(builder, "this.toBuilder()");
CampaignKt.Dsl _create = companion._create(builder);
_create.setShowTimestamp(this.getSharedDataTimestamps.invoke());
Unit unit = Unit.INSTANCE;
setCampaign(opportunityId, _create._build());
}
}
@Override // com.unity3d.ads.core.data.repository.CampaignRepository
public CampaignStateOuterClass.Campaign getCampaign(ByteString opportunityId) {
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
return (CampaignStateOuterClass.Campaign) ((Map) this.campaigns.getValue()).get(opportunityId.toStringUtf8());
}
@Override // com.unity3d.ads.core.data.repository.CampaignRepository
public void setLoadTimestamp(ByteString opportunityId) {
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
CampaignStateOuterClass.Campaign campaign = getCampaign(opportunityId);
if (campaign != null) {
CampaignKt.Dsl.Companion companion = CampaignKt.Dsl.Companion;
CampaignStateOuterClass.Campaign.Builder builder = campaign.toBuilder();
Intrinsics.checkNotNullExpressionValue(builder, "this.toBuilder()");
CampaignKt.Dsl _create = companion._create(builder);
_create.setLoadTimestamp(this.getSharedDataTimestamps.invoke());
Unit unit = Unit.INSTANCE;
setCampaign(opportunityId, _create._build());
}
}
@Override // com.unity3d.ads.core.data.repository.CampaignRepository
public CampaignStateOuterClass.CampaignState getCampaignState() {
Collection values = ((Map) this.campaigns.getValue()).values();
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (Object obj : values) {
if (((CampaignStateOuterClass.Campaign) obj).hasShowTimestamp()) {
arrayList.add(obj);
} else {
arrayList2.add(obj);
}
}
Pair pair = new Pair(arrayList, arrayList2);
List list = (List) pair.component1();
List list2 = (List) pair.component2();
CampaignStateKt.Dsl.Companion companion = CampaignStateKt.Dsl.Companion;
CampaignStateOuterClass.CampaignState.Builder newBuilder = CampaignStateOuterClass.CampaignState.newBuilder();
Intrinsics.checkNotNullExpressionValue(newBuilder, "newBuilder()");
CampaignStateKt.Dsl _create = companion._create(newBuilder);
_create.addAllShownCampaigns(_create.getShownCampaigns(), list);
_create.addAllLoadedCampaigns(_create.getLoadedCampaigns(), list2);
return _create._build();
}
@Override // com.unity3d.ads.core.data.repository.CampaignRepository
public void removeState(ByteString opportunityId) {
Object value;
Map minus;
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
MutableStateFlow mutableStateFlow = this.campaigns;
do {
value = mutableStateFlow.getValue();
String stringUtf8 = opportunityId.toStringUtf8();
Intrinsics.checkNotNullExpressionValue(stringUtf8, "opportunityId.toStringUtf8()");
minus = MapsKt__MapsKt.minus((Map) value, stringUtf8);
} while (!mutableStateFlow.compareAndSet(value, minus));
}
@Override // com.unity3d.ads.core.data.repository.CampaignRepository
public void setCampaign(ByteString opportunityId, CampaignStateOuterClass.Campaign campaign) {
Object value;
Map plus;
Intrinsics.checkNotNullParameter(opportunityId, "opportunityId");
Intrinsics.checkNotNullParameter(campaign, "campaign");
MutableStateFlow mutableStateFlow = this.campaigns;
do {
value = mutableStateFlow.getValue();
plus = MapsKt__MapsKt.plus((Map) value, TuplesKt.to(opportunityId.toStringUtf8(), campaign));
} while (!mutableStateFlow.compareAndSet(value, plus));
}
}

View File

@@ -0,0 +1,20 @@
package com.unity3d.ads.core.data.repository;
import com.unity3d.ads.core.data.datasource.DeveloperConsentDataSource;
import gatewayprotocol.v1.DeveloperConsentOuterClass;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AndroidDeveloperConsentRepository implements DeveloperConsentRepository {
private final DeveloperConsentOuterClass.DeveloperConsent developerConsent;
@Override // com.unity3d.ads.core.data.repository.DeveloperConsentRepository
public DeveloperConsentOuterClass.DeveloperConsent getDeveloperConsent() {
return this.developerConsent;
}
public AndroidDeveloperConsentRepository(DeveloperConsentDataSource developerConsentDataSource) {
Intrinsics.checkNotNullParameter(developerConsentDataSource, "developerConsentDataSource");
this.developerConsent = developerConsentDataSource.getDeveloperConsent();
}
}

View File

@@ -0,0 +1,26 @@
package com.unity3d.ads.core.data.repository;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
@DebugMetadata(c = "com.unity3d.ads.core.data.repository.AndroidDeviceInfoRepository", f = "AndroidDeviceInfoRepository.kt", l = {38}, m = "getAuidByteString")
/* loaded from: classes4.dex */
public final class AndroidDeviceInfoRepository$getAuidByteString$1 extends ContinuationImpl {
int label;
/* synthetic */ Object result;
final /* synthetic */ AndroidDeviceInfoRepository this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AndroidDeviceInfoRepository$getAuidByteString$1(AndroidDeviceInfoRepository androidDeviceInfoRepository, Continuation continuation) {
super(continuation);
this.this$0 = androidDeviceInfoRepository;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
this.result = obj;
this.label |= Integer.MIN_VALUE;
return this.this$0.getAuidByteString(this);
}
}

View File

@@ -0,0 +1,207 @@
package com.unity3d.ads.core.data.repository;
import com.unity3d.ads.core.data.datasource.DynamicDeviceInfoDataSource;
import com.unity3d.ads.core.data.datasource.PrivacyDeviceInfoDataSource;
import com.unity3d.ads.core.data.datasource.StaticDeviceInfoDataSource;
import gatewayprotocol.v1.AllowedPiiOuterClass;
import gatewayprotocol.v1.DynamicDeviceInfoOuterClass;
import gatewayprotocol.v1.PiiOuterClass;
import gatewayprotocol.v1.StaticDeviceInfoOuterClass;
import java.util.List;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.Flow;
import kotlinx.coroutines.flow.MutableStateFlow;
import kotlinx.coroutines.flow.StateFlowKt;
/* loaded from: classes4.dex */
public final class AndroidDeviceInfoRepository implements DeviceInfoRepository {
private final MutableStateFlow allowedPii;
private final String analyticsUserId;
private final DynamicDeviceInfoDataSource dynamicDeviceInfoDataSource;
private final PrivacyDeviceInfoDataSource privacyDeviceInfoDataSource;
private final SessionRepository sessionRepository;
private final StaticDeviceInfoDataSource staticDeviceInfoDataSource;
private final Flow volumeSettingsChange;
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public MutableStateFlow getAllowedPii() {
return this.allowedPii;
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public String getAnalyticsUserId() {
return this.analyticsUserId;
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public Flow getVolumeSettingsChange() {
return this.volumeSettingsChange;
}
public AndroidDeviceInfoRepository(StaticDeviceInfoDataSource staticDeviceInfoDataSource, DynamicDeviceInfoDataSource dynamicDeviceInfoDataSource, PrivacyDeviceInfoDataSource privacyDeviceInfoDataSource, SessionRepository sessionRepository) {
Intrinsics.checkNotNullParameter(staticDeviceInfoDataSource, "staticDeviceInfoDataSource");
Intrinsics.checkNotNullParameter(dynamicDeviceInfoDataSource, "dynamicDeviceInfoDataSource");
Intrinsics.checkNotNullParameter(privacyDeviceInfoDataSource, "privacyDeviceInfoDataSource");
Intrinsics.checkNotNullParameter(sessionRepository, "sessionRepository");
this.staticDeviceInfoDataSource = staticDeviceInfoDataSource;
this.dynamicDeviceInfoDataSource = dynamicDeviceInfoDataSource;
this.privacyDeviceInfoDataSource = privacyDeviceInfoDataSource;
this.sessionRepository = sessionRepository;
AllowedPiiOuterClass.AllowedPii defaultInstance = AllowedPiiOuterClass.AllowedPii.getDefaultInstance();
Intrinsics.checkNotNullExpressionValue(defaultInstance, "getDefaultInstance()");
this.allowedPii = StateFlowKt.MutableStateFlow(defaultInstance);
this.analyticsUserId = staticDeviceInfoDataSource.getAnalyticsUserId();
this.volumeSettingsChange = dynamicDeviceInfoDataSource.getVolumeSettingsChange();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public Object staticDeviceInfo(Continuation continuation) {
StaticDeviceInfoDataSource staticDeviceInfoDataSource = this.staticDeviceInfoDataSource;
List<String> additionalStorePackagesList = this.sessionRepository.getNativeConfiguration().getAdditionalStorePackagesList();
Intrinsics.checkNotNullExpressionValue(additionalStorePackagesList, "sessionRepository.native…ditionalStorePackagesList");
return staticDeviceInfoDataSource.fetch(additionalStorePackagesList, continuation);
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public StaticDeviceInfoOuterClass.StaticDeviceInfo cachedStaticDeviceInfo() {
return this.staticDeviceInfoDataSource.fetchCached();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public DynamicDeviceInfoOuterClass.DynamicDeviceInfo getDynamicDeviceInfo() {
return this.dynamicDeviceInfoDataSource.fetch();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public PiiOuterClass.Pii getPiiData() {
return this.privacyDeviceInfoDataSource.fetch((AllowedPiiOuterClass.AllowedPii) getAllowedPii().getValue());
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public Object getIdfi(Continuation continuation) {
return this.staticDeviceInfoDataSource.getIdfi(continuation);
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public Object getAuidString(Continuation continuation) {
return this.staticDeviceInfoDataSource.getAuid(continuation);
}
/* JADX WARN: Removed duplicated region for block: B:12:0x0042 A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:14:0x0043 A[EXC_TOP_SPLITTER, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:22:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public java.lang.Object getAuidByteString(kotlin.coroutines.Continuation r5) {
/*
r4 = this;
boolean r0 = r5 instanceof com.unity3d.ads.core.data.repository.AndroidDeviceInfoRepository$getAuidByteString$1
if (r0 == 0) goto L13
r0 = r5
com.unity3d.ads.core.data.repository.AndroidDeviceInfoRepository$getAuidByteString$1 r0 = (com.unity3d.ads.core.data.repository.AndroidDeviceInfoRepository$getAuidByteString$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
com.unity3d.ads.core.data.repository.AndroidDeviceInfoRepository$getAuidByteString$1 r0 = new com.unity3d.ads.core.data.repository.AndroidDeviceInfoRepository$getAuidByteString$1
r0.<init>(r4, r5)
L18:
java.lang.Object r5 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L31
if (r2 != r3) goto L29
kotlin.ResultKt.throwOnFailure(r5)
goto L3d
L29:
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
r5.<init>(r0)
throw r5
L31:
kotlin.ResultKt.throwOnFailure(r5)
r0.label = r3
java.lang.Object r5 = r4.getAuidString(r0)
if (r5 != r1) goto L3d
return r1
L3d:
java.lang.String r5 = (java.lang.String) r5
r0 = 0
if (r5 != 0) goto L43
return r0
L43:
java.util.UUID r5 = java.util.UUID.fromString(r5) // Catch: java.lang.Throwable -> L50
java.lang.String r1 = "fromString(auidString)"
kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r5, r1) // Catch: java.lang.Throwable -> L50
com.google.protobuf.ByteString r0 = com.unity3d.ads.core.extensions.ProtobufExtensionsKt.toByteString(r5) // Catch: java.lang.Throwable -> L50
L50:
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.ads.core.data.repository.AndroidDeviceInfoRepository.getAuidByteString(kotlin.coroutines.Continuation):java.lang.Object");
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public int getRingerMode() {
return this.dynamicDeviceInfoDataSource.getRingerMode();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public long getSystemBootTime() {
return this.staticDeviceInfoDataSource.getSystemBootTime();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public String getOrientation() {
return this.dynamicDeviceInfoDataSource.getOrientation();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public String getConnectionTypeStr() {
return this.dynamicDeviceInfoDataSource.getConnectionTypeStr();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public int getCurrentUiTheme() {
return this.dynamicDeviceInfoDataSource.getCurrentUiTheme();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public List<String> getLocaleList() {
return this.dynamicDeviceInfoDataSource.getLocaleList();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public String getAppName() {
return this.staticDeviceInfoDataSource.getAppName();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public String getModel() {
return this.staticDeviceInfoDataSource.getModel();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public String getManufacturer() {
return this.staticDeviceInfoDataSource.getManufacturer();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public String getOsVersion() {
return this.staticDeviceInfoDataSource.getOsVersion();
}
@Override // com.unity3d.ads.core.data.repository.DeviceInfoRepository
public boolean getHasInternet() {
return this.dynamicDeviceInfoDataSource.hasInternet();
}
}

Some files were not shown because too many files have changed in this diff Show More