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,53 @@
|
||||
package com.adif.elcanomovil.serviceStorage.utils;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import kotlin.Lazy;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.properties.ReadWriteProperty;
|
||||
import kotlin.reflect.KProperty;
|
||||
|
||||
@Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0018\u00002\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00030\u0001B#\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\u0006\u0010\t\u001a\u00020\u0003¢\u0006\u0002\u0010\nJ\"\u0010\u000b\u001a\u00020\u00032\u0006\u0010\f\u001a\u00020\u00022\n\u0010\r\u001a\u0006\u0012\u0002\b\u00030\u000eH\u0097\u0002¢\u0006\u0002\u0010\u000fJ%\u0010\u0010\u001a\u00020\u00112\u0006\u0010\f\u001a\u00020\u00022\n\u0010\r\u001a\u0006\u0012\u0002\b\u00030\u000e2\u0006\u0010\u0012\u001a\u00020\u0003H\u0096\u0002R\u000e\u0010\t\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\bX\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0013"}, d2 = {"Lcom/adif/elcanomovil/serviceStorage/utils/BooleanPreference;", "Lkotlin/properties/ReadWriteProperty;", "", "", "preferences", "Lkotlin/Lazy;", "Landroid/content/SharedPreferences;", AppMeasurementSdk.ConditionalUserProperty.NAME, "", "defaultValue", "(Lkotlin/Lazy;Ljava/lang/String;Z)V", "getValue", "thisRef", "property", "Lkotlin/reflect/KProperty;", "(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Boolean;", "setValue", "", "value", "service-storage_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nBooleanPreference.kt\nKotlin\n*S Kotlin\n*F\n+ 1 BooleanPreference.kt\ncom/adif/elcanomovil/serviceStorage/utils/BooleanPreference\n+ 2 SharedPreferences.kt\nandroidx/core/content/SharedPreferencesKt\n*L\n1#1,30:1\n39#2,12:31\n*S KotlinDebug\n*F\n+ 1 BooleanPreference.kt\ncom/adif/elcanomovil/serviceStorage/utils/BooleanPreference\n*L\n27#1:31,12\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class BooleanPreference implements ReadWriteProperty<Object, Boolean> {
|
||||
private final boolean defaultValue;
|
||||
private final String name;
|
||||
private final Lazy<SharedPreferences> preferences;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public BooleanPreference(Lazy<? extends SharedPreferences> preferences, String name, boolean z3) {
|
||||
Intrinsics.checkNotNullParameter(preferences, "preferences");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
this.preferences = preferences;
|
||||
this.name = name;
|
||||
this.defaultValue = z3;
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty, kotlin.properties.ReadOnlyProperty
|
||||
public /* bridge */ /* synthetic */ Object getValue(Object obj, KProperty kProperty) {
|
||||
return getValue(obj, (KProperty<?>) kProperty);
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty
|
||||
public /* bridge */ /* synthetic */ void setValue(Object obj, KProperty kProperty, Boolean bool) {
|
||||
setValue(obj, (KProperty<?>) kProperty, bool.booleanValue());
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty, kotlin.properties.ReadOnlyProperty
|
||||
public Boolean getValue(Object thisRef, KProperty<?> property) {
|
||||
Intrinsics.checkNotNullParameter(thisRef, "thisRef");
|
||||
Intrinsics.checkNotNullParameter(property, "property");
|
||||
return Boolean.valueOf(this.preferences.getValue().getBoolean(this.name, this.defaultValue));
|
||||
}
|
||||
|
||||
public void setValue(Object thisRef, KProperty<?> property, boolean value) {
|
||||
Intrinsics.checkNotNullParameter(thisRef, "thisRef");
|
||||
Intrinsics.checkNotNullParameter(property, "property");
|
||||
SharedPreferences.Editor edit = this.preferences.getValue().edit();
|
||||
edit.putBoolean(this.name, value);
|
||||
edit.apply();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.adif.elcanomovil.serviceStorage.utils;
|
||||
|
||||
import Q2.d;
|
||||
import X2.a;
|
||||
import com.adif.elcanomovil.serviceStorage.model.avisa.IncidenceCommentEntity;
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u001f\u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00070\u00062\b\u0010\u0005\u001a\u0004\u0018\u00010\u0004H\u0007¢\u0006\u0004\b\b\u0010\tJ\u001f\u0010\u000b\u001a\u00020\u00042\u000e\u0010\n\u001a\n\u0012\u0004\u0012\u00020\u0007\u0018\u00010\u0006H\u0007¢\u0006\u0004\b\u000b\u0010\fR\u0014\u0010\u000e\u001a\u00020\r8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u000e\u0010\u000f¨\u0006\u0010"}, d2 = {"Lcom/adif/elcanomovil/serviceStorage/utils/CommentTypeConverter;", "", "<init>", "()V", "", Constants.ScionAnalytics.MessageType.DATA_MESSAGE, "", "Lcom/adif/elcanomovil/serviceStorage/model/avisa/IncidenceCommentEntity;", "stringToList", "(Ljava/lang/String;)Ljava/util/List;", "someObjects", "listToString", "(Ljava/util/List;)Ljava/lang/String;", "LQ2/d;", "gson", "LQ2/d;", "service-storage_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class CommentTypeConverter {
|
||||
private final d gson = new d();
|
||||
|
||||
public final String listToString(List<IncidenceCommentEntity> someObjects) {
|
||||
String f2 = this.gson.f(someObjects);
|
||||
Intrinsics.checkNotNullExpressionValue(f2, "toJson(...)");
|
||||
return f2;
|
||||
}
|
||||
|
||||
public final List<IncidenceCommentEntity> stringToList(String data) {
|
||||
if (data == null || Intrinsics.areEqual(data, "null")) {
|
||||
List<IncidenceCommentEntity> list = Collections.EMPTY_LIST;
|
||||
Intrinsics.checkNotNullExpressionValue(list, "emptyList(...)");
|
||||
return list;
|
||||
}
|
||||
Type type = new a() { // from class: com.adif.elcanomovil.serviceStorage.utils.CommentTypeConverter$stringToList$listType$1
|
||||
}.getType();
|
||||
d dVar = this.gson;
|
||||
dVar.getClass();
|
||||
Object c4 = dVar.c(data, a.get(type));
|
||||
Intrinsics.checkNotNullExpressionValue(c4, "fromJson(...)");
|
||||
return (List) c4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.adif.elcanomovil.serviceStorage.utils;
|
||||
|
||||
import java.util.Date;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.JvmStatic;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0005\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0019\u0010\u0003\u001a\u0004\u0018\u00010\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0007¢\u0006\u0002\u0010\u0007J\u0019\u0010\b\u001a\u0004\u0018\u00010\u00062\b\u0010\t\u001a\u0004\u0018\u00010\u0004H\u0007¢\u0006\u0002\u0010\n¨\u0006\u000b"}, d2 = {"Lcom/adif/elcanomovil/serviceStorage/utils/DateConverter;", "", "()V", "toDate", "Ljava/util/Date;", "timestamp", "", "(Ljava/lang/Long;)Ljava/util/Date;", "toTimestamp", "date", "(Ljava/util/Date;)Ljava/lang/Long;", "service-storage_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class DateConverter {
|
||||
public static final DateConverter INSTANCE = new DateConverter();
|
||||
|
||||
private DateConverter() {
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final Date toDate(Long timestamp) {
|
||||
if (timestamp == null) {
|
||||
return null;
|
||||
}
|
||||
return new Date(timestamp.longValue());
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
public static final Long toTimestamp(Date date) {
|
||||
if (date != null) {
|
||||
return Long.valueOf(date.getTime());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.adif.elcanomovil.serviceStorage.utils;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0010\n\u0002\b\u0002\n\u0002\u0010\u0010\n\u0002\u0010\b\n\u0002\b\u0004\u001a$\u0010\u0000\u001a\u0002H\u0001\"\u0010\b\u0000\u0010\u0001\u0018\u0001*\b\u0012\u0004\u0012\u0002H\u00010\u0002*\u00020\u0003H\u0082\b¢\u0006\u0002\u0010\u0004\u001a\"\u0010\u0005\u001a\u00020\u0003\"\u000e\b\u0000\u0010\u0001*\b\u0012\u0004\u0012\u0002H\u00010\u0002*\u0002H\u0001H\u0082\b¢\u0006\u0002\u0010\u0006¨\u0006\u0007"}, d2 = {"toEnum", "T", "", "", "(I)Ljava/lang/Enum;", "toInt", "(Ljava/lang/Enum;)I", "service-storage_proNon_corporateRelease"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class DbConvertersKt {
|
||||
private static final /* synthetic */ <T extends Enum<T>> T toEnum(int i) {
|
||||
Intrinsics.reifiedOperationMarker(5, "T");
|
||||
return (T) new Enum[0][i];
|
||||
}
|
||||
|
||||
private static final <T extends Enum<T>> int toInt(T t2) {
|
||||
return t2.ordinal();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.adif.elcanomovil.serviceStorage.utils;
|
||||
|
||||
import com.adif.elcanomovil.serviceStorage.database.StationDatabase;
|
||||
import com.adif.elcanomovil.serviceStorage.model.subscriptions.DestinationEntity;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0014\u0010\u0003\u001a\u0004\u0018\u00010\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0007J\u0012\u0010\u0007\u001a\u0004\u0018\u00010\u00062\u0006\u0010\b\u001a\u00020\u0004H\u0007¨\u0006\t"}, d2 = {"Lcom/adif/elcanomovil/serviceStorage/utils/DestinationTypeConverter;", "", "()V", "destinationToString", "", "orderInfo", "Lcom/adif/elcanomovil/serviceStorage/model/subscriptions/DestinationEntity;", "stringToDestination", "value", "service-storage_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class DestinationTypeConverter {
|
||||
public final String destinationToString(DestinationEntity orderInfo) {
|
||||
return StationDatabase.INSTANCE.getMoshi().a(DestinationEntity.class).toJson(orderInfo);
|
||||
}
|
||||
|
||||
public final DestinationEntity stringToDestination(String value) {
|
||||
Intrinsics.checkNotNullParameter(value, "value");
|
||||
return (DestinationEntity) StationDatabase.INSTANCE.getMoshi().a(DestinationEntity.class).fromJson(value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.adif.elcanomovil.serviceStorage.utils;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import kotlin.Lazy;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.properties.ReadWriteProperty;
|
||||
import kotlin.reflect.KProperty;
|
||||
|
||||
@Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0018\u00002\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00030\u0001B\u001b\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005\u0012\u0006\u0010\u0007\u001a\u00020\b¢\u0006\u0002\u0010\tJ\"\u0010\n\u001a\u00020\u00032\u0006\u0010\u000b\u001a\u00020\u00022\n\u0010\f\u001a\u0006\u0012\u0002\b\u00030\rH\u0097\u0002¢\u0006\u0002\u0010\u000eJ%\u0010\u000f\u001a\u00020\u00102\u0006\u0010\u000b\u001a\u00020\u00022\n\u0010\f\u001a\u0006\u0012\u0002\b\u00030\r2\u0006\u0010\u0011\u001a\u00020\u0003H\u0096\u0002R\u000e\u0010\u0007\u001a\u00020\bX\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0012"}, d2 = {"Lcom/adif/elcanomovil/serviceStorage/utils/LongPreference;", "Lkotlin/properties/ReadWriteProperty;", "", "", "preferences", "Lkotlin/Lazy;", "Landroid/content/SharedPreferences;", AppMeasurementSdk.ConditionalUserProperty.NAME, "", "(Lkotlin/Lazy;Ljava/lang/String;)V", "getValue", "thisRef", "property", "Lkotlin/reflect/KProperty;", "(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Long;", "setValue", "", "value", "service-storage_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nLongPreference.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongPreference.kt\ncom/adif/elcanomovil/serviceStorage/utils/LongPreference\n+ 2 SharedPreferences.kt\nandroidx/core/content/SharedPreferencesKt\n*L\n1#1,31:1\n39#2,12:32\n*S KotlinDebug\n*F\n+ 1 LongPreference.kt\ncom/adif/elcanomovil/serviceStorage/utils/LongPreference\n*L\n26#1:32,12\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class LongPreference implements ReadWriteProperty<Object, Long> {
|
||||
private final String name;
|
||||
private final Lazy<SharedPreferences> preferences;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public LongPreference(Lazy<? extends SharedPreferences> preferences, String name) {
|
||||
Intrinsics.checkNotNullParameter(preferences, "preferences");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
this.preferences = preferences;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty, kotlin.properties.ReadOnlyProperty
|
||||
public /* bridge */ /* synthetic */ Object getValue(Object obj, KProperty kProperty) {
|
||||
return getValue(obj, (KProperty<?>) kProperty);
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty
|
||||
public /* bridge */ /* synthetic */ void setValue(Object obj, KProperty kProperty, Long l4) {
|
||||
setValue(obj, (KProperty<?>) kProperty, l4.longValue());
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty, kotlin.properties.ReadOnlyProperty
|
||||
public Long getValue(Object thisRef, KProperty<?> property) {
|
||||
Intrinsics.checkNotNullParameter(thisRef, "thisRef");
|
||||
Intrinsics.checkNotNullParameter(property, "property");
|
||||
return Long.valueOf(this.preferences.getValue().getLong(this.name, 0L));
|
||||
}
|
||||
|
||||
public void setValue(Object thisRef, KProperty<?> property, long value) {
|
||||
Intrinsics.checkNotNullParameter(thisRef, "thisRef");
|
||||
Intrinsics.checkNotNullParameter(property, "property");
|
||||
SharedPreferences.Editor edit = this.preferences.getValue().edit();
|
||||
edit.putLong(this.name, value);
|
||||
edit.apply();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.adif.elcanomovil.serviceStorage.utils;
|
||||
|
||||
import Z2.AbstractC0104l;
|
||||
import Z2.G;
|
||||
import android.content.SharedPreferences;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import java.lang.reflect.Type;
|
||||
import kotlin.Lazy;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.properties.ReadWriteProperty;
|
||||
import kotlin.reflect.KProperty;
|
||||
|
||||
@Metadata(d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\b\u0018\u0000*\b\b\u0000\u0010\u0002*\u00020\u00012\u0010\u0012\u0004\u0012\u00020\u0001\u0012\u0006\u0012\u0004\u0018\u00018\u00000\u0003B7\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004\u0012\u0006\u0010\b\u001a\u00020\u0007\u0012\u0006\u0010\n\u001a\u00020\t\u0012\b\u0010\u000b\u001a\u0004\u0018\u00018\u0000\u0012\u0006\u0010\r\u001a\u00020\f¢\u0006\u0004\b\u000e\u0010\u000fJ&\u0010\u0013\u001a\u0004\u0018\u00018\u00002\u0006\u0010\u0010\u001a\u00020\u00012\n\u0010\u0012\u001a\u0006\u0012\u0002\b\u00030\u0011H\u0097\u0002¢\u0006\u0004\b\u0013\u0010\u0014J.\u0010\u0017\u001a\u00020\u00162\u0006\u0010\u0010\u001a\u00020\u00012\n\u0010\u0012\u001a\u0006\u0012\u0002\b\u00030\u00112\b\u0010\u0015\u001a\u0004\u0018\u00018\u0000H\u0096\u0002¢\u0006\u0004\b\u0017\u0010\u0018R\u001a\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u00048\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0006\u0010\u0019R\u0014\u0010\b\u001a\u00020\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\b\u0010\u001aR\u0014\u0010\n\u001a\u00020\t8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\n\u0010\u001bR\u0016\u0010\u000b\u001a\u0004\u0018\u00018\u00008\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u000b\u0010\u001cR\u0014\u0010\r\u001a\u00020\f8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\r\u0010\u001d¨\u0006\u001e"}, d2 = {"Lcom/adif/elcanomovil/serviceStorage/utils/ObjectPreference;", "", "T", "Lkotlin/properties/ReadWriteProperty;", "Lkotlin/Lazy;", "Landroid/content/SharedPreferences;", "preferences", "LZ2/G;", "moshi", "", AppMeasurementSdk.ConditionalUserProperty.NAME, "defaultValue", "Ljava/lang/reflect/Type;", "type", "<init>", "(Lkotlin/Lazy;LZ2/G;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/reflect/Type;)V", "thisRef", "Lkotlin/reflect/KProperty;", "property", "getValue", "(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;", "value", "", "setValue", "(Ljava/lang/Object;Lkotlin/reflect/KProperty;Ljava/lang/Object;)V", "Lkotlin/Lazy;", "LZ2/G;", "Ljava/lang/String;", "Ljava/lang/Object;", "Ljava/lang/reflect/Type;", "service-storage_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nObjectPreference.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ObjectPreference.kt\ncom/adif/elcanomovil/serviceStorage/utils/ObjectPreference\n+ 2 SharedPreferences.kt\nandroidx/core/content/SharedPreferencesKt\n*L\n1#1,85:1\n39#2,12:86\n*S KotlinDebug\n*F\n+ 1 ObjectPreference.kt\ncom/adif/elcanomovil/serviceStorage/utils/ObjectPreference\n*L\n45#1:86,12\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class ObjectPreference<T> implements ReadWriteProperty<Object, T> {
|
||||
private final T defaultValue;
|
||||
private final G moshi;
|
||||
private final String name;
|
||||
private final Lazy<SharedPreferences> preferences;
|
||||
private final Type type;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public ObjectPreference(Lazy<? extends SharedPreferences> preferences, G moshi, String name, T t2, Type type) {
|
||||
Intrinsics.checkNotNullParameter(preferences, "preferences");
|
||||
Intrinsics.checkNotNullParameter(moshi, "moshi");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(type, "type");
|
||||
this.preferences = preferences;
|
||||
this.moshi = moshi;
|
||||
this.name = name;
|
||||
this.defaultValue = t2;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty, kotlin.properties.ReadOnlyProperty
|
||||
public T getValue(Object thisRef, KProperty<?> property) {
|
||||
Intrinsics.checkNotNullParameter(thisRef, "thisRef");
|
||||
Intrinsics.checkNotNullParameter(property, "property");
|
||||
try {
|
||||
if (!this.preferences.getValue().contains(this.name)) {
|
||||
return this.defaultValue;
|
||||
}
|
||||
String string = this.preferences.getValue().getString(this.name, null);
|
||||
if (string != null && string.length() != 0) {
|
||||
T t2 = (T) this.moshi.b(this.type).fromJson(string);
|
||||
return t2 == null ? this.defaultValue : t2;
|
||||
}
|
||||
return this.defaultValue;
|
||||
} catch (Exception unused) {
|
||||
return this.defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty
|
||||
public void setValue(Object thisRef, KProperty<?> property, T value) {
|
||||
Intrinsics.checkNotNullParameter(thisRef, "thisRef");
|
||||
Intrinsics.checkNotNullParameter(property, "property");
|
||||
AbstractC0104l b4 = this.moshi.b(this.type);
|
||||
SharedPreferences.Editor edit = this.preferences.getValue().edit();
|
||||
edit.putString(this.name, b4.toJson(value));
|
||||
edit.apply();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.adif.elcanomovil.serviceStorage.utils;
|
||||
|
||||
import Z2.AbstractC0104l;
|
||||
import Z2.G;
|
||||
import android.content.SharedPreferences;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import java.lang.reflect.Type;
|
||||
import kotlin.Lazy;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.properties.ReadWriteProperty;
|
||||
import kotlin.reflect.KProperty;
|
||||
|
||||
@Metadata(d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\b\u0018\u0000*\b\b\u0000\u0010\u0002*\u00020\u00012\u000e\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00028\u00000\u0003B5\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004\u0012\u0006\u0010\b\u001a\u00020\u0007\u0012\u0006\u0010\n\u001a\u00020\t\u0012\u0006\u0010\u000b\u001a\u00028\u0000\u0012\u0006\u0010\r\u001a\u00020\f¢\u0006\u0004\b\u000e\u0010\u000fJ$\u0010\u0013\u001a\u00028\u00002\u0006\u0010\u0010\u001a\u00020\u00012\n\u0010\u0012\u001a\u0006\u0012\u0002\b\u00030\u0011H\u0097\u0002¢\u0006\u0004\b\u0013\u0010\u0014J,\u0010\u0017\u001a\u00020\u00162\u0006\u0010\u0010\u001a\u00020\u00012\n\u0010\u0012\u001a\u0006\u0012\u0002\b\u00030\u00112\u0006\u0010\u0015\u001a\u00028\u0000H\u0096\u0002¢\u0006\u0004\b\u0017\u0010\u0018R\u001a\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u00048\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0006\u0010\u0019R\u0014\u0010\b\u001a\u00020\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\b\u0010\u001aR\u0014\u0010\n\u001a\u00020\t8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\n\u0010\u001bR\u0014\u0010\u000b\u001a\u00028\u00008\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u000b\u0010\u001cR\u0014\u0010\r\u001a\u00020\f8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\r\u0010\u001d¨\u0006\u001e"}, d2 = {"Lcom/adif/elcanomovil/serviceStorage/utils/ObjectPreferenceNotNull;", "", "T", "Lkotlin/properties/ReadWriteProperty;", "Lkotlin/Lazy;", "Landroid/content/SharedPreferences;", "preferences", "LZ2/G;", "moshi", "", AppMeasurementSdk.ConditionalUserProperty.NAME, "defaultValue", "Ljava/lang/reflect/Type;", "type", "<init>", "(Lkotlin/Lazy;LZ2/G;Ljava/lang/String;Ljava/lang/Object;Ljava/lang/reflect/Type;)V", "thisRef", "Lkotlin/reflect/KProperty;", "property", "getValue", "(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;", "value", "", "setValue", "(Ljava/lang/Object;Lkotlin/reflect/KProperty;Ljava/lang/Object;)V", "Lkotlin/Lazy;", "LZ2/G;", "Ljava/lang/String;", "Ljava/lang/Object;", "Ljava/lang/reflect/Type;", "service-storage_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nObjectPreference.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ObjectPreference.kt\ncom/adif/elcanomovil/serviceStorage/utils/ObjectPreferenceNotNull\n+ 2 SharedPreferences.kt\nandroidx/core/content/SharedPreferencesKt\n*L\n1#1,85:1\n39#2,12:86\n*S KotlinDebug\n*F\n+ 1 ObjectPreference.kt\ncom/adif/elcanomovil/serviceStorage/utils/ObjectPreferenceNotNull\n*L\n82#1:86,12\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class ObjectPreferenceNotNull<T> implements ReadWriteProperty<Object, T> {
|
||||
private final T defaultValue;
|
||||
private final G moshi;
|
||||
private final String name;
|
||||
private final Lazy<SharedPreferences> preferences;
|
||||
private final Type type;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public ObjectPreferenceNotNull(Lazy<? extends SharedPreferences> preferences, G moshi, String name, T defaultValue, Type type) {
|
||||
Intrinsics.checkNotNullParameter(preferences, "preferences");
|
||||
Intrinsics.checkNotNullParameter(moshi, "moshi");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
|
||||
Intrinsics.checkNotNullParameter(type, "type");
|
||||
this.preferences = preferences;
|
||||
this.moshi = moshi;
|
||||
this.name = name;
|
||||
this.defaultValue = defaultValue;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty, kotlin.properties.ReadOnlyProperty
|
||||
public T getValue(Object thisRef, KProperty<?> property) {
|
||||
Intrinsics.checkNotNullParameter(thisRef, "thisRef");
|
||||
Intrinsics.checkNotNullParameter(property, "property");
|
||||
try {
|
||||
if (!this.preferences.getValue().contains(this.name)) {
|
||||
return this.defaultValue;
|
||||
}
|
||||
String string = this.preferences.getValue().getString(this.name, null);
|
||||
if (string != null && string.length() != 0) {
|
||||
T t2 = (T) this.moshi.b(this.type).fromJson(string);
|
||||
return t2 == null ? this.defaultValue : t2;
|
||||
}
|
||||
return this.defaultValue;
|
||||
} catch (Exception unused) {
|
||||
return this.defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty
|
||||
public void setValue(Object thisRef, KProperty<?> property, T value) {
|
||||
Intrinsics.checkNotNullParameter(thisRef, "thisRef");
|
||||
Intrinsics.checkNotNullParameter(property, "property");
|
||||
Intrinsics.checkNotNullParameter(value, "value");
|
||||
AbstractC0104l b4 = this.moshi.b(this.type);
|
||||
SharedPreferences.Editor edit = this.preferences.getValue().edit();
|
||||
edit.putString(this.name, b4.toJson(value));
|
||||
edit.apply();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.adif.elcanomovil.serviceStorage.utils;
|
||||
|
||||
import com.adif.elcanomovil.serviceStorage.database.StationDatabase;
|
||||
import com.adif.elcanomovil.serviceStorage.model.subscriptions.OriginEntity;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0014\u0010\u0003\u001a\u0004\u0018\u00010\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0007J\u0012\u0010\u0007\u001a\u0004\u0018\u00010\u00062\u0006\u0010\b\u001a\u00020\u0004H\u0007¨\u0006\t"}, d2 = {"Lcom/adif/elcanomovil/serviceStorage/utils/OriginTypeConverter;", "", "()V", "origiginToString", "", "orderInfo", "Lcom/adif/elcanomovil/serviceStorage/model/subscriptions/OriginEntity;", "stringToOrigin", "value", "service-storage_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class OriginTypeConverter {
|
||||
public final String origiginToString(OriginEntity orderInfo) {
|
||||
return StationDatabase.INSTANCE.getMoshi().a(OriginEntity.class).toJson(orderInfo);
|
||||
}
|
||||
|
||||
public final OriginEntity stringToOrigin(String value) {
|
||||
Intrinsics.checkNotNullParameter(value, "value");
|
||||
return (OriginEntity) StationDatabase.INSTANCE.getMoshi().a(OriginEntity.class).fromJson(value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.adif.elcanomovil.serviceStorage.utils;
|
||||
|
||||
import Q2.d;
|
||||
import X2.a;
|
||||
import com.adif.elcanomovil.serviceStorage.model.avisa.IncidencePictureEntity;
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u001f\u0010\b\u001a\b\u0012\u0004\u0012\u00020\u00070\u00062\b\u0010\u0005\u001a\u0004\u0018\u00010\u0004H\u0007¢\u0006\u0004\b\b\u0010\tJ\u001f\u0010\u000b\u001a\u00020\u00042\u000e\u0010\n\u001a\n\u0012\u0004\u0012\u00020\u0007\u0018\u00010\u0006H\u0007¢\u0006\u0004\b\u000b\u0010\fR\u0014\u0010\u000e\u001a\u00020\r8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u000e\u0010\u000f¨\u0006\u0010"}, d2 = {"Lcom/adif/elcanomovil/serviceStorage/utils/PictureTypeConverter;", "", "<init>", "()V", "", Constants.ScionAnalytics.MessageType.DATA_MESSAGE, "", "Lcom/adif/elcanomovil/serviceStorage/model/avisa/IncidencePictureEntity;", "stringToList", "(Ljava/lang/String;)Ljava/util/List;", "someObjects", "listToString", "(Ljava/util/List;)Ljava/lang/String;", "LQ2/d;", "gson", "LQ2/d;", "service-storage_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class PictureTypeConverter {
|
||||
private final d gson = new d();
|
||||
|
||||
public final String listToString(List<IncidencePictureEntity> someObjects) {
|
||||
String f2 = this.gson.f(someObjects);
|
||||
Intrinsics.checkNotNullExpressionValue(f2, "toJson(...)");
|
||||
return f2;
|
||||
}
|
||||
|
||||
public final List<IncidencePictureEntity> stringToList(String data) {
|
||||
if (data == null || Intrinsics.areEqual(data, "null")) {
|
||||
List<IncidencePictureEntity> list = Collections.EMPTY_LIST;
|
||||
Intrinsics.checkNotNullExpressionValue(list, "emptyList(...)");
|
||||
return list;
|
||||
}
|
||||
Type type = new a() { // from class: com.adif.elcanomovil.serviceStorage.utils.PictureTypeConverter$stringToList$listType$1
|
||||
}.getType();
|
||||
d dVar = this.gson;
|
||||
dVar.getClass();
|
||||
Object c4 = dVar.c(data, a.get(type));
|
||||
Intrinsics.checkNotNullExpressionValue(c4, "fromJson(...)");
|
||||
return (List) c4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.adif.elcanomovil.serviceStorage.utils;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import kotlin.Lazy;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.SourceDebugExtension;
|
||||
import kotlin.properties.ReadWriteProperty;
|
||||
import kotlin.reflect.KProperty;
|
||||
|
||||
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\u0018\u00002\u0010\u0012\u0004\u0012\u00020\u0002\u0012\u0006\u0012\u0004\u0018\u00010\u00030\u0001B#\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005\u0012\u0006\u0010\u0007\u001a\u00020\u0003\u0012\u0006\u0010\b\u001a\u00020\u0003¢\u0006\u0002\u0010\tJ\u001d\u0010\n\u001a\u00020\u00032\u0006\u0010\u000b\u001a\u00020\u00022\n\u0010\f\u001a\u0006\u0012\u0002\b\u00030\rH\u0097\u0002J'\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u000b\u001a\u00020\u00022\n\u0010\f\u001a\u0006\u0012\u0002\b\u00030\r2\b\u0010\u0010\u001a\u0004\u0018\u00010\u0003H\u0096\u0002R\u000e\u0010\b\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0011"}, d2 = {"Lcom/adif/elcanomovil/serviceStorage/utils/StringPreference;", "Lkotlin/properties/ReadWriteProperty;", "", "", "preferences", "Lkotlin/Lazy;", "Landroid/content/SharedPreferences;", AppMeasurementSdk.ConditionalUserProperty.NAME, "defaultValue", "(Lkotlin/Lazy;Ljava/lang/String;Ljava/lang/String;)V", "getValue", "thisRef", "property", "Lkotlin/reflect/KProperty;", "setValue", "", "value", "service-storage_proNon_corporateRelease"}, k = 1, mv = {1, 9, 0}, xi = 48)
|
||||
@SourceDebugExtension({"SMAP\nStringPreference.kt\nKotlin\n*S Kotlin\n*F\n+ 1 StringPreference.kt\ncom/adif/elcanomovil/serviceStorage/utils/StringPreference\n+ 2 SharedPreferences.kt\nandroidx/core/content/SharedPreferencesKt\n*L\n1#1,30:1\n39#2,12:31\n*S KotlinDebug\n*F\n+ 1 StringPreference.kt\ncom/adif/elcanomovil/serviceStorage/utils/StringPreference\n*L\n27#1:31,12\n*E\n"})
|
||||
/* loaded from: classes.dex */
|
||||
public final class StringPreference implements ReadWriteProperty<Object, String> {
|
||||
private final String defaultValue;
|
||||
private final String name;
|
||||
private final Lazy<SharedPreferences> preferences;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public StringPreference(Lazy<? extends SharedPreferences> preferences, String name, String defaultValue) {
|
||||
Intrinsics.checkNotNullParameter(preferences, "preferences");
|
||||
Intrinsics.checkNotNullParameter(name, "name");
|
||||
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
|
||||
this.preferences = preferences;
|
||||
this.name = name;
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty, kotlin.properties.ReadOnlyProperty
|
||||
public /* bridge */ /* synthetic */ Object getValue(Object obj, KProperty kProperty) {
|
||||
return getValue(obj, (KProperty<?>) kProperty);
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty
|
||||
public /* bridge */ /* synthetic */ void setValue(Object obj, KProperty kProperty, String str) {
|
||||
setValue2(obj, (KProperty<?>) kProperty, str);
|
||||
}
|
||||
|
||||
@Override // kotlin.properties.ReadWriteProperty, kotlin.properties.ReadOnlyProperty
|
||||
public String getValue(Object thisRef, KProperty<?> property) {
|
||||
Intrinsics.checkNotNullParameter(thisRef, "thisRef");
|
||||
Intrinsics.checkNotNullParameter(property, "property");
|
||||
String string = this.preferences.getValue().getString(this.name, this.defaultValue);
|
||||
return string == null ? this.defaultValue : string;
|
||||
}
|
||||
|
||||
/* renamed from: setValue, reason: avoid collision after fix types in other method */
|
||||
public void setValue2(Object thisRef, KProperty<?> property, String value) {
|
||||
Intrinsics.checkNotNullParameter(thisRef, "thisRef");
|
||||
Intrinsics.checkNotNullParameter(property, "property");
|
||||
SharedPreferences.Editor edit = this.preferences.getValue().edit();
|
||||
edit.putString(this.name, value);
|
||||
edit.apply();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user