what-the-bank/sources/com/huawei/hms/support/api/PendingResultImpl.java

952 lines
37 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.huawei.hms.support.api;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.Process;
import android.text.TextUtils;
import android.util.Pair;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewConfiguration;
import android.widget.ExpandableListView;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.huawei.hms.adapter.BaseAdapter;
import com.huawei.hms.core.aidl.AbstractMessageEntity;
import com.huawei.hms.core.aidl.IMessageEntity;
import com.huawei.hms.support.api.client.ApiClient;
import com.huawei.hms.support.api.client.InnerPendingResult;
import com.huawei.hms.support.api.client.Result;
import com.huawei.hms.support.api.client.ResultCallback;
import com.huawei.hms.support.api.client.Status;
import com.huawei.hms.support.api.entity.core.CommonCode;
import com.huawei.hms.support.api.transport.DatagramTransport;
import com.huawei.hms.support.gentyref.GenericTypeReflector;
import com.huawei.hms.support.log.HMSLog;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import net.sf.scuba.smartcards.ISOFileInfo;
import o.C3614bBe;
import o.xzZ;
/* loaded from: classes2.dex */
public abstract class PendingResultImpl<R extends Result, T extends IMessageEntity> extends InnerPendingResult<R> {
private CountDownLatch a;
private WeakReference<ApiClient> c;
private static final byte[] $$a = {53, ISOFileInfo.A5, 77, -13};
private static final int $$b = 56;
private static int $10 = 0;
private static int $11 = 1;
private static int n = 0;
/* renamed from: o, reason: collision with root package name */
private static int f6498o = 1;
private static char[] i = {16099};
private static int h = 1934311123;
private static boolean g = true;
private static boolean j = true;
protected DatagramTransport transport = null;
private R b = null;
private String d = null;
private String e = null;
private boolean f = true;
/* loaded from: classes2.dex */
class a implements DatagramTransport.a {
final PendingResultImpl a;
a(PendingResultImpl pendingResultImpl) {
this.a = pendingResultImpl;
}
@Override // com.huawei.hms.support.api.transport.DatagramTransport.a
public void a(int i, IMessageEntity iMessageEntity) {
PendingResultImpl.a(this.a, i, iMessageEntity);
PendingResultImpl.a(this.a).countDown();
}
}
/* loaded from: classes2.dex */
class b implements DatagramTransport.a {
final AtomicBoolean a;
final PendingResultImpl b;
b(PendingResultImpl pendingResultImpl, AtomicBoolean atomicBoolean) {
this.b = pendingResultImpl;
this.a = atomicBoolean;
}
@Override // com.huawei.hms.support.api.transport.DatagramTransport.a
public void a(int i, IMessageEntity iMessageEntity) {
if (!this.a.get()) {
PendingResultImpl.a(this.b, i, iMessageEntity);
}
PendingResultImpl.a(this.b).countDown();
}
}
/* loaded from: classes2.dex */
class c implements DatagramTransport.a {
final d a;
final ResultCallback b;
final PendingResultImpl c;
c(PendingResultImpl pendingResultImpl, d dVar, ResultCallback resultCallback) {
this.c = pendingResultImpl;
this.a = dVar;
this.b = resultCallback;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.huawei.hms.support.api.transport.DatagramTransport.a
public void a(int i, IMessageEntity iMessageEntity) {
PendingResultImpl.a(this.c, i, iMessageEntity);
this.a.a(this.b, PendingResultImpl.b(this.c));
}
}
/* loaded from: classes2.dex */
protected static class d<R extends Result> extends Handler {
public d(Looper looper) {
super(looper);
}
public void a(ResultCallback<? super R> resultCallback, R r) {
sendMessage(obtainMessage(1, new Pair(resultCallback, r)));
}
/* JADX WARN: Multi-variable type inference failed */
protected void b(ResultCallback<? super R> resultCallback, R r) {
resultCallback.onResult(r);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // android.os.Handler
public void handleMessage(Message message) {
if (message.what == 1) {
Pair pair = (Pair) message.obj;
b((ResultCallback) pair.first, (Result) pair.second);
}
}
}
public PendingResultImpl(ApiClient apiClient, String str, IMessageEntity iMessageEntity) {
a(apiClient, str, iMessageEntity, getResponseType(), 0);
}
static /* synthetic */ void a(PendingResultImpl pendingResultImpl, int i2, IMessageEntity iMessageEntity) {
int i3 = 2 % 2;
int i4 = n + 35;
f6498o = i4 % 128;
int i5 = i4 % 2;
pendingResultImpl.a(i2, iMessageEntity);
if (i5 == 0) {
throw null;
}
int i6 = n + 89;
f6498o = i6 % 128;
if (i6 % 2 == 0) {
throw null;
}
}
static /* synthetic */ Result b(PendingResultImpl pendingResultImpl) {
int i2 = 2 % 2;
int i3 = f6498o + 47;
n = i3 % 128;
int i4 = i3 % 2;
R r = pendingResultImpl.b;
if (i4 != 0) {
int i5 = 41 / 0;
}
return r;
}
/* JADX WARN: Removed duplicated region for block: B:10:0x002a */
/* JADX WARN: Removed duplicated region for block: B:7:0x0022 */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x002a -> B:4:0x002e). Please report as a decompilation issue!!! */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static void l(int r6, short r7, short r8, java.lang.Object[] r9) {
/*
int r7 = r7 * 3
int r0 = 1 - r7
int r8 = r8 * 4
int r8 = 4 - r8
int r6 = r6 * 57
int r6 = r6 + 65
byte[] r1 = com.huawei.hms.support.api.PendingResultImpl.$$a
byte[] r0 = new byte[r0]
r2 = 0
int r7 = 0 - r7
if (r1 != 0) goto L19
r4 = r7
r6 = r8
r3 = r2
goto L2e
L19:
r3 = r2
r5 = r8
r8 = r6
r6 = r5
L1d:
byte r4 = (byte) r8
r0[r3] = r4
if (r3 != r7) goto L2a
java.lang.String r6 = new java.lang.String
r6.<init>(r0, r2)
r9[r2] = r6
return
L2a:
int r3 = r3 + 1
r4 = r1[r6]
L2e:
int r4 = -r4
int r8 = r8 + r4
int r6 = r6 + 1
goto L1d
*/
throw new UnsupportedOperationException("Method not decompiled: com.huawei.hms.support.api.PendingResultImpl.l(int, short, short, java.lang.Object[]):void");
}
public abstract R onComplete(T t);
static /* synthetic */ CountDownLatch a(PendingResultImpl pendingResultImpl) {
int i2 = 2 % 2;
int i3 = n + 91;
int i4 = i3 % 128;
f6498o = i4;
int i5 = i3 % 2;
CountDownLatch countDownLatch = pendingResultImpl.a;
int i6 = i4 + 31;
n = i6 % 128;
if (i6 % 2 == 0) {
return countDownLatch;
}
Object obj = null;
obj.hashCode();
throw null;
}
@Override // com.huawei.hms.support.api.client.PendingResult
public void setResultCallback(ResultCallback<R> resultCallback) {
int i2 = 2 % 2;
int i3 = n + 105;
f6498o = i3 % 128;
if (i3 % 2 == 0) {
this.f = resultCallback instanceof BaseAdapter.BaseRequestResultCallback;
} else {
this.f = !(resultCallback instanceof BaseAdapter.BaseRequestResultCallback);
}
setResultCallback(Looper.getMainLooper(), resultCallback);
}
protected Class<T> getResponseType() {
int i2 = 2 % 2;
Type genericSuperclass = getClass().getGenericSuperclass();
if (genericSuperclass != null) {
int i3 = n + 27;
f6498o = i3 % 128;
int i4 = i3 % 2;
Type type = ((ParameterizedType) genericSuperclass).getActualTypeArguments()[1];
if (type != null) {
int i5 = n + 59;
f6498o = i5 % 128;
Class<T> cls = (Class) type;
if (i5 % 2 != 0) {
return cls;
}
throw null;
}
}
return null;
}
@Override // com.huawei.hms.support.api.client.PendingResult
public final R await() {
int i2 = 2 % 2;
int i3 = n + 83;
f6498o = i3 % 128;
int i4 = i3 % 2;
HMSLog.i("PendingResultImpl", "await");
if (Looper.myLooper() != Looper.getMainLooper()) {
R awaitOnAnyThread = awaitOnAnyThread();
int i5 = n + 53;
f6498o = i5 % 128;
int i6 = i5 % 2;
return awaitOnAnyThread;
}
HMSLog.e("PendingResultImpl", "await in main thread");
throw new IllegalStateException("await must not be called on the UI thread");
}
@Override // com.huawei.hms.support.api.client.PendingResult
public R await(long j2, TimeUnit timeUnit) {
int i2 = 2 % 2;
StringBuilder sb = new StringBuilder("await timeout:");
sb.append(j2);
sb.append(" unit:");
sb.append(timeUnit.toString());
HMSLog.i("PendingResultImpl", sb.toString());
if (Looper.myLooper() == Looper.getMainLooper()) {
HMSLog.i("PendingResultImpl", "await in main thread");
throw new IllegalStateException("await must not be called on the UI thread");
}
int i3 = n + 75;
f6498o = i3 % 128;
int i4 = i3 % 2;
R awaitOnAnyThread = awaitOnAnyThread(j2, timeUnit);
int i5 = n + 117;
f6498o = i5 % 128;
if (i5 % 2 != 0) {
return awaitOnAnyThread;
}
Object obj = null;
obj.hashCode();
throw null;
}
protected R onError(int i2) {
Type type;
int i3 = 2 % 2;
Type genericSuperclass = getClass().getGenericSuperclass();
if (genericSuperclass != null) {
int i4 = f6498o + 53;
n = i4 % 128;
int i5 = i4 % 2;
type = ((ParameterizedType) genericSuperclass).getActualTypeArguments()[0];
int i6 = f6498o + 113;
n = i6 % 128;
int i7 = i6 % 2;
} else {
type = null;
}
Class<?> type2 = type != null ? GenericTypeReflector.getType(type) : null;
if (type2 != null) {
try {
R r = (R) type2.newInstance();
this.b = r;
r.setStatus(new Status(i2));
} catch (Exception e) {
StringBuilder sb = new StringBuilder("on Error:");
sb.append(e.getMessage());
HMSLog.e("PendingResultImpl", sb.toString());
return null;
}
}
return this.b;
}
@Override // com.huawei.hms.support.api.client.PendingResult
public final void setResultCallback(Looper looper, ResultCallback<R> resultCallback) {
int i2 = 2 % 2;
HMSLog.i("PendingResultImpl", "setResultCallback");
if (looper == null) {
looper = Looper.myLooper();
}
d dVar = new d(looper);
WeakReference<ApiClient> weakReference = this.c;
if (weakReference == null) {
HMSLog.e("PendingResultImpl", "api is null");
a(CommonCode.ErrorCode.CLIENT_API_INVALID, (IMessageEntity) null);
return;
}
ApiClient apiClient = weakReference.get();
if (!checkApiClient(apiClient)) {
int i3 = f6498o + 5;
n = i3 % 128;
int i4 = i3 % 2;
HMSLog.e("PendingResultImpl", "client is invalid");
a(CommonCode.ErrorCode.CLIENT_API_INVALID, (IMessageEntity) null);
dVar.a(resultCallback, this.b);
return;
}
if (this.f) {
int i5 = n + 117;
f6498o = i5 % 128;
if (i5 % 2 == 0) {
a(0, 0);
} else {
a(0, 1);
}
}
this.transport.post(apiClient, new c(this, dVar, resultCallback));
}
@Override // com.huawei.hms.support.api.client.PendingResult
@Deprecated
public void setResultCallback(ResultCallback<R> resultCallback, long j2, TimeUnit timeUnit) {
int i2 = 2 % 2;
int i3 = n + 9;
f6498o = i3 % 128;
int i4 = i3 % 2;
setResultCallback(resultCallback);
if (i4 != 0) {
return;
}
Object obj = null;
obj.hashCode();
throw null;
}
private void a(ApiClient apiClient, String str, IMessageEntity iMessageEntity, Class<T> cls, int i2) {
int i3 = 2 % 2;
int i4 = f6498o + 91;
n = i4 % 128;
if (i4 % 2 != 0) {
HMSLog.i("PendingResultImpl", "init uri:".concat(String.valueOf(str)));
this.d = str;
throw null;
}
HMSLog.i("PendingResultImpl", "init uri:".concat(String.valueOf(str)));
this.d = str;
if (apiClient == null) {
HMSLog.e("PendingResultImpl", "client is null");
int i5 = f6498o + 65;
n = i5 % 128;
int i6 = i5 % 2;
return;
}
this.c = new WeakReference<>(apiClient);
this.a = new CountDownLatch(1);
try {
this.transport = (DatagramTransport) Class.forName(apiClient.getTransportName()).getConstructor(String.class, IMessageEntity.class, Class.class, Integer.TYPE).newInstance(str, iMessageEntity, cls, Integer.valueOf(i2));
int i7 = f6498o + 111;
n = i7 % 128;
int i8 = i7 % 2;
} catch (ClassNotFoundException e) {
e = e;
StringBuilder sb = new StringBuilder("gen transport error:");
sb.append(e.getMessage());
HMSLog.e("PendingResultImpl", sb.toString());
StringBuilder sb2 = new StringBuilder("Instancing transport exception, ");
sb2.append(e.getMessage());
throw new IllegalStateException(sb2.toString(), e);
} catch (IllegalAccessException e2) {
e = e2;
StringBuilder sb3 = new StringBuilder("gen transport error:");
sb3.append(e.getMessage());
HMSLog.e("PendingResultImpl", sb3.toString());
StringBuilder sb22 = new StringBuilder("Instancing transport exception, ");
sb22.append(e.getMessage());
throw new IllegalStateException(sb22.toString(), e);
} catch (IllegalArgumentException e3) {
e = e3;
StringBuilder sb32 = new StringBuilder("gen transport error:");
sb32.append(e.getMessage());
HMSLog.e("PendingResultImpl", sb32.toString());
StringBuilder sb222 = new StringBuilder("Instancing transport exception, ");
sb222.append(e.getMessage());
throw new IllegalStateException(sb222.toString(), e);
} catch (InstantiationException e4) {
e = e4;
StringBuilder sb322 = new StringBuilder("gen transport error:");
sb322.append(e.getMessage());
HMSLog.e("PendingResultImpl", sb322.toString());
StringBuilder sb2222 = new StringBuilder("Instancing transport exception, ");
sb2222.append(e.getMessage());
throw new IllegalStateException(sb2222.toString(), e);
} catch (NoSuchMethodException e5) {
e = e5;
StringBuilder sb3222 = new StringBuilder("gen transport error:");
sb3222.append(e.getMessage());
HMSLog.e("PendingResultImpl", sb3222.toString());
StringBuilder sb22222 = new StringBuilder("Instancing transport exception, ");
sb22222.append(e.getMessage());
throw new IllegalStateException(sb22222.toString(), e);
} catch (InvocationTargetException e6) {
e = e6;
StringBuilder sb32222 = new StringBuilder("gen transport error:");
sb32222.append(e.getMessage());
HMSLog.e("PendingResultImpl", sb32222.toString());
StringBuilder sb222222 = new StringBuilder("Instancing transport exception, ");
sb222222.append(e.getMessage());
throw new IllegalStateException(sb222222.toString(), e);
} catch (Exception e7) {
throw e7;
}
}
public PendingResultImpl(ApiClient apiClient, String str, IMessageEntity iMessageEntity, Class<T> cls) {
a(apiClient, str, iMessageEntity, cls, 0);
}
@Override // com.huawei.hms.support.api.client.InnerPendingResult
public final R awaitOnAnyThread() {
int i2 = 2 % 2;
int i3 = n + 97;
f6498o = i3 % 128;
Object obj = null;
if (i3 % 2 != 0) {
HMSLog.i("PendingResultImpl", "awaitOnAnyThread");
WeakReference<ApiClient> weakReference = this.c;
if (weakReference == null) {
HMSLog.e("PendingResultImpl", "api is null");
a(CommonCode.ErrorCode.CLIENT_API_INVALID, (IMessageEntity) null);
R r = this.b;
int i4 = n + 71;
f6498o = i4 % 128;
if (i4 % 2 != 0) {
return r;
}
obj.hashCode();
throw null;
}
ApiClient apiClient = weakReference.get();
if (!checkApiClient(apiClient)) {
HMSLog.e("PendingResultImpl", "client invalid");
a(CommonCode.ErrorCode.CLIENT_API_INVALID, (IMessageEntity) null);
return this.b;
}
if (this.f) {
a(0, 1);
}
this.transport.send(apiClient, new a(this));
try {
this.a.await();
} catch (InterruptedException unused) {
HMSLog.e("PendingResultImpl", "await in anythread InterruptedException");
a(CommonCode.ErrorCode.INTERNAL_ERROR, (IMessageEntity) null);
}
return this.b;
}
HMSLog.i("PendingResultImpl", "awaitOnAnyThread");
obj.hashCode();
throw null;
}
/* JADX WARN: Multi-variable type inference failed */
private void a(int i2, IMessageEntity iMessageEntity) {
Status status;
int i3 = 2 % 2;
HMSLog.i("PendingResultImpl", "setResult:".concat(String.valueOf(i2)));
if (iMessageEntity instanceof AbstractMessageEntity) {
int i4 = f6498o + 97;
n = i4 % 128;
int i5 = i4 % 2;
status = ((AbstractMessageEntity) iMessageEntity).getCommonStatus();
} else {
status = null;
}
if (i2 == 0) {
this.b = onComplete(iMessageEntity);
} else {
this.b = onError(i2);
}
if (this.f) {
a(i2, 2);
}
R r = this.b;
if (r != null) {
int i6 = n + 9;
f6498o = i6 % 128;
int i7 = i6 % 2;
Status status2 = r.getStatus();
if (status2 != null) {
int i8 = f6498o;
int i9 = i8 + 3;
n = i9 % 128;
int i10 = i9 % 2;
if (status != null) {
int i11 = i8 + 95;
n = i11 % 128;
int i12 = i11 % 2;
int statusCode = status2.getStatusCode();
String statusMessage = status2.getStatusMessage();
int statusCode2 = status.getStatusCode();
String statusMessage2 = status.getStatusMessage();
if (statusCode != statusCode2) {
StringBuilder sb = new StringBuilder("rstStatus code (");
sb.append(statusCode);
sb.append(") is not equal commonStatus code (");
sb.append(statusCode2);
sb.append(")");
HMSLog.e("PendingResultImpl", sb.toString());
StringBuilder sb2 = new StringBuilder("rstStatus msg (");
sb2.append(statusMessage);
sb2.append(") is not equal commonStatus msg (");
sb2.append(statusMessage2);
sb2.append(")");
HMSLog.e("PendingResultImpl", sb2.toString());
return;
}
if ((!TextUtils.isEmpty(statusMessage)) || TextUtils.isEmpty(statusMessage2)) {
return;
}
StringBuilder sb3 = new StringBuilder("rstStatus msg (");
sb3.append(statusMessage);
sb3.append(") is not equal commonStatus msg (");
sb3.append(statusMessage2);
sb3.append(")");
HMSLog.i("PendingResultImpl", sb3.toString());
this.b.setStatus(new Status(statusCode, statusMessage2, status2.getResolution()));
int i13 = f6498o + 51;
n = i13 % 128;
int i14 = i13 % 2;
}
}
}
}
public PendingResultImpl(ApiClient apiClient, String str, IMessageEntity iMessageEntity, int i2) {
a(apiClient, str, iMessageEntity, getResponseType(), i2);
}
@Override // com.huawei.hms.support.api.client.InnerPendingResult
public final R awaitOnAnyThread(long j2, TimeUnit timeUnit) {
int i2 = 2 % 2;
StringBuilder sb = new StringBuilder("awaitOnAnyThread timeout:");
sb.append(j2);
sb.append(" unit:");
sb.append(timeUnit.toString());
HMSLog.i("PendingResultImpl", sb.toString());
WeakReference<ApiClient> weakReference = this.c;
if (weakReference == null) {
int i3 = f6498o + 35;
n = i3 % 128;
int i4 = i3 % 2;
HMSLog.e("PendingResultImpl", "api is null");
a(CommonCode.ErrorCode.CLIENT_API_INVALID, (IMessageEntity) null);
return this.b;
}
ApiClient apiClient = weakReference.get();
if (!checkApiClient(apiClient)) {
HMSLog.e("PendingResultImpl", "client invalid");
a(CommonCode.ErrorCode.CLIENT_API_INVALID, (IMessageEntity) null);
return this.b;
}
AtomicBoolean atomicBoolean = new AtomicBoolean();
if (this.f) {
int i5 = f6498o + 35;
n = i5 % 128;
if (i5 % 2 != 0) {
a(0, 0);
} else {
a(0, 1);
}
}
this.transport.post(apiClient, new b(this, atomicBoolean));
try {
if (!this.a.await(j2, timeUnit)) {
atomicBoolean.set(true);
a(CommonCode.ErrorCode.EXECUTE_TIMEOUT, (IMessageEntity) null);
}
} catch (InterruptedException unused) {
HMSLog.e("PendingResultImpl", "awaitOnAnyThread InterruptedException");
a(CommonCode.ErrorCode.INTERNAL_ERROR, (IMessageEntity) null);
}
return this.b;
}
/* JADX WARN: Code restructure failed: missing block: B:11:0x0041, code lost:
if (com.huawei.hms.support.hianalytics.HiAnalyticsUtil.getInstance().hasError(r1.getContext()) != false) goto L44;
*/
/* JADX WARN: Code restructure failed: missing block: B:12:0x0043, code lost:
r2 = new java.util.HashMap();
r2.put("package", r1.getPackageName());
r2.put(com.huawei.hms.support.hianalytics.HiAnalyticsConstant.HaKey.BI_KEY_BASE_VERSION, "6.11.0.302");
*/
/* JADX WARN: Code restructure failed: missing block: B:13:0x005b, code lost:
if (r10 != 1) goto L16;
*/
/* JADX WARN: Code restructure failed: missing block: B:14:0x005d, code lost:
r2.put(com.huawei.hms.support.hianalytics.HiAnalyticsConstant.HaKey.BI_KEY_DIRECTION, com.huawei.hms.support.hianalytics.HiAnalyticsConstant.Direction.REQUEST);
*/
/* JADX WARN: Code restructure failed: missing block: B:15:0x00a0, code lost:
r3 = new java.lang.Object[1];
k(null, new byte[]{net.sf.scuba.smartcards.ISOFileInfo.DATA_BYTES2}, null, (android.view.ViewConfiguration.getEdgeSlop() >> 16) + 127, r3);
r2.put("version", ((java.lang.String) r3[0]).intern());
r9 = com.huawei.hms.utils.Util.getAppId(r1.getContext());
*/
/* JADX WARN: Code restructure failed: missing block: B:16:0x00cd, code lost:
if (android.text.TextUtils.isEmpty(r9) == false) goto L31;
*/
/* JADX WARN: Code restructure failed: missing block: B:17:0x00cf, code lost:
r10 = com.huawei.hms.support.api.PendingResultImpl.n + 77;
com.huawei.hms.support.api.PendingResultImpl.f6498o = r10 % 128;
*/
/* JADX WARN: Code restructure failed: missing block: B:18:0x00d8, code lost:
if ((r10 % 2) != 0) goto L28;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x00da, code lost:
r10 = r1.getSubAppInfo();
r3 = 70 / 0;
*/
/* JADX WARN: Code restructure failed: missing block: B:20:0x00e1, code lost:
if (r10 == null) goto L31;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x00ea, code lost:
r9 = r10.getSubAppID();
*/
/* JADX WARN: Code restructure failed: missing block: B:22:0x00e4, code lost:
r10 = r1.getSubAppInfo();
*/
/* JADX WARN: Code restructure failed: missing block: B:23:0x00e8, code lost:
if (r10 == null) goto L31;
*/
/* JADX WARN: Code restructure failed: missing block: B:24:0x00ee, code lost:
r2.put(com.huawei.hms.support.hianalytics.HiAnalyticsConstant.HaKey.BI_KEY_APPID, r9);
*/
/* JADX WARN: Code restructure failed: missing block: B:25:0x00fb, code lost:
if (android.text.TextUtils.isEmpty(r8.e) == false) goto L38;
*/
/* JADX WARN: Code restructure failed: missing block: B:26:0x00fd, code lost:
r10 = com.huawei.hms.support.api.PendingResultImpl.n + 79;
com.huawei.hms.support.api.PendingResultImpl.f6498o = r10 % 128;
*/
/* JADX WARN: Code restructure failed: missing block: B:27:0x0106, code lost:
if ((r10 % 2) == 0) goto L36;
*/
/* JADX WARN: Code restructure failed: missing block: B:28:0x0108, code lost:
r9 = com.huawei.hms.common.internal.TransactionIdCreater.getId(r9, r8.d);
r8.e = r9;
r2.put(com.huawei.hms.support.hianalytics.HiAnalyticsConstant.HaKey.BI_KEY_TRANSID, r9);
*/
/* JADX WARN: Code restructure failed: missing block: B:29:0x0127, code lost:
r9 = r8.d.split("\\.");
*/
/* JADX WARN: Code restructure failed: missing block: B:30:0x0130, code lost:
if (r9.length < 2) goto L42;
*/
/* JADX WARN: Code restructure failed: missing block: B:31:0x0132, code lost:
r2.put("service", r9[0]);
r2.put("apiName", r9[1]);
*/
/* JADX WARN: Code restructure failed: missing block: B:32:0x0140, code lost:
r2.put("callTime", java.lang.String.valueOf(java.lang.System.currentTimeMillis()));
r2.put(com.huawei.hms.support.hianalytics.HiAnalyticsConstant.HaKey.BI_KEY_PHONETYPE, com.huawei.hms.utils.Util.getSystemProperties("ro.logsystem.usertype", ""));
com.huawei.hms.support.hianalytics.HiAnalyticsUtil.getInstance().onEvent(r1.getContext(), com.huawei.hms.support.hianalytics.HiAnalyticsConstant.HMS_SDK_BASE_CALL_AIDL, r2);
*/
/* JADX WARN: Code restructure failed: missing block: B:33:0x0167, code lost:
return;
*/
/* JADX WARN: Code restructure failed: missing block: B:34:0x0114, code lost:
r9 = com.huawei.hms.common.internal.TransactionIdCreater.getId(r9, r8.d);
r8.e = r9;
r2.put(com.huawei.hms.support.hianalytics.HiAnalyticsConstant.HaKey.BI_KEY_TRANSID, r9);
*/
/* JADX WARN: Code restructure failed: missing block: B:35:0x011f, code lost:
throw null;
*/
/* JADX WARN: Code restructure failed: missing block: B:36:0x0120, code lost:
r2.put(com.huawei.hms.support.hianalytics.HiAnalyticsConstant.HaKey.BI_KEY_TRANSID, r8.e);
r8.e = null;
*/
/* JADX WARN: Code restructure failed: missing block: B:37:0x0063, code lost:
r2.put(com.huawei.hms.support.hianalytics.HiAnalyticsConstant.HaKey.BI_KEY_DIRECTION, com.huawei.hms.support.hianalytics.HiAnalyticsConstant.Direction.RESPONSE);
r2.put("result", java.lang.String.valueOf(r9));
r9 = r8.b;
*/
/* JADX WARN: Code restructure failed: missing block: B:38:0x0073, code lost:
if (r9 == null) goto L21;
*/
/* JADX WARN: Code restructure failed: missing block: B:40:0x0079, code lost:
if (r9.getStatus() == null) goto L21;
*/
/* JADX WARN: Code restructure failed: missing block: B:41:0x007b, code lost:
r9 = com.huawei.hms.support.api.PendingResultImpl.f6498o + 113;
com.huawei.hms.support.api.PendingResultImpl.n = r9 % 128;
r9 = r9 % 2;
r2.put(com.huawei.hms.support.hianalytics.HiAnalyticsConstant.HaKey.BI_KEY_RESULT, java.lang.String.valueOf(r8.b.getStatus().getStatusCode()));
r9 = com.huawei.hms.support.api.PendingResultImpl.n + 21;
com.huawei.hms.support.api.PendingResultImpl.f6498o = r9 % 128;
r9 = r9 % 2;
*/
/* JADX WARN: Code restructure failed: missing block: B:43:0x002f, code lost:
if (r1 != null) goto L9;
*/
/* JADX WARN: Code restructure failed: missing block: B:4:0x0021, code lost:
if (r1 != null) goto L9;
*/
/* JADX WARN: Code restructure failed: missing block: B:9:0x0033, code lost:
if (r8.d == null) goto L44;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void a(int r9, int r10) {
/*
Method dump skipped, instructions count: 366
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.huawei.hms.support.api.PendingResultImpl.a(int, int):void");
}
private static void k(char[] cArr, byte[] bArr, int[] iArr, int i2, Object[] objArr) {
int i3 = 2;
int i4 = 2 % 2;
C3614bBe c3614bBe = new C3614bBe();
char[] cArr2 = i;
long j2 = 0;
int i5 = 0;
if (cArr2 != null) {
int length = cArr2.length;
char[] cArr3 = new char[length];
int i6 = 0;
while (i6 < length) {
int i7 = $10 + 117;
$11 = i7 % 128;
int i8 = i7 % i3;
try {
Object[] objArr2 = new Object[1];
objArr2[i5] = Integer.valueOf(cArr2[i6]);
Object obj = xzZ.y.get(-950481649);
if (obj == null) {
Class cls = (Class) xzZ.c(338 - (Process.getElapsedCpuTime() > j2 ? 1 : (Process.getElapsedCpuTime() == j2 ? 0 : -1)), View.MeasureSpec.makeMeasureSpec(i5, i5) + 5, (char) ((-1) - Process.getGidForName("")));
byte b2 = (byte) i5;
byte b3 = b2;
Object[] objArr3 = new Object[1];
l(b2, b3, b3, objArr3);
obj = cls.getMethod((String) objArr3[0], Integer.TYPE);
xzZ.y.put(-950481649, obj);
}
cArr3[i6] = ((Character) ((Method) obj).invoke(null, objArr2)).charValue();
i6++;
i3 = 2;
j2 = 0;
i5 = 0;
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
}
cArr2 = cArr3;
}
Object[] objArr4 = {Integer.valueOf(h)};
Object obj2 = xzZ.y.get(-1521625011);
if (obj2 == null) {
Class cls2 = (Class) xzZ.c(282 - TextUtils.indexOf((CharSequence) "", '0', 0), (ViewConfiguration.getScrollDefaultDelay() >> 16) + 5, (char) (39814 - (Process.getElapsedCpuTime() > 0L ? 1 : (Process.getElapsedCpuTime() == 0L ? 0 : -1))));
byte b4 = (byte) 1;
byte b5 = (byte) (b4 - 1);
Object[] objArr5 = new Object[1];
l(b4, b5, b5, objArr5);
obj2 = cls2.getMethod((String) objArr5[0], Integer.TYPE);
xzZ.y.put(-1521625011, obj2);
}
int intValue = ((Integer) ((Method) obj2).invoke(null, objArr4)).intValue();
if (j) {
c3614bBe.c = bArr.length;
char[] cArr4 = new char[c3614bBe.c];
c3614bBe.a = 0;
while (c3614bBe.a < c3614bBe.c) {
cArr4[c3614bBe.a] = (char) (cArr2[bArr[(c3614bBe.c - 1) - c3614bBe.a] + i2] - intValue);
Object[] objArr6 = {c3614bBe, c3614bBe};
Object obj3 = xzZ.y.get(1779759091);
if (obj3 == null) {
obj3 = ((Class) xzZ.c(40 - (TypedValue.complexToFraction(0, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) > BitmapDescriptorFactory.HUE_RED ? 1 : (TypedValue.complexToFraction(0, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)), 5 - (ViewConfiguration.getLongPressTimeout() >> 16), (char) (ExpandableListView.getPackedPositionForGroup(0) > 0L ? 1 : (ExpandableListView.getPackedPositionForGroup(0) == 0L ? 0 : -1)))).getMethod("D", Object.class, Object.class);
xzZ.y.put(1779759091, obj3);
}
((Method) obj3).invoke(null, objArr6);
int i9 = $11 + 97;
$10 = i9 % 128;
int i10 = i9 % 2;
}
objArr[0] = new String(cArr4);
return;
}
if (g) {
c3614bBe.c = cArr.length;
char[] cArr5 = new char[c3614bBe.c];
c3614bBe.a = 0;
while (c3614bBe.a < c3614bBe.c) {
cArr5[c3614bBe.a] = (char) (cArr2[cArr[(c3614bBe.c - 1) - c3614bBe.a] - i2] - intValue);
Object[] objArr7 = {c3614bBe, c3614bBe};
Object obj4 = xzZ.y.get(1779759091);
if (obj4 == null) {
obj4 = ((Class) xzZ.c(40 - Drawable.resolveOpacity(0, 0), 4 - (ExpandableListView.getPackedPositionForChild(0, 0) > 0L ? 1 : (ExpandableListView.getPackedPositionForChild(0, 0) == 0L ? 0 : -1)), (char) View.resolveSize(0, 0))).getMethod("D", Object.class, Object.class);
xzZ.y.put(1779759091, obj4);
}
((Method) obj4).invoke(null, objArr7);
}
objArr[0] = new String(cArr5);
return;
}
c3614bBe.c = iArr.length;
char[] cArr6 = new char[c3614bBe.c];
c3614bBe.a = 0;
while (c3614bBe.a < c3614bBe.c) {
int i11 = $11 + 69;
$10 = i11 % 128;
int i12 = i11 % 2;
cArr6[c3614bBe.a] = (char) (cArr2[iArr[(c3614bBe.c - 1) - c3614bBe.a] - i2] - intValue);
c3614bBe.a++;
int i13 = $11 + 5;
$10 = i13 % 128;
int i14 = i13 % 2;
}
objArr[0] = new String(cArr6);
}
@Override // com.huawei.hms.support.api.client.PendingResult
@Deprecated
public boolean isCanceled() {
int i2 = 2 % 2;
int i3 = f6498o + 105;
n = i3 % 128;
int i4 = i3 % 2;
return false;
}
protected boolean checkApiClient(ApiClient apiClient) {
int i2 = 2 % 2;
int i3 = f6498o + 117;
n = i3 % 128;
return i3 % 2 == 0;
}
@Override // com.huawei.hms.support.api.client.PendingResult
@Deprecated
public void cancel() {
int i2 = 2 % 2;
int i3 = f6498o + 89;
n = i3 % 128;
int i4 = i3 % 2;
}
}