CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 VendorSdkInfoManager.java 源代码,内容仅作参考
package com.mobile.auth.gatewayauth.manager;
import ak.im.module.BleConstant;
import android.text.TextUtils;
import android.util.SparseArray;
import com.mobile.auth.gatewayauth.Constant;
import com.mobile.auth.gatewayauth.ExceptionProcessor;
import com.mobile.auth.gatewayauth.annotations.SafeProtector;
import com.mobile.auth.gatewayauth.manager.e;
import com.mobile.auth.gatewayauth.model.MonitorStruct;
import com.mobile.auth.gatewayauth.model.VendorConfig;
import com.nirvana.tools.core.ExecutorManager;
import com.nirvana.tools.jsoner.JsonType;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
public class VendorSdkInfoManager {
private SparseArray<VendorConfig> f29974a = new com.mobile.auth.gatewayauth.manager.base.a(3);
private SparseArray<VendorConfig> f29975b = new com.mobile.auth.gatewayauth.manager.base.a(3);
private String f29976c;
private String f29977d;
private d f29978e;
private SystemManager f29979f;
private com.mobile.auth.q.a f29980g;
class AnonymousClass4 extends JsonType<VendorConfig> {
AnonymousClass4() {
}
}
static {
e1.a.SLoad("pns-2.13.2.1-LogOnlineStandardCuumRelease_alijtca_plus");
}
public VendorSdkInfoManager(d dVar, SystemManager systemManager) {
this.f29978e = dVar;
this.f29980g = dVar.a();
this.f29979f = systemManager;
}
static SparseArray a(VendorSdkInfoManager vendorSdkInfoManager) {
try {
return vendorSdkInfoManager.f29975b;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
private MonitorStruct a(String str) {
try {
MonitorStruct monitorStruct = new MonitorStruct();
monitorStruct.setStartTime(System.currentTimeMillis());
monitorStruct.setSessionId(str);
monitorStruct.setRequestId(this.f29978e.e());
monitorStruct.setAction(Constant.ACTION_QUERY_VENDOR_LIST);
return monitorStruct;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
static void a(VendorSdkInfoManager vendorSdkInfoManager, MonitorStruct monitorStruct) {
try {
vendorSdkInfoManager.a(monitorStruct);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
static void a(VendorSdkInfoManager vendorSdkInfoManager, String str) {
try {
vendorSdkInfoManager.storeVendorConfigsBySceneCodeToDisk(str);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
private void a(final MonitorStruct monitorStruct) {
try {
ExecutorManager.getInstance().scheduleFuture(new Runnable() {
@Override
public void run() {
try {
VendorSdkInfoManager.d(VendorSdkInfoManager.this).a(VendorSdkInfoManager.c(VendorSdkInfoManager.this).a(monitorStruct), 2);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
});
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
private void a(String[] strArr) {
if (strArr == null) {
return;
}
try {
if (strArr.length >= 8) {
String str = strArr[6];
this.f29976c = str;
this.f29978e.a(str);
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
private void a(String[] strArr, SparseArray<VendorConfig> sparseArray) {
if (strArr != null) {
try {
if (strArr.length >= 6 && sparseArray != null) {
for (int i10 = 0; i10 < 3; i10++) {
VendorConfig vendorConfig = new VendorConfig();
int i11 = i10 * 2;
vendorConfig.setVendorAccessId(strArr[i11]);
vendorConfig.setVendorAccessSecret(strArr[i11 + 1]);
if (i10 == 0) {
vendorConfig.setVendorKey(Constant.VENDOR_CMCC);
sparseArray.put(1, vendorConfig);
} else if (i10 == 1) {
vendorConfig.setVendorKey(Constant.VENDOR_CUCC);
sparseArray.put(2, vendorConfig);
} else if (i10 == 2) {
vendorConfig.setVendorKey(Constant.VENDOR_CTCC);
sparseArray.put(3, vendorConfig);
}
}
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
}
static String b(VendorSdkInfoManager vendorSdkInfoManager) {
try {
return vendorSdkInfoManager.f29976c;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
private void b(String[] strArr) {
if (strArr == null) {
return;
}
try {
if (strArr.length >= 10) {
this.f29977d = strArr[9];
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
static d c(VendorSdkInfoManager vendorSdkInfoManager) {
try {
return vendorSdkInfoManager.f29978e;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
static com.mobile.auth.q.a d(VendorSdkInfoManager vendorSdkInfoManager) {
try {
return vendorSdkInfoManager.f29980g;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
@SafeProtector
private native void loadVendorConfigsBySceneCodeFromDisk(String str);
@SafeProtector
private native void storeVendorConfigsBySceneCodeToDisk(String str);
public VendorConfig a(int i10) {
try {
VendorConfig vendorConfig = this.f29975b.get(i10);
return vendorConfig != null ? vendorConfig : this.f29974a.get(i10);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
public String a(boolean z10) {
if (z10) {
return "SceneCode";
}
try {
String str = this.f29976c;
return str == null ? UUID.randomUUID().toString() : str;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
public void a(String str, final RequestCallback<Void, String> requestCallback, e eVar) {
if (requestCallback == null || eVar == null) {
return;
}
try {
final MonitorStruct a10 = a(str);
eVar.a(new e.a() {
@Override
public void a(String str2, String str3) {
try {
a10.setEndTime(System.currentTimeMillis());
a10.setSuccess(false);
a10.setTopTraceId(str3);
a10.setFailRet(str2);
VendorSdkInfoManager.a(VendorSdkInfoManager.this, a10);
requestCallback.onError(str2);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
@Override
public void a(String str2, String str3, SparseArray<VendorConfig> sparseArray) {
if (sparseArray != null) {
try {
if (sparseArray.size() > 0) {
synchronized (VendorSdkInfoManager.this) {
for (int i10 = 0; i10 < sparseArray.size(); i10++) {
VendorSdkInfoManager.a(VendorSdkInfoManager.this).put(sparseArray.keyAt(i10), sparseArray.valueAt(i10));
}
}
VendorSdkInfoManager vendorSdkInfoManager = VendorSdkInfoManager.this;
VendorSdkInfoManager.a(vendorSdkInfoManager, VendorSdkInfoManager.b(vendorSdkInfoManager));
a10.setEndTime(System.currentTimeMillis());
a10.setSuccess(true);
a10.setTopTraceId(str3);
VendorSdkInfoManager.a(VendorSdkInfoManager.this, a10);
requestCallback.onSuccess(null);
return;
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return;
}
}
}
a(str2, str3);
}
});
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
public boolean a() {
try {
return !TextUtils.isEmpty(this.f29976c);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return false;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return false;
}
}
}
public boolean a(final String str, final e eVar) {
try {
if (!b()) {
try {
ExecutorManager.getInstance().scheduleFuture(new Runnable() {
@Override
public void run() {
try {
final CountDownLatch countDownLatch = new CountDownLatch(1);
VendorSdkInfoManager.this.a(str, new RequestCallback<Void, String>() {
public void a(String str2) {
try {
countDownLatch.countDown();
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
public void a(Void r12) {
try {
countDownLatch.countDown();
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
@Override
public void onError(String str2) {
try {
a(str2);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
@Override
public void onSuccess(Void r12) {
try {
a(r12);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
}, eVar);
try {
countDownLatch.await(BleConstant.SEND_OUTTIME, TimeUnit.MILLISECONDS);
} catch (InterruptedException unused) {
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
}).get(BleConstant.SEND_OUTTIME, TimeUnit.MILLISECONDS);
} catch (Exception unused) {
}
}
return b();
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return false;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return false;
}
}
}
public boolean b() {
try {
if (this.f29975b.size() <= 0) {
if (this.f29974a.size() <= 0) {
return false;
}
}
return true;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return false;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return false;
}
}
}
public String c() {
try {
return this.f29976c;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
public boolean d() {
return false;
}
@SafeProtector
public native void setLocalVendorSdkInfo(String str);
}