AI Chat v1.1.8版本的 MD5 值为:1bcdce875f86738c8cfbf1e5f4064353
以下内容为反编译后的 aa.java 源代码,内容仅作参考
package com.bytedance.sdk.openadsdk.n;
import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.Looper;
import android.os.StatFs;
import android.text.TextUtils;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import cn.thinkingdata.android.utils.TDConstants;
import com.bytedance.sdk.component.widget.SSWebView;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.FutureTask;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantLock;
import java.util.regex.Pattern;
import org.json.JSONObject;
public class aa {
private static final ExecutorService a = Executors.newSingleThreadExecutor();
private static volatile boolean b = false;
private static volatile String c = "";
private static final ReentrantLock f1442d = new ReentrantLock();
private static String e = null;
private static String f = null;
private static String g = null;
private static final HashSet<String> h = new HashSet<>(Arrays.asList("Asia/Shanghai", "Asia/Urumqi", "Asia/Chongqing", "Asia/Harbin", "Asia/Kashgar"));
public static class a implements Callable<String> {
private final int a;
public a(int i) {
this.a = i;
}
private String b() {
String str;
Throwable th;
try {
str = System.getProperty("http.agent");
if (str != null) {
try {
if (!"unKnow".equals(str)) {
if (com.bytedance.sdk.openadsdk.multipro.b.c()) {
com.bytedance.sdk.openadsdk.multipro.d.a.a("sp_multi_ua_data", "android_system_ua", str);
} else {
com.bytedance.sdk.openadsdk.core.c.a(com.bytedance.sdk.openadsdk.core.n.a()).a("android_system_ua", str);
}
}
} catch (Throwable th2) {
th = th2;
com.bytedance.sdk.component.utils.l.e("getUA", "e:" + th.getMessage());
return str;
}
}
} catch (Throwable th3) {
str = "unKnow";
th = th3;
}
return str;
}
private synchronized String c() {
final String[] strArr;
strArr = new String[]{"unKnow"};
final CountDownLatch countDownLatch = new CountDownLatch(1);
y.a(new Runnable() {
@Override
public void run() {
strArr[0] = aa.t();
com.bytedance.sdk.component.utils.l.b("getUA", "webview ua:" + strArr[0]);
countDownLatch.countDown();
}
});
try {
countDownLatch.await(2L, TimeUnit.SECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
}
return strArr[0];
}
@Override
public synchronized String call() {
String str;
str = "unKnow";
int i = this.a;
if (i == 1) {
str = c();
} else if (i == 2) {
str = b();
}
return str;
}
}
public static String a(int i) {
switch (i) {
case 1:
return "embeded_ad_landingpage";
case 2:
return "banner_ad_landingpage";
case 3:
return "interaction_landingpage";
case 4:
return "splash_ad_landingpage";
case 5:
return "fullscreen_interstitial_ad";
case 6:
return "draw_ad_landingpage";
case 7:
return "rewarded_video_landingpage";
default:
return null;
}
}
public static void a(com.bytedance.sdk.openadsdk.core.model.o oVar, View view) {
}
public static String b(int i) {
return i != 1 ? i != 2 ? (i == 3 || i == 4) ? "open_ad" : i != 7 ? i != 8 ? i != 9 ? "embeded_ad" : "draw_ad" : "fullscreen_interstitial_ad" : "rewarded_video" : "interaction" : "banner_ad";
}
public static boolean b(Context context, String str) {
if (context == null || TextUtils.isEmpty(str)) {
return false;
}
try {
return context.getPackageManager().getPackageInfo(str, 0) != null;
} catch (Throwable unused) {
return false;
}
}
public static boolean c(int i) {
return i == 4;
}
public static boolean c(Context context, String str) {
if (context != null && !TextUtils.isEmpty(str)) {
try {
Intent intent = new Intent("android.intent.action.DIAL", Uri.parse("tel:" + Uri.encode(str)));
if (!(context instanceof Activity)) {
intent.setFlags(268435456);
}
com.bytedance.sdk.component.utils.b.a(context, intent, null);
return true;
} catch (Exception unused) {
}
}
return false;
}
public static String d() {
return q.a();
}
public static boolean d(int i) {
return i == 5;
}
public static synchronized String e() {
String str;
Context a2;
synchronized (aa.class) {
if (TextUtils.isEmpty(e) && (a2 = com.bytedance.sdk.openadsdk.core.n.a()) != null) {
e = a2.getPackageName();
}
str = e;
}
return str;
}
public static boolean e(int i) {
return i == 6;
}
public static int f(int i) {
if (i != 1) {
if (i != 4) {
if (i != 5) {
if (i != 6) {
return i;
}
return 5;
}
return 4;
}
return 1;
}
return 0;
}
public static synchronized String f() {
String str;
synchronized (aa.class) {
if (TextUtils.isEmpty(f) && com.bytedance.sdk.openadsdk.core.n.a() != null) {
PackageInfo packageInfo = com.bytedance.sdk.openadsdk.core.n.a().getPackageManager().getPackageInfo(e(), 0);
f = String.valueOf(packageInfo.versionCode);
g = packageInfo.versionName;
}
str = f;
}
return str;
}
public static synchronized String g() {
String str;
synchronized (aa.class) {
if (TextUtils.isEmpty(g) && com.bytedance.sdk.openadsdk.core.n.a() != null) {
PackageInfo packageInfo = com.bytedance.sdk.openadsdk.core.n.a().getPackageManager().getPackageInfo(e(), 0);
f = String.valueOf(packageInfo.versionCode);
g = packageInfo.versionName;
}
str = g;
}
return str;
}
public static String h() {
try {
ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
((ActivityManager) com.bytedance.sdk.openadsdk.core.n.a().getSystemService("activity")).getMemoryInfo(memoryInfo);
long j = memoryInfo.totalMem;
if (j > 0) {
return String.valueOf(j / 1024);
}
return null;
} catch (Throwable unused) {
return null;
}
}
public static String i() {
return c("MemTotal");
}
public static long j() {
long blockSize;
long blockCount;
try {
StatFs statFs = new StatFs(Environment.getDataDirectory().getPath());
if (Build.VERSION.SDK_INT >= 18) {
blockSize = statFs.getBlockSizeLong();
blockCount = statFs.getBlockCountLong();
} else {
blockSize = statFs.getBlockSize();
blockCount = statFs.getBlockCount();
}
return blockCount * blockSize;
} catch (Throwable unused) {
return 0L;
}
}
public static boolean l() {
try {
if (!new File("/system/bin/su").exists()) {
if (!new File("/system/xbin/su").exists()) {
return false;
}
}
return true;
} catch (Throwable unused) {
return false;
}
}
public static String m() {
return String.format("https://%s", "log.byteoversea.com/service/2/app_log_test/");
}
public static String n() {
int p = p();
return (p == 1 || p == 2) ? "https://sf16-static.i18n-pglstatp.com/obj/ad-pattern-sg/renderer/package_sg.json" : "https://sf16-static.i18n-pglstatp.com/obj/ad-pattern-va/renderer/package_va.json";
}
public static String o() {
try {
return TimeZone.getDefault().getID();
} catch (Exception e2) {
com.bytedance.sdk.component.utils.l.e("ToolUtils", e2.toString());
return "";
}
}
public static int p() {
try {
String id = TimeZone.getDefault().getID();
if (h.contains(id)) {
return 2;
}
if (id == null || !id.startsWith("Asia/")) {
if (id == null || !id.startsWith("Europe/")) {
if (id != null) {
if (id.startsWith("America/")) {
return 5;
}
}
return 3;
}
return 4;
}
return 2;
} catch (Throwable th) {
com.bytedance.sdk.component.utils.l.e("ToolUtils", th.toString());
return 0;
}
}
public static int q() {
int rawOffset = TimeZone.getDefault().getRawOffset() / 3600000;
if (rawOffset < -12) {
rawOffset = -12;
}
if (rawOffset > 12) {
return 12;
}
return rawOffset;
}
public static String r() {
int i = -q();
if (i >= 0) {
return "Etc/GMT+" + i;
}
return "Etc/GMT" + i;
}
public static String t() {
return v();
}
private static String v() {
try {
WebView webView = new WebView(com.bytedance.sdk.openadsdk.core.n.a());
webView.setWebViewClient(new SSWebView.a());
String userAgentString = webView.getSettings().getUserAgentString();
if (userAgentString != null && !"unKnow".equals(userAgentString)) {
if (com.bytedance.sdk.openadsdk.multipro.b.c()) {
com.bytedance.sdk.openadsdk.multipro.d.a.a("sp_multi_ua_data", "webview_ua", userAgentString);
} else {
com.bytedance.sdk.openadsdk.core.c.a(com.bytedance.sdk.openadsdk.core.n.a()).a("webview_ua", userAgentString);
}
}
return userAgentString;
} catch (Throwable th) {
com.bytedance.sdk.component.utils.l.e("getUA", "e:" + th.getMessage());
return "unKnow";
}
}
private static boolean w() {
try {
return "mounted".equals(Environment.getExternalStorageState());
} catch (Throwable unused) {
return false;
}
}
public static Intent a(Context context, String str) {
Intent launchIntentForPackage = context.getPackageManager().getLaunchIntentForPackage(str);
if (launchIntentForPackage == null) {
return null;
}
if (!launchIntentForPackage.hasCategory("android.intent.category.LAUNCHER")) {
launchIntentForPackage.addCategory("android.intent.category.LAUNCHER");
}
launchIntentForPackage.setPackage(null);
launchIntentForPackage.addFlags(TDConstants.TD_ACTION_USER_PROPERTY_SET);
launchIntentForPackage.addFlags(268435456);
return launchIntentForPackage;
}
public static long d(Context context) {
return com.bytedance.sdk.openadsdk.core.c.a(context).b("free_internal_storage", 0L).longValue();
}
public static boolean i(Context context) {
if (context != null) {
boolean z = context.getApplicationInfo().targetSdkVersion >= 30 && Build.VERSION.SDK_INT >= 30;
StringBuilder sb = new StringBuilder();
sb.append("can query all package = ");
sb.append(!z);
com.bytedance.sdk.component.utils.l.c("ToolUtils", sb.toString());
return !z;
}
throw new IllegalArgumentException("params context is null");
}
public static long k() {
try {
if (w()) {
StatFs statFs = new StatFs(Environment.getExternalStorageDirectory().getPath());
return statFs.getBlockCount() * statFs.getBlockSize();
}
return 0L;
} catch (Throwable th) {
th.printStackTrace();
return 0L;
}
}
private static String l(String str) {
try {
return Uri.parse(str).buildUpon().appendQueryParameter("aid", "1371").appendQueryParameter("device_platform", "android").appendQueryParameter("version_code", f()).toString();
} catch (Exception e2) {
e2.printStackTrace();
return str;
}
}
public static int m(Context context) {
return f(com.bytedance.sdk.component.utils.w.a(context, 0L));
}
public static String d(String str) {
return a(str, false);
}
public static String b() {
String b2;
String str = "unKnow";
try {
if (com.bytedance.sdk.openadsdk.multipro.b.c()) {
b2 = com.bytedance.sdk.openadsdk.multipro.d.a.b("sp_multi_ua_data", "android_system_ua", "unKnow");
} else {
b2 = com.bytedance.sdk.openadsdk.core.c.a(com.bytedance.sdk.openadsdk.core.n.a()).b("android_system_ua", "unKnow");
}
} catch (Exception unused) {
}
if (b2 == null || "unKnow".equals(b2)) {
FutureTask futureTask = new FutureTask(new a(2));
a.execute(futureTask);
str = (String) futureTask.get(500L, TimeUnit.MILLISECONDS);
com.bytedance.sdk.component.utils.l.e("getUA", " getAndroidSystemUA userAgent" + str);
return str;
}
return b2;
}
public static long e(Context context) {
return com.bytedance.sdk.openadsdk.core.c.a(context).b("total_sdcard_storage", 0L).longValue();
}
public static String c() {
if (!TextUtils.isEmpty(c)) {
return c;
}
c = com.bytedance.sdk.openadsdk.core.h.a("sdk_local_web_ua", (long) com.anythink.expressad.foundation.g.a.bV);
if (TextUtils.isEmpty(c)) {
ReentrantLock reentrantLock = f1442d;
if (reentrantLock.tryLock()) {
try {
try {
if (Build.VERSION.SDK_INT < 17) {
y.a(new Runnable() {
@Override
public void run() {
try {
if (TextUtils.isEmpty(aa.c)) {
SSWebView sSWebView = new SSWebView(com.bytedance.sdk.openadsdk.core.n.a());
sSWebView.setWebViewClient(new SSWebView.a());
String unused = aa.c = sSWebView.getUserAgentString();
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
});
} else if (TextUtils.isEmpty(c)) {
c = WebSettings.getDefaultUserAgent(com.bytedance.sdk.openadsdk.core.n.a());
}
com.bytedance.sdk.openadsdk.core.h.a("sdk_local_web_ua", c);
} catch (Exception e2) {
com.bytedance.sdk.component.utils.l.c("ToolUtils", "", e2);
reentrantLock = f1442d;
}
reentrantLock.unlock();
} catch (Throwable th) {
f1442d.unlock();
throw th;
}
}
}
return c;
}
public static String e(String str) {
if (TextUtils.isEmpty(str)) {
str = com.bytedance.sdk.openadsdk.core.n.d().A();
}
if (TextUtils.isEmpty(str)) {
return p() == 2 ? "https://log.sgsnssdk.com/service/2/app_log/" : "https://log-mva.isnssdk.com/service/2/app_log/";
} else if (str.startsWith("http")) {
return str;
} else {
return "https://" + str;
}
}
public static String h(Context context) {
Locale locale;
try {
if (Build.VERSION.SDK_INT >= 24) {
locale = context.getResources().getConfiguration().getLocales().get(0);
} else {
locale = Locale.getDefault();
}
return locale.getLanguage();
} catch (Exception e2) {
com.bytedance.sdk.component.utils.l.e("ToolUtils", e2.toString());
return "";
}
}
public static void i(String str) {
if (com.bytedance.sdk.openadsdk.core.l.e()) {
return;
}
com.bytedance.sdk.component.utils.l.d("You must use method '" + str + "' after initialization, please check.");
}
public static boolean a(Context context, Intent intent) {
if (intent == null) {
return false;
}
try {
List<ResolveInfo> queryIntentActivities = context.getPackageManager().queryIntentActivities(intent, 65536);
if (queryIntentActivities != null) {
return queryIntentActivities.size() > 0;
}
return false;
} catch (Throwable unused) {
return false;
}
}
public static boolean j(Context context) {
if (context == null) {
return false;
}
try {
return (context.getApplicationInfo().flags & 2) != 0;
} catch (Exception unused) {
return false;
}
}
public static long k(Context context) {
int i = -1;
try {
i = context.getApplicationInfo().targetSdkVersion;
com.bytedance.sdk.component.utils.l.b("ToolUtils", "targetSdkVersion = ", Integer.valueOf(i));
} catch (Throwable th) {
th.printStackTrace();
}
return i;
}
public static long l(Context context) {
int i = -1;
try {
if (Build.VERSION.SDK_INT >= 24) {
i = context.getApplicationInfo().minSdkVersion;
com.bytedance.sdk.component.utils.l.b("ToolUtils", "minSdkVersion = ", Integer.valueOf(i));
}
} catch (Throwable th) {
th.printStackTrace();
}
return i;
}
public static int f(Context context) {
return com.bytedance.sdk.openadsdk.core.c.a(context).b("is_root", -1);
}
public static String g(Context context) {
Locale locale;
try {
if (Build.VERSION.SDK_INT >= 24) {
locale = context.getResources().getConfiguration().getLocales().get(0);
} else {
locale = Locale.getDefault();
}
String language = locale.getLanguage();
String country = locale.getCountry();
return language + "_" + country;
} catch (Exception e2) {
com.bytedance.sdk.component.utils.l.e("ToolUtils", e2.toString());
return "";
}
}
public static void j(String str) {
if (Looper.myLooper() != Looper.getMainLooper()) {
return;
}
com.bytedance.sdk.component.utils.l.d("You should use method '" + str + "' on the asynchronous thread,it may cause anr, please check.");
}
public static boolean a() {
return (com.bytedance.sdk.openadsdk.core.h.c() == null || com.bytedance.sdk.openadsdk.core.h.c().a()) ? false : true;
}
public static boolean f(String str) {
try {
return Pattern.compile("[一-龥]").matcher(str).find();
} catch (Throwable unused) {
return false;
}
}
public static String a(com.bytedance.sdk.openadsdk.core.model.o oVar) {
if (oVar == null) {
return null;
}
try {
return b(oVar.aT());
} catch (Throwable unused) {
return null;
}
}
public static void h(final String str) {
com.bytedance.sdk.openadsdk.i.b.a().b(new com.bytedance.sdk.openadsdk.i.a() {
@Override
public com.bytedance.sdk.openadsdk.i.a.a a() {
if (aa.b || !com.bytedance.sdk.openadsdk.core.n.d().Q()) {
return null;
}
boolean unused = aa.b = true;
JSONObject jSONObject = new JSONObject();
jSONObject.put("error", str);
return com.bytedance.sdk.openadsdk.i.a.b.b().a("reportMultiLog").b(jSONObject.toString());
}
});
}
public static long b(String str) {
try {
return Long.parseLong(str);
} catch (Throwable unused) {
return 0L;
}
}
public static int a(String str) {
str.hashCode();
char c2 = 65535;
switch (str.hashCode()) {
case -1695837674:
if (str.equals("banner_ad")) {
c2 = 0;
break;
}
break;
case -1364000502:
if (str.equals("rewarded_video")) {
c2 = 1;
break;
}
break;
case -1263194568:
if (str.equals("open_ad")) {
c2 = 2;
break;
}
break;
case -764631662:
if (str.equals("fullscreen_interstitial_ad")) {
c2 = 3;
break;
}
break;
case 564365438:
if (str.equals("cache_splash_ad")) {
c2 = 4;
break;
}
break;
case 1844104722:
if (str.equals("interaction")) {
c2 = 5;
break;
}
break;
case 1912999166:
if (str.equals("draw_ad")) {
c2 = 6;
break;
}
break;
}
switch (c2) {
case 0:
return 2;
case 1:
return 7;
case 2:
case 4:
return 4;
case 3:
return 5;
case 5:
return 3;
case 6:
return 6;
default:
return 1;
}
}
public static String b(Context context) {
return com.bytedance.sdk.openadsdk.core.c.a(context).b("total_memory", "0");
}
public static String a(Context context) {
String b2 = com.bytedance.sdk.openadsdk.core.c.a(context).b("total_memory", (String) null);
if (b2 == null || b(b2) <= 0) {
b2 = c("MemTotal");
if (b(b2) <= 0) {
b2 = h();
}
com.bytedance.sdk.openadsdk.core.c.a(context).a("total_memory", b2);
}
return b2;
}
public static boolean b(com.bytedance.sdk.openadsdk.core.model.o oVar) {
if (oVar == null) {
return true;
}
int a2 = com.bytedance.sdk.openadsdk.core.n.d().a(oVar.aY());
int c2 = com.bytedance.sdk.component.utils.o.c(com.bytedance.sdk.openadsdk.core.n.a());
if (a2 != 1) {
if (a2 == 2) {
return d(c2) || c(c2) || e(c2);
} else if (a2 != 3) {
return a2 != 5 || c(c2) || e(c2);
} else {
return false;
}
}
return c(c2);
}
public static String g(String str) {
if (TextUtils.isEmpty(str)) {
return "";
}
if (str.contains("KLLK")) {
return str.replace("KLLK", "OPPO");
}
return str.contains("kllk") ? str.replace("kllk", "oppo") : "";
}
public static String c(String str) {
FileReader fileReader;
BufferedReader bufferedReader;
String readLine;
try {
fileReader = new FileReader("/proc/meminfo");
try {
bufferedReader = new BufferedReader(fileReader, 4096);
do {
try {
readLine = bufferedReader.readLine();
if (readLine == null) {
break;
}
} catch (Throwable th) {
th = th;
try {
th.printStackTrace();
if (fileReader != null) {
try {
fileReader.close();
} catch (Exception unused) {
}
}
return null;
} finally {
if (bufferedReader != null) {
try {
bufferedReader.close();
} catch (Exception unused2) {
}
}
if (fileReader != null) {
try {
fileReader.close();
} catch (Exception unused3) {
}
}
}
}
} while (!readLine.contains(str));
if (readLine == null) {
try {
bufferedReader.close();
} catch (Exception unused4) {
}
try {
fileReader.close();
} catch (Exception unused5) {
}
return null;
}
String[] split = readLine.split("\\s+");
com.bytedance.sdk.component.utils.l.b("ToolUtils", "getTotalMemory = " + split[1]);
String str2 = split[1];
try {
bufferedReader.close();
} catch (Exception unused6) {
}
try {
fileReader.close();
} catch (Exception unused7) {
}
return str2;
} catch (Throwable th2) {
th = th2;
bufferedReader = null;
}
} catch (Throwable th3) {
th = th3;
fileReader = null;
bufferedReader = null;
}
}
public static String a(String str, boolean z) {
String str2;
String z2 = com.bytedance.sdk.openadsdk.core.n.d().z();
if (TextUtils.isEmpty(z2)) {
int p = p();
if (p == 1) {
str2 = "https://pangolin16.sgsnssdk.com" + str;
} else if (p == 2) {
str2 = "https://pangolin16.sgsnssdk.com" + str;
} else {
str2 = "https://pangolin16.isnssdk.com" + str;
}
if (!z) {
return x.a(str2);
}
return l(str2);
}
String str3 = "https://" + z2 + str;
if (x.a() && !z) {
str3 = x.a(str3);
}
return z ? l(str3) : str3;
}
public static Map<String, Object> a(boolean z, com.bytedance.sdk.openadsdk.core.model.o oVar, long j, long j2, String str) {
HashMap hashMap = new HashMap();
hashMap.put("creative_id", oVar.Y());
hashMap.put("load_time", Long.valueOf(j));
com.bykv.vk.openvk.component.video.api.c.b K = oVar.K();
if (K != null) {
hashMap.put("video_size", Long.valueOf(K.e()));
hashMap.put("video_resolution", K.g());
}
if (!z) {
hashMap.put("error_code", Long.valueOf(j2));
if (TextUtils.isEmpty(str)) {
str = "unknown";
}
hashMap.put("error_message", str);
}
return hashMap;
}
public static long c(Context context) {
return com.bytedance.sdk.openadsdk.core.c.a(context).b("total_internal_storage", 0L).longValue();
}
public static Map<String, Object> a(com.bytedance.sdk.openadsdk.core.model.o oVar, long j, com.bykv.vk.openvk.component.video.api.a aVar) {
if (oVar == null) {
return new HashMap();
}
HashMap hashMap = new HashMap();
hashMap.put("creative_id", oVar.Y());
hashMap.put("buffers_time", Long.valueOf(j));
com.bykv.vk.openvk.component.video.api.c.b K = oVar.K();
if (K != null) {
hashMap.put("video_size", Long.valueOf(K.e()));
hashMap.put("video_resolution", K.g());
}
a(hashMap, aVar);
return hashMap;
}
private static void a(Map<String, Object> map, com.bykv.vk.openvk.component.video.api.a aVar) {
if (map.containsKey("video_resolution") || aVar == null) {
return;
}
try {
map.put("video_resolution", String.format(Locale.getDefault(), "%d×%d", Integer.valueOf(aVar.e()), Integer.valueOf(aVar.f())));
} catch (Throwable unused) {
}
}
public static void a(com.bytedance.sdk.openadsdk.core.model.o oVar, String str) {
if (oVar != null) {
try {
String P = oVar.P();
if (TextUtils.isEmpty(P) && oVar.ab() != null && oVar.ab().c() == 1 && !TextUtils.isEmpty(oVar.ab().b())) {
P = oVar.ab().b();
}
String str2 = P;
if (TextUtils.isEmpty(str2)) {
return;
}
com.bytedance.sdk.openadsdk.core.x.a(com.bytedance.sdk.openadsdk.core.n.a(), str2, oVar, a(str), str, false);
} catch (Throwable unused) {
}
}
}
public static boolean a(long j, long j2) {
long j3 = j2 - j;
return j3 < com.anythink.expressad.foundation.g.a.bV && j3 > -86400000 && a(j) == a(j2);
}
public static long a(long j) {
return (j + TimeZone.getDefault().getOffset(j)) / com.anythink.expressad.foundation.g.a.bV;
}
public static void a(String str, String str2, Context context) {
int i;
if (TextUtils.isEmpty(str2) || !j(context)) {
return;
}
int i2 = 3572;
int length = str2.length();
int i3 = 0;
int i4 = 1;
if (length % 3572 == 0) {
i = length / 3572;
} else {
i = (length / 3572) + 1;
}
while (i4 <= i) {
if (i2 < length) {
String str3 = i + "-" + i4 + ":" + str2.substring(i3, i2);
i4++;
i3 = i2;
i2 += 3572;
} else {
String str4 = i + "-" + i4 + ":" + str2.substring(i3);
return;
}
}
}
}