FlixOlé v4.4.0版本的 MD5 值为:50e7f767ca3e8715936523e9ef089581
以下内容为反编译后的 a.java 源代码,内容仅作参考
package i.h.a.a;
import android.content.Context;
import android.os.Build;
import android.os.Environmenu;
import android.text.TextUtils;
import com.magine.android.mamo.api.PioneerServiceSource;
import com.magine.api.service.superscription.RxSuperscriptionService;
import i.h.a.a.a0;
import i.h.a.a.e;
import i.h.a.a.f;
import java.io.Closeable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
public class a extends Thread implements Closeable {
public static int Q = 0;
public static String R = "https://cdn-gl.imrworldwide.com/conf/|!nol_appid!|.json?devtypid=|!nol_devtypeid!|&devid=|![nol_deviceId]!|&devname=|!(nol_devname)!|&osver=|!nol_osversion!|&sysname=|!(nol_sysname)!|&bid=|!nol_bundleID!|";
public static String S = "http://DEFAULT_ERROR_HOST/cgi-bin/error?message=|!(nol_errorMessage)!|,c13_|![nol_appid]!|,c16_|![nol_sdkv]!|,c8_|![nol_devGroup]!|,c7_|![nol_osGroup]!|,c10_|![nol_platform]!|,c17_|![nol_stationId]!|,c18_|![nol_assetid]!|,c6_|![nol_product]!|,ci_|![nol_clientid]!|";
public static final Character T = ' ';
public static final Character U = 'S';
public static final Character V = 'D';
public i.h.a.a.e B;
public l0 C;
public boolean D;
public boolean E;
public boolean F;
public boolean G;
public k I;
public m J;
public n0 K;
public e0 L;
public h0 M;
public boolean O;
public s0 P;
public boolean f9888o;
public Map<String, String> f9889p;
public Map<String, String> f9890q;
public Map<String, String> r;
public Map<String, String> s;
public e u;
public boolean v;
public ArrayList<f> w;
public i.h.a.a.f y;
public String f9887n = "";
public boolean t = false;
public d x = null;
public int z = 0;
public String A = R;
public String H = null;
public i N = null;
public class b extends e.b {
public boolean r;
public e.a s;
public b(i.h.a.a.e eVar) {
super("ConfigRequest");
e0 e0Var;
String str;
eVar.getClass();
this.r = false;
this.s = null;
this.r = false;
if (a.this.L == null || a.this.C == null || a.this.J == null) {
a.this.I.k('E', "There is no dictionary and/or keychain and/or utility objects, cannot allow config request", new Object[0]);
} else if (!a.this.J.h()) {
a.this.I.l(3, 'E', "No Network connection. Device is currently offline, try again later", new Object[0]);
} else {
if (a.this.J.D0()) {
e0Var = a.this.L;
str = a.this.E ? "true" : "false";
} else {
e0Var = a.this.L;
str = "";
}
e0Var.u("nol_appdisable", str);
String n0 = a.this.J.n0();
a.this.L.u("nol_nuid", n0);
a.this.L.u("nol_deviceId", n0);
String e = a.this.L.e("nol_url_override");
if (e == null || e.isEmpty()) {
e = a.R;
} else {
a.this.I.k('I', "USING URL OVERRIDE", new Object[0]);
}
a.this.A = a.this.L.L(e);
if (a.this.A != null && !a.this.A.isEmpty()) {
if (a.this.J.G0()) {
a.this.f();
h(true);
a.this.G = false;
if (a.this.J.c0(0)) {
a.this.J.p0(0);
}
}
i.h.a.a.e eVar2 = a.this.B;
eVar2.getClass();
e.a aVar = new e.a("ConfigRequest", this, 60000, 60000, true);
this.s = aVar;
aVar.d(n0);
}
this.r = true;
}
}
@Override
public void b(String str, long j2, e.C0338e c0338e, Exception exc) {
try {
a.this.I.l(9, 'E', "Failed to get config response", new Object[0]);
a.this.I.k('D', "Failed sending config request", new Object[0]);
f();
} catch (Exception e) {
a.this.I.n(exc, 9, 'E', "Failed to get config response; failed retry. %s", e.getMessage());
}
}
@Override
public void c(String str, long j2, e.C0338e c0338e) {
String b;
Map<String, List<String>> c;
int i2 = -1;
if (c0338e != null) {
try {
i2 = c0338e.a();
b = c0338e.b();
c = c0338e.c();
} catch (Exception e) {
a.this.I.n(e, 2, 'E', "Could not finalize download of config file", new Object[0]);
return;
}
} else {
b = null;
c = null;
}
if (i2 < 0) {
b(str, j2, c0338e, null);
return;
}
if (i2 > 300 && ((i2 == 302 || i2 == 301 || i2 == 303) && a.Q < 5)) {
if (a.this.y.e("AppTaskConfig") != null) {
a.this.y.d("AppTaskConfig");
}
a.this.f1();
a aVar = a.this;
a aVar2 = a.this;
aVar.x = new d(aVar2.y, 5000L);
if (a.this.x == null) {
a.this.I.l(2, 'E', "Could not instantiate config retry task. No config request will happen", new Object[0]);
return;
} else if (c != null && c.containsKey("Location")) {
if (c.get("Location").size() > 1) {
a.this.I.k('D', "More than one redirect URLs found. Redirecting to the 1st redirect url.", new Object[0]);
}
a.this.A = c.get("Location").get(0);
a.this.y.b("AppTaskConfig");
a.b();
return;
}
}
a.this.I.k('D', "CONFIG response: %s ", b);
boolean G0 = a.this.J.G0();
boolean D0 = a.this.J.D0();
if (G0 || D0) {
if (D0) {
a.this.J.W(false);
}
if (G0) {
a.this.J.b0(false);
}
if (a.this.D && G0) {
a.this.I.k('I', "Successfully sent opt out ping", new Object[0]);
a.this.I.k('I', "Goodbye ping... USER OPT OUT finished", new Object[0]);
if (a.this.E) {
return;
}
} else if (a.this.E && D0) {
a.this.I.k('I', "Successfully sent app disable ping", new Object[0]);
a.this.I.k('I', "Goodbye ping... APP SDK DISABLE finished", new Object[0]);
a.this.G = false;
h(false);
a.this.I.Q().P0(1, true);
return;
} else {
a.this.I.k('I', "Hello ping... USER OPT IN / APP SDK ENABLE finished", new Object[0]);
}
}
if (b != null && !b.isEmpty()) {
a.this.I.k('I', "Receive content to parse.", new Object[0]);
a.this.H = null;
if (a.this.T0(b, m.I0())) {
a.this.I.k('I', "Successfully received config; parse successful", new Object[0]);
if (!a.this.v) {
a.this.j1(b);
}
a.this.P1();
a.this.k();
a.this.L();
a.this.s1();
return;
} else if (!TextUtils.isEmpty(a.this.H)) {
a.this.I.k('I', "%s", a.this.H);
if (a.this.y.e("AppTaskConfig") != null) {
a.this.y.d("AppTaskConfig");
}
a aVar3 = a.this;
a aVar4 = a.this;
aVar3.x = new d(aVar4.y, 21600000L, 21600000L);
if (a.this.x == null) {
a.this.I.l(2, 'E', "Could not instantiate config retry task. No config request will happen", new Object[0]);
return;
} else {
a.this.y.b("AppTaskConfig");
return;
}
} else {
a.this.I.k('I', "Failed parsing config file", new Object[0]);
}
} else if (i2 == 200) {
a.this.w();
a.this.I.k('I', "Received Empty Config file. Check that you are online and have provided the correct appid. If the issue persists, contact your Nielsen technical representative.", new Object[0]);
return;
} else {
a.this.I.k('I', "Received Empty Config file.", new Object[0]);
}
f();
}
@Override
public void d(String str, long j2) {
}
@Override
public void e(String str, long j2) {
}
public final void f() {
if (a.this.y != null) {
int unused = a.Q = 0;
if (a.this.z < 5) {
a.this.y.b("AppTaskConfig");
a.y1(a.this);
return;
}
if (a.this.J != null) {
if (!a.this.J.c0(0)) {
a.this.I.k('D', "Cached config file is not available ! Allowing config request to census.", new Object[0]);
} else if (!a.this.J.i0(0)) {
a.this.I.k('D', "Cached config file is older than 7 days ! Deleting it from cache as it is not valid anymore. Allowing config request to census.", new Object[0]);
a.this.J.p0(0);
} else if (a.this.B()) {
return;
}
}
if (a.this.z == 5) {
a.this.I.l(2, 'E', "Config not received URL(%s)", a.this.A);
if (a.this.y.e("AppTaskConfig") != null) {
a.this.y.d("AppTaskConfig");
}
a aVar = a.this;
a aVar2 = a.this;
aVar.x = new d(aVar2.y, 21600000L, 21600000L);
if (a.this.x == null) {
a.this.I.l(2, 'E', "Could not instantiate config retry task. No config request will happen", new Object[0]);
return;
}
a.y1(a.this);
}
a.this.y.b("AppTaskConfig");
}
}
public final boolean h(boolean z) {
f.a e;
r0 S = a.this.I.S();
if (S == null) {
a.this.I.k('E', "Could not restart processors. Missing cache processor manager object", new Object[0]);
return false;
}
S.w(z ? "CMD_FLUSH" : "CMD_NOFLUSH");
a.this.I.k('D', "STOP UPLOAD task now", new Object[0]);
if (a.this.y != null && (e = a.this.y.e("AppUpload")) != null) {
e.e();
}
return true;
}
public final boolean j() {
if (this.r) {
return this.s.f(0, a.this.A, 18, -1L);
}
return false;
}
}
public class c implements Closeable {
public boolean f9891n;
public String f9892o;
public String f9893p;
public String r;
public String s;
public List<String> f9894q = new LinkedList();
public Map<String, String> t = new HashMap();
public Map<String, String> u = new HashMap();
public Map<String, String> v = new HashMap();
public c(o.b.c cVar) {
this.f9891n = false;
this.f9892o = "";
this.f9893p = "";
this.r = "";
this.s = "";
this.f9891n = false;
if (cVar == null) {
a.this.I.l(3, 'E', "There is no rule to parse", new Object[0]);
return;
}
try {
o.b.c g2 = cVar.g("tagVar");
if (g2 == null) {
a.this.I.l(3, 'E', "There must be a \"tagVar\" statement on filter(%s)", cVar.toString());
return;
}
this.f9892o = g2.i("name");
this.f9893p = g2.i("value");
try {
o.b.c g3 = cVar.g("is");
if (g3 == null) {
a.this.I.l(3, 'E', "There must be a \"is\" statement on filter(%s)", cVar.toString());
return;
}
this.r = g3.i("type");
this.s = g3.i("value");
try {
o.b.a f2 = cVar.f("cond");
if (f2 == null) {
a.this.I.l(3, 'E', "There must be a \"cond\" statement on filter(%s)", cVar.toString());
return;
}
for (int i2 = 0; i2 < f2.r(); i2++) {
this.f9894q.add(f2.q(i2));
}
if (this.f9894q.size() <= 0) {
a.this.I.l(3, 'E', "There should be at least one value on current condition(%s)", f2.toString());
return;
}
try {
o.b.c g4 = cVar.g("then");
if (g4 == null) {
a.this.I.l(3, 'E', "There must be a \"%s\" statement on filter(%s)", "then", cVar.toString());
return;
}
Iterator<String> o2 = g4.o();
while (o2.hasNext()) {
String next = o2.next();
this.t.put(next, g4.i(next));
}
if (this.t.size() <= 0) {
a.this.I.l(3, 'E', "There should be at least one name/value on current object(%s)", g4.toString());
return;
}
try {
o.b.c g5 = cVar.g("else");
if (g5 != null) {
try {
Iterator<String> o3 = g5.o();
while (o3.hasNext()) {
String next2 = o3.next();
this.u.put(next2, g5.i(next2));
}
} catch (Exception e) {
a.this.I.n(e, 3, 'E', "Could not parse \"%s\" on filter(%s)", "else", cVar.toString());
return;
}
}
} catch (RuntimeException | Exception unused) {
}
try {
o.b.c g6 = cVar.g("result");
if (g6 != null) {
try {
Iterator<String> o4 = g6.o();
while (o4.hasNext()) {
String next3 = o4.next();
this.v.put(next3, g6.i(next3));
}
} catch (Exception e2) {
a.this.I.n(e2, 3, 'E', "Could not parse \"%s\" on filter(%s)", "result", cVar.toString());
return;
}
}
} catch (RuntimeException | Exception unused2) {
}
this.f9891n = true;
} catch (Exception e3) {
a.this.I.n(e3, 3, 'E', "There must be \"%s\" on filter declaration(%s)", "then", cVar.toString());
}
} catch (Exception e4) {
a.this.I.n(e4, 3, 'E', "There should be \"%s\" JSON array on current filter(%s)", "cond", cVar.toString());
}
} catch (Exception e5) {
a.this.I.n(e5, 3, 'E', "There should be \"%s\" on current filter(%s)", "is", cVar.toString());
}
} catch (RuntimeException unused3) {
a.this.I.l(3, 'E', "RuntimeException occurred. There should be \"%s\" on current filter(%s)", "tagVar", cVar.toString());
} catch (Exception unused4) {
a.this.I.l(3, 'E', "Exception occurred. There should be \"%s\" on current filter(%s)", "tagVar", cVar.toString());
}
}
public String B() {
return this.s;
}
public int L() {
return this.v.size();
}
public Map<String, String> O() {
return this.v;
}
public String R() {
return this.f9892o;
}
public String U() {
return this.f9893p;
}
public String b(int i2) {
try {
return this.f9894q.get(i2);
} catch (Exception e) {
a.this.I.n(e, 3, 'E', "Could not get condition index(%d)", Integer.valueOf(i2));
return null;
}
}
@Override
public void close() {
try {
Map<String, String> map = this.u;
if (map != null) {
map.clear();
}
this.u = null;
Map<String, String> map2 = this.t;
if (map2 != null) {
map2.clear();
}
this.t = null;
Map<String, String> map3 = this.v;
if (map3 != null) {
map3.clear();
}
this.v = null;
List<String> list = this.f9894q;
if (list != null) {
list.clear();
}
this.f9894q = null;
} catch (Exception e) {
a.this.I.n(e, 3, 'E', "Failed while closing rule", new Object[0]);
}
}
public int f() {
return this.f9894q.size();
}
public Map<String, String> i0() {
return this.t;
}
public Map<String, String> k() {
return this.u;
}
public boolean m0() {
return this.f9891n;
}
public String toString() {
StringBuilder sb = new StringBuilder("");
try {
sb.append("TagVar( name=");
sb.append(this.f9892o);
sb.append(" value=");
sb.append(this.f9893p);
sb.append(" ) ");
if (!this.f9894q.isEmpty()) {
sb.append("Condition( ");
for (int i2 = 0; i2 < this.f9894q.size(); i2++) {
sb.append(this.f9894q.get(i2));
sb.append(" ");
}
sb.append(") ");
}
sb.append("Is( type=");
sb.append(this.r);
sb.append(" value=");
sb.append(this.s);
sb.append(" )");
if (!this.t.isEmpty()) {
sb.append(" Then( ");
for (Map.Entry<String, String> entry : this.t.entrySet()) {
sb.append(entry.getKey());
sb.append("=");
sb.append(entry.getValue());
sb.append(" ");
}
sb.append(")");
}
if (!this.u.isEmpty()) {
sb.append(" Else( ");
for (Map.Entry<String, String> entry2 : this.u.entrySet()) {
sb.append(entry2.getKey());
sb.append("=");
sb.append(entry2.getValue());
sb.append(" ");
}
sb.append(")");
}
if (!this.v.isEmpty()) {
sb.append(" Result( ");
for (Map.Entry<String, String> entry3 : this.v.entrySet()) {
sb.append(entry3.getKey());
sb.append("=");
sb.append(entry3.getValue());
sb.append(" ");
}
sb.append(")");
}
} catch (RuntimeException e) {
a.this.I.n(e, 3, 'E', "RuntimeException occurred. Could not print rule as string", new Object[0]);
} catch (Exception e2) {
a.this.I.n(e2, 3, 'E', "Exception occurred. Could not print rule as string", new Object[0]);
}
return sb.toString();
}
public String w() {
return this.r;
}
}
public class d extends f.a {
public d(i.h.a.a.f fVar, long j2) {
super("AppTaskConfig", 1L, j2);
fVar.getClass();
}
public d(i.h.a.a.f fVar, long j2, long j3) {
super("AppTaskConfig", j2, j3);
fVar.getClass();
}
@Override
public boolean e() {
try {
a aVar = a.this;
b bVar = new b(aVar.B);
if (bVar.j()) {
return false;
}
bVar.f();
return true;
} catch (Exception e) {
a.this.I.n(e, 2, 'E', "There is no utilities object to execute the request", new Object[0]);
return true;
}
}
}
public interface e {
void b();
void f();
}
public interface f {
void d(boolean z, k kVar);
}
public a(Context context, HashMap<String, String> hashMap, s0 s0Var, k kVar) {
RuntimeException runtimeException;
int i2;
char c2;
String str;
this.f9888o = false;
this.y = null;
this.B = null;
this.C = null;
this.D = false;
this.E = false;
this.F = false;
this.G = false;
this.I = null;
this.J = null;
this.K = null;
this.L = null;
this.M = null;
this.O = false;
this.P = null;
this.O = false;
if (s0Var != null) {
try {
try {
this.P = s0Var;
this.f9888o = true;
} catch (Exception e2) {
this.I.m(e2, 'E', "Exception occurred. Failed on AppConfig construction", new Object[0]);
return;
}
} catch (RuntimeException e3) {
runtimeException = e3;
i2 = 0;
c2 = 'E';
this.I.m(runtimeException, c2, "RuntimeException occurred. Failed on AppConfig construction", new Object[i2]);
}
}
try {
this.I = kVar;
this.K = kVar.N();
this.M = this.I.M();
this.J = this.I.O();
this.C = this.I.b();
this.y = this.I.R();
this.B = this.I.a();
this.E = this.J.A0();
this.D = this.J.F0();
HashMap hashMap2 = new HashMap();
hashMap2.put("nol_appid", "appid");
hashMap2.put("nol_appname", "appname");
hashMap2.put("nol_appver_client", "appversion");
hashMap2.put("nol_appdma", "dma");
hashMap2.put("nol_appcountrycode", "ccode");
hashMap2.put("nol_sfcode", "sfcode");
hashMap2.put("nol_dpr", "tv");
hashMap2.put("nol_assetid", "assetid");
hashMap2.put("nol_stationType", "stationType");
hashMap2.put("nol_channelName", "channelName");
hashMap2.put("nol_mediaURL", "mediaURL");
hashMap2.put("nol_ocrtag", "ocrtag");
hashMap2.put("nol_title", "(title)");
hashMap2.put("nol_category", "(category)");
hashMap2.put("nol_censuscategory", "(censuscategory)");
hashMap2.put("nol_length", "length");
hashMap2.put("nol_clientid", "clientid");
hashMap2.put("nol_vcid", "vcid");
hashMap2.put("nol_vidtype", "type");
hashMap2.put("nol_sid", "sid");
hashMap2.put("nol_tfid", "tfid");
hashMap2.put("nol_pd", "pd");
hashMap2.put("nol_prod", "prod");
hashMap2.put("nol_metro", "metro");
hashMap2.put("nol_provider", "(provider)");
hashMap2.put("nol_comment", "(comment)");
hashMap2.put("nol_ottStatus", "ottStatus");
hashMap2.put("nol_ottType", "ottType");
hashMap2.put("nol_playerId", "playerid");
hashMap2.put("nol_uid2", "uid2");
hashMap2.put("nol_uid2Token", "uid2_token");
hashMap2.put("nol_hemSha256", "hem_sha256");
hashMap2.put("nol_hemSha1", "hem_sha1");
hashMap2.put("nol_hemMd5", "hem_md5");
hashMap2.put("nol_hemUnknown", "hem_unknown");
this.I.k('D', "Default CMS map parameters length(%d)", Integer.valueOf(hashMap2.size()));
X0(hashMap2);
HashMap hashMap3 = new HashMap();
if (hashMap != null) {
if (TextUtils.isEmpty(hashMap.get("appversion"))) {
hashMap.put("appversion", Environmenu.MEDIA_UNKNOWN);
}
if (TextUtils.isEmpty(hashMap.get("dma"))) {
hashMap.put("dma", "");
}
if (TextUtils.isEmpty(hashMap.get("ccode"))) {
hashMap.put("ccode", "1");
}
for (Map.Entry<String, String> entry : hashMap.entrySet()) {
String key = entry.getKey();
String value = entry.getValue();
if (!h1(key)) {
value = m.H0(value);
}
hashMap3.put(key, value);
}
if (!hashMap.containsKey("playerid") || hashMap.get("playerid").trim().isEmpty()) {
hashMap3.put("playerid", m.O());
}
}
hashMap3.put("nol_appdisable", "");
hashMap3.put("nol_useroptout", "");
hashMap3.put("nol_devname", m.U0());
hashMap3.put("nol_devmodel", Build.MODEL);
hashMap3.put("nol_sysname", "Android");
hashMap3.put("nol_sysversion", Build.VERSION.RELEASE);
String str2 = Build.MANUFACTURER;
hashMap3.put("nol_manuf", str2);
hashMap3.put("nol_contentType", "radio,content");
hashMap3.put("nol_staticType", "static,text");
hashMap3.put("nol_eventDataEvents", "play,pause,resume,stop,mute,rewind,forward,buffering");
hashMap3.put("nol_eventDataDelimiter", "~");
hashMap3.put("nol_eventDataParameterDelimiter", ":");
hashMap3.put("nol_pauseEventTimeoutPlayhead", "30");
hashMap3.put("nol_launchPingLimit", "200");
hashMap3.put("baseServerTime", "0");
hashMap3.put("baseDeviceTime", "0");
hashMap3.put("nol_drm", "3");
hashMap3.put("nol_panelFlag", "false");
hashMap3.put("nol_id3Delimiter", "%7C");
hashMap3.put("nol_cidNull", "X100zdCIGeIlgZnkYj6UvQ==");
hashMap3.put("nol_backgroundMode", Boolean.toString(false));
hashMap3.put("nol_devtypeid", m.U0());
String w = m.w(context);
hashMap3.put("nol_bundleID", w);
String S0 = m.S0();
hashMap3.put("nol_osver", S0);
hashMap3.put("nol_osversion", S0);
hashMap3.put("nol_sdkver", m.Y0());
if (hashMap == null || !hashMap.containsKey("sdkapitype")) {
str = "0";
} else {
str = "0";
String n0 = n0(hashMap);
hashMap.remove("sdkapitype");
hashMap.remove("intType");
this.J.s0(hashMap.get("sdkapitype"));
this.J.v0(n0);
}
String str3 = str;
String S2 = this.J.S(context);
if (S2 != null) {
hashMap3.put("nol_appver", m.H0(S2));
} else {
hashMap3.put("nol_appver", "");
}
String a0 = this.J.a0(context);
if (a0 == null || a0.isEmpty()) {
hashMap3.put("nol_appname", w);
} else {
hashMap3.put("nol_appname", m.H0(a0));
}
hashMap3.put("nol_devtimezone", m.Q0());
hashMap3.put("nol_pendingPingsDelay", "1");
this.I.k('D', "Default global data parameters length(%d)", Integer.valueOf(hashMap3.size()));
hashMap3.put("nol_channelName", "defaultChannelName");
hashMap3.put("nol_mediaURL", "");
hashMap3.put("nol_errorURL", S);
hashMap3.put("nol_tsvFlag", "99");
hashMap3.put("baseServerTime", str3);
hashMap3.put("baseDeviceTime", str3);
l0 l0Var = this.C;
if (l0Var == null) {
this.I.k('E', "Failed on AppConfig construction. Could not create the keychain object", new Object[0]);
hashMap3.put("nol_SDKEncDevIdFlag", "true");
return;
}
hashMap3.put("nol_SDKEncDevIdFlag", l0Var.u0("nol_SDKEncDevIdFlag", "true"));
hashMap3.put("nol_encryptDevId", "false");
hashMap3.put("enableVendorID", "false");
hashMap3.put("hashVendorID", "true");
hashMap3.put("enableCookielessDomain", "false");
hashMap3.put("nol_appCrash", str3);
hashMap3.put("nol_segmentTimeSpent_ad", str3);
hashMap3.put("nol_count_ad", str3);
hashMap3.put("nol_currSeg", str3);
hashMap3.put("nol_segmentTimeSpent", str3);
hashMap3.put("nol_pingStartTimeUTC", str3);
hashMap3.put("nol_sessionId", str3);
hashMap3.put("nol_isLive", "false");
hashMap3.put("nol_createTime", str3);
hashMap3.put("nol_pauseTimeout", "1800");
hashMap3.put("nol_ottStatus", str3);
hashMap3.put("nol_locale", "");
hashMap3.put("nol_language", "");
hashMap3.put("nol_localeCountryCode", "");
hashMap3.put("nol_devicetype", "");
hashMap3.put("nol_stationIdReset", Boolean.toString(false));
hashMap3.put("nol_timeShiftValueReset", Boolean.toString(false));
hashMap3.put("nol_vriDeviceTypeId", "0003");
hashMap3.put("nol_retry", str3);
Locale locale = Locale.getDefault();
if (locale != null) {
String locale2 = locale.toString();
if (!locale2.isEmpty()) {
hashMap3.put("nol_locale", locale2);
}
String language = locale.getLanguage();
if (language != null && !language.isEmpty()) {
hashMap3.put("nol_language", language);
}
String country = locale.getCountry();
if (country != null && !country.isEmpty()) {
hashMap3.put("nol_localeCountryCode", country);
}
} else {
n0 n0Var = this.K;
if (n0Var != null) {
n0Var.R('E', "Failed to get the Device Locale.", new Object[0]);
}
}
hashMap3.put("nol_devicetype", str2.equalsIgnoreCase(RxSuperscriptionService.THIRD_PARTY_AMAZON) ? RxSuperscriptionService.THIRD_PARTY_AMAZON : "mobile");
hashMap3.put("nol_clocksrc", "D");
this.I.k('D', "Full data global set -- Length(%d)", Integer.valueOf(hashMap3.size()));
O0(hashMap3);
e0 e0Var = new e0(hashMap2, hashMap3, this.I);
this.L = e0Var;
e0Var.m(0, "RAW ID3 default controller", "id3", "interval", "", null);
this.L.i(null);
this.F = true;
this.G = false;
this.O = true;
} catch (RuntimeException e4) {
i2 = 0;
c2 = 'E';
runtimeException = e4;
this.I.m(runtimeException, c2, "RuntimeException occurred. Failed on AppConfig construction", new Object[i2]);
}
}
public static int b() {
int i2 = Q;
Q = i2 + 1;
return i2;
}
public static int y1(a aVar) {
int i2 = aVar.z;
aVar.z = i2 + 1;
return i2;
}
public Map<String, String> A1() {
return this.f9890q;
}
public final boolean B() {
this.I.k('D', "Valid config file is available from cache. Reusing the cached config file.", new Object[0]);
String R2 = this.J.R(0);
boolean z = true;
this.I.k('D', "CONFIG response from cache: %s ", R2);
if (!R2.isEmpty()) {
this.I.k('D', "Received config from cache to parse.", new Object[0]);
if (T0(R2, this.J.q0(0) / 1000)) {
this.I.k('D', "Cached config parsed successfully", new Object[0]);
P1();
k();
L();
s1();
this.I.k('I', !z ? "SDK Offline mode is enabled" : "SDK Offline mode is not enabled", new Object[0]);
return z;
}
this.I.k('D', "Failed parsing cached config file. Deleting it from cache as it is not valid anymore. Allowing config request to census.", new Object[0]);
this.J.p0(0);
}
z = false;
this.I.k('I', !z ? "SDK Offline mode is enabled" : "SDK Offline mode is not enabled", new Object[0]);
return z;
}
public void B0(f fVar) {
if (this.w == null) {
this.w = new ArrayList<>();
}
if (fVar != null) {
this.w.add(fVar);
}
}
public Map<String, String> D1() {
return this.f9889p;
}
public Map<String, String> F1() {
return this.s;
}
public final synchronized void H0(a0 a0Var) {
int i2;
int i3;
int i4;
int i5;
try {
long parseLong = Long.parseLong("300");
l0 l0Var = this.C;
if (l0Var != null) {
parseLong = Long.parseLong(l0Var.u0("nol_offlinePingsLimit", "300"));
}
long j2 = parseLong;
this.I.k('D', "Filtering pending table by applying limit - %d ping(s)", Long.valueOf(j2));
List<a0.h> w = a0Var.w(2, -1L, -1L, 0, true);
a0Var.P0(2, true);
int i6 = 0;
int i7 = 0;
while (i7 < w.size()) {
a0.h hVar = w.get(i7);
if (hVar != null) {
int f2 = hVar.f();
if (f2 != 3 && i6 >= j2) {
i5 = f2;
i2 = i6;
i3 = i7;
i4 = 3;
if (i5 != i4) {
i6 = i2 + 1;
i7 = i3 + 1;
}
}
i4 = 3;
i5 = f2;
i2 = i6;
i3 = i7;
a0Var.R(2, hVar.d(), hVar.f(), hVar.h(), hVar.l(), hVar.j(), hVar.k());
if (i5 != i4) {
}
} else {
i2 = i6;
i3 = i7;
}
i6 = i2;
i7 = i3 + 1;
}
a0Var.U0(2);
} catch (Exception e2) {
this.I.m(e2, 'E', "Error while saving rest part of UPLOADING pings to PENDING table", new Object[0]);
}
}
public Map<String, String> H1() {
return this.r;
}
public boolean J1() {
return this.t;
}
public void K0(s0 s0Var) {
this.P = s0Var;
}
public String K1() {
return this.f9887n;
}
public final void L() {
ArrayList<f> arrayList = this.w;
if (arrayList != null) {
Iterator<f> it = arrayList.iterator();
while (it.hasNext()) {
it.next().d(this.f9888o, this.I);
}
}
}
public boolean M1() {
r0 S2 = this.I.S();
if (S2 != null) {
if (S2.T0()) {
m.b1(this.I.h());
return m.b(this.I.h());
}
m.Z0(this.I.h());
}
return false;
}
public void N0(String str, String str2) {
if (str == null || str.isEmpty() || str2 == null || str2.isEmpty()) {
return;
}
String L = this.L.L(str2);
if (L.isEmpty()) {
return;
}
this.J.K(str, L);
}
public void N1() {
String h2 = M1() ? this.I.h() : m.t() ? m.u() : null;
if (h2 != null) {
m.s();
c1(h2);
return;
}
k kVar = this.I;
kVar.k('W', "Master appId is not resolved: No first DCR static processor found with Master appId - %s", kVar.h());
}
public void O0(Map<String, String> map) {
this.f9890q = map;
}
public String O1() {
try {
o.b.c cVar = new o.b.c(this.I.g());
if (this.J.d0(cVar, "sfcode")) {
return this.J.D(cVar, "sfcode");
}
return null;
} catch (o.b.b e2) {
k kVar = this.I;
kVar.k('W', "JSONException occurred while parsing the init params Json to fetch the client provided sfcode. Exception - " + e2.getMessage(), new Object[0]);
return null;
}
}
public void P0(Map<String, String> map, Map<String, String> map2) {
String str;
if (map == null || map2 == null) {
return;
}
String str2 = map.get("enableUid2");
String str3 = "false";
if (str2 == null || str2.isEmpty()) {
String str4 = map2.get("enableUid2");
map.put("enableUid2", (str4 == null || str4.isEmpty()) ? "false" : "false");
}
String str5 = map.get("enableHem");
if (str5 == null || str5.isEmpty()) {
String str6 = map2.get("enableHem");
if (str6 != null && !str6.isEmpty()) {
str3 = str6;
}
map.put("enableHem", str3);
}
String str7 = map.get("nol_hemUidCharLimit");
if ((str7 != null && !str7.isEmpty()) || (str = map2.get("nol_hemUidCharLimit")) == null || str.isEmpty()) {
return;
}
map.put("nol_hemUidCharLimit", str);
}
public void P1() {
boolean z;
boolean z2;
Iterator<Map.Entry<String, String>> it;
boolean z3;
Map<String, String> map;
char c2;
Map<String, String> map2;
String[] strArr;
String str;
Map.Entry<String, String> next;
char c3;
a aVar = this;
String str2 = ": ";
try {
e0 e0Var = aVar.L;
if (e0Var == null) {
return;
}
long parseInt = Integer.parseInt(e0Var.f("nol_hemUidCharLimit", String.valueOf(Integer.MAX_VALUE)));
String f2 = aVar.L.f("enableHem", "false");
String f3 = aVar.L.f("enableUid2", "false");
if (!f2.equalsIgnoreCase("true") && !f2.equalsIgnoreCase("1")) {
z = false;
if (!f3.equalsIgnoreCase("true") && !f3.equalsIgnoreCase("1")) {
z2 = false;
Map<String, String> A1 = A1();
ArrayList arrayList = new ArrayList();
it = A1.entrySet().iterator();
while (true) {
String str3 = "uid2";
z3 = z2;
if (it.hasNext()) {
if (arrayList.isEmpty()) {
map = A1;
} else {
StringBuilder sb = new StringBuilder(": ");
Iterator it2 = arrayList.iterator();
while (it2.hasNext()) {
String str4 = (String) it2.next();
sb.append(str4);
sb.append(str2);
sb.append(A1.get(str4));
sb.append(", ");
A1.put(str4, "");
str2 = str2;
}
map = A1;
aVar.I.l(27, 'I', "Error. SDK received below parameter/s value exceeding permissible limit of %d characters %s", Long.valueOf(parseInt), sb.toString());
}
String[] strArr2 = {"uid2", "uid2_token", "hem_sha256", "hem_sha1", "hem_md5", "hem_unknown", "nol_uid2", "nol_uid2Token", "nol_hemSha256", "nol_hemSha1", "nol_hemMd5", "nol_hemUnknown"};
int i2 = 0;
for (int i3 = 12; i2 < i3; i3 = 12) {
String str5 = strArr2[i2];
switch (str5.hashCode()) {
case -1690071837:
if (str5.equals("nol_hemSha256")) {
c2 = '\t';
break;
}
c2 = 65535;
break;
case -1396226877:
if (str5.equals("nol_uid2Token")) {
c2 = 3;
break;
}
c2 = 65535;
break;
case -775919404:
if (str5.equals("hem_sha1")) {
c2 = 5;
break;
}
c2 = 65535;
break;
case 3589602:
if (str5.equals(str3)) {
c2 = 0;
break;
}
c2 = 65535;
break;
case 121794908:
if (str5.equals("uid2_token")) {
c2 = 1;
break;
}
c2 = 65535;
break;
case 798240449:
if (str5.equals("nol_hemSha1")) {
c2 = '\n';
break;
}
c2 = 65535;
break;
case 806248399:
if (str5.equals("hem_md5")) {
c2 = 6;
break;
}
c2 = 65535;
break;
case 1105243406:
if (str5.equals("nol_hemUnknown")) {
c2 = '\b';
break;
}
c2 = 65535;
break;
case 1347541718:
if (str5.equals("nol_uid2")) {
c2 = 2;
break;
}
c2 = 65535;
break;
case 1665764918:
if (str5.equals("hem_sha256")) {
c2 = 4;
break;
}
c2 = 65535;
break;
case 1826859074:
if (str5.equals("nol_hemMd5")) {
c2 = 11;
break;
}
c2 = 65535;
break;
case 2056967707:
if (str5.equals("hem_unknown")) {
c2 = 7;
break;
}
c2 = 65535;
break;
default:
c2 = 65535;
break;
}
switch (c2) {
case 0:
case 1:
case 2:
case 3:
map2 = map;
if (z3) {
strArr = strArr2;
str = str3;
if (aVar.L.e(str5).length() <= parseInt) {
i2++;
str3 = str;
strArr2 = strArr;
map = map2;
}
} else {
strArr = strArr2;
str = str3;
}
aVar.L.u(str5, "");
map2.put(str5, "");
continue;
i2++;
str3 = str;
strArr2 = strArr;
map = map2;
case 4:
case 5:
case 6:
case 7:
case '\b':
case '\t':
case '\n':
case 11:
if (z) {
try {
if (aVar.L.e(str5).length() <= parseInt) {
aVar = this;
}
} catch (Exception e2) {
e = e2;
aVar = this;
aVar.I.k('W', "Exception occurred while verifyPersonalIdentityParams :: " + e.getLocalizedMessage(), new Object[0]);
return;
}
}
aVar = this;
aVar.L.u(str5, "");
map2 = map;
map2.put(str5, "");
strArr = strArr2;
break;
default:
strArr = strArr2;
map2 = map;
break;
}
str = str3;
i2++;
str3 = str;
strArr2 = strArr;
map = map2;
}
return;
}
String key = it.next().getKey();
switch (key.hashCode()) {
case -775919404:
if (key.equals("hem_sha1")) {
c3 = 3;
break;
}
c3 = 65535;
break;
case 3589602:
if (key.equals("uid2")) {
c3 = 0;
break;
}
c3 = 65535;
break;
case 121794908:
if (key.equals("uid2_token")) {
c3 = 1;
break;
}
c3 = 65535;
break;
case 806248399:
if (key.equals("hem_md5")) {
c3 = 4;
break;
}
c3 = 65535;
break;
case 1665764918:
if (key.equals("hem_sha256")) {
c3 = 2;
break;
}
c3 = 65535;
break;
case 2056967707:
if (key.equals("hem_unknown")) {
c3 = 5;
break;
}
c3 = 65535;
break;
default:
c3 = 65535;
break;
}
if ((c3 == 0 || c3 == 1 || c3 == 2 || c3 == 3 || c3 == 4 || c3 == 5) && next.getValue().length() > parseInt) {
arrayList.add(key);
}
z2 = z3;
}
}
z2 = true;
Map<String, String> A12 = A1();
ArrayList arrayList2 = new ArrayList();
it = A12.entrySet().iterator();
while (true) {
String str32 = "uid2";
z3 = z2;
if (it.hasNext()) {
}
z2 = z3;
}
}
z = true;
if (!f3.equalsIgnoreCase("true")) {
z2 = false;
Map<String, String> A122 = A1();
ArrayList arrayList22 = new ArrayList();
it = A122.entrySet().iterator();
while (true) {
String str322 = "uid2";
z3 = z2;
if (it.hasNext()) {
}
z2 = z3;
}
}
z2 = true;
Map<String, String> A1222 = A1();
ArrayList arrayList222 = new ArrayList();
it = A1222.entrySet().iterator();
while (true) {
String str3222 = "uid2";
z3 = z2;
if (it.hasNext()) {
}
z2 = z3;
}
} catch (Exception e3) {
e = e3;
}
}
public void Q0(o.b.c cVar, HashMap<String, List<c>> hashMap, HashMap<String, Map<String, String>> hashMap2, HashMap<String, String> hashMap3, HashMap<String, String> hashMap4, HashMap<String, String> hashMap5, ArrayList<String> arrayList, ArrayList<String> arrayList2, ArrayList<String> arrayList3, ArrayList<String> arrayList4, HashMap<String, Boolean> hashMap6) throws o.b.b {
Iterator<String> it;
List<c> list;
Iterator<String> it2;
o.b.a aVar;
ArrayList<String> arrayList5;
Iterator<String> o2 = cVar.o();
while (o2.hasNext()) {
String next = o2.next();
Object b2 = cVar.b(next);
if (b2 instanceof o.b.c) {
o.b.c cVar2 = (o.b.c) b2;
Iterator<String> o3 = cVar2.o();
if (next.equalsIgnoreCase("nol_eventFilter") || next.equalsIgnoreCase("nol_serviceFilter")) {
it = o2;
while (true) {
if (!o3.hasNext()) {
break;
}
String next2 = o3.next();
Object b3 = cVar2.b(next2);
if (b3 instanceof o.b.a) {
if (hashMap.containsKey(next2)) {
list = hashMap.get(next2);
} else {
list = new ArrayList<>();
hashMap.put(next2, list);
}
o.b.a aVar2 = (o.b.a) b3;
int i2 = 0;
while (true) {
if (i2 >= aVar2.r()) {
break;
}
o.b.c j2 = aVar2.j(i2);
if (list == null) {
hashMap6.put("failedRuleParsing", Boolean.TRUE);
break;
}
c cVar3 = new c(j2);
if (!cVar3.m0()) {
hashMap6.put("failedRuleParsing", Boolean.TRUE);
cVar3.close();
break;
}
list.add(cVar3);
i2++;
}
}
if (hashMap6.get("failedRuleParsing").booleanValue()) {
this.I.l(3, 'I', "Unexpected JSON object rule(%s) under filter(%s)", next2, "nol_eventFilter");
break;
}
}
} else if (next.equalsIgnoreCase("nol_id3Map") || next.equalsIgnoreCase("nol_tsvBreakoutMap")) {
it = o2;
HashMap hashMap7 = new HashMap();
if (!hashMap2.containsKey(next)) {
hashMap2.put(next, hashMap7);
}
while (o3.hasNext()) {
String next3 = o3.next();
hashMap7.put(next3, cVar2.i(next3));
}
} else {
if (next.equalsIgnoreCase("nol_clientCMSmap")) {
while (o3.hasNext()) {
String next4 = o3.next();
hashMap3.put(next4, cVar2.i(next4));
hashMap6.put("foundCms", Boolean.TRUE);
}
} else if (next.equalsIgnoreCase("nol_tagMap")) {
hashMap6.put("foundTagMaps", Boolean.TRUE);
while (o3.hasNext()) {
String next5 = o3.next();
Object b4 = cVar2.b(next5);
if (b4 instanceof o.b.a) {
o.b.a aVar3 = (o.b.a) b4;
it2 = o2;
int i3 = 0;
while (i3 < aVar3.r()) {
String q2 = aVar3.q(i3);
if (next5.equalsIgnoreCase("nol_product")) {
arrayList5 = arrayList;
} else if (next5.equalsIgnoreCase("nol_cadence")) {
arrayList5 = arrayList2;
} else if (next5.equalsIgnoreCase("nol_url")) {
arrayList5 = arrayList3;
} else {
aVar = aVar3;
this.I.k('I', "Ignoring JSON array(%s) under %s", next5, "nol_tagMap");
i3++;
aVar3 = aVar;
}
arrayList5.add(q2);
aVar = aVar3;
i3++;
aVar3 = aVar;
}
} else {
it2 = o2;
if (b4 instanceof o.b.c) {
if (next5.equalsIgnoreCase("nol_defaults")) {
o.b.c cVar4 = (o.b.c) b4;
Iterator<String> o4 = cVar4.o();
while (o4.hasNext()) {
String next6 = o4.next();
String str = (String) cVar4.b(next6);
if (next6.equalsIgnoreCase("nol_maxLength")) {
if (str != null && !str.isEmpty()) {
this.C.i0(next6, str);
}
} else if (next6.equalsIgnoreCase("nol_tsvFlag")) {
String str2 = (str == null || str.isEmpty()) ? "99" : str;
this.C.i0(next6, str2);
hashMap5.put("nol_tsvFlagDefault", str2);
} else if (next6.equalsIgnoreCase("nol_sendTime")) {
str = "DEFAULTSENDTIME";
}
hashMap5.put(next6, str);
}
} else {
this.I.k('I', "Ignoring JSON object(%s) under %s", next5, "nol_tagMap");
o2 = it2;
}
}
}
o2 = it2;
}
} else {
it = o2;
this.I.k('I', "Ignoring JSON object(%s) under %s", next, "nol_GLOBALS");
}
it = o2;
}
} else {
it = o2;
if (b2 instanceof o.b.a) {
o.b.a aVar4 = (o.b.a) b2;
for (int i4 = 0; i4 < aVar4.r(); i4++) {
Object obj = aVar4.get(i4);
if (next.equalsIgnoreCase("nol_customExtension")) {
arrayList4.add((String) obj);
}
}
hashMap4.put(next, aVar4.toString());
} else {
String str3 = (String) b2;
if (next.equalsIgnoreCase("nol_SDKEncDevIdFlag")) {
if (str3 != null && !str3.isEmpty()) {
this.C.i0("nol_SDKEncDevIdFlag", m.B0(str3) ? "true" : "false");
}
} else if (next.equalsIgnoreCase("nol_devDebug")) {
if (str3 != null && !str3.isEmpty() && !this.I.N().Q0(n0.b(str3))) {
this.I.j(n0.b(str3));
}
} else if (next.equalsIgnoreCase("nol_mediaURL")) {
if (str3 != null && !str3.isEmpty()) {
this.f9887n = str3;
}
} else if (next.equalsIgnoreCase("nol_id3Delimiter")) {
if (str3 == null || str3.isEmpty()) {
str3 = "%7C";
}
} else if (next.equalsIgnoreCase("nol_useroptUrl")) {
if (str3 != null) {
}
str3 = "";
} else if (next.equalsIgnoreCase("nol_useroptUrl_lat")) {
if (str3 != null) {
}
str3 = "";
} else if (next.equalsIgnoreCase("nol_bgTimeOut")) {
if (str3 != null && !str3.isEmpty()) {
i.h.a.a.c.l(Integer.parseInt(str3));
}
} else if (next.equalsIgnoreCase("nol_currSeg")) {
if (str3 == null || str3.isEmpty()) {
str3 = "0";
}
} else if (next.equalsIgnoreCase("nol_pendingPingsDelay")) {
if (str3 == null || str3.isEmpty()) {
str3 = "1";
}
} else if (next.equalsIgnoreCase("nol_backgroundMode")) {
str3 = Boolean.toString((str3 == null || str3.isEmpty() || !str3.equalsIgnoreCase("1")) ? false : true);
} else if (next.equalsIgnoreCase("nol_requestError")) {
this.H = str3;
} else if (next.equalsIgnoreCase("nol_requestMethod")) {
this.t = (str3 == null || str3.isEmpty() || !str3.equalsIgnoreCase(PioneerServiceSource.POST)) ? false : true;
} else if (next.equalsIgnoreCase("enableVendorID")) {
if (str3 != null) {
}
str3 = "false";
} else if (next.equalsIgnoreCase("hashVendorID")) {
if (str3 == null || str3.isEmpty()) {
str3 = "true";
}
} else if (next.equalsIgnoreCase("enableCookielessDomain")) {
if (str3 != null) {
}
str3 = "false";
}
hashMap4.put(next, str3);
}
}
o2 = it;
}
}
public boolean S0(String str) {
r0 S2;
try {
} catch (Exception e2) {
this.I.m(e2, 'E', "Could not complete opt out operation", new Object[0]);
}
if (str == null) {
this.I.k('E', "Could not complete opt in/out. Received null input string", new Object[0]);
return false;
}
String trim = str.trim();
if (!trim.equalsIgnoreCase("nielsenappsdk://1") && !trim.equalsIgnoreCase("nielsenappsdk://0")) {
this.I.k('E', "Invalid response received from webpage (%s)", trim);
return false;
} else if (!this.J.j0(trim)) {
this.I.k('I', "Opt out state has NOT changed (%s)", trim);
return false;
} else {
boolean F0 = this.J.F0();
this.D = F0;
if ((F0 || !this.E) && (S2 = this.I.S()) != null) {
S2.U0(trim);
}
return true;
}
}
public boolean T0(java.lang.String r48, long r49) {
throw new UnsupportedOperationException("Method not decompiled: i.h.a.a.a.T0(java.lang.String, long):boolean");
}
public boolean U0(boolean z) {
try {
if (this.y == null || this.L == null || this.J.A0() == z) {
return false;
}
this.E = z;
this.J.L(z);
this.J.W(true);
this.L.u("nol_appdisable", Boolean.toString(this.E));
if (z) {
this.I.k('I', "App SDK disabled by APP DISABLE -- Goodbye!", new Object[0]);
i.h.a.a.c.h(true);
} else {
this.I.k('I', "App SDK enabled by APP ENABLE -- Sending Hello ping", new Object[0]);
i.h.a.a.c.h(false);
}
f1();
if (this.y.e("AppTaskConfig") != null) {
this.y.d("AppTaskConfig");
}
this.x = new d(this.y, 5000L);
this.y.b("AppTaskConfig");
return true;
} catch (Exception e2) {
this.I.m(e2, 'E', "Could not complete App SDK disable operation", new Object[0]);
return false;
}
}
public void X0(Map<String, String> map) {
this.f9889p = map;
}
public void a1() {
if (this.J == null || this.C == null || this.L == null || this.B == null) {
this.I.k('E', "Could not schedule config request task. Utilities, Keychain, request manager and/or dictionary not ready yet", new Object[0]);
return;
}
try {
HashMap hashMap = new HashMap();
String u0 = this.C.u0("nol_SDKEncDevIdFlag", "true");
if (u0 != null && !u0.isEmpty()) {
hashMap.put("nol_encryptDevId", u0);
hashMap.put("nol_SDKEncDevIdFlag", u0);
}
if (hashMap.size() > 0) {
this.L.k(null, hashMap);
}
String u02 = this.C.u0("nol_userAgent", "");
if (u02 == null || u02.isEmpty()) {
String L = this.L.L("NLSDK (|!nol_osver!|,|!nol_devtypeid!| BUILD/|!nol_sdkver!|) |!nol_appid!|/|!nol_appver!|");
if (!L.isEmpty()) {
this.L.u("nol_userAgent", L);
}
}
if (this.f9888o) {
this.I.k('I', "Automatic 24 hrs SDK refresh is happening ! Allowing config request to census.", new Object[0]);
} else {
f();
if (!this.J.c0(0)) {
this.I.k('D', "Cached config file is not available ! Allowing config request to census.", new Object[0]);
} else if (!this.J.i0(0)) {
this.I.k('D', "Cached config file is older than 7 days ! Deleting it from cache as it is not valid anymore. Allowing config request to census.", new Object[0]);
this.J.p0(0);
} else if (this.J.m0(0)) {
this.I.k('D', "Cached config file is older than 24 hrs ! Allowing config request to census.", new Object[0]);
} else if (B()) {
return;
}
}
if (this.E) {
return;
}
this.I.k('I', "Sending Hello ping..", new Object[0]);
f1();
if (this.y != null) {
this.x = new d(this.y, 5000L);
this.y.b("AppTaskConfig");
}
} catch (Exception e2) {
this.I.m(e2, 'E', "Exception while waiting for DeviceId", new Object[0]);
}
}
public void c1(String str) {
String e2;
if (str == null || str.isEmpty()) {
return;
}
if (i.h.a.a.c.v()) {
String w = i.h.a.a.c.w();
if (w != null && !w.equalsIgnoreCase(str) && (e2 = this.L.e("nol_invalidateMaster")) != null && (e2.equalsIgnoreCase("1") || e2.equalsIgnoreCase("true"))) {
this.I.k('I', "Master AppId updated from - %s to - %s", w, str);
i.h.a.a.c.r(str);
}
} else {
this.I.k('I', "Resolved Master appId - %s", str);
i.h.a.a.c.n(str);
}
this.I.k('D', "Master instance is available with Master appId: - %s", str);
}
@Override
public void close() {
this.I.k('I', "AppConfig - close()", new Object[0]);
i.h.a.a.f fVar = this.y;
if (fVar != null) {
fVar.d("AppTaskConfig");
}
ArrayList<f> arrayList = this.w;
if (arrayList != null) {
arrayList.clear();
}
this.u = null;
this.B = null;
this.x = null;
this.y = null;
}
public void d1(Map<String, String> map) {
this.s = map;
}
public final void f() {
a0 Q2 = this.I.Q();
if (Q2 != null) {
Q2.a1();
Q2.P0(1, true);
H0(Q2);
}
}
public void f1() {
this.z = 0;
}
public void g1(Map<String, String> map) {
this.r = map;
}
public boolean h1(String str) {
if (str != null) {
str.hashCode();
char c2 = 65535;
switch (str.hashCode()) {
case -1690071837:
if (str.equals("nol_hemSha256")) {
c2 = 0;
break;
}
break;
case -1396226877:
if (str.equals("nol_uid2Token")) {
c2 = 1;
break;
}
break;
case -775919404:
if (str.equals("hem_sha1")) {
c2 = 2;
break;
}
break;
case 3589602:
if (str.equals("uid2")) {
c2 = 3;
break;
}
break;
case 121794908:
if (str.equals("uid2_token")) {
c2 = 4;
break;
}
break;
case 798240449:
if (str.equals("nol_hemSha1")) {
c2 = 5;
break;
}
break;
case 806248399:
if (str.equals("hem_md5")) {
c2 = 6;
break;
}
break;
case 1105243406:
if (str.equals("nol_hemUnknown")) {
c2 = 7;
break;
}
break;
case 1347541718:
if (str.equals("nol_uid2")) {
c2 = '\b';
break;
}
break;
case 1665764918:
if (str.equals("hem_sha256")) {
c2 = '\t';
break;
}
break;
case 1826859074:
if (str.equals("nol_hemMd5")) {
c2 = '\n';
break;
}
break;
case 2056967707:
if (str.equals("hem_unknown")) {
c2 = 11;
break;
}
break;
}
switch (c2) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case '\b':
case '\t':
case '\n':
case 11:
return true;
}
}
return false;
}
public e0 i0() {
return this.L;
}
public final void j1(String str) {
m mVar;
if (this.L == null || (mVar = this.J) == null) {
return;
}
mVar.p0(0);
this.J.G(0, str);
}
public final void k() {
e0 e0Var = this.L;
if (e0Var == null || this.y == null) {
return;
}
long d2 = e0Var.d("nol_pendingPingsDelay", 1L);
new h(this.y, 1000 * d2, this.I);
this.y.b("AppPendingUpload");
this.I.k('D', "Started pending pings timer with period(%d second(s))", Long.valueOf(d2));
}
public void l1() {
if (this.y == null || this.L == null) {
this.I.k('W', "There are no scheduler and/or dictionary objects, it cannot proceed", new Object[0]);
return;
}
this.I.k('W', "Remove current config update task", new Object[0]);
if (this.y.e("AppTaskConfig") != null) {
this.y.d("AppTaskConfig");
}
w();
this.C.i0("nol_maxLength", this.L.f("nol_maxLength", "1800"));
this.G = true;
}
public String n0(HashMap<String, String> hashMap) {
try {
Locale locale = Locale.ENGLISH;
String lowerCase = "intType".toLowerCase(locale);
if (hashMap == null || !hashMap.containsKey(lowerCase)) {
return "n";
}
String str = hashMap.get(lowerCase);
if (str == null || !(str.equalsIgnoreCase("h") || str.equalsIgnoreCase("w") || str.equalsIgnoreCase(i.f.a.h.b.d.r.e) || str.equalsIgnoreCase("n"))) {
k kVar = this.I;
if (kVar != null) {
kVar.k('W', "Incorrect integration type passed " + str, new Object[0]);
return "n";
}
return "n";
}
return str.toLowerCase(locale);
} catch (Exception e2) {
k kVar2 = this.I;
if (kVar2 != null) {
kVar2.k('W', "Exception in AppConfig::getIntegrationType() ", e2.getLocalizedMessage());
return "n";
}
return "n";
}
}
public boolean o1() {
return this.G;
}
public boolean p1() {
return this.F;
}
@Override
public void run() {
if (!this.O) {
this.I.k('E', "AppConfig construction failed, cannot allow running thread", new Object[0]);
} else if (this.L == null || this.C == null || this.J == null) {
this.I.k('E', "There is no dictionary and/or keychain and/or utility objects, cannot allow running thread", new Object[0]);
} else {
try {
a1();
} catch (Error e2) {
this.I.m(e2, 'E', "An unrecoverable error encountered inside AppConfig thread : %s ", e2.getMessage());
} catch (Exception e3) {
this.I.m(e3, 'E', "Exception while waiting for location and DeviceId", new Object[0]);
}
}
}
public boolean s1() {
r0 S2 = this.I.S();
if (S2 == null || this.L == null) {
this.I.k('E', "Could not restart processors. Missing cache processor manager and/or dictionary objects", new Object[0]);
return false;
}
S2.w("CMD_FLUSH");
v1();
z1();
S2.m0();
l1();
n0 n0Var = this.K;
if (n0Var != null) {
n0Var.i0(1, "Config file successfully loaded and parsed.", new Object[0]);
}
h0 h0Var = this.M;
if (h0Var != null) {
h0Var.b(1, "Config file successfully loaded and parsed.");
}
if (this.G) {
N1();
if (S2.T0() && i.h.a.a.c.v() && i.h.a.a.c.j(this.I)) {
this.I.k('I', "Processing App Launch Ping(s) after config request is successful.", new Object[0]);
S2.P0("SDK INIT");
return true;
}
return true;
}
return true;
}
public i t1() {
return this.N;
}
public void u0(e eVar) {
this.u = eVar;
}
public void v1() {
e0 e0Var = this.L;
if (e0Var == null || this.y == null) {
return;
}
long d2 = e0Var.d("nol_sendTimer", 90L);
this.N = new i(this.y, 1000 * d2, this.I);
this.y.b("AppUpload");
this.I.k('D', "START UPLOAD task now. Period(%d)", Long.valueOf(d2));
}
public final void w() {
e0 e0Var;
if (this.P == null || (e0Var = this.L) == null) {
return;
}
long d2 = e0Var.d("nol_configRefreshInterval", 86400L);
long d3 = this.L.d("nol_configIncrement", 3600L);
this.P.w(d2, d3);
this.I.k('D', "Setup refresh task with interval(%d) and increment(%d)", Long.valueOf(d2), Long.valueOf(d3));
}
public void z1() {
e0 e0Var = this.L;
if (e0Var == null || this.y == null) {
return;
}
long d2 = e0Var.d("nol_errlogInterval", 3600L);
new g0(this.y, 1000 * d2, this.I);
this.y.b("AppErrorLogUploader");
this.I.k('D', "START ERROR LOG UPLOAD task now. Period(%d)", Long.valueOf(d2));
}
}