思特奇智慧酒店云平台 v0.0.5版本的 MD5 值为:dedb172bb322639d79d7e0e26262fb5c
以下内容为反编译后的 Log.java 源代码,内容仅作参考
package com.sitech.oncon.camera.util;
import android.content.ClipData;
import android.content.ComponentName;
import android.content.Intent;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
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.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;
public class Log {
public static final String A = "null";
public static final String B = "args";
public static final String C = " ";
public static final int a = 8;
public static int b = 2;
public static String c = "";
public static final int d = 2;
public static final int e = 3;
public static final int f = 4;
public static final int g = 5;
public static final int h = 6;
public static final int i = 7;
public static final int k = 16;
public static final int l = 32;
public static final int m = 48;
public static final String p = "┌";
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 int y = 3000;
public static final String z = "log nothing";
public static final char[] j = {'V', 'D', 'I', 'W', 'E', FunctionParser.Lexer.A_UPPER};
public static final String n = System.getProperty("file.separator");
public static final String o = System.getProperty("line.separator");
public static c D = null;
public static final ThreadLocal<SimpleDateFormat> E = new ThreadLocal<>();
public static final ExecutorService F = Executors.newSingleThreadExecutor();
public static final SimpleArrayMap<Class, d> G = new SimpleArrayMap<>();
public static final Object H = 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;
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 str = "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 "";
}
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.g(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.o + "switch: " + p() + Log.o + "console: " + l() + Log.o + "tag: " + g() + Log.o + "head: " + o() + Log.o + "file: " + m() + Log.o + "dir: " + c() + Log.o + "filePrefix: " + e() + Log.o + "border: " + n() + Log.o + "singleTag: " + q() + Log.o + "consoleFilter: " + a() + Log.o + "fileFilter: " + d() + Log.o + "stackDeep: " + j() + Log.o + "stackOffset: " + k() + Log.o + "saveDays: " + i() + Log.o + "formatter: " + Log.G;
}
public c() {
this.c = "util";
this.d = true;
this.e = true;
this.f = "";
this.g = true;
this.h = false;
this.i = false;
this.j = false;
this.k = true;
this.l = 2;
this.m = 2;
this.n = 1;
this.o = 0;
this.p = 1;
this.q = r();
if (this.a != null) {
return;
}
this.a = ck0.p();
}
public c a(String str) {
if (!Log.g(str)) {
if (!str.endsWith(Log.n)) {
str = str + Log.n;
}
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.g(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.d().format(new Date(System.currentTimeMillis())).substring(0, 10);
return Log.f().c() + "camera_" + substring + ".log";
}
public c b(String str) {
if (Log.g(str)) {
this.c = "util";
} else {
this.c = str;
}
return this;
}
public char d() {
return Log.j[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.n;
}
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.G.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.j[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 gd1.a(th);
}
public static String b(Object obj) {
if (obj instanceof CharSequence) {
return a(obj.toString());
}
return 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.o);
} 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 static class f {
public String a;
public String[] b;
public String c;
public f(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 d() {
return g();
}
public static void f(String str, String str2) {
if (b <= 5) {
a(5, str, str2);
}
}
public static void g(String str, String str2) {
a(51, str, str2);
}
public static String h() {
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 f i(String str) {
String str2;
String str3;
String name;
if (!f().g && !f().o()) {
str3 = f().g();
} else {
StackTraceElement[] stackTrace = new Throwable().getStackTrace();
int k2 = f().k() + 3;
if (k2 >= stackTrace.length) {
String a2 = a(stackTrace[stackTrace.length - 1]);
if (f().g && g(str)) {
int indexOf = a2.indexOf(46);
if (indexOf != -1) {
a2 = a2.substring(0, indexOf);
}
} else {
a2 = str;
}
return new f(a2, null, ": ");
}
StackTraceElement stackTraceElement = stackTrace[k2];
String a3 = a(stackTraceElement);
if (f().g && g(str)) {
int indexOf2 = a3.indexOf(46);
str2 = indexOf2 == -1 ? a3 : a3.substring(0, indexOf2);
} else {
str2 = str;
}
if (f().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 (f().j() <= 1) {
return new f(str2, new String[]{formatter}, str4);
}
String[] strArr = new String[Math.min(f().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 f(str2, strArr, str4);
}
str3 = str2;
}
return new f(str3, null, ": ");
}
public static void j(String str) {
a(51, f().g(), str);
}
public static void b(String str, String str2) {
if (b <= 6) {
a(6, str, str2);
}
}
public static void c(String str) {
if (b <= 3) {
String str2 = c;
a(3, str2, h() + str);
}
}
public static void d(Object... objArr) {
a(4, f().g(), objArr);
}
public static void e(String str) {
if (b <= 6) {
a(6, c, str);
}
}
public static SimpleDateFormat g() {
SimpleDateFormat simpleDateFormat = E.get();
if (simpleDateFormat == null) {
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
E.set(simpleDateFormat2);
return simpleDateFormat2;
}
return simpleDateFormat;
}
public static void d(String str, Object... objArr) {
a(4, str, objArr);
}
public static void f(String str) {
if (b <= 4) {
a(4, c, str);
}
}
public static void b(Object... objArr) {
a(3, f().g(), objArr);
}
public static void c(String str, String str2) {
if (b <= 4) {
a(4, str, str2);
}
}
public static void d(int i2, String str, String str2) {
String[] split;
if (!f().n()) {
android.util.Log.println(i2, str, str2);
return;
}
for (String str3 : str2.split(o)) {
android.util.Log.println(i2, str, "│ " + str3);
}
}
public static void e(String str, String str2) {
if (b <= 2) {
a(2, str, str2);
}
}
public static void h(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);
sb.append("\n************* Log Head ****************\n\n");
d(sb.toString(), str);
}
public static void a(String str, String str2, Throwable th) {
if (b <= 6) {
a(6, str, str2, th);
}
}
public static void b(String str, Object... objArr) {
a(3, str, objArr);
}
public static c f() {
if (D == null) {
synchronized (H) {
if (D == null) {
D = new c(null);
}
}
}
return D;
}
public static boolean g(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 b(Object obj) {
a(19, f().g(), obj);
}
public static void c(Object... objArr) {
a(6, f().g(), objArr);
}
public static void e(Object... objArr) {
a(2, f().g(), objArr);
}
public static void a(String str, Throwable th) {
if (b <= 6) {
a(6, c, str, th);
}
}
public static void b(String str, Object obj) {
a(35, str, obj);
}
public static void c(String str, Object... objArr) {
a(6, str, objArr);
}
public static void e(String str, Object... objArr) {
a(2, str, objArr);
}
public static void b(int i2, String str, Object obj) {
a(i2 | 32, str, obj);
}
public static void c(int i2, Object obj) {
a(i2 | 32, f().g(), obj);
}
public static void e(Object obj) {
a(35, f().g(), obj);
}
public static void a(Throwable th) {
if (b <= 6) {
a(6, c, th.getMessage(), th);
}
}
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 String c(Object obj) {
d dVar;
if (obj == null) {
return "null";
}
if (!G.isEmpty() && (dVar = G.get(d(obj))) != null) {
return dVar.a(obj);
}
return e.c(obj);
}
public static void d(String str) {
File[] listFiles;
if (f().i() > 0 && (listFiles = new File(str).getParentFile().listFiles()) != null && listFiles.length > 0) {
long time = Calendar.getInstance().getTime().getTime() - (f().i() * 86400000);
for (File file : listFiles) {
if (file.lastModified() <= time) {
F.execute(new a(file));
}
}
}
}
public static void e(int i2, String str, String str2) {
a(i2 | 48, str, str2);
}
public static void a(String str, String str2) {
if (b <= 3) {
a(3, str, h() + str2);
}
}
public static void f(Object... objArr) {
a(5, f().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 f(String str, Object... objArr) {
a(5, str, objArr);
}
public static void a(Object... objArr) {
a(7, f().g(), objArr);
}
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 (f().n()) {
android.util.Log.println(i2, str, str2.substring(0, 3000) + o + "└────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
while (i4 < i3) {
StringBuilder sb = new StringBuilder();
sb.append(" ");
sb.append(o);
sb.append("┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
sb.append(o);
sb.append("│ ");
int i6 = i5 + 3000;
sb.append(str2.substring(i5, i6));
sb.append(o);
sb.append("└────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
android.util.Log.println(i2, str, sb.toString());
i4++;
i5 = i6;
}
if (i5 != length) {
android.util.Log.println(i2, str, " " + o + "┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────" + o + "│ " + 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 a(String str, Object... objArr) {
a(7, str, objArr);
}
public static void a(int i2, Object obj) {
a(i2 | 16, f().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 String b(int i2, String str, String[] strArr, String str2) {
StringBuilder sb = new StringBuilder();
int i3 = 0;
if (f().n()) {
sb.append("┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
sb.append(o);
if (strArr != null) {
for (String str3 : strArr) {
sb.append("│ ");
sb.append(str3);
sb.append(o);
}
sb.append("├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄");
sb.append(o);
}
String[] split = str2.split(o);
int length = split.length;
while (i3 < length) {
String str4 = split[i3];
sb.append("│ ");
sb.append(str4);
sb.append(o);
i3++;
}
sb.append("└────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
} else {
if (strArr != null) {
int length2 = strArr.length;
while (i3 < length2) {
sb.append(strArr[i3]);
sb.append(o);
i3++;
}
}
sb.append(str2);
}
return sb.toString();
}
public static void a(int i2, String str) {
a(i2 | 48, f().g(), str);
}
public static void d(String str, String str2) {
F.execute(new b(str2, str));
}
public static void a(int i2, String str, Object... objArr) {
if (TextUtils.isEmpty(str)) {
str = "TAG";
}
if (f().p()) {
int i3 = i2 & 15;
int i4 = i2 & 240;
if (f().l() || f().m() || i4 == 16) {
if (i3 >= f().l || i3 >= f().m) {
f i5 = i(str);
String a2 = a(i4, objArr);
if (f().l() && i4 != 16 && i3 >= f().l) {
a(i3, i5.a, i5.b, a2);
}
if ((f().m() || i4 == 16) && i3 >= f().m) {
String str2 = i5.a;
a(i3, str2, i5.c + a2);
}
}
}
}
}
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 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 boolean b(String str) {
File file = new File(str);
if (file.exists()) {
return file.isFile();
}
if (a(file.getParentFile())) {
try {
d(str);
boolean createNewFile = file.createNewFile();
if (createNewFile) {
h(str);
}
return createNewFile;
} catch (IOException e2) {
e2.printStackTrace();
return false;
}
}
return false;
}
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(o);
}
str = sb.toString();
}
} else {
str = "null";
}
return str.length() == 0 ? "log nothing" : str;
}
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 void a(int i2, String str, String[] strArr, String str2) {
if (f().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 (f().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 (f().n()) {
str2 = "│ " + str2;
}
android.util.Log.println(i2, str, str2);
}
if (f().n()) {
android.util.Log.println(i2, str, "├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄");
}
}
}
public static void a(int i2, String str, String str2) {
try {
String substring = g().format(new Date(System.currentTimeMillis())).substring(11);
String f2 = f().f();
if (!b(f2)) {
r0 = "create " + f2 + " failed!";
return;
}
d(substring + j[i2 - 2] + "/" + str + str2 + o, f2);
} catch (Throwable unused) {
}
}
public static boolean a(File file) {
return file != null && (!file.exists() ? !file.mkdirs() : !file.isDirectory());
}
}