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

118 lines
3.8 KiB
Java

package o;
import android.app.Activity;
import android.content.Context;
import android.content.IntentSender;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
/* renamed from: o.owp, reason: case insensitive filesystem */
/* loaded from: classes.dex */
final class C16518owp implements lRf {
private final AmK a;
private final Context b;
private final OAW c;
private final Handler d = new Handler(Looper.getMainLooper());
/* JADX INFO: Access modifiers changed from: package-private */
public C16518owp(OAW oaw, AmK amK, Context context) {
this.c = oaw;
this.a = amK;
this.b = context;
}
@Override // o.lRf
public final boolean Nq_(Igp igp, int i, Activity activity, int i2) throws IntentSender.SendIntentException {
ymQ d = ymQ.d(i);
if (activity == null) {
return false;
}
CZC czc = new CZC(activity);
if (igp == null || d == null || igp.MZ_(d) == null || igp.a) {
return false;
}
igp.a = true;
czc.Nx_(igp.MZ_(d).getIntentSender(), i2);
return true;
}
@Override // o.lRf
public final Task<Void> a() {
OAW oaw = this.c;
String packageName = this.b.getPackageName();
if (oaw.a == null) {
return OAW.d();
}
yax yaxVar = OAW.d;
Object[] objArr = {packageName};
if (Log.isLoggable("PlayCore", 4)) {
yax.d(yaxVar.d, "completeUpdate(%s)", objArr);
}
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
iNu inu = oaw.a;
C16341nck c16341nck = new C16341nck(oaw, taskCompletionSource, taskCompletionSource, packageName);
inu.Nn_().post(new UDL(inu, c16341nck.c, taskCompletionSource, c16341nck));
return taskCompletionSource.getTask();
}
@Override // o.lRf
public final void c(kGL kgl) {
synchronized (this) {
AmK amK = this.a;
synchronized (amK) {
yax yaxVar = amK.a;
Object[] objArr = new Object[0];
if (Log.isLoggable("PlayCore", 4)) {
yax.d(yaxVar.d, "unregisterListener", objArr);
}
if (kgl == null) {
throw new NullPointerException("Unregistered Play Core listener should not be null.");
}
amK.d.remove(kgl);
amK.a();
}
}
}
@Override // o.lRf
public final Task<Igp> e() {
OAW oaw = this.c;
String packageName = this.b.getPackageName();
if (oaw.a == null) {
return OAW.d();
}
yax yaxVar = OAW.d;
Object[] objArr = {packageName};
if (Log.isLoggable("PlayCore", 4)) {
yax.d(yaxVar.d, "requestUpdateInfo(%s)", objArr);
}
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
iNu inu = oaw.a;
kbJ kbj = new kbJ(oaw, taskCompletionSource, packageName, taskCompletionSource);
inu.Nn_().post(new UDL(inu, kbj.c, taskCompletionSource, kbj));
return taskCompletionSource.getTask();
}
@Override // o.lRf
public final void e(kGL kgl) {
synchronized (this) {
AmK amK = this.a;
synchronized (amK) {
yax yaxVar = amK.a;
Object[] objArr = new Object[0];
if (Log.isLoggable("PlayCore", 4)) {
yax.d(yaxVar.d, "registerListener", objArr);
}
if (kgl == null) {
throw new NullPointerException("Registered Play Core listener should not be null.");
}
amK.d.add(kgl);
amK.a();
}
}
}
}