package com.ta.a.d; import android.content.Context; import android.text.TextUtils; import com.ta.a.c.b; import com.ta.a.e.f; import com.ta.utdid2.device.a; public class h implements Runnable { private static volatile boolean b = false; private Context mContext = null; public h(Context context) { this.mContext = context; } public void run() { try { a(); } catch (Throwable th) { com.ta.a.e.h.a("", th, new Object[0]); } } private void a() { com.ta.a.e.h.f(); if (f.e(this.mContext) && !b) { b = true; try { b(); } catch (Throwable unused) { } b = false; } } private boolean a(String str) { a a = b.a("https://mpush-api.aliyun.com/v2.0/a/audid/req/", str, true); if (a == null) { return false; } return com.ta.utdid2.device.f.a(a); } private void b() { com.ta.a.e.h.f(); String i = i(); if (TextUtils.isEmpty(i)) { com.ta.a.e.h.m710a("postData is empty", new Object[0]); } else if (a(i)) { com.ta.a.e.h.m710a("", "upload success"); } else { com.ta.a.e.h.m710a("", "upload fail"); } } private String i() { String r = a.a().r(); if (TextUtils.isEmpty(r)) { return null; } String a = com.ta.a.c.a.a(r); if (com.ta.a.e.h.b()) { com.ta.a.e.h.b("", a); } return b.b(a); } }