47 lines
1.6 KiB
Java
47 lines
1.6 KiB
Java
package o;
|
|
|
|
import android.content.Context;
|
|
import android.location.Address;
|
|
import android.location.Geocoder;
|
|
import java.io.IOException;
|
|
import java.util.List;
|
|
import java.util.Locale;
|
|
import o.guC;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public final class guB implements InterfaceC13170fSr<List<Address>> {
|
|
private final double a;
|
|
private final Locale b;
|
|
private final double c;
|
|
private final Context d;
|
|
private final int e = 20;
|
|
|
|
public static AbstractC13163fSk<List<Address>> a(Context context, guC guc, Locale locale, double d, double d2) {
|
|
return AbstractC13163fSk.create(new guB(context, locale, d, d2, 20)).compose(new guC.HBt(guc.a.a));
|
|
}
|
|
|
|
private guB(Context context, Locale locale, double d, double d2, int i) {
|
|
this.d = context;
|
|
this.c = d;
|
|
this.a = d2;
|
|
this.b = locale;
|
|
}
|
|
|
|
@Override // o.InterfaceC13170fSr
|
|
public final void b(InterfaceC13168fSp<List<Address>> interfaceC13168fSp) throws Exception {
|
|
try {
|
|
List<Address> fromLocation = new Geocoder(this.d, this.b).getFromLocation(this.c, this.a, this.e);
|
|
if (interfaceC13168fSp.isDisposed()) {
|
|
return;
|
|
}
|
|
interfaceC13168fSp.e(fromLocation);
|
|
interfaceC13168fSp.c();
|
|
} catch (IOException unused) {
|
|
if (interfaceC13168fSp.isDisposed()) {
|
|
return;
|
|
}
|
|
AbstractC13163fSk.create(new C15594guz(this.b, this.c, this.a, this.e)).subscribeOn(C13417fZt.c()).subscribe(new C15567guA(interfaceC13168fSp));
|
|
}
|
|
}
|
|
}
|