- 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
331 lines
12 KiB
Java
331 lines
12 KiB
Java
package com.ea.nimble;
|
|
|
|
import com.ea.nimble.Error;
|
|
import com.ea.nimble.Log;
|
|
import com.ea.nimble.mtx.catalog.synergy.SynergyCatalog;
|
|
import com.unity3d.ads.metadata.InAppPurchaseMetaData;
|
|
import java.io.Externalizable;
|
|
import java.io.IOException;
|
|
import java.io.ObjectInput;
|
|
import java.io.ObjectOutput;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes2.dex */
|
|
class EnvironmentDataContainer implements ISynergyEnvironment, Externalizable, LogSource {
|
|
private static final int SYNERGY_DIRECTOR_RESPONSE_APP_VERSION_OK = 0;
|
|
private static final int SYNERGY_DIRECTOR_RESPONSE_APP_VERSION_UPGRADE_RECOMMENDED = 1;
|
|
private static final int SYNERGY_DIRECTOR_RESPONSE_APP_VERSION_UPGRADE_REQUIRED = 2;
|
|
private String m_eaDeviceId;
|
|
private Long m_lastDirectorResponseTimestamp;
|
|
private Map<String, String> m_serverUrls;
|
|
private String m_synergyAnonymousId;
|
|
private Map<String, String> m_overrideUrls = new HashMap();
|
|
private Map<String, Object> m_getDirectionResponseDictionary = new HashMap();
|
|
private String m_applicationLanguageCode = "en";
|
|
|
|
public Map<String, Object> getGetDirectionResponseDictionary() {
|
|
return this.m_getDirectionResponseDictionary;
|
|
}
|
|
|
|
@Override // com.ea.nimble.LogSource
|
|
public String getLogSourceTitle() {
|
|
return "SynergyEnv";
|
|
}
|
|
|
|
public Map<String, String> getServerUrls() {
|
|
return this.m_serverUrls;
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public String getEADeviceId() {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
return this.m_eaDeviceId;
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public String getSynergyId() {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
return this.m_synergyAnonymousId;
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public String getSellId() {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
Map<String, Object> map = this.m_getDirectionResponseDictionary;
|
|
if (map == null || map.isEmpty()) {
|
|
return null;
|
|
}
|
|
return (String) this.m_getDirectionResponseDictionary.get(SynergyCatalog.MTX_INFO_KEY_SELLID);
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public String getProductId() {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
Map<String, Object> map = this.m_getDirectionResponseDictionary;
|
|
if (map == null || map.isEmpty()) {
|
|
return null;
|
|
}
|
|
return (String) this.m_getDirectionResponseDictionary.get(InAppPurchaseMetaData.KEY_PRODUCT_ID);
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public String getEAHardwareId() {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
Map<String, Object> map = this.m_getDirectionResponseDictionary;
|
|
if (map == null || map.isEmpty()) {
|
|
return null;
|
|
}
|
|
return (String) this.m_getDirectionResponseDictionary.get("hwId");
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public String getNexusClientId() {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
Map<String, Object> map = this.m_getDirectionResponseDictionary;
|
|
if (map == null || map.isEmpty()) {
|
|
return null;
|
|
}
|
|
return (String) this.m_getDirectionResponseDictionary.get("clientId");
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public String getNexusClientSecret() {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
Map<String, Object> map = this.m_getDirectionResponseDictionary;
|
|
if (map == null || map.isEmpty()) {
|
|
return null;
|
|
}
|
|
return (String) this.m_getDirectionResponseDictionary.get("clientSecret");
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public String getGosMdmAppKey() {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
Map<String, Object> map = this.m_getDirectionResponseDictionary;
|
|
if (map == null || map.isEmpty()) {
|
|
return null;
|
|
}
|
|
return (String) this.m_getDirectionResponseDictionary.get("mdmAppKey");
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public Error setServerUrl(String str, String str2) {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
if (!Utility.validString(str)) {
|
|
Log.Helper.LOGE(this, "Provided override URL key is not a valid string, unable to set URL", new Object[0]);
|
|
return new Error(Error.Code.INVALID_ARGUMENT, "Provided override URL key is not a valid string, unable to set URL");
|
|
}
|
|
if (!Utility.validString(str2)) {
|
|
Log.Helper.LOGD(this, "Empty or null value provided for key \"" + str + "\", removing key from map", new Object[0]);
|
|
if (this.m_overrideUrls.remove(str) != null) {
|
|
return null;
|
|
}
|
|
Log.Helper.LOGW(this, "No matching key found in override URLs", new Object[0]);
|
|
return null;
|
|
}
|
|
this.m_overrideUrls.put(str, str2);
|
|
Log.Helper.LOGD(this, "Successfully set Override URL pair: (%s,%s)", str, this.m_overrideUrls.get(str));
|
|
return null;
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public String getServerUrlWithKey(String str) {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
String str2 = this.m_overrideUrls.get(str);
|
|
return str2 != null ? str2 : this.m_serverUrls.get(str);
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public String getSynergyDirectorServerUrl(NimbleConfiguration nimbleConfiguration) {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
return SynergyEnvironment.getComponent().getSynergyDirectorServerUrl(nimbleConfiguration);
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public int getLatestAppVersionCheckResult() {
|
|
int parseInt;
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
Map<String, Object> map = this.m_getDirectionResponseDictionary;
|
|
if (map == null || map.isEmpty()) {
|
|
return -1;
|
|
}
|
|
Object obj = this.m_getDirectionResponseDictionary.get("appUpgrade");
|
|
if (obj instanceof Integer) {
|
|
parseInt = ((Integer) obj).intValue();
|
|
} else {
|
|
parseInt = obj instanceof String ? Integer.parseInt((String) obj) : 0;
|
|
}
|
|
if (parseInt == 0) {
|
|
return 0;
|
|
}
|
|
int i = 1;
|
|
if (parseInt != 1) {
|
|
i = 2;
|
|
if (parseInt != 2) {
|
|
return 0;
|
|
}
|
|
}
|
|
return i;
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public int getTrackingPostInterval() {
|
|
Integer num;
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
Map<String, Object> map = this.m_getDirectionResponseDictionary;
|
|
if (map == null || map.isEmpty() || (num = (Integer) this.m_getDirectionResponseDictionary.get("telemetryFreq")) == null) {
|
|
return -1;
|
|
}
|
|
return num.intValue();
|
|
}
|
|
|
|
public void setGetDirectionResponseDictionary(Map<String, Object> map) {
|
|
Log.Helper.LOGFUNC(this);
|
|
if (map != null) {
|
|
map.put(SynergyCatalog.MTX_INFO_KEY_SELLID, ((Integer) map.get(SynergyCatalog.MTX_INFO_KEY_SELLID)).toString());
|
|
map.put(InAppPurchaseMetaData.KEY_PRODUCT_ID, ((Integer) map.get(InAppPurchaseMetaData.KEY_PRODUCT_ID)).toString());
|
|
map.put("hwId", ((Integer) map.get("hwId")).toString());
|
|
this.m_getDirectionResponseDictionary = map;
|
|
return;
|
|
}
|
|
this.m_getDirectionResponseDictionary = new HashMap();
|
|
}
|
|
|
|
public void setServerUrls(Map<String, String> map) {
|
|
Log.Helper.LOGFUNC(this);
|
|
this.m_serverUrls = map;
|
|
}
|
|
|
|
public void setEADeviceId(String str) {
|
|
Log.Helper.LOGFUNC(this);
|
|
this.m_eaDeviceId = str;
|
|
}
|
|
|
|
public String getSynergyAnonymousId() {
|
|
Log.Helper.LOGFUNC(this);
|
|
return this.m_synergyAnonymousId;
|
|
}
|
|
|
|
public void setSynergyAnonymousId(String str) {
|
|
Log.Helper.LOGFUNC(this);
|
|
this.m_synergyAnonymousId = str;
|
|
}
|
|
|
|
public Long getMostRecentDirectorResponseTimestamp() {
|
|
Log.Helper.LOGFUNC(this);
|
|
return this.m_lastDirectorResponseTimestamp;
|
|
}
|
|
|
|
public void setMostRecentDirectorResponseTimestamp(Long l) {
|
|
Log.Helper.LOGFUNC(this);
|
|
this.m_lastDirectorResponseTimestamp = l;
|
|
}
|
|
|
|
@Override // java.io.Externalizable
|
|
public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException {
|
|
Map<String, Object> map = (Map) objectInput.readObject();
|
|
this.m_getDirectionResponseDictionary = map;
|
|
if (map.isEmpty()) {
|
|
this.m_getDirectionResponseDictionary = null;
|
|
}
|
|
Map<String, String> map2 = (Map) objectInput.readObject();
|
|
this.m_serverUrls = map2;
|
|
if (map2.isEmpty()) {
|
|
this.m_serverUrls = null;
|
|
}
|
|
String str = (String) objectInput.readObject();
|
|
this.m_eaDeviceId = str;
|
|
if (str.length() == 0) {
|
|
this.m_eaDeviceId = null;
|
|
}
|
|
String str2 = (String) objectInput.readObject();
|
|
this.m_synergyAnonymousId = str2;
|
|
if (str2.length() == 0) {
|
|
this.m_synergyAnonymousId = null;
|
|
}
|
|
Long valueOf = Long.valueOf(objectInput.readLong());
|
|
this.m_lastDirectorResponseTimestamp = valueOf;
|
|
if (valueOf.longValue() == 0) {
|
|
this.m_lastDirectorResponseTimestamp = null;
|
|
}
|
|
String str3 = (String) objectInput.readObject();
|
|
this.m_applicationLanguageCode = str3;
|
|
if (str3.length() == 0) {
|
|
this.m_applicationLanguageCode = null;
|
|
}
|
|
}
|
|
|
|
@Override // java.io.Externalizable
|
|
public void writeExternal(ObjectOutput objectOutput) throws IOException {
|
|
Object obj = this.m_getDirectionResponseDictionary;
|
|
if (obj == null) {
|
|
obj = new HashMap();
|
|
}
|
|
objectOutput.writeObject(obj);
|
|
Object obj2 = this.m_serverUrls;
|
|
if (obj2 == null) {
|
|
obj2 = new HashMap();
|
|
}
|
|
objectOutput.writeObject(obj2);
|
|
String str = this.m_eaDeviceId;
|
|
if (str == null) {
|
|
str = "";
|
|
}
|
|
objectOutput.writeObject(str);
|
|
String str2 = this.m_synergyAnonymousId;
|
|
if (str2 == null) {
|
|
str2 = "";
|
|
}
|
|
objectOutput.writeObject(str2);
|
|
Long l = this.m_lastDirectorResponseTimestamp;
|
|
objectOutput.writeLong(l == null ? 0L : l.longValue());
|
|
String str3 = this.m_applicationLanguageCode;
|
|
objectOutput.writeObject(str3 != null ? str3 : "");
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:48:0x0167 A[RETURN] */
|
|
/* JADX WARN: Removed duplicated region for block: B:50:0x0168 A[RETURN] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public java.util.Set<java.lang.String> getKeysOfDifferences(com.ea.nimble.ISynergyEnvironment r13) {
|
|
/*
|
|
Method dump skipped, instructions count: 362
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.ea.nimble.EnvironmentDataContainer.getKeysOfDifferences(com.ea.nimble.ISynergyEnvironment):java.util.Set");
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public boolean isDataAvailable() {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
return true;
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public boolean isUpdateInProgress() {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
return false;
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public Error checkAndInitiateSynergyEnvironmentUpdate() {
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
return null;
|
|
}
|
|
|
|
@Override // com.ea.nimble.ISynergyEnvironment
|
|
public boolean isFeatureDisabled(String str) {
|
|
List list;
|
|
Log.Helper.LOGPUBLICFUNC(this);
|
|
Map<String, Object> map = this.m_getDirectionResponseDictionary;
|
|
if (map == null || (list = (List) map.get("disabledFeatures")) == null) {
|
|
return false;
|
|
}
|
|
return list.contains(str);
|
|
}
|
|
}
|