what-the-bank/sources/com/huawei/hms/common/internal/BindResolveClients.java

98 lines
3.2 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.huawei.hms.common.internal;
import java.util.ArrayList;
import java.util.ListIterator;
/* loaded from: classes2.dex */
public class BindResolveClients {
private static final Object b = new Object();
private ArrayList<ResolveClientBean> a;
public static BindResolveClients getInstance() {
return b.a;
}
public boolean isClientRegistered(ResolveClientBean resolveClientBean) {
boolean contains;
synchronized (b) {
contains = this.a.contains(resolveClientBean);
}
return contains;
}
public void notifyClientReconnect() {
synchronized (b) {
ListIterator<ResolveClientBean> listIterator = this.a.listIterator();
while (listIterator.hasNext()) {
listIterator.next().clientReconnect();
}
this.a.clear();
}
}
public void register(ResolveClientBean resolveClientBean) {
if (resolveClientBean == null) {
return;
}
synchronized (b) {
if (!this.a.contains(resolveClientBean)) {
this.a.add(resolveClientBean);
}
}
}
/* JADX WARN: Code restructure failed: missing block: B:15:0x0024, code lost:
r1.remove();
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void unRegister(com.huawei.hms.common.internal.ResolveClientBean r4) {
/*
r3 = this;
if (r4 != 0) goto L3
return
L3:
java.lang.Object r0 = com.huawei.hms.common.internal.BindResolveClients.b
monitor-enter(r0)
java.util.ArrayList<com.huawei.hms.common.internal.ResolveClientBean> r1 = r3.a // Catch: java.lang.Throwable -> L29
boolean r1 = r1.contains(r4) // Catch: java.lang.Throwable -> L29
if (r1 == 0) goto L27
java.util.ArrayList<com.huawei.hms.common.internal.ResolveClientBean> r1 = r3.a // Catch: java.lang.Throwable -> L29
java.util.ListIterator r1 = r1.listIterator() // Catch: java.lang.Throwable -> L29
L14:
boolean r2 = r1.hasNext() // Catch: java.lang.Throwable -> L29
if (r2 == 0) goto L27
java.lang.Object r2 = r1.next() // Catch: java.lang.Throwable -> L29
boolean r2 = r4.equals(r2) // Catch: java.lang.Throwable -> L29
if (r2 == 0) goto L14
r1.remove() // Catch: java.lang.Throwable -> L29
L27:
monitor-exit(r0)
return
L29:
r4 = move-exception
monitor-exit(r0)
throw r4
*/
throw new UnsupportedOperationException("Method not decompiled: com.huawei.hms.common.internal.BindResolveClients.unRegister(com.huawei.hms.common.internal.ResolveClientBean):void");
}
public void unRegisterAll() {
synchronized (b) {
this.a.clear();
}
}
private BindResolveClients() {
this.a = new ArrayList<>();
}
/* loaded from: classes2.dex */
static class b {
private static final BindResolveClients a = new BindResolveClients();
}
}