思特奇智慧酒店云平台 v0.0.5版本的 MD5 值为:dedb172bb322639d79d7e0e26262fb5c
以下内容为反编译后的 Log.java 源代码,内容仅作参考
package com.sitech.core.util;
import android.app.ActivityManager;
import android.content.ClipData;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Process;
import android.text.TextUtils;
import androidx.annotation.IntRange;
import androidx.annotation.RequiresApi;
import androidx.collection.SimpleArrayMap;
import com.baidu.ocr.sdk.utils.LogUtil;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.taobao.weex.el.parse.Operators;
import com.taobao.weex.utils.FunctionParser;
import com.umeng.analytics.pro.am;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Formatter;
import java.util.Iterator;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.linphone.mediastream.Version;
public class Log {
public static final String A = "log nothing";
public static final String B = "null";
public static final String C = "args";
public static final String D = " ";
public static final int a = 8;
public static int b = 2;
public static Context c = null;
public static f d = null;
public static final int e = 2;
public static final int f = 3;
public static final int g = 4;
public static final int h = 5;
public static final int i = 6;
public static final int j = 7;
public static final int l = 16;
public static final int m = 32;
public static final int n = 48;
public static final String q = "┌";
public static final String r = "├";
public static final String s = "│ ";
public static final String t = "└";
public static final String u = "────────────────────────────────────────────────────────";
public static final String v = "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄";
public static final String w = "┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────";
public static final String x = "├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄";
public static final String y = "└────────────────────────────────────────────────────────────────────────────────────────────────────────────────";
public static final int z = 3000;
public static final char[] k = {'V', 'D', 'I', 'W', 'E', FunctionParser.Lexer.A_UPPER};
public static final String o = System.getProperty("file.separator");
public static final String p = System.getProperty("line.separator");
public static c E = null;
public static final Gson F = new GsonBuilder().setPrettyPrinting().serializeNulls().create();
public static final ThreadLocal<SimpleDateFormat> G = new ThreadLocal<>();
public static final ExecutorService H = Executors.newSingleThreadExecutor();
public static final SimpleArrayMap<Class, d> I = new SimpleArrayMap<>();
public static final Object J = new Object();
@Retention(RetentionPolicy.SOURCE)
public @interface TYPE {
}
public class a implements Runnable {
public final File a;
public a(File file) {
this.a = file;
}
@Override
public void run() {
if (this.a.delete()) {
return;
}
String str = "delete " + this.a + " failed!";
}
}
public class b implements Runnable {
public final String a;
public final String b;
public b(String str, String str2) {
this.a = str;
this.b = str2;
}
@Override
public void run() {
BufferedWriter bufferedWriter;
if (!Log.c(this.a)) {
String str = "create " + this.a + " failed!";
return;
}
BufferedWriter bufferedWriter2 = null;
try {
try {
try {
bufferedWriter = new BufferedWriter(new FileWriter(this.a, true));
} catch (IOException e) {
e.printStackTrace();
return;
}
} catch (IOException e2) {
e = e2;
}
} catch (Throwable th) {
th = th;
}
try {
bufferedWriter.write(this.b);
bufferedWriter.close();
} catch (IOException e3) {
e = e3;
bufferedWriter2 = bufferedWriter;
e.printStackTrace();
String str2 = "log to " + this.a + " failed!";
if (bufferedWriter2 != null) {
bufferedWriter2.close();
}
} catch (Throwable th2) {
th = th2;
bufferedWriter2 = bufferedWriter;
if (bufferedWriter2 != null) {
try {
bufferedWriter2.close();
} catch (IOException e4) {
e4.printStackTrace();
}
}
throw th;
}
}
}
public static class c {
public String a;
public String b;
public String c;
public boolean d;
public boolean e;
public String f;
public boolean g;
public boolean h;
public boolean i;
public boolean j;
public boolean k;
public int l;
public int m;
public int n;
public int o;
public int p;
public String q;
public c(a aVar) {
this();
}
public static String r() {
return vl0.a(pm0.a());
}
public c d(boolean z) {
this.h = z;
return this;
}
public c e(boolean z) {
this.d = z;
return this;
}
public c f(boolean z) {
this.k = z;
return this;
}
public String g() {
return Log.h(this.f) ? "" : this.f;
}
public String h() {
return this.q;
}
public int i() {
return this.p;
}
public int j() {
return this.n;
}
public int k() {
return this.o;
}
public boolean l() {
return this.e;
}
public boolean m() {
return this.i;
}
public boolean n() {
return this.j;
}
public boolean o() {
return this.h;
}
public boolean p() {
return this.d;
}
public boolean q() {
return this.k;
}
public String toString() {
return "process: " + h() + Log.p + "switch: " + p() + Log.p + "console: " + l() + Log.p + "tag: " + g() + Log.p + "head: " + o() + Log.p + "file: " + m() + Log.p + "dir: " + c() + Log.p + "filePrefix: " + e() + Log.p + "border: " + n() + Log.p + "singleTag: " + q() + Log.p + "consoleFilter: " + a() + Log.p + "fileFilter: " + d() + Log.p + "stackDeep: " + j() + Log.p + "stackOffset: " + k() + Log.p + "saveDays: " + i() + Log.p + "formatter: " + Log.I;
}
public c() {
this.c = "util";
this.d = true;
this.e = true;
this.f = "";
this.g = true;
this.h = false;
this.i = true;
this.j = false;
this.k = true;
this.l = 2;
this.m = 2;
this.n = 1;
this.o = 0;
this.p = 3;
this.q = r();
if (this.a != null) {
return;
}
this.a = ck0.p();
}
public c a(String str) {
if (!Log.h(str)) {
if (!str.endsWith(Log.o)) {
str = str + Log.o;
}
this.b = str;
} else {
this.b = null;
}
return this;
}
public c b(boolean z) {
this.e = z;
return this;
}
public c c(String str) {
if (Log.h(str)) {
this.f = "";
this.g = true;
} else {
this.f = str;
this.g = false;
}
return this;
}
public c d(@IntRange(from = 1) int i) {
this.n = i;
return this;
}
public c e(@IntRange(from = 0) int i) {
this.o = i;
return this;
}
public String f() {
String substring = Log.f().format(new Date(System.currentTimeMillis())).substring(0, 10);
return Log.g().c() + substring + ".log";
}
public c b(String str) {
if (Log.h(str)) {
this.c = "util";
} else {
this.c = str;
}
return this;
}
public char d() {
return Log.k[this.m - 2];
}
public String e() {
return this.c;
}
public c a(File file) {
String str;
if (file == null) {
str = null;
} else {
str = file.getAbsolutePath() + Log.o;
}
this.b = str;
return this;
}
public c a(boolean z) {
this.j = z;
return this;
}
public c b(int i) {
this.m = i;
return this;
}
public c a(int i) {
this.l = i;
return this;
}
public String b() {
return this.a;
}
public c c(boolean z) {
this.i = z;
return this;
}
public final <T> c a(d<T> dVar) {
if (dVar != null) {
Log.I.put(Log.b((d) dVar), dVar);
}
return this;
}
public c c(@IntRange(from = 1) int i) {
this.p = i;
return this;
}
public char a() {
return Log.k[this.l - 2];
}
public String c() {
String str = this.b;
return str == null ? this.a : str;
}
}
public static abstract class d<T> {
public abstract String a(T t);
}
public static class e {
public static String a(Throwable th) {
return nm0.a(th);
}
public static String b(Object obj) {
if (!(obj instanceof CharSequence)) {
try {
return Log.F.toJson(obj);
} catch (Throwable unused) {
return obj.toString();
}
}
return a(obj.toString());
}
public static String c(Object obj) {
return obj.getClass().isArray() ? a(obj) : obj instanceof Throwable ? a((Throwable) obj) : obj instanceof Bundle ? a((Bundle) obj) : obj instanceof Intent ? a((Intent) obj) : obj.toString();
}
public static String a(Bundle bundle) {
Iterator<String> it = bundle.keySet().iterator();
if (!it.hasNext()) {
return "Bundle {}";
}
StringBuilder sb = new StringBuilder(128);
sb.append("Bundle { ");
while (true) {
String next = it.next();
Object obj = bundle.get(next);
sb.append(next);
sb.append('=');
if (!(obj instanceof Bundle)) {
sb.append(Log.c(obj));
} else {
sb.append(obj == bundle ? "(this Bundle)" : a((Bundle) obj));
}
if (!it.hasNext()) {
sb.append(" }");
return sb.toString();
}
sb.append(',');
sb.append(' ');
}
}
public static String b(String str) {
try {
StreamSource streamSource = new StreamSource(new StringReader(str));
StreamResult streamResult = new StreamResult(new StringWriter());
Transformer newTransformer = TransformerFactory.newInstance().newTransformer();
newTransformer.setOutputProperty("indent", "yes");
newTransformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
newTransformer.transform(streamSource, streamResult);
String obj = streamResult.getWriter().toString();
return obj.replaceFirst(Operators.G, Operators.G + Log.p);
} catch (Exception e) {
e.printStackTrace();
return str;
}
}
public static String a(Intent intent) {
boolean z;
Intent selector;
ClipData clipData;
StringBuilder sb = new StringBuilder(128);
sb.append("Intent { ");
String action = intent.getAction();
boolean z2 = true;
if (action != null) {
sb.append("act=");
sb.append(action);
z = false;
} else {
z = true;
}
Set<String> categories = intent.getCategories();
if (categories != null) {
if (!z) {
sb.append(' ');
}
sb.append("cat=[");
for (String str : categories) {
if (!z2) {
sb.append(',');
}
sb.append(str);
z2 = false;
}
sb.append(Operators.ARRAY_END_STR);
z = false;
}
Uri data = intent.getData();
if (data != null) {
if (!z) {
sb.append(' ');
}
sb.append("dat=");
sb.append(data);
z = false;
}
String type = intent.getType();
if (type != null) {
if (!z) {
sb.append(' ');
}
sb.append("typ=");
sb.append(type);
z = false;
}
int flags = intent.getFlags();
if (flags != 0) {
if (!z) {
sb.append(' ');
}
sb.append("flg=0x");
sb.append(Integer.toHexString(flags));
z = false;
}
String str2 = intent.getPackage();
if (str2 != null) {
if (!z) {
sb.append(' ');
}
sb.append("pkg=");
sb.append(str2);
z = false;
}
ComponentName component = intent.getComponent();
if (component != null) {
if (!z) {
sb.append(' ');
}
sb.append("cmp=");
sb.append(component.flattenToShortString());
z = false;
}
Rect sourceBounds = intent.getSourceBounds();
if (sourceBounds != null) {
if (!z) {
sb.append(' ');
}
sb.append("bnds=");
sb.append(sourceBounds.toShortString());
z = false;
}
if (Build.VERSION.SDK_INT >= 16 && (clipData = intent.getClipData()) != null) {
if (!z) {
sb.append(' ');
}
a(clipData, sb);
z = false;
}
Bundle extras = intent.getExtras();
if (extras != null) {
if (!z) {
sb.append(' ');
}
sb.append("extras={");
sb.append(a(extras));
sb.append('}');
z = false;
}
if (Build.VERSION.SDK_INT >= 15 && (selector = intent.getSelector()) != null) {
if (!z) {
sb.append(' ');
}
sb.append("sel={");
sb.append(selector == intent ? "(this Intent)" : a(selector));
sb.append(Operators.BLOCK_END_STR);
}
sb.append(" }");
return sb.toString();
}
public static String a(String str) {
try {
int length = str.length();
for (int i = 0; i < length; i++) {
char charAt = str.charAt(i);
if (charAt == '{') {
return new JSONObject(str).toString(2);
}
if (charAt == '[') {
return new JSONArray(str).toString(2);
}
if (!Character.isWhitespace(charAt)) {
return str;
}
}
} catch (JSONException e) {
e.printStackTrace();
}
return str;
}
@RequiresApi(api = 16)
public static void a(ClipData clipData, StringBuilder sb) {
ClipData.Item itemAt = clipData.getItemAt(0);
if (itemAt == null) {
sb.append("ClipData.Item {}");
return;
}
sb.append("ClipData.Item { ");
String htmlText = itemAt.getHtmlText();
if (htmlText != null) {
sb.append("H:");
sb.append(htmlText);
sb.append(Operators.BLOCK_END_STR);
return;
}
CharSequence text = itemAt.getText();
if (text != null) {
sb.append("T:");
sb.append(text);
sb.append(Operators.BLOCK_END_STR);
return;
}
Uri uri = itemAt.getUri();
if (uri != null) {
sb.append("U:");
sb.append(uri);
sb.append(Operators.BLOCK_END_STR);
return;
}
Intent intent = itemAt.getIntent();
if (intent != null) {
sb.append("I:");
sb.append(a(intent));
sb.append(Operators.BLOCK_END_STR);
return;
}
sb.append("NULL");
sb.append(Operators.BLOCK_END_STR);
}
public static String a(Object obj) {
if (obj instanceof Object[]) {
return Arrays.deepToString((Object[]) obj);
}
if (obj instanceof boolean[]) {
return Arrays.toString((boolean[]) obj);
}
if (obj instanceof byte[]) {
return Arrays.toString((byte[]) obj);
}
if (obj instanceof char[]) {
return Arrays.toString((char[]) obj);
}
if (obj instanceof double[]) {
return Arrays.toString((double[]) obj);
}
if (obj instanceof float[]) {
return Arrays.toString((float[]) obj);
}
if (obj instanceof int[]) {
return Arrays.toString((int[]) obj);
}
if (obj instanceof long[]) {
return Arrays.toString((long[]) obj);
}
if (obj instanceof short[]) {
return Arrays.toString((short[]) obj);
}
throw new IllegalArgumentException("Array has incompatible type: " + obj.getClass());
}
}
public interface f {
void a(Throwable th);
void b(Throwable th);
}
public static class g {
public String a;
public String[] b;
public String c;
public g(String str, String[] strArr, String str2) {
this.a = str;
this.b = strArr;
this.c = str2;
}
}
public Log() {
throw new UnsupportedOperationException("u can't instantiate me...");
}
public static SimpleDateFormat f() {
return i();
}
public static void g(String str) {
if (b <= 4) {
a(4, bk0.V5, str);
}
}
public static String h() {
return ((ActivityManager) c.getSystemService("activity")).getDeviceConfigurationInfo().getGlEsVersion();
}
public static SimpleDateFormat i() {
SimpleDateFormat simpleDateFormat = G.get();
if (simpleDateFormat == null) {
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.getDefault());
G.set(simpleDateFormat2);
return simpleDateFormat2;
}
return simpleDateFormat;
}
public static g j(String str) {
String str2;
String str3;
String name;
if (!g().g && !g().o()) {
str3 = g().g();
} else {
StackTraceElement[] stackTrace = new Throwable().getStackTrace();
int k2 = g().k() + 3;
if (k2 >= stackTrace.length) {
String a2 = a(stackTrace[stackTrace.length - 1]);
if (g().g && h(str)) {
int indexOf = a2.indexOf(46);
if (indexOf != -1) {
a2 = a2.substring(0, indexOf);
}
} else {
a2 = str;
}
return new g(a2, null, ": ");
}
StackTraceElement stackTraceElement = stackTrace[k2];
String a3 = a(stackTraceElement);
if (g().g && h(str)) {
int indexOf2 = a3.indexOf(46);
str2 = indexOf2 == -1 ? a3 : a3.substring(0, indexOf2);
} else {
str2 = str;
}
if (g().o()) {
String formatter = new Formatter().format("%s, %s.%s(%s:%d)", Thread.currentThread().getName(), stackTraceElement.getClassName(), stackTraceElement.getMethodName(), a3, Integer.valueOf(stackTraceElement.getLineNumber())).toString();
String str4 = LogUtil.TAG_LEFT_BRICK + formatter + LogUtil.TAG_RIGHT_BRICK;
if (g().j() <= 1) {
return new g(str2, new String[]{formatter}, str4);
}
String[] strArr = new String[Math.min(g().j(), stackTrace.length - k2)];
strArr[0] = formatter;
String formatter2 = new Formatter().format("%" + (name.length() + 2) + am.aB, "").toString();
int length = strArr.length;
for (int i2 = 1; i2 < length; i2++) {
StackTraceElement stackTraceElement2 = stackTrace[i2 + k2];
strArr[i2] = new Formatter().format("%s%s.%s(%s:%d)", formatter2, stackTraceElement2.getClassName(), stackTraceElement2.getMethodName(), a(stackTraceElement2), Integer.valueOf(stackTraceElement2.getLineNumber())).toString();
}
return new g(str2, strArr, str4);
}
str3 = str2;
}
return new g(str3, null, ": ");
}
public static String k() {
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
if (stackTrace.length > 4) {
return Operators.ARRAY_START_STR + stackTrace[4].getFileName() + " " + stackTrace[4].getMethodName() + ":" + stackTrace[4].getLineNumber() + Operators.ARRAY_END_STR;
}
return "PREFIX";
}
public static void l(String str) {
if (b <= 5) {
a(5, bk0.V5, str);
}
}
public static void m(String str) {
a(51, g().g(), str);
}
public static void c(String str, Throwable th) {
if (b <= 6) {
a(6, str, th.getMessage(), th);
}
}
public static void d(String str) {
if (b <= 3) {
String str2 = bk0.V5;
a(3, str2, k() + str);
}
}
public static void e(String str, String str2) {
if (b <= 2) {
a(2, str, str2);
}
}
public static void f(String str) {
if (b <= 6) {
a(6, bk0.V5, str);
}
}
public static void b(String str, Throwable th) {
if (b <= 6) {
a(6, bk0.V5, str, th);
f fVar = d;
if (fVar != null) {
fVar.a(th);
}
}
}
public static c g() {
if (E == null) {
synchronized (J) {
if (E == null) {
E = new c(null);
}
}
}
return E;
}
public static void c(String str, String str2) {
if (b <= 4) {
a(4, str, str2);
}
}
public static void d(Object... objArr) {
a(4, g().g(), objArr);
}
public static void e(Object... objArr) {
a(2, g().g(), objArr);
}
public static void f(String str, String str2) {
if (b <= 5) {
a(5, str, str2);
}
}
public static boolean h(String str) {
if (str == null) {
return true;
}
int length = str.length();
for (int i2 = 0; i2 < length; i2++) {
if (!Character.isWhitespace(str.charAt(i2))) {
return false;
}
}
return true;
}
public static void i(String str) {
String substring = str.substring(str.length() - 14, str.length() - 4);
StringBuilder sb = new StringBuilder("************* Log Head ****************");
sb.append("\nDate of Log : " + substring + "\nDevice Manufacturer: " + Build.MANUFACTURER + "\nDevice Model : " + Build.MODEL + "\nAndroid Version : " + Build.VERSION.RELEASE + "\nAndroid SDK : " + Build.VERSION.SDK_INT + "\nApp VersionName : " + bk0.H3 + bk0.J3 + "\nApp VersionCode : " + bk0.I3 + "\nGlEsVersion : " + h() + "\nSupported ABIs : " + j());
sb.append("\n************* Log Head ****************\n\n");
d(sb.toString(), str);
}
public static void k(String str) {
if (b <= 2) {
a(2, bk0.V5, str);
}
}
public static void a(Context context, f fVar) {
c = context;
d = fVar;
}
public static void d(String str, Object... objArr) {
a(4, str, objArr);
}
public static void e(String str, Object... objArr) {
a(2, str, objArr);
}
public static void b(String str, String str2) {
if (b <= 6) {
a(6, str, str2);
}
}
public static void c(Object... objArr) {
a(6, g().g(), objArr);
}
public static void d(int i2, String str, String str2) {
String[] split;
if (!g().n()) {
android.util.Log.println(i2, str, str2);
return;
}
for (String str3 : str2.split(p)) {
android.util.Log.println(i2, str, "│ " + str3);
}
}
public static void e(Object obj) {
a(35, g().g(), obj);
}
public static void f(Object... objArr) {
a(5, g().g(), objArr);
}
public static void a(String str, String str2, Throwable th) {
if (b <= 6) {
a(6, str, str2, th);
f fVar = d;
if (fVar != null) {
fVar.a(th);
}
}
}
public static void c(String str, Object... objArr) {
a(6, str, objArr);
}
public static void e(int i2, String str, String str2) {
a(i2 | 48, str, str2);
}
public static void f(String str, Object... objArr) {
a(5, str, objArr);
}
public static void b(Throwable th) {
if (b <= 6) {
a(6, bk0.V5, th.getMessage(), th);
}
}
public static void c(int i2, Object obj) {
a(i2 | 32, g().g(), obj);
}
public static void e(String str) {
File[] listFiles;
if (g().i() > 0 && (listFiles = new File(str).getParentFile().listFiles()) != null && listFiles.length > 0) {
long time = Calendar.getInstance().getTime().getTime() - (g().i() * 86400000);
for (File file : listFiles) {
if (file.lastModified() <= time) {
H.execute(new a(file));
}
}
}
}
public static String c(Object obj) {
d dVar;
if (obj == null) {
return "null";
}
if (!I.isEmpty() && (dVar = I.get(d(obj))) != null) {
return dVar.a(obj);
}
return e.c(obj);
}
public static void g(String str, String str2) {
a(51, str, str2);
}
public static void a(String str, Throwable th) {
if (b <= 6) {
a(6, bk0.V5, str, th);
f fVar = d;
if (fVar != null) {
fVar.b(th);
}
}
}
public static void b(Object... objArr) {
a(3, g().g(), objArr);
}
public static void b(String str, Object... objArr) {
a(3, str, objArr);
}
public static void d(String str, String str2) {
H.execute(new b(str2, str));
}
public static void b(Object obj) {
a(19, g().g(), obj);
}
public static Class d(Object obj) {
String obj2;
Class<?> cls = obj.getClass();
if (cls.isAnonymousClass() || cls.isSynthetic()) {
Type[] genericInterfaces = cls.getGenericInterfaces();
if (genericInterfaces.length == 1) {
Type type = genericInterfaces[0];
while (type instanceof ParameterizedType) {
type = ((ParameterizedType) type).getRawType();
}
obj2 = type.toString();
} else {
Type genericSuperclass = cls.getGenericSuperclass();
while (genericSuperclass instanceof ParameterizedType) {
genericSuperclass = ((ParameterizedType) genericSuperclass).getRawType();
}
obj2 = genericSuperclass.toString();
}
if (obj2.startsWith("class ")) {
obj2 = obj2.substring(6);
} else if (obj2.startsWith("interface ")) {
obj2 = obj2.substring(10);
}
try {
return Class.forName(obj2);
} catch (ClassNotFoundException e2) {
e2.printStackTrace();
}
}
return cls;
}
public static void a(Throwable th) {
if (b <= 6) {
a(6, bk0.V5, th.getMessage(), th);
f fVar = d;
if (fVar != null) {
fVar.a(th);
}
}
}
public static void b(String str, Object obj) {
a(35, str, obj);
}
public static void c(int i2, String str, String str2) {
int length = str2.length();
int i3 = length / 3000;
if (i3 > 0) {
int i4 = 1;
int i5 = 3000;
if (g().n()) {
android.util.Log.println(i2, str, str2.substring(0, 3000) + p + "└────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
while (i4 < i3) {
StringBuilder sb = new StringBuilder();
sb.append(" ");
sb.append(p);
sb.append("┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
sb.append(p);
sb.append("│ ");
int i6 = i5 + 3000;
sb.append(str2.substring(i5, i6));
sb.append(p);
sb.append("└────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
android.util.Log.println(i2, str, sb.toString());
i4++;
i5 = i6;
}
if (i5 != length) {
android.util.Log.println(i2, str, " " + p + "┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────" + p + "│ " + str2.substring(i5, length));
return;
}
return;
}
android.util.Log.println(i2, str, str2.substring(0, 3000));
while (i4 < i3) {
int i7 = i5 + 3000;
android.util.Log.println(i2, str, str2.substring(i5, i7));
i4++;
i5 = i7;
}
if (i5 != length) {
android.util.Log.println(i2, str, str2.substring(i5, length));
return;
}
return;
}
android.util.Log.println(i2, str, str2);
}
public static void b(int i2, String str, Object obj) {
a(i2 | 32, str, obj);
}
public static String b(int i2, Object obj) {
if (obj == null) {
return "null";
}
if (i2 == 32) {
return e.b(obj);
}
if (i2 == 48) {
return e.b(obj.toString());
}
return c(obj);
}
public static void a(String str, String str2) {
if (b <= 3) {
a(3, str, k() + str2);
}
}
public static void a(Object... objArr) {
a(7, g().g(), objArr);
}
public static void b(int i2, String str, String str2) {
int length = str2.length();
int i3 = length / 3000;
if (i3 <= 0) {
d(i2, str, str2);
return;
}
int i4 = 0;
int i5 = 0;
while (i4 < i3) {
int i6 = i5 + 3000;
d(i2, str, str2.substring(i5, i6));
i4++;
i5 = i6;
}
if (i5 != length) {
d(i2, str, str2.substring(i5, length));
}
}
public static void a(String str, Object... objArr) {
a(7, str, objArr);
}
public static void a(int i2, Object obj) {
a(i2 | 16, g().g(), obj);
}
public static void a(String str, Object obj) {
a(19, str, obj);
}
public static void a(int i2, String str, Object obj) {
a(i2 | 16, str, obj);
}
public static void a(int i2, String str) {
a(i2 | 48, g().g(), str);
}
public static String b(int i2, String str, String[] strArr, String str2) {
StringBuilder sb = new StringBuilder();
int i3 = 0;
if (g().n()) {
sb.append("┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
sb.append(p);
if (strArr != null) {
for (String str3 : strArr) {
sb.append("│ ");
sb.append(str3);
sb.append(p);
}
sb.append("├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄");
sb.append(p);
}
String[] split = str2.split(p);
int length = split.length;
while (i3 < length) {
String str4 = split[i3];
sb.append("│ ");
sb.append(str4);
sb.append(p);
i3++;
}
sb.append("└────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
} else {
if (strArr != null) {
int length2 = strArr.length;
while (i3 < length2) {
sb.append(strArr[i3]);
sb.append(p);
i3++;
}
}
sb.append(str2);
}
return sb.toString();
}
public static void a(int i2, String str, Object... objArr) {
if (TextUtils.isEmpty(str)) {
str = "TAG";
}
if (g().p()) {
int i3 = i2 & 15;
int i4 = i2 & 240;
if (g().l() || g().m() || i4 == 16) {
if (i3 >= g().l || i3 >= g().m) {
g j2 = j(str);
String a2 = a(i4, objArr);
if (g().l() && i4 != 16 && i3 >= g().l) {
a(i3, j2.a, j2.b, a2);
}
if ((g().m() || i4 == 16) && i3 >= g().m) {
String str2 = j2.a;
a(i3, str2, j2.c + a2);
}
}
}
}
}
public static boolean c(String str) {
File file = new File(str);
if (file.exists()) {
return file.isFile();
}
if (a(file.getParentFile())) {
try {
e(str);
boolean createNewFile = file.createNewFile();
if (createNewFile) {
i(str);
}
return createNewFile;
} catch (IOException e2) {
e2.printStackTrace();
return false;
}
}
return false;
}
public static String a(StackTraceElement stackTraceElement) {
String fileName = stackTraceElement.getFileName();
if (fileName != null) {
return fileName;
}
String className = stackTraceElement.getClassName();
String[] split = className.split("\\.");
if (split.length > 0) {
className = split[split.length - 1];
}
int indexOf = className.indexOf(36);
if (indexOf != -1) {
className = className.substring(0, indexOf);
}
return className + ".java";
}
public static <T> Class b(d<T> dVar) {
Type genericSuperclass;
Type[] genericInterfaces = dVar.getClass().getGenericInterfaces();
if (genericInterfaces.length == 1) {
genericSuperclass = genericInterfaces[0];
} else {
genericSuperclass = dVar.getClass().getGenericSuperclass();
}
Type type = ((ParameterizedType) genericSuperclass).getActualTypeArguments()[0];
while (type instanceof ParameterizedType) {
type = ((ParameterizedType) type).getRawType();
}
String obj = type.toString();
if (obj.startsWith("class ")) {
obj = obj.substring(6);
} else if (obj.startsWith("interface ")) {
obj = obj.substring(10);
}
try {
return Class.forName(obj);
} catch (ClassNotFoundException e2) {
e2.printStackTrace();
return null;
}
}
public static String a(int i2, Object... objArr) {
String str;
if (objArr != null) {
if (objArr.length == 1) {
str = b(i2, objArr[0]);
} else {
StringBuilder sb = new StringBuilder();
int length = objArr.length;
for (int i3 = 0; i3 < length; i3++) {
Object obj = objArr[i3];
sb.append("args");
sb.append(Operators.ARRAY_START_STR);
sb.append(i3);
sb.append(Operators.ARRAY_END_STR);
sb.append(" = ");
sb.append(c(obj));
sb.append(p);
}
str = sb.toString();
}
} else {
str = "null";
}
return str.length() == 0 ? "log nothing" : str;
}
public static String j() {
StringBuilder sb = new StringBuilder();
for (String str : Version.getCpuAbis()) {
sb.append(str);
sb.append(", ");
}
return sb.toString();
}
public static void a(int i2, String str, String[] strArr, String str2) {
if (g().q()) {
c(i2, str, b(i2, str, strArr, str2));
return;
}
a(i2, str, true);
a(i2, str, strArr);
b(i2, str, str2);
a(i2, str, false);
}
public static void a(int i2, String str, boolean z2) {
if (g().n()) {
android.util.Log.println(i2, str, z2 ? "┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────" : "└────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
}
}
public static void a(int i2, String str, String[] strArr) {
if (strArr != null) {
for (String str2 : strArr) {
if (g().n()) {
str2 = "│ " + str2;
}
android.util.Log.println(i2, str, str2);
}
if (g().n()) {
android.util.Log.println(i2, str, "├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄");
}
}
}
public static void a(int i2, String str, String str2) {
String substring = i().format(new Date(System.currentTimeMillis())).substring(11);
String f2 = g().f();
d(substring + k[i2 - 2] + "/" + str + "(" + Process.myPid() + ")" + str2 + p, f2);
}
public static boolean a(File file) {
return file != null && (!file.exists() ? !file.mkdirs() : !file.isDirectory());
}
}