正在查看: Aisle v12.32 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Aisle v12.32 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package S2;
import Fb.y;
import V2.C0823v;
import X2.D;
import android.app.Application;
import android.content.Context;
import cb.N;
import com.aisle.app.data.api.AuthorisedRestApiService;
import com.aisle.app.data.api.DownloaderService;
import com.aisle.app.data.api.NotificationService;
import com.aisle.app.data.api.UnAuthorisedRestApiService;
import com.aisle.app.data.dataStore.DataStore;
import com.aisle.app.domain.model.Profile;
import java.util.concurrent.TimeUnit;
import kotlin.Unit;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import okhttp3.CertificatePinner;
import okhttp3.ConnectionPool;
import okhttp3.Interceptor;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.logging.HttpLoggingInterceptor;
import v4.C2178a;
import v4.C2199w;
import v4.z0;
import z0.AbstractC2330f;
public final class i {
public static final i f7837a = new i();
private static String f7838b = "";
static final class a extends kotlin.coroutines.jvm.internal.l implements Function2 {
int f7839a;
final DataStore f7840b;
a(DataStore dataStore, kotlin.coroutines.d dVar) {
super(2, dVar);
this.f7840b = dataStore;
}
public final kotlin.coroutines.d create(Object obj, kotlin.coroutines.d dVar) {
return new a(this.f7840b, dVar);
}
public final Object invoke(N n5, kotlin.coroutines.d dVar) {
return create(n5, dVar).invokeSuspend(Unit.a);
}
public final Object invokeSuspend(Object obj) {
Object e5 = Ma.b.e();
int i5 = this.f7839a;
if (i5 == 0) {
Ja.q.b(obj);
i iVar = i.f7837a;
DataStore dataStore = this.f7840b;
AbstractC2330f.a auth_token = DataStore.Companion.getAUTH_TOKEN();
this.f7839a = 1;
obj = dataStore.getValue(auth_token, "", this);
if (obj == e5) {
return e5;
}
} else {
if (i5 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
Ja.q.b(obj);
}
i.f7838b = (String) obj;
return Unit.a;
}
}
static final class b extends kotlin.coroutines.jvm.internal.l implements Function2 {
int f7841a;
final DataStore f7842b;
b(DataStore dataStore, kotlin.coroutines.d dVar) {
super(2, dVar);
this.f7842b = dataStore;
}
public final kotlin.coroutines.d create(Object obj, kotlin.coroutines.d dVar) {
return new b(this.f7842b, dVar);
}
public final Object invoke(N n5, kotlin.coroutines.d dVar) {
return create(n5, dVar).invokeSuspend(Unit.a);
}
public final Object invokeSuspend(Object obj) {
Object e5 = Ma.b.e();
int i5 = this.f7841a;
if (i5 == 0) {
Ja.q.b(obj);
i iVar = i.f7837a;
DataStore dataStore = this.f7842b;
AbstractC2330f.a auth_token = DataStore.Companion.getAUTH_TOKEN();
this.f7841a = 1;
obj = dataStore.getValue(auth_token, "", this);
if (obj == e5) {
return e5;
}
} else {
if (i5 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
Ja.q.b(obj);
}
i.f7838b = (String) obj;
return Unit.a;
}
}
private i() {
}
private final void c(okhttp3.Response r7, com.aisle.app.data.dataStore.DataStore r8) {
throw new UnsupportedOperationException("Method not decompiled: S2.i.c(okhttp3.Response, com.aisle.app.data.dataStore.DataStore):void");
}
public static final Response k(DataStore dataStore, C2178a c2178a, C2199w c2199w, Interceptor.Chain chain) {
Intrinsics.checkNotNullParameter(chain, "chain");
Request.Builder newBuilder = chain.request().newBuilder();
if (Intrinsics.areEqual(f7838b, "")) {
cb.i.f((CoroutineContext) null, new b(dataStore, null), 1, (Object) null);
if (!Intrinsics.areEqual(f7838b, "")) {
newBuilder.header("Authorization", f7838b);
}
} else {
newBuilder.header("Authorization", f7838b);
}
newBuilder.header("device-type", "android");
newBuilder.header("app-version", c2178a.b());
newBuilder.header("model-details", c2178a.c());
newBuilder.header("os-version", String.valueOf(c2178a.d()));
newBuilder.header("app-name", c2178a.a());
newBuilder.header("is-device-rooted", String.valueOf(c2178a.e()));
String o5 = c2199w.o();
if (o5 != null && o5.length() != 0) {
newBuilder.header("unique-identifier", o5);
newBuilder.header("advertising-id", o5);
}
Response proceed = chain.proceed(newBuilder.build());
if (proceed.code() == 401) {
dataStore.deleteValue(DataStore.Companion.getAUTH_TOKEN());
return proceed;
}
if (proceed.code() == 403) {
f7837a.c(proceed, dataStore);
return proceed;
}
if (proceed.code() == 503) {
f7837a.c(proceed, dataStore);
}
return proceed;
}
public final Context d(Application application) {
Intrinsics.checkNotNullParameter(application, "application");
return application;
}
public final AuthorisedRestApiService e(DataStore dataStore, Fb.y yVar) {
Intrinsics.checkNotNullParameter(dataStore, "dataStore");
Intrinsics.checkNotNullParameter(yVar, "retrofit");
if (Intrinsics.areEqual(f7838b, "")) {
cb.i.f((CoroutineContext) null, new a(dataStore, null), 1, (Object) null);
}
Object b5 = yVar.b(AuthorisedRestApiService.class);
Intrinsics.checkNotNullExpressionValue(b5, "create(...)");
return (AuthorisedRestApiService) b5;
}
public final C0823v f() {
return new C0823v(null, null, 3, null);
}
public final DataStore g(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return new DataStore(context);
}
public final DownloaderService h() {
Object b5 = new y.b().b("https://app.aisle.co/V1/").a(Gb.a.f()).d().b(DownloaderService.class);
Intrinsics.checkNotNullExpressionValue(b5, "create(...)");
return (DownloaderService) b5;
}
public final D i() {
return new D();
}
public final Interceptor j(final C2178a c2178a, final DataStore dataStore, final C2199w c2199w) {
Intrinsics.checkNotNullParameter(c2178a, "appInfo");
Intrinsics.checkNotNullParameter(dataStore, "dataStore");
Intrinsics.checkNotNullParameter(c2199w, "eventLogger");
return new Interceptor() {
public final Response intercept(Interceptor.Chain chain) {
Response k5;
k5 = i.k(DataStore.this, c2178a, c2199w, chain);
return k5;
}
};
}
public final HttpLoggingInterceptor l() {
HttpLoggingInterceptor httpLoggingInterceptor = new HttpLoggingInterceptor((HttpLoggingInterceptor.Logger) null, 1, (DefaultConstructorMarker) null);
httpLoggingInterceptor.level(HttpLoggingInterceptor.Level.NONE);
return httpLoggingInterceptor;
}
public final NotificationService m(OkHttpClient okHttpClient) {
Intrinsics.checkNotNullParameter(okHttpClient, "okHttpClient");
Object b5 = new y.b().b("https://notification.aisle.co/v1/").a(Gb.a.f()).f(okHttpClient).d().b(NotificationService.class);
Intrinsics.checkNotNullExpressionValue(b5, "create(...)");
return (NotificationService) b5;
}
public final OkHttpClient n(Interceptor interceptor, Context context, HttpLoggingInterceptor httpLoggingInterceptor) {
Intrinsics.checkNotNullParameter(interceptor, "interceptor");
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(httpLoggingInterceptor, "logger");
CertificatePinner build = new CertificatePinner.Builder().add("aisle.co", new String[]{"sha256/" + z0.c(z0.z("3E611E3A0A779518AF2CD9468A96AE072D77C9879AF19216503E58EA3770503A"))}).build();
OkHttpClient.Builder builder = new OkHttpClient.Builder();
TimeUnit timeUnit = TimeUnit.SECONDS;
return builder.connectTimeout(30L, timeUnit).readTimeout(30L, timeUnit).connectionPool(new ConnectionPool(0, 1L, TimeUnit.NANOSECONDS)).retryOnConnectionFailure(true).addInterceptor(interceptor).addInterceptor(httpLoggingInterceptor).certificatePinner(build).build();
}
public final Profile o() {
return new Profile(null, null, null, null, null, null, null, null, null, null, false, false, false, null, null, null, null, null, null, false, false, false, false, false, null, null, null, 0, false, false, null, null, null, false, false, null, false, false, false, null, null, null, null, false, 0, null, null, false, null, null, null, null, null, null, null, null, null, null, null, false, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, false, null, -1, -1, 16383, null);
}
public final Fb.y p(OkHttpClient okHttpClient) {
Intrinsics.checkNotNullParameter(okHttpClient, "okHttpClient");
Fb.y d5 = new y.b().b("https://app.aisle.co/V1/").a(Gb.a.f()).f(okHttpClient).d();
Intrinsics.checkNotNullExpressionValue(d5, "build(...)");
return d5;
}
public final UnAuthorisedRestApiService q(Fb.y yVar) {
Intrinsics.checkNotNullParameter(yVar, "retrofit");
f7838b = "";
Object b5 = yVar.b(UnAuthorisedRestApiService.class);
Intrinsics.checkNotNullExpressionValue(b5, "create(...)");
return (UnAuthorisedRestApiService) b5;
}
}