Files
rr3-apk/decompiled-community/sources/com/ea/nimble/SynergyResponse.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

70 lines
2.4 KiB
Java

package com.ea.nimble;
import com.ea.nimble.Error;
import com.ea.nimble.Log;
import java.util.Map;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class SynergyResponse implements ISynergyResponse {
public IHttpResponse httpResponse = null;
public Error error = null;
public Map<String, Object> jsonData = null;
public void parseData() {
int intValue;
Log.Helper.LOGPUBLICFUNC(this);
if (this.jsonData != null) {
return;
}
IHttpResponse iHttpResponse = this.httpResponse;
if (iHttpResponse == null || iHttpResponse.getError() != null) {
this.jsonData = null;
this.error = null;
return;
}
String str = "<empty>";
try {
str = Utility.readStringFromStream(this.httpResponse.getDataStream());
Map<String, Object> convertJSONObjectToMap = Utility.convertJSONObjectToMap(new JSONObject(str));
this.jsonData = convertJSONObjectToMap;
if (!convertJSONObjectToMap.containsKey("resultCode") || (intValue = ((Integer) this.jsonData.get("resultCode")).intValue()) >= 0) {
return;
}
this.error = new SynergyServerError(intValue, (String) this.jsonData.get("message"));
} catch (Exception e) {
this.jsonData = null;
this.error = new Error(Error.Code.NETWORK_INVALID_SERVER_RESPONSE, "Unparseable synergy json response " + str, e);
}
}
@Override // com.ea.nimble.ISynergyResponse
public IHttpResponse getHttpResponse() {
Log.Helper.LOGPUBLICFUNC(this);
return this.httpResponse;
}
@Override // com.ea.nimble.ISynergyResponse
public boolean isCompleted() {
Log.Helper.LOGPUBLICFUNC(this);
IHttpResponse iHttpResponse = this.httpResponse;
if (iHttpResponse == null) {
return false;
}
return iHttpResponse.isCompleted();
}
@Override // com.ea.nimble.ISynergyResponse
public Exception getError() {
IHttpResponse iHttpResponse;
Error error = this.error;
return (error != null || (iHttpResponse = this.httpResponse) == null) ? error : iHttpResponse.getError();
}
@Override // com.ea.nimble.ISynergyResponse
public Map<String, Object> getJsonData() {
Log.Helper.LOGPUBLICFUNC(this);
return this.jsonData;
}
}