112 lines
3.7 KiB
Java
112 lines
3.7 KiB
Java
|
package o;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.Intent;
|
||
|
import android.content.ServiceConnection;
|
||
|
import android.os.Handler;
|
||
|
import android.os.HandlerThread;
|
||
|
import android.os.IBinder;
|
||
|
import android.os.IInterface;
|
||
|
import android.os.RemoteException;
|
||
|
import android.util.Log;
|
||
|
import com.google.android.gms.tasks.TaskCompletionSource;
|
||
|
import java.lang.ref.WeakReference;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.HashMap;
|
||
|
import java.util.HashSet;
|
||
|
import java.util.Iterator;
|
||
|
import java.util.List;
|
||
|
import java.util.Map;
|
||
|
import java.util.Set;
|
||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||
|
|
||
|
/* renamed from: o.qpn, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class C16741qpn {
|
||
|
private static final Map k = new HashMap();
|
||
|
final String a;
|
||
|
final Context b;
|
||
|
final C16916sOz c;
|
||
|
final NqU f;
|
||
|
final Intent h;
|
||
|
boolean i;
|
||
|
public IInterface l;
|
||
|
ServiceConnection n;
|
||
|
final List d = new ArrayList();
|
||
|
public final Set e = new HashSet();
|
||
|
public final Object g = new Object();
|
||
|
final IBinder.DeathRecipient m = new IBinder.DeathRecipient(this) { // from class: o.Wci
|
||
|
private C16741qpn c;
|
||
|
|
||
|
@Override // android.os.IBinder.DeathRecipient
|
||
|
public final void binderDied() {
|
||
|
C16741qpn c16741qpn = this.c;
|
||
|
C16916sOz c16916sOz = c16741qpn.c;
|
||
|
Object[] objArr = new Object[0];
|
||
|
if (Log.isLoggable("PlayCore", 4)) {
|
||
|
C16916sOz.c(c16916sOz.d, "reportBinderDeath", objArr);
|
||
|
}
|
||
|
if (((DSw) c16741qpn.j.get()) == null) {
|
||
|
C16916sOz c16916sOz2 = c16741qpn.c;
|
||
|
Object[] objArr2 = {c16741qpn.a};
|
||
|
if (Log.isLoggable("PlayCore", 4)) {
|
||
|
C16916sOz.c(c16916sOz2.d, "%s : Binder has died.", objArr2);
|
||
|
}
|
||
|
Iterator it = c16741qpn.d.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
((AbstractRunnableC16156liu) it.next()).e(new RemoteException(String.valueOf(c16741qpn.a).concat(" : Binder has died.")));
|
||
|
}
|
||
|
c16741qpn.d.clear();
|
||
|
} else {
|
||
|
C16916sOz c16916sOz3 = c16741qpn.c;
|
||
|
Object[] objArr3 = new Object[0];
|
||
|
if (Log.isLoggable("PlayCore", 4)) {
|
||
|
C16916sOz.c(c16916sOz3.d, "calling onBinderDied", objArr3);
|
||
|
}
|
||
|
}
|
||
|
synchronized (c16741qpn.g) {
|
||
|
c16741qpn.a();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
{
|
||
|
this.c = this;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
/* renamed from: o, reason: collision with root package name */
|
||
|
final AtomicInteger f9251o = new AtomicInteger(0);
|
||
|
final WeakReference j = new WeakReference(null);
|
||
|
|
||
|
public C16741qpn(Context context, C16916sOz c16916sOz, String str, Intent intent, NqU nqU) {
|
||
|
this.b = context;
|
||
|
this.c = c16916sOz;
|
||
|
this.a = str;
|
||
|
this.h = intent;
|
||
|
this.f = nqU;
|
||
|
}
|
||
|
|
||
|
public final Handler NB_() {
|
||
|
Handler handler;
|
||
|
Map map = k;
|
||
|
synchronized (map) {
|
||
|
if (!map.containsKey(this.a)) {
|
||
|
HandlerThread handlerThread = new HandlerThread(this.a, 10);
|
||
|
handlerThread.start();
|
||
|
map.put(this.a, new Handler(handlerThread.getLooper()));
|
||
|
}
|
||
|
handler = (Handler) map.get(this.a);
|
||
|
}
|
||
|
return handler;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final void a() {
|
||
|
Iterator it = this.e.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
((TaskCompletionSource) it.next()).trySetException(new RemoteException(String.valueOf(this.a).concat(" : Binder has died.")));
|
||
|
}
|
||
|
this.e.clear();
|
||
|
}
|
||
|
}
|