- 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
168 lines
7.7 KiB
Java
168 lines
7.7 KiB
Java
package com.tapjoy;
|
|
|
|
import android.content.Context;
|
|
import java.util.Objects;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class TJPrivacyPolicy {
|
|
public static TJPrivacyPolicy f;
|
|
public TJStatus a = null;
|
|
public TJStatus b = null;
|
|
public TJStatus c = null;
|
|
public String d = null;
|
|
public Context e;
|
|
|
|
public TJStatus getBelowConsentAge() {
|
|
return this.c;
|
|
}
|
|
|
|
public TJStatus getSubjectToGDPR() {
|
|
return this.a;
|
|
}
|
|
|
|
public String getUSPrivacy() {
|
|
return this.d;
|
|
}
|
|
|
|
public TJStatus getUserConsent() {
|
|
return this.b;
|
|
}
|
|
|
|
public static TJPrivacyPolicy getInstance() {
|
|
if (f == null) {
|
|
f = new TJPrivacyPolicy();
|
|
}
|
|
return f;
|
|
}
|
|
|
|
public void setBelowConsentAge(TJStatus tJStatus) {
|
|
this.c = tJStatus;
|
|
Context context = this.e;
|
|
if (context == null || tJStatus == null) {
|
|
return;
|
|
}
|
|
if (tJStatus == TJStatus.UNKNOWN) {
|
|
new TJKeyValueStorage(context, TapjoyConstants.TJC_PREFERENCE).remove(TapjoyConstants.PREF_BELOW_CONSENT_AGE);
|
|
} else {
|
|
new TJKeyValueStorage(context, TapjoyConstants.TJC_PREFERENCE).setValue(TapjoyConstants.PREF_BELOW_CONSENT_AGE, Integer.valueOf(this.c.getValue()));
|
|
}
|
|
}
|
|
|
|
public void setSubjectToGDPR(TJStatus tJStatus) {
|
|
this.a = tJStatus;
|
|
Context context = this.e;
|
|
if (context == null || tJStatus == null) {
|
|
return;
|
|
}
|
|
if (tJStatus == TJStatus.UNKNOWN) {
|
|
new TJKeyValueStorage(context, TapjoyConstants.TJC_PREFERENCE).remove(TapjoyConstants.PREF_SUBJECT_TO_GDPR);
|
|
} else {
|
|
new TJKeyValueStorage(context, TapjoyConstants.TJC_PREFERENCE).setValue(TapjoyConstants.PREF_SUBJECT_TO_GDPR, Integer.valueOf(this.a.getValue()));
|
|
}
|
|
}
|
|
|
|
public void setUSPrivacy(String str) {
|
|
this.d = str;
|
|
if (this.e == null || str == null) {
|
|
return;
|
|
}
|
|
if (str.isEmpty()) {
|
|
new TJKeyValueStorage(this.e, TapjoyConstants.TJC_PREFERENCE).remove(TapjoyConstants.PREF_US_PRIVACY);
|
|
} else {
|
|
new TJKeyValueStorage(this.e, TapjoyConstants.TJC_PREFERENCE).setValue(TapjoyConstants.PREF_US_PRIVACY, this.d);
|
|
}
|
|
}
|
|
|
|
public void setUserConsent(TJStatus tJStatus) {
|
|
this.b = tJStatus;
|
|
Context context = this.e;
|
|
if (context == null || tJStatus == null) {
|
|
return;
|
|
}
|
|
if (tJStatus == TJStatus.UNKNOWN) {
|
|
new TJKeyValueStorage(context, TapjoyConstants.TJC_PREFERENCE).remove(TapjoyConstants.PREF_USER_CONSENT);
|
|
} else {
|
|
new TJKeyValueStorage(context, TapjoyConstants.TJC_PREFERENCE).setValue(TapjoyConstants.PREF_USER_CONSENT, Integer.valueOf(this.b.getValue()));
|
|
}
|
|
}
|
|
|
|
public final synchronized void a(Context context) {
|
|
String str;
|
|
TJStatus tJStatus;
|
|
TJStatus tJStatus2;
|
|
if (context != null) {
|
|
try {
|
|
if (this.e == null) {
|
|
this.e = context;
|
|
}
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
TJPrivacyPolicy tJPrivacyPolicy = getInstance();
|
|
Context context2 = tJPrivacyPolicy.e;
|
|
if (context2 != null) {
|
|
TJKeyValueStorage tJKeyValueStorage = new TJKeyValueStorage(context2, TapjoyConstants.TJC_PREFERENCE);
|
|
if (tJPrivacyPolicy.a == null && tJKeyValueStorage.contains(TapjoyConstants.PREF_SUBJECT_TO_GDPR)) {
|
|
if (tJKeyValueStorage.getValueType(TapjoyConstants.PREF_SUBJECT_TO_GDPR) == Boolean.class) {
|
|
tJPrivacyPolicy.a = tJKeyValueStorage.getBoolean(TapjoyConstants.PREF_SUBJECT_TO_GDPR, false) ? TJStatus.TRUE : TJStatus.FALSE;
|
|
} else if (tJKeyValueStorage.getValueType(TapjoyConstants.PREF_SUBJECT_TO_GDPR) == Integer.class) {
|
|
tJPrivacyPolicy.a = TJStatus.valueOf(tJKeyValueStorage.getInt(TapjoyConstants.PREF_SUBJECT_TO_GDPR, TJStatus.UNKNOWN.getValue()));
|
|
}
|
|
}
|
|
if (tJPrivacyPolicy.b == null && tJKeyValueStorage.contains(TapjoyConstants.PREF_USER_CONSENT)) {
|
|
if (tJKeyValueStorage.getValueType(TapjoyConstants.PREF_USER_CONSENT) == String.class) {
|
|
tJPrivacyPolicy.b = Objects.equals(tJKeyValueStorage.getString(TapjoyConstants.PREF_USER_CONSENT, ""), "1") ? TJStatus.TRUE : TJStatus.FALSE;
|
|
} else if (tJKeyValueStorage.getValueType(TapjoyConstants.PREF_USER_CONSENT) == Integer.class) {
|
|
tJPrivacyPolicy.b = TJStatus.valueOf(tJKeyValueStorage.getInt(TapjoyConstants.PREF_USER_CONSENT, TJStatus.UNKNOWN.getValue()));
|
|
}
|
|
}
|
|
if (tJPrivacyPolicy.c == null && tJKeyValueStorage.contains(TapjoyConstants.PREF_BELOW_CONSENT_AGE)) {
|
|
if (tJKeyValueStorage.getValueType(TapjoyConstants.PREF_BELOW_CONSENT_AGE) == Boolean.class) {
|
|
tJPrivacyPolicy.c = tJKeyValueStorage.getBoolean(TapjoyConstants.PREF_BELOW_CONSENT_AGE, false) ? TJStatus.TRUE : TJStatus.FALSE;
|
|
} else if (tJKeyValueStorage.getValueType(TapjoyConstants.PREF_BELOW_CONSENT_AGE) == Integer.class) {
|
|
tJPrivacyPolicy.c = TJStatus.valueOf(tJKeyValueStorage.getInt(TapjoyConstants.PREF_BELOW_CONSENT_AGE, TJStatus.UNKNOWN.getValue()));
|
|
}
|
|
}
|
|
if (tJPrivacyPolicy.d == null) {
|
|
tJPrivacyPolicy.d = tJKeyValueStorage.getString(TapjoyConstants.PREF_US_PRIVACY, "");
|
|
}
|
|
}
|
|
TJPrivacyPolicy tJPrivacyPolicy2 = getInstance();
|
|
Context context3 = tJPrivacyPolicy2.e;
|
|
if (context3 != null) {
|
|
TJStatus tJStatus3 = tJPrivacyPolicy2.a;
|
|
if (tJStatus3 != null) {
|
|
if (tJStatus3 == TJStatus.UNKNOWN) {
|
|
new TJKeyValueStorage(context3, TapjoyConstants.TJC_PREFERENCE).remove(TapjoyConstants.PREF_SUBJECT_TO_GDPR);
|
|
} else {
|
|
new TJKeyValueStorage(context3, TapjoyConstants.TJC_PREFERENCE).setValue(TapjoyConstants.PREF_SUBJECT_TO_GDPR, Integer.valueOf(tJPrivacyPolicy2.a.getValue()));
|
|
}
|
|
}
|
|
Context context4 = tJPrivacyPolicy2.e;
|
|
if (context4 != null && (tJStatus2 = tJPrivacyPolicy2.b) != null) {
|
|
if (tJStatus2 == TJStatus.UNKNOWN) {
|
|
new TJKeyValueStorage(context4, TapjoyConstants.TJC_PREFERENCE).remove(TapjoyConstants.PREF_USER_CONSENT);
|
|
} else {
|
|
new TJKeyValueStorage(context4, TapjoyConstants.TJC_PREFERENCE).setValue(TapjoyConstants.PREF_USER_CONSENT, Integer.valueOf(tJPrivacyPolicy2.b.getValue()));
|
|
}
|
|
}
|
|
Context context5 = tJPrivacyPolicy2.e;
|
|
if (context5 != null && (tJStatus = tJPrivacyPolicy2.c) != null) {
|
|
if (tJStatus == TJStatus.UNKNOWN) {
|
|
new TJKeyValueStorage(context5, TapjoyConstants.TJC_PREFERENCE).remove(TapjoyConstants.PREF_BELOW_CONSENT_AGE);
|
|
} else {
|
|
new TJKeyValueStorage(context5, TapjoyConstants.TJC_PREFERENCE).setValue(TapjoyConstants.PREF_BELOW_CONSENT_AGE, Integer.valueOf(tJPrivacyPolicy2.c.getValue()));
|
|
}
|
|
}
|
|
if (tJPrivacyPolicy2.e != null && (str = tJPrivacyPolicy2.d) != null) {
|
|
if (str.isEmpty()) {
|
|
new TJKeyValueStorage(tJPrivacyPolicy2.e, TapjoyConstants.TJC_PREFERENCE).remove(TapjoyConstants.PREF_US_PRIVACY);
|
|
} else {
|
|
new TJKeyValueStorage(tJPrivacyPolicy2.e, TapjoyConstants.TJC_PREFERENCE).setValue(TapjoyConstants.PREF_US_PRIVACY, tJPrivacyPolicy2.d);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|