Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.utils.Status;
|
||||
import kotlin.Metadata;
|
||||
|
||||
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final /* synthetic */ class GetClosestStationUseCase$invoke$2$2$WhenMappings {
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[Status.values().length];
|
||||
try {
|
||||
iArr[Status.SUCCESS.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
$EnumSwitchMapping$0 = iArr;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import android.location.Location;
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.providers.Check24hProvider;
|
||||
import com.adif.elcanomovil.domain.providers.LocationProvider;
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlinx.coroutines.BuildersKt;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
|
||||
@Metadata(d1 = {"\u00008\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\u001d\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007¢\u0006\u0002\u0010\bJ \u0010\t\u001a\u0004\u0018\u00010\n2\f\u0010\u000b\u001a\b\u0012\u0004\u0012\u00020\n0\f2\u0006\u0010\r\u001a\u00020\u000eH\u0002J\u0016\u0010\u000f\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\n0\u0010H\u0086B¢\u0006\u0002\u0010\u0011R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0012"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/GetClosestStationUseCase;", "", "locationProvider", "Lcom/adif/elcanomovil/domain/providers/LocationProvider;", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "check24hProvider", "Lcom/adif/elcanomovil/domain/providers/Check24hProvider;", "(Lcom/adif/elcanomovil/domain/providers/LocationProvider;Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;Lcom/adif/elcanomovil/domain/providers/Check24hProvider;)V", "findClosestStation", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "stations", "", FirebaseAnalytics.Param.LOCATION, "Landroid/location/Location;", "invoke", "Lkotlinx/coroutines/flow/Flow;", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nGetClosestStationUseCase.kt\nKotlin\n*S Kotlin\n*F\n+ 1 GetClosestStationUseCase.kt\ncom/adif/elcanomovil/domain/usecases/stations/GetClosestStationUseCase\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,56:1\n1855#2,2:57\n*S KotlinDebug\n*F\n+ 1 GetClosestStationUseCase.kt\ncom/adif/elcanomovil/domain/usecases/stations/GetClosestStationUseCase\n*L\n43#1:57,2\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class GetClosestStationUseCase {
|
||||
private final Check24hProvider check24hProvider;
|
||||
private final LocationProvider locationProvider;
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public GetClosestStationUseCase(LocationProvider locationProvider, StationsRepository stationsRepository, Check24hProvider check24hProvider) {
|
||||
Intrinsics.checkNotNullParameter(locationProvider, "locationProvider");
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
Intrinsics.checkNotNullParameter(check24hProvider, "check24hProvider");
|
||||
this.locationProvider = locationProvider;
|
||||
this.stationsRepository = stationsRepository;
|
||||
this.check24hProvider = check24hProvider;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final Station findClosestStation(List<Station> stations, Location location) {
|
||||
float f2 = Float.MAX_VALUE;
|
||||
Station station = null;
|
||||
for (Station station2 : stations) {
|
||||
Location location2 = station2.getLocation();
|
||||
if (location2 != null) {
|
||||
float distanceTo = location2.distanceTo(location);
|
||||
station2.setDistance(Float.valueOf(distanceTo));
|
||||
if (distanceTo < f2) {
|
||||
station = station2;
|
||||
f2 = distanceTo;
|
||||
}
|
||||
}
|
||||
}
|
||||
return station;
|
||||
}
|
||||
|
||||
public final Object invoke(Continuation<? super Flow<Station>> continuation) {
|
||||
return BuildersKt.withContext(Dispatchers.getIO(), new b(this, null), continuation);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.station.RequestedStationInfo;
|
||||
import com.adif.elcanomovil.domain.entities.utils.AsyncResult;
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
|
||||
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0017\u0010\u0005\u001a\u0010\u0012\f\u0012\n\u0012\u0004\u0012\u00020\b\u0018\u00010\u00070\u0006H\u0086\u0002R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\t"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/GetCurrentOneStationUseCase;", "", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;)V", "invoke", "Lkotlinx/coroutines/flow/Flow;", "Lcom/adif/elcanomovil/domain/entities/utils/AsyncResult;", "Lcom/adif/elcanomovil/domain/entities/station/RequestedStationInfo;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class GetCurrentOneStationUseCase {
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public GetCurrentOneStationUseCase(StationsRepository stationsRepository) {
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
this.stationsRepository = stationsRepository;
|
||||
}
|
||||
|
||||
public final Flow<AsyncResult<RequestedStationInfo>> invoke() {
|
||||
return this.stationsRepository.getCurrentOneStation();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.BuildersKt;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0086B¢\u0006\u0002\u0010\u0007R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\b"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/GetHomeStationUseCase;", "", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;)V", "invoke", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class GetHomeStationUseCase {
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public GetHomeStationUseCase(StationsRepository stationsRepository) {
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
this.stationsRepository = stationsRepository;
|
||||
}
|
||||
|
||||
public final Object invoke(Continuation<? super Station> continuation) {
|
||||
return BuildersKt.withContext(Dispatchers.getIO(), new c(this, null), continuation);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u000e\u0010\u0005\u001a\u00020\u0006H\u0086B¢\u0006\u0002\u0010\u0007R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\b"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/GetLastVisitedStationUseCase;", "", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;)V", "invoke", "", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class GetLastVisitedStationUseCase {
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public GetLastVisitedStationUseCase(StationsRepository stationsRepository) {
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
this.stationsRepository = stationsRepository;
|
||||
}
|
||||
|
||||
public final Object invoke(Continuation<? super String> continuation) {
|
||||
return this.stationsRepository.getLastVisitedStation(continuation);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0016\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0086B¢\u0006\u0002\u0010\tR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/GetOneStationUseCase;", "", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;)V", "invoke", "", "stationCode", "", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class GetOneStationUseCase {
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public GetOneStationUseCase(StationsRepository stationsRepository) {
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
this.stationsRepository = stationsRepository;
|
||||
}
|
||||
|
||||
public final Object invoke(String str, Continuation<? super Unit> continuation) {
|
||||
Object collect = this.stationsRepository.fetchOneStation(str).collect(d.f4497a, continuation);
|
||||
return collect == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? collect : Unit.INSTANCE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.BuildersKt;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
|
||||
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0018\u0010\u0005\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0086B¢\u0006\u0002\u0010\tR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/GetStationByIdUseCase;", "", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;)V", "invoke", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "stationCode", "", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class GetStationByIdUseCase {
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public GetStationByIdUseCase(StationsRepository stationsRepository) {
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
this.stationsRepository = stationsRepository;
|
||||
}
|
||||
|
||||
public final Object invoke(String str, Continuation<? super Station> continuation) {
|
||||
return BuildersKt.withContext(Dispatchers.getIO(), new e(this, str, null), continuation);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.BuildersKt;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
|
||||
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u001c\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00070\u00062\u0006\u0010\b\u001a\u00020\tH\u0086B¢\u0006\u0002\u0010\nR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u000b"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/GetStationByNameUseCase;", "", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;)V", "invoke", "", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "searchText", "", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class GetStationByNameUseCase {
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public GetStationByNameUseCase(StationsRepository stationsRepository) {
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
this.stationsRepository = stationsRepository;
|
||||
}
|
||||
|
||||
public final Object invoke(String str, Continuation<? super List<Station>> continuation) {
|
||||
return BuildersKt.withContext(Dispatchers.getIO(), new f(this, str, null), continuation);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.utils.Status;
|
||||
import kotlin.Metadata;
|
||||
|
||||
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final /* synthetic */ class GetStationsForRegionUseCase$invoke$2$2$WhenMappings {
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[Status.values().length];
|
||||
try {
|
||||
iArr[Status.SUCCESS.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
$EnumSwitchMapping$0 = iArr;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import android.location.Location;
|
||||
import com.adif.elcanomovil.domain.entities.MapRegion;
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.providers.Check24hProvider;
|
||||
import com.adif.elcanomovil.domain.providers.LocationProvider;
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlinx.coroutines.BuildersKt;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
|
||||
@Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u0001B\u001d\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007¢\u0006\u0002\u0010\bJ&\u0010\t\u001a\u0010\u0012\f\u0012\n\u0012\u0004\u0012\u00020\f\u0018\u00010\u000b0\n2\b\u0010\r\u001a\u0004\u0018\u00010\u000eH\u0086B¢\u0006\u0002\u0010\u000fJ\u001e\u0010\u0010\u001a\u00020\u00112\f\u0010\u0012\u001a\b\u0012\u0004\u0012\u00020\f0\u000b2\u0006\u0010\u0013\u001a\u00020\u0014H\u0002R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0015"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/GetStationsForRegionUseCase;", "", "locationProvider", "Lcom/adif/elcanomovil/domain/providers/LocationProvider;", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "check24hProvider", "Lcom/adif/elcanomovil/domain/providers/Check24hProvider;", "(Lcom/adif/elcanomovil/domain/providers/LocationProvider;Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;Lcom/adif/elcanomovil/domain/providers/Check24hProvider;)V", "invoke", "Lkotlinx/coroutines/flow/Flow;", "", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "mapRegion", "Lcom/adif/elcanomovil/domain/entities/MapRegion;", "(Lcom/adif/elcanomovil/domain/entities/MapRegion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "updateStationsDistance", "", "stations", FirebaseAnalytics.Param.LOCATION, "Landroid/location/Location;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nGetStationsForRegionUseCase.kt\nKotlin\n*S Kotlin\n*F\n+ 1 GetStationsForRegionUseCase.kt\ncom/adif/elcanomovil/domain/usecases/stations/GetStationsForRegionUseCase\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,47:1\n1855#2:48\n1856#2:50\n1#3:49\n*S KotlinDebug\n*F\n+ 1 GetStationsForRegionUseCase.kt\ncom/adif/elcanomovil/domain/usecases/stations/GetStationsForRegionUseCase\n*L\n42#1:48\n42#1:50\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class GetStationsForRegionUseCase {
|
||||
private final Check24hProvider check24hProvider;
|
||||
private final LocationProvider locationProvider;
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public GetStationsForRegionUseCase(LocationProvider locationProvider, StationsRepository stationsRepository, Check24hProvider check24hProvider) {
|
||||
Intrinsics.checkNotNullParameter(locationProvider, "locationProvider");
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
Intrinsics.checkNotNullParameter(check24hProvider, "check24hProvider");
|
||||
this.locationProvider = locationProvider;
|
||||
this.stationsRepository = stationsRepository;
|
||||
this.check24hProvider = check24hProvider;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void updateStationsDistance(List<Station> stations, Location location) {
|
||||
for (Station station : stations) {
|
||||
Location location2 = station.getLocation();
|
||||
if (location2 != null) {
|
||||
station.setDistance(Float.valueOf(location2.distanceTo(location)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final Object invoke(MapRegion mapRegion, Continuation<? super Flow<? extends List<Station>>> continuation) {
|
||||
return BuildersKt.withContext(Dispatchers.getIO(), new g(this, mapRegion, null), continuation);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.stationObservations.StationObservation;
|
||||
import com.adif.elcanomovil.domain.entities.utils.AsyncResult;
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsObservationsRepository;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
|
||||
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J.\u0010\u0005\u001a\u0014\u0012\u0010\u0012\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\t0\b0\u00070\u00062\f\u0010\n\u001a\b\u0012\u0004\u0012\u00020\u000b0\bH\u0086B¢\u0006\u0002\u0010\fR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/GetStationsObservationsUseCase;", "", "stationsObservationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsObservationsRepository;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsObservationsRepository;)V", "invoke", "Lkotlinx/coroutines/flow/Flow;", "Lcom/adif/elcanomovil/domain/entities/utils/AsyncResult;", "", "Lcom/adif/elcanomovil/domain/entities/stationObservations/StationObservation;", "stations", "", "(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class GetStationsObservationsUseCase {
|
||||
private final StationsObservationsRepository stationsObservationsRepository;
|
||||
|
||||
public GetStationsObservationsUseCase(StationsObservationsRepository stationsObservationsRepository) {
|
||||
Intrinsics.checkNotNullParameter(stationsObservationsRepository, "stationsObservationsRepository");
|
||||
this.stationsObservationsRepository = stationsObservationsRepository;
|
||||
}
|
||||
|
||||
public final Object invoke(List<String> list, Continuation<? super Flow<? extends AsyncResult<? extends List<StationObservation>>>> continuation) {
|
||||
return this.stationsObservationsRepository.observations(list, continuation);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.entities.utils.AsyncResult;
|
||||
import com.adif.elcanomovil.domain.providers.Check24hProvider;
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.BuildersKt;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
|
||||
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J \u0010\u0007\u001a\u0014\u0012\u0010\u0012\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u000b0\n0\t0\bH\u0086B¢\u0006\u0002\u0010\fR\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/GetStationsUseCase;", "", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "check24hProvider", "Lcom/adif/elcanomovil/domain/providers/Check24hProvider;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;Lcom/adif/elcanomovil/domain/providers/Check24hProvider;)V", "invoke", "Lkotlinx/coroutines/flow/Flow;", "Lcom/adif/elcanomovil/domain/entities/utils/AsyncResult;", "", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class GetStationsUseCase {
|
||||
private final Check24hProvider check24hProvider;
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public GetStationsUseCase(StationsRepository stationsRepository, Check24hProvider check24hProvider) {
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
Intrinsics.checkNotNullParameter(check24hProvider, "check24hProvider");
|
||||
this.stationsRepository = stationsRepository;
|
||||
this.check24hProvider = check24hProvider;
|
||||
}
|
||||
|
||||
public final Object invoke(Continuation<? super Flow<? extends AsyncResult<? extends List<Station>>>> continuation) {
|
||||
return BuildersKt.withContext(Dispatchers.getIO(), new h(this, null), continuation);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.BuildersKt;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0086B¢\u0006\u0002\u0010\u0007R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\b"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/GetWorkStationUseCase;", "", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;)V", "invoke", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class GetWorkStationUseCase {
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public GetWorkStationUseCase(StationsRepository stationsRepository) {
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
this.stationsRepository = stationsRepository;
|
||||
}
|
||||
|
||||
public final Object invoke(Continuation<? super Station> continuation) {
|
||||
return BuildersKt.withContext(Dispatchers.getIO(), new i(this, null), continuation);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import android.location.Location;
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.providers.LocationProvider;
|
||||
import com.adif.elcanomovil.domain.usecases.recentSearch.GetRecentSearchesUseCase;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
import kotlinx.coroutines.flow.FlowKt;
|
||||
|
||||
@Metadata(d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J$\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\t0\b2\f\u0010\n\u001a\b\u0012\u0004\u0012\u00020\t0\b2\u0006\u0010\u000b\u001a\u00020\fH\u0002J\u001a\u0010\r\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\t0\b0\u000eH\u0086@¢\u0006\u0002\u0010\u000fJ\"\u0010\u0010\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\t0\b0\u000e2\f\u0010\n\u001a\b\u0012\u0004\u0012\u00020\t0\bH\u0002R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0011"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/ObserveRecentlySearchedStationsWithDistanceUseCase;", "", "locationProvider", "Lcom/adif/elcanomovil/domain/providers/LocationProvider;", "getRecentStations", "Lcom/adif/elcanomovil/domain/usecases/recentSearch/GetRecentSearchesUseCase;", "(Lcom/adif/elcanomovil/domain/providers/LocationProvider;Lcom/adif/elcanomovil/domain/usecases/recentSearch/GetRecentSearchesUseCase;)V", "calculateLocationtStation", "", "Lcom/adif/elcanomovil/domain/entities/station/Station;", "stations", FirebaseAnalytics.Param.LOCATION, "Landroid/location/Location;", "invoke", "Lkotlinx/coroutines/flow/Flow;", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "observeDistanceChangesAndUpdate", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nObserveRecentlySearchedStationsWithDistanceUseCase.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ObserveRecentlySearchedStationsWithDistanceUseCase.kt\ncom/adif/elcanomovil/domain/usecases/stations/ObserveRecentlySearchedStationsWithDistanceUseCase\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,38:1\n1855#2:39\n1856#2:41\n1#3:40\n*S KotlinDebug\n*F\n+ 1 ObserveRecentlySearchedStationsWithDistanceUseCase.kt\ncom/adif/elcanomovil/domain/usecases/stations/ObserveRecentlySearchedStationsWithDistanceUseCase\n*L\n32#1:39\n32#1:41\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class ObserveRecentlySearchedStationsWithDistanceUseCase {
|
||||
private final GetRecentSearchesUseCase getRecentStations;
|
||||
private final LocationProvider locationProvider;
|
||||
|
||||
public ObserveRecentlySearchedStationsWithDistanceUseCase(LocationProvider locationProvider, GetRecentSearchesUseCase getRecentStations) {
|
||||
Intrinsics.checkNotNullParameter(locationProvider, "locationProvider");
|
||||
Intrinsics.checkNotNullParameter(getRecentStations, "getRecentStations");
|
||||
this.locationProvider = locationProvider;
|
||||
this.getRecentStations = getRecentStations;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final List<Station> calculateLocationtStation(List<Station> stations, Location location) {
|
||||
for (Station station : stations) {
|
||||
Location location2 = station.getLocation();
|
||||
station.setDistance(location2 != null ? Float.valueOf(location.distanceTo(location2)) : null);
|
||||
}
|
||||
return stations;
|
||||
}
|
||||
|
||||
private final Flow<List<Station>> observeDistanceChangesAndUpdate(List<Station> stations) {
|
||||
return FlowKt.flow(new m(this, stations, null));
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0033 */
|
||||
/* 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 invoke(kotlin.coroutines.Continuation<? super kotlinx.coroutines.flow.Flow<? extends java.util.List<com.adif.elcanomovil.domain.entities.station.Station>>> r5) {
|
||||
/*
|
||||
r4 = this;
|
||||
boolean r0 = r5 instanceof com.adif.elcanomovil.domain.usecases.stations.j
|
||||
if (r0 == 0) goto L13
|
||||
r0 = r5
|
||||
com.adif.elcanomovil.domain.usecases.stations.j r0 = (com.adif.elcanomovil.domain.usecases.stations.j) r0
|
||||
int r1 = r0.f4515d
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r3 = r1 & r2
|
||||
if (r3 == 0) goto L13
|
||||
int r1 = r1 - r2
|
||||
r0.f4515d = r1
|
||||
goto L18
|
||||
L13:
|
||||
com.adif.elcanomovil.domain.usecases.stations.j r0 = new com.adif.elcanomovil.domain.usecases.stations.j
|
||||
r0.<init>(r4, r5)
|
||||
L18:
|
||||
java.lang.Object r5 = r0.f4513b
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.f4515d
|
||||
r3 = 1
|
||||
if (r2 == 0) goto L33
|
||||
if (r2 != r3) goto L2b
|
||||
com.adif.elcanomovil.domain.usecases.stations.ObserveRecentlySearchedStationsWithDistanceUseCase r4 = r0.f4512a
|
||||
kotlin.ResultKt.throwOnFailure(r5)
|
||||
goto L43
|
||||
L2b:
|
||||
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
|
||||
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r4.<init>(r5)
|
||||
throw r4
|
||||
L33:
|
||||
kotlin.ResultKt.throwOnFailure(r5)
|
||||
com.adif.elcanomovil.domain.usecases.recentSearch.GetRecentSearchesUseCase r5 = r4.getRecentStations
|
||||
r0.f4512a = r4
|
||||
r0.f4515d = r3
|
||||
java.lang.Object r5 = r5.invoke(r0)
|
||||
if (r5 != r1) goto L43
|
||||
return r1
|
||||
L43:
|
||||
java.util.List r5 = (java.util.List) r5
|
||||
kotlinx.coroutines.flow.Flow r4 = r4.observeDistanceChangesAndUpdate(r5)
|
||||
return r4
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.domain.usecases.stations.ObserveRecentlySearchedStationsWithDistanceUseCase.invoke(kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.BuildersKt;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
|
||||
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0016\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0086B¢\u0006\u0002\u0010\tR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/SetHomeStationUseCase;", "", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;)V", "invoke", "", "station", "", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class SetHomeStationUseCase {
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public SetHomeStationUseCase(StationsRepository stationsRepository) {
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
this.stationsRepository = stationsRepository;
|
||||
}
|
||||
|
||||
public final Object invoke(String str, Continuation<? super Unit> continuation) {
|
||||
Object withContext = BuildersKt.withContext(Dispatchers.getIO(), new n(this, str, null), continuation);
|
||||
return withContext == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? withContext : Unit.INSTANCE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0016\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0086B¢\u0006\u0002\u0010\tR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/SetLastVisitedStationUseCase;", "", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;)V", "invoke", "", "stationCode", "", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class SetLastVisitedStationUseCase {
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public SetLastVisitedStationUseCase(StationsRepository stationsRepository) {
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
this.stationsRepository = stationsRepository;
|
||||
}
|
||||
|
||||
public final Object invoke(String str, Continuation<? super Unit> continuation) {
|
||||
Object lastVisitedStation = this.stationsRepository.setLastVisitedStation(str, continuation);
|
||||
return lastVisitedStation == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? lastVisitedStation : Unit.INSTANCE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.BuildersKt;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
|
||||
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0016\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0086B¢\u0006\u0002\u0010\tR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Lcom/adif/elcanomovil/domain/usecases/stations/SetWorkStationUseCase;", "", "stationsRepository", "Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;", "(Lcom/adif/elcanomovil/domain/repositories/stations/StationsRepository;)V", "invoke", "", "station", "", "(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "domain_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class SetWorkStationUseCase {
|
||||
private final StationsRepository stationsRepository;
|
||||
|
||||
public SetWorkStationUseCase(StationsRepository stationsRepository) {
|
||||
Intrinsics.checkNotNullParameter(stationsRepository, "stationsRepository");
|
||||
this.stationsRepository = stationsRepository;
|
||||
}
|
||||
|
||||
public final Object invoke(String str, Continuation<? super Unit> continuation) {
|
||||
Object withContext = BuildersKt.withContext(Dispatchers.getIO(), new o(this, str, null), continuation);
|
||||
return withContext == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? withContext : Unit.INSTANCE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import android.location.Location;
|
||||
import com.adif.elcanomovil.domain.entities.station.Station;
|
||||
import com.adif.elcanomovil.domain.entities.utils.AsyncResult;
|
||||
import java.util.List;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class a extends SuspendLambda implements Function3 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ int f4488a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public /* synthetic */ Location f4489b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public /* synthetic */ AsyncResult f4490c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final /* synthetic */ Object f4491d;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public /* synthetic */ a(Object obj, Continuation continuation, int i) {
|
||||
super(3, continuation);
|
||||
this.f4488a = i;
|
||||
this.f4491d = obj;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public final Object invoke(Object obj, Object obj2, Object obj3) {
|
||||
Location location = (Location) obj;
|
||||
AsyncResult asyncResult = (AsyncResult) obj2;
|
||||
Continuation continuation = (Continuation) obj3;
|
||||
switch (this.f4488a) {
|
||||
case 0:
|
||||
a aVar = new a((GetClosestStationUseCase) this.f4491d, continuation, 0);
|
||||
aVar.f4489b = location;
|
||||
aVar.f4490c = asyncResult;
|
||||
return aVar.invokeSuspend(Unit.INSTANCE);
|
||||
default:
|
||||
a aVar2 = new a((GetStationsForRegionUseCase) this.f4491d, continuation, 1);
|
||||
aVar2.f4489b = location;
|
||||
aVar2.f4490c = asyncResult;
|
||||
return aVar2.invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Station findClosestStation;
|
||||
int i = this.f4488a;
|
||||
IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
switch (i) {
|
||||
case 0:
|
||||
ResultKt.throwOnFailure(obj);
|
||||
Location location = this.f4489b;
|
||||
AsyncResult asyncResult = this.f4490c;
|
||||
if (GetClosestStationUseCase$invoke$2$2$WhenMappings.$EnumSwitchMapping$0[asyncResult.getStatus().ordinal()] != 1) {
|
||||
return null;
|
||||
}
|
||||
List list = (List) asyncResult.getData();
|
||||
if (list == null) {
|
||||
list = CollectionsKt.emptyList();
|
||||
}
|
||||
findClosestStation = ((GetClosestStationUseCase) this.f4491d).findClosestStation(list, location);
|
||||
return findClosestStation;
|
||||
default:
|
||||
ResultKt.throwOnFailure(obj);
|
||||
Location location2 = this.f4489b;
|
||||
AsyncResult asyncResult2 = this.f4490c;
|
||||
if (GetStationsForRegionUseCase$invoke$2$2$WhenMappings.$EnumSwitchMapping$0[asyncResult2.getStatus().ordinal()] != 1) {
|
||||
return null;
|
||||
}
|
||||
List list2 = (List) asyncResult2.getData();
|
||||
if (list2 == null) {
|
||||
list2 = CollectionsKt.emptyList();
|
||||
}
|
||||
((GetStationsForRegionUseCase) this.f4491d).updateStationsDistance(list2, location2);
|
||||
return list2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class b extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public Flow f4492a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public int f4493b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ GetClosestStationUseCase f4494c;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public b(GetClosestStationUseCase getClosestStationUseCase, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4494c = getClosestStationUseCase;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new b(this.f4494c, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((b) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:17:0x0030, code lost:
|
||||
|
||||
if (r10 == r0) goto L15;
|
||||
*/
|
||||
@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 r10) {
|
||||
/*
|
||||
r9 = this;
|
||||
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r1 = r9.f4493b
|
||||
com.adif.elcanomovil.domain.usecases.stations.GetClosestStationUseCase r2 = r9.f4494c
|
||||
r3 = 0
|
||||
r4 = 2
|
||||
r5 = 1
|
||||
if (r1 == 0) goto L23
|
||||
if (r1 == r5) goto L1f
|
||||
if (r1 != r4) goto L17
|
||||
kotlinx.coroutines.flow.Flow r9 = r9.f4492a
|
||||
kotlin.ResultKt.throwOnFailure(r10)
|
||||
goto L54
|
||||
L17:
|
||||
java.lang.IllegalStateException r9 = new java.lang.IllegalStateException
|
||||
java.lang.String r10 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r9.<init>(r10)
|
||||
throw r9
|
||||
L1f:
|
||||
kotlin.ResultKt.throwOnFailure(r10)
|
||||
goto L33
|
||||
L23:
|
||||
kotlin.ResultKt.throwOnFailure(r10)
|
||||
com.adif.elcanomovil.domain.providers.LocationProvider r10 = com.adif.elcanomovil.domain.usecases.stations.GetClosestStationUseCase.access$getLocationProvider$p(r2)
|
||||
r9.f4493b = r5
|
||||
java.lang.Object r10 = r10.fetchLastLocation(r9)
|
||||
if (r10 != r0) goto L33
|
||||
goto L50
|
||||
L33:
|
||||
kotlinx.coroutines.flow.Flow r10 = (kotlinx.coroutines.flow.Flow) r10
|
||||
kotlinx.coroutines.flow.Flow r10 = kotlinx.coroutines.flow.FlowKt.filterNotNull(r10)
|
||||
com.adif.elcanomovil.domain.repositories.stations.StationsRepository r1 = com.adif.elcanomovil.domain.usecases.stations.GetClosestStationUseCase.access$getStationsRepository$p(r2)
|
||||
com.adif.elcanomovil.domain.providers.Check24hProvider r6 = com.adif.elcanomovil.domain.usecases.stations.GetClosestStationUseCase.access$getCheck24hProvider$p(r2)
|
||||
r7 = 0
|
||||
boolean r5 = com.adif.elcanomovil.domain.providers.Check24hProvider.DefaultImpls.checkfetchInfo$default(r6, r7, r5, r3)
|
||||
r9.f4492a = r10
|
||||
r9.f4493b = r4
|
||||
java.lang.Object r9 = r1.fetch(r5, r9)
|
||||
if (r9 != r0) goto L51
|
||||
L50:
|
||||
return r0
|
||||
L51:
|
||||
r8 = r10
|
||||
r10 = r9
|
||||
r9 = r8
|
||||
L54:
|
||||
kotlinx.coroutines.flow.Flow r10 = (kotlinx.coroutines.flow.Flow) r10
|
||||
com.adif.elcanomovil.domain.usecases.stations.GetClosestStationUseCase$invoke$2$invokeSuspend$$inlined$filter$1 r0 = new com.adif.elcanomovil.domain.usecases.stations.GetClosestStationUseCase$invoke$2$invokeSuspend$$inlined$filter$1
|
||||
r0.<init>()
|
||||
com.adif.elcanomovil.domain.usecases.stations.a r10 = new com.adif.elcanomovil.domain.usecases.stations.a
|
||||
r1 = 0
|
||||
r10.<init>(r2, r3, r1)
|
||||
kotlinx.coroutines.flow.Flow r9 = kotlinx.coroutines.flow.FlowKt.combine(r9, r0, r10)
|
||||
return r9
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.domain.usecases.stations.b.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class c extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4495a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ GetHomeStationUseCase f4496b;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public c(GetHomeStationUseCase getHomeStationUseCase, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4496b = getHomeStationUseCase;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new c(this.f4496b, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((c) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
StationsRepository stationsRepository;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.f4495a;
|
||||
if (i != 0) {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
return obj;
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
stationsRepository = this.f4496b.stationsRepository;
|
||||
this.f4495a = 1;
|
||||
Object homeStation = stationsRepository.homeStation(this);
|
||||
return homeStation == coroutine_suspended ? coroutine_suspended : homeStation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlinx.coroutines.flow.FlowCollector;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class d implements FlowCollector {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public static final d f4497a = new Object();
|
||||
|
||||
@Override // kotlinx.coroutines.flow.FlowCollector
|
||||
public final Object emit(Object obj, Continuation continuation) {
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class e extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4498a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ GetStationByIdUseCase f4499b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ String f4500c;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public e(GetStationByIdUseCase getStationByIdUseCase, String str, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4499b = getStationByIdUseCase;
|
||||
this.f4500c = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new e(this.f4499b, this.f4500c, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((e) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
StationsRepository stationsRepository;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.f4498a;
|
||||
if (i != 0) {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
return obj;
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
stationsRepository = this.f4499b.stationsRepository;
|
||||
this.f4498a = 1;
|
||||
Object fetchStation = stationsRepository.fetchStation(this.f4500c, this);
|
||||
return fetchStation == coroutine_suspended ? coroutine_suspended : fetchStation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class f extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4501a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ GetStationByNameUseCase f4502b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ String f4503c;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public f(GetStationByNameUseCase getStationByNameUseCase, String str, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4502b = getStationByNameUseCase;
|
||||
this.f4503c = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new f(this.f4502b, this.f4503c, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((f) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
StationsRepository stationsRepository;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.f4501a;
|
||||
if (i != 0) {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
return obj;
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
stationsRepository = this.f4502b.stationsRepository;
|
||||
this.f4501a = 1;
|
||||
Object searchStation = stationsRepository.searchStation(this.f4503c, this);
|
||||
return searchStation == coroutine_suspended ? coroutine_suspended : searchStation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.entities.MapRegion;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class g extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public Flow f4504a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public int f4505b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ GetStationsForRegionUseCase f4506c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final /* synthetic */ MapRegion f4507d;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public g(GetStationsForRegionUseCase getStationsForRegionUseCase, MapRegion mapRegion, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4506c = getStationsForRegionUseCase;
|
||||
this.f4507d = mapRegion;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new g(this.f4506c, this.f4507d, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((g) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:17:0x002f, code lost:
|
||||
|
||||
if (r7 == r0) goto L15;
|
||||
*/
|
||||
@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 r7) {
|
||||
/*
|
||||
r6 = this;
|
||||
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r1 = r6.f4505b
|
||||
com.adif.elcanomovil.domain.usecases.stations.GetStationsForRegionUseCase r2 = r6.f4506c
|
||||
r3 = 2
|
||||
r4 = 1
|
||||
if (r1 == 0) goto L22
|
||||
if (r1 == r4) goto L1e
|
||||
if (r1 != r3) goto L16
|
||||
kotlinx.coroutines.flow.Flow r6 = r6.f4504a
|
||||
kotlin.ResultKt.throwOnFailure(r7)
|
||||
goto L4d
|
||||
L16:
|
||||
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
|
||||
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r6.<init>(r7)
|
||||
throw r6
|
||||
L1e:
|
||||
kotlin.ResultKt.throwOnFailure(r7)
|
||||
goto L32
|
||||
L22:
|
||||
kotlin.ResultKt.throwOnFailure(r7)
|
||||
com.adif.elcanomovil.domain.providers.LocationProvider r7 = com.adif.elcanomovil.domain.usecases.stations.GetStationsForRegionUseCase.access$getLocationProvider$p(r2)
|
||||
r6.f4505b = r4
|
||||
java.lang.Object r7 = r7.fetchLastLocation(r6)
|
||||
if (r7 != r0) goto L32
|
||||
goto L49
|
||||
L32:
|
||||
kotlinx.coroutines.flow.Flow r7 = (kotlinx.coroutines.flow.Flow) r7
|
||||
kotlinx.coroutines.flow.Flow r7 = kotlinx.coroutines.flow.FlowKt.filterNotNull(r7)
|
||||
com.adif.elcanomovil.domain.repositories.stations.StationsRepository r1 = com.adif.elcanomovil.domain.usecases.stations.GetStationsForRegionUseCase.access$getStationsRepository$p(r2)
|
||||
r6.f4504a = r7
|
||||
r6.f4505b = r3
|
||||
com.adif.elcanomovil.domain.entities.MapRegion r3 = r6.f4507d
|
||||
r4 = 0
|
||||
java.lang.Object r6 = r1.fetchForRegion(r3, r4, r6)
|
||||
if (r6 != r0) goto L4a
|
||||
L49:
|
||||
return r0
|
||||
L4a:
|
||||
r5 = r7
|
||||
r7 = r6
|
||||
r6 = r5
|
||||
L4d:
|
||||
kotlinx.coroutines.flow.Flow r7 = (kotlinx.coroutines.flow.Flow) r7
|
||||
com.adif.elcanomovil.domain.usecases.stations.GetStationsForRegionUseCase$invoke$2$invokeSuspend$$inlined$filter$1 r0 = new com.adif.elcanomovil.domain.usecases.stations.GetStationsForRegionUseCase$invoke$2$invokeSuspend$$inlined$filter$1
|
||||
r0.<init>()
|
||||
com.adif.elcanomovil.domain.usecases.stations.a r7 = new com.adif.elcanomovil.domain.usecases.stations.a
|
||||
r1 = 0
|
||||
r3 = 1
|
||||
r7.<init>(r2, r1, r3)
|
||||
kotlinx.coroutines.flow.Flow r6 = kotlinx.coroutines.flow.FlowKt.combine(r6, r0, r7)
|
||||
return r6
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.domain.usecases.stations.g.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.providers.Check24hProvider;
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class h extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4508a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ GetStationsUseCase f4509b;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public h(GetStationsUseCase getStationsUseCase, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4509b = getStationsUseCase;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new h(this.f4509b, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((h) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
StationsRepository stationsRepository;
|
||||
Check24hProvider check24hProvider;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.f4508a;
|
||||
if (i != 0) {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
return obj;
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
GetStationsUseCase getStationsUseCase = this.f4509b;
|
||||
stationsRepository = getStationsUseCase.stationsRepository;
|
||||
check24hProvider = getStationsUseCase.check24hProvider;
|
||||
boolean checkfetchInfo$default = Check24hProvider.DefaultImpls.checkfetchInfo$default(check24hProvider, false, 1, null);
|
||||
this.f4508a = 1;
|
||||
Object fetch = stationsRepository.fetch(checkfetchInfo$default, this);
|
||||
return fetch == coroutine_suspended ? coroutine_suspended : fetch;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class i extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4510a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ GetWorkStationUseCase f4511b;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public i(GetWorkStationUseCase getWorkStationUseCase, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4511b = getWorkStationUseCase;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new i(this.f4511b, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((i) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
StationsRepository stationsRepository;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.f4510a;
|
||||
if (i != 0) {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
return obj;
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
stationsRepository = this.f4511b.stationsRepository;
|
||||
this.f4510a = 1;
|
||||
Object workStation = stationsRepository.workStation(this);
|
||||
return workStation == coroutine_suspended ? coroutine_suspended : workStation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.jvm.internal.IntCompanionObject;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class j extends ContinuationImpl {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public ObserveRecentlySearchedStationsWithDistanceUseCase f4512a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public /* synthetic */ Object f4513b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ ObserveRecentlySearchedStationsWithDistanceUseCase f4514c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public int f4515d;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public j(ObserveRecentlySearchedStationsWithDistanceUseCase observeRecentlySearchedStationsWithDistanceUseCase, Continuation continuation) {
|
||||
super(continuation);
|
||||
this.f4514c = observeRecentlySearchedStationsWithDistanceUseCase;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.f4513b = obj;
|
||||
this.f4515d |= IntCompanionObject.MIN_VALUE;
|
||||
return this.f4514c.invoke(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.jvm.internal.IntCompanionObject;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class k extends ContinuationImpl {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public l f4516a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public /* synthetic */ Object f4517b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ l f4518c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public int f4519d;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public k(l lVar, Continuation continuation) {
|
||||
super(continuation);
|
||||
this.f4518c = lVar;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.f4517b = obj;
|
||||
this.f4519d |= IntCompanionObject.MIN_VALUE;
|
||||
return this.f4518c.emit(null, this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import java.util.List;
|
||||
import kotlinx.coroutines.flow.FlowCollector;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class l implements FlowCollector {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ FlowCollector f4520a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ ObserveRecentlySearchedStationsWithDistanceUseCase f4521b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ List f4522c;
|
||||
|
||||
public l(FlowCollector flowCollector, ObserveRecentlySearchedStationsWithDistanceUseCase observeRecentlySearchedStationsWithDistanceUseCase, List list) {
|
||||
this.f4520a = flowCollector;
|
||||
this.f4521b = observeRecentlySearchedStationsWithDistanceUseCase;
|
||||
this.f4522c = list;
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:20:0x0067, code lost:
|
||||
|
||||
if (r7.emit(r6.f4522c, r0) == r1) goto L26;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:21:0x0069, code lost:
|
||||
|
||||
return r1;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:25:0x0052, code lost:
|
||||
|
||||
if (r6.f4520a.emit(r7, r0) == r1) goto L26;
|
||||
*/
|
||||
/* JADX WARN: Removed duplicated region for block: B:19:0x005b */
|
||||
/* JADX WARN: Removed duplicated region for block: B:22:0x003b */
|
||||
/* JADX WARN: Removed duplicated region for block: B:8:0x0025 */
|
||||
@Override // kotlinx.coroutines.flow.FlowCollector
|
||||
/* renamed from: a, reason: merged with bridge method [inline-methods] */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object emit(android.location.Location r7, kotlin.coroutines.Continuation r8) {
|
||||
/*
|
||||
r6 = this;
|
||||
boolean r0 = r8 instanceof com.adif.elcanomovil.domain.usecases.stations.k
|
||||
if (r0 == 0) goto L13
|
||||
r0 = r8
|
||||
com.adif.elcanomovil.domain.usecases.stations.k r0 = (com.adif.elcanomovil.domain.usecases.stations.k) r0
|
||||
int r1 = r0.f4519d
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r3 = r1 & r2
|
||||
if (r3 == 0) goto L13
|
||||
int r1 = r1 - r2
|
||||
r0.f4519d = r1
|
||||
goto L18
|
||||
L13:
|
||||
com.adif.elcanomovil.domain.usecases.stations.k r0 = new com.adif.elcanomovil.domain.usecases.stations.k
|
||||
r0.<init>(r6, r8)
|
||||
L18:
|
||||
java.lang.Object r8 = r0.f4517b
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.f4519d
|
||||
r3 = 0
|
||||
r4 = 2
|
||||
r5 = 1
|
||||
if (r2 == 0) goto L3b
|
||||
if (r2 == r5) goto L35
|
||||
if (r2 != r4) goto L2d
|
||||
kotlin.ResultKt.throwOnFailure(r8)
|
||||
goto L6a
|
||||
L2d:
|
||||
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
|
||||
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r6.<init>(r7)
|
||||
throw r6
|
||||
L35:
|
||||
com.adif.elcanomovil.domain.usecases.stations.l r6 = r0.f4516a
|
||||
kotlin.ResultKt.throwOnFailure(r8)
|
||||
goto L55
|
||||
L3b:
|
||||
kotlin.ResultKt.throwOnFailure(r8)
|
||||
if (r7 == 0) goto L58
|
||||
com.adif.elcanomovil.domain.usecases.stations.ObserveRecentlySearchedStationsWithDistanceUseCase r8 = r6.f4521b
|
||||
java.util.List r2 = r6.f4522c
|
||||
java.util.List r7 = com.adif.elcanomovil.domain.usecases.stations.ObserveRecentlySearchedStationsWithDistanceUseCase.access$calculateLocationtStation(r8, r2, r7)
|
||||
r0.f4516a = r6
|
||||
r0.f4519d = r5
|
||||
kotlinx.coroutines.flow.FlowCollector r8 = r6.f4520a
|
||||
java.lang.Object r7 = r8.emit(r7, r0)
|
||||
if (r7 != r1) goto L55
|
||||
goto L69
|
||||
L55:
|
||||
kotlin.Unit r7 = kotlin.Unit.INSTANCE
|
||||
goto L59
|
||||
L58:
|
||||
r7 = r3
|
||||
L59:
|
||||
if (r7 != 0) goto L6a
|
||||
kotlinx.coroutines.flow.FlowCollector r7 = r6.f4520a
|
||||
r0.f4516a = r3
|
||||
r0.f4519d = r4
|
||||
java.util.List r6 = r6.f4522c
|
||||
java.lang.Object r6 = r7.emit(r6, r0)
|
||||
if (r6 != r1) goto L6a
|
||||
L69:
|
||||
return r1
|
||||
L6a:
|
||||
kotlin.Unit r6 = kotlin.Unit.INSTANCE
|
||||
return r6
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.domain.usecases.stations.l.emit(android.location.Location, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import java.util.List;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.flow.FlowCollector;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class m extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4523a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public /* synthetic */ Object f4524b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ ObserveRecentlySearchedStationsWithDistanceUseCase f4525c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final /* synthetic */ List f4526d;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public m(ObserveRecentlySearchedStationsWithDistanceUseCase observeRecentlySearchedStationsWithDistanceUseCase, List list, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4525c = observeRecentlySearchedStationsWithDistanceUseCase;
|
||||
this.f4526d = list;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
m mVar = new m(this.f4525c, this.f4526d, continuation);
|
||||
mVar.f4524b = obj;
|
||||
return mVar;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((m) create((FlowCollector) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:13:0x004d, code lost:
|
||||
|
||||
if (((kotlinx.coroutines.flow.Flow) r7).collect(r4, r6) == r0) goto L15;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:14:0x004f, code lost:
|
||||
|
||||
return r0;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:16:0x0038, code lost:
|
||||
|
||||
if (r7 == r0) goto L15;
|
||||
*/
|
||||
@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 r7) {
|
||||
/*
|
||||
r6 = this;
|
||||
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r1 = r6.f4523a
|
||||
com.adif.elcanomovil.domain.usecases.stations.ObserveRecentlySearchedStationsWithDistanceUseCase r2 = r6.f4525c
|
||||
r3 = 2
|
||||
r4 = 1
|
||||
if (r1 == 0) goto L24
|
||||
if (r1 == r4) goto L1c
|
||||
if (r1 != r3) goto L14
|
||||
kotlin.ResultKt.throwOnFailure(r7)
|
||||
goto L50
|
||||
L14:
|
||||
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
|
||||
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r6.<init>(r7)
|
||||
throw r6
|
||||
L1c:
|
||||
java.lang.Object r1 = r6.f4524b
|
||||
kotlinx.coroutines.flow.FlowCollector r1 = (kotlinx.coroutines.flow.FlowCollector) r1
|
||||
kotlin.ResultKt.throwOnFailure(r7)
|
||||
goto L3b
|
||||
L24:
|
||||
kotlin.ResultKt.throwOnFailure(r7)
|
||||
java.lang.Object r7 = r6.f4524b
|
||||
r1 = r7
|
||||
kotlinx.coroutines.flow.FlowCollector r1 = (kotlinx.coroutines.flow.FlowCollector) r1
|
||||
com.adif.elcanomovil.domain.providers.LocationProvider r7 = com.adif.elcanomovil.domain.usecases.stations.ObserveRecentlySearchedStationsWithDistanceUseCase.access$getLocationProvider$p(r2)
|
||||
r6.f4524b = r1
|
||||
r6.f4523a = r4
|
||||
java.lang.Object r7 = r7.fetchLastLocation(r6)
|
||||
if (r7 != r0) goto L3b
|
||||
goto L4f
|
||||
L3b:
|
||||
kotlinx.coroutines.flow.Flow r7 = (kotlinx.coroutines.flow.Flow) r7
|
||||
com.adif.elcanomovil.domain.usecases.stations.l r4 = new com.adif.elcanomovil.domain.usecases.stations.l
|
||||
java.util.List r5 = r6.f4526d
|
||||
r4.<init>(r1, r2, r5)
|
||||
r1 = 0
|
||||
r6.f4524b = r1
|
||||
r6.f4523a = r3
|
||||
java.lang.Object r6 = r7.collect(r4, r6)
|
||||
if (r6 != r0) goto L50
|
||||
L4f:
|
||||
return r0
|
||||
L50:
|
||||
kotlin.Unit r6 = kotlin.Unit.INSTANCE
|
||||
return r6
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.adif.elcanomovil.domain.usecases.stations.m.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class n extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4527a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ SetHomeStationUseCase f4528b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ String f4529c;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public n(SetHomeStationUseCase setHomeStationUseCase, String str, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4528b = setHomeStationUseCase;
|
||||
this.f4529c = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new n(this.f4528b, this.f4529c, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((n) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
StationsRepository stationsRepository;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.f4527a;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
stationsRepository = this.f4528b.stationsRepository;
|
||||
this.f4527a = 1;
|
||||
if (stationsRepository.saveHomeStation(this.f4529c, 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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.adif.elcanomovil.domain.usecases.stations;
|
||||
|
||||
import com.adif.elcanomovil.domain.repositories.stations.StationsRepository;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class o extends SuspendLambda implements Function2 {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public int f4530a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ SetWorkStationUseCase f4531b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final /* synthetic */ String f4532c;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public o(SetWorkStationUseCase setWorkStationUseCase, String str, Continuation continuation) {
|
||||
super(2, continuation);
|
||||
this.f4531b = setWorkStationUseCase;
|
||||
this.f4532c = str;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation create(Object obj, Continuation continuation) {
|
||||
return new o(this.f4531b, this.f4532c, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(Object obj, Object obj2) {
|
||||
return ((o) create((CoroutineScope) obj, (Continuation) obj2)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
StationsRepository stationsRepository;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.f4530a;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
stationsRepository = this.f4531b.stationsRepository;
|
||||
this.f4530a = 1;
|
||||
if (stationsRepository.saveWorkStation(this.f4532c, 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user