红果免费短剧 v6.2.3.32版本的 MD5 值为:a6b05492607eab2c8a25f26d2f238ae0
以下内容为反编译后的 ch.java 源代码,内容仅作参考
package com.dragon.read.util;
import android.app.Application;
import android.content.Context;
import android.net.Uri;
import android.text.TextUtils;
import com.dragon.read.NsCommonDepend;
import com.dragon.read.app.App;
import com.dragon.read.app.SingleAppContext;
import com.dragon.read.base.util.LogWrapper;
import java.util.Iterator;
import java.util.LinkedList;
import org.json.JSONException;
import org.json.JSONObject;
public class ch {
public static Application f93865a = null;
private static long f93866b = 0;
private static int f93867c = 0;
private static boolean d = true;
private static long e;
private static long f;
private static StringBuilder a() {
return new StringBuilder("https://ib.snssdk.com/api/event/report/");
}
public static void a(Application application) {
f93865a = application;
f93866b = System.currentTimeMillis();
}
public static void b(Context context) {
try {
new JSONObject().put("popup_type", "privacy_325_reminder");
} catch (JSONException e2) {
e2.printStackTrace();
}
}
public static void d(Context context) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("popup_type", "privacy_325_reminder");
jSONObject.put("clicked_content", "agree");
} catch (JSONException e2) {
e2.printStackTrace();
}
}
public static void f(Context context) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("popup_type", "privacy_325_reminder");
jSONObject.put("clicked_content", "disagree");
} catch (JSONException e2) {
e2.printStackTrace();
}
}
public static void g(Context context) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("popup_type", "privacy_325_reminder");
jSONObject.put("clicked_content", "basic_functions_only");
} catch (JSONException e2) {
e2.printStackTrace();
}
}
private static int k(Context context) {
int b2 = com.ss.android.c.b.a(context).b("private_show_count", 0) + 1;
com.ss.android.c.b.a(context).a("private_show_count", b2);
return b2;
}
public static void c(Context context) {
JSONObject jSONObject = new JSONObject();
f = System.currentTimeMillis();
try {
jSONObject.put("popup_type", "privacy_325");
jSONObject.put("clicked_content", "agree");
jSONObject.put("launch_to_private_done", f - f93866b);
jSONObject.put("private_show_to_done", f - e);
} catch (JSONException e2) {
e2.printStackTrace();
}
}
public static void e(Context context) {
JSONObject jSONObject = new JSONObject();
long currentTimeMillis = System.currentTimeMillis();
try {
jSONObject.put("popup_type", "privacy_325");
jSONObject.put("clicked_content", "disagree");
jSONObject.put("launch_to_private_done", currentTimeMillis - f93866b);
jSONObject.put("private_show_to_done", currentTimeMillis - e);
} catch (JSONException e2) {
e2.printStackTrace();
}
}
public static void h(Context context) {
JSONObject jSONObject = new JSONObject();
long currentTimeMillis = System.currentTimeMillis();
try {
jSONObject.put("popup_type", "privacy_325");
jSONObject.put("clicked_content", "user_agreement");
jSONObject.put("launch_to_click_user_agree", currentTimeMillis - f93866b);
jSONObject.put("privacy_show_to_private_user_agree", currentTimeMillis - e);
} catch (JSONException e2) {
e2.printStackTrace();
}
}
public static void i(Context context) {
JSONObject jSONObject = new JSONObject();
long currentTimeMillis = System.currentTimeMillis();
try {
jSONObject.put("popup_type", "privacy_325");
jSONObject.put("clicked_content", "basic_functional_data_processing_rules");
jSONObject.put("launch_to_click_user_agree", currentTimeMillis - f93866b);
jSONObject.put("privacy_show_to_private_user_agree", currentTimeMillis - e);
} catch (JSONException e2) {
e2.printStackTrace();
}
}
public static void j(Context context) {
JSONObject jSONObject = new JSONObject();
long currentTimeMillis = System.currentTimeMillis();
try {
jSONObject.put("popup_type", "privacy_325");
jSONObject.put("clicked_content", "privacy_policy");
jSONObject.put("launch_to_click_privacy_agree", currentTimeMillis - f93866b);
jSONObject.put("privacy_show_to_private_privacy_agree", currentTimeMillis - e);
} catch (JSONException e2) {
e2.printStackTrace();
}
}
private static synchronized String l(Context context) {
String string;
synchronized (ch.class) {
try {
string = context.getSharedPreferences("snssdk_openudid", 0).getString("clientudid", "");
} catch (Exception e2) {
LogWrapper.warn("RealTimeReportUtil", "exception when making client_udid: " + e2, new Object[0]);
return "";
}
}
return string;
}
private static String m(Context context) {
String channel;
String preInstallChannel;
try {
channel = SingleAppContext.inst(App.context()).getChannel();
preInstallChannel = NsCommonDepend.IMPL.preinstall().getPreInstallChannel();
} catch (Throwable unused) {
}
if (!TextUtils.isEmpty(channel)) {
return channel;
}
if (TextUtils.isEmpty(preInstallChannel)) {
return "";
}
return preInstallChannel;
}
private static JSONObject a(JSONObject jSONObject) {
if (jSONObject == null) {
return null;
}
LinkedList linkedList = new LinkedList();
Iterator<String> keys = jSONObject.keys();
if (keys == null) {
return null;
}
while (keys.hasNext()) {
linkedList.add(keys.next());
}
try {
return new JSONObject(jSONObject, (String[]) linkedList.toArray(new String[0]));
} catch (Exception e2) {
e2.printStackTrace();
return jSONObject;
}
}
public static void a(Context context) {
e = System.currentTimeMillis();
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("popup_type", "privacy_325");
jSONObject.put("launch_to_private_show", e - f93866b);
if (d) {
f93867c = k(context);
d = false;
} else {
f93867c++;
}
int i = f93867c;
if (i > 3) {
jSONObject.put("private_show_count", i);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
private static String a(String str, String str2, String str3) {
try {
if (TextUtils.isEmpty(str2)) {
return str;
}
return Uri.parse(str).buildUpon().appendQueryParameter(str2, str3).build().toString();
} catch (Throwable th) {
th.printStackTrace();
return str;
}
}
private static void a(StringBuilder sb, String str, String str2, boolean z) {
if (sb != null && !TextUtils.isEmpty(str) && !TextUtils.isEmpty(str2)) {
if (sb.toString().indexOf(63) < 0) {
sb.append("?");
} else {
sb.append("&");
}
sb.append(str);
sb.append("=");
if (z) {
str2 = Uri.encode(str2);
}
sb.append(str2);
}
}
}