what-the-bank/sources/o/ABP.java

102 lines
3.4 KiB
Java

package o;
import android.content.Context;
import android.content.res.Resources;
import android.location.Address;
import android.location.Location;
import android.os.SystemClock;
import java.util.List;
import java.util.Locale;
/* loaded from: classes3.dex */
public final class ABP implements InterfaceC12861fJe {
final Resources a;
final LXX b;
final trQ c;
Locale d;
final XeU e;
private final Context g;
@InterfaceC13391fZD
public ABP(Context context, LXX lxx, trQ trq, Resources resources, XeU xeU) {
this.g = context;
this.e = xeU;
this.b = lxx;
this.a = resources;
this.c = trq;
}
@Override // o.InterfaceC12861fJe
public final AbstractC13163fSk<ZBS> a() {
Locale locale;
LXX lxx = this.b;
if ((SystemClock.elapsedRealtime() - lxx.d > 600000 ? null : lxx.b) != null && (locale = this.d) != null && locale.equals(bBI.qs_(this.a.getConfiguration()).c(0))) {
LXX lxx2 = this.b;
return AbstractC13163fSk.just(SystemClock.elapsedRealtime() - lxx2.d <= 600000 ? lxx2.b : null);
}
C15587gun c15587gun = new C15587gun(this.g);
return C15593guy.d(c15587gun.c, c15587gun.a).map(new fSS() { // from class: o.uHO
@Override // o.fSS
public final Object a(Object obj) {
Location location = (Location) obj;
return new ZBS(location.getLatitude(), location.getLongitude(), location.getAccuracy());
}
}).doOnNext(new fSQ(this) { // from class: o.GVs
private ABP c;
@Override // o.fSQ
public final void c(Object obj) {
ABP abp = this.c;
ZBS zbs = (ZBS) obj;
LXX lxx3 = abp.b;
lxx3.b = zbs;
lxx3.d = SystemClock.elapsedRealtime();
abp.c.b(zbs);
}
{
this.c = this;
}
});
}
@Override // o.InterfaceC12861fJe
public final AbstractC13163fSk<C14553fvQ> d(ZBS zbs) {
Locale locale;
LXX lxx = this.b;
if ((SystemClock.elapsedRealtime() - lxx.d > 600000 ? null : lxx.a) != null && (locale = this.d) != null && locale.equals(bBI.qs_(this.a.getConfiguration()).c(0))) {
LXX lxx2 = this.b;
return AbstractC13163fSk.just(SystemClock.elapsedRealtime() - lxx2.d <= 600000 ? lxx2.a : null);
}
C15587gun c15587gun = new C15587gun(this.g);
return guB.a(c15587gun.c.c, c15587gun.a, bBI.qs_(this.a.getConfiguration()).c(0), zbs.b, zbs.c).flatMap(new fSS(this) { // from class: o.DLB
private ABP c;
@Override // o.fSS
public final Object a(Object obj) {
XeU xeU = this.c.e;
return AbstractC13163fSk.just(XeU.c((List<Address>) obj));
}
{
this.c = this;
}
}).doOnNext(new fSQ(this) { // from class: o.kRn
private ABP b;
@Override // o.fSQ
public final void c(Object obj) {
ABP abp = this.b;
LXX lxx3 = abp.b;
lxx3.a = (C14553fvQ) obj;
lxx3.d = SystemClock.elapsedRealtime();
abp.d = bBI.qs_(abp.a.getConfiguration()).c(0);
}
{
this.b = this;
}
});
}
}