@@ -0,0 +1,2222 @@
+// TODO Copyright%0D%0Apackage org.videolan.vlc.util;%0D%0A%0D%0Aimport android.util.Log;%0D%0A%0D%0Aimport java.util.Locale;%0D%0A%0D%0Apublic class LogUtil %7B%0D%0A    public static boolean ENABLE_DEBUG = true;%0D%0A%0D%0A%0D%0A    private static String getTag() %7B%0D%0A        StackTraceElement%5B%5D trace = new Throwable().fillInStackTrace()%0D%0A                .getStackTrace();%0D%0A        String callingClass = %22%22;%0D%0A        for (int i = 2; i %3C trace.length; i++) %7B%0D%0A            Class%3C?%3E clazz = trace%5Bi%5D.getClass();%0D%0A            if (!clazz.equals(LogUtil.class)) %7B%0D%0A                callingClass = trace%5Bi%5D.getClassName();%0D%0A                callingClass = callingClass.substring(callingClass%0D%0A                        .lastIndexOf('.') + 1);%0D%0A                break;%0D%0A            %7D%0D%0A        %7D%0D%0A        return callingClass;%0D%0A    %7D%0D%0A%0D%0A    private static String buildMessage(String msg) %7B%0D%0A        StackTraceElement%5B%5D trace = new Throwable().fillInStackTrace()%0D%0A                .getStackTrace();%0D%0A        String caller = %22%22;%0D%0A        for (int i = 2; i %3C trace.length; i++) %7B%0D%0A            Class%3C?%3E clazz = trace%5Bi%5D.getClass();%0D%0A            if (!clazz.equals(LogUtil.class)) %7B%0D%0A                caller = trace%5Bi%5D.getMethodName();%0D%0A                break;%0D%0A            %7D%0D%0A        %7D%0D%0A        return String.format(Locale.US, %22%5B%25d%5D %25s: %25s%22, Thread.currentThread()%0D%0A                .getId(), caller, msg);%0D%0A    %7D%0D%0A%0D%0A    public static void v(String msg) %7B%0D%0A        if (ENABLE_DEBUG) %7B%0D%0A            Log.v(getTag(), buildMessage(msg));%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    public static void d(String msg) %7B%0D%0A        if (ENABLE_DEBUG) %7B%0D%0A            Log.d(getTag(), buildMessage(msg));%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    public static void i(String msg) %7B%0D%0A        if (ENABLE_DEBUG) %7B%0D%0A            Log.i(getTag(), buildMessage(msg));%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    public static void w(String msg) %7B%0D%0A        if (ENABLE_DEBUG) %7B%0D%0A            Log.w(getTag(), buildMessage(msg));%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    public static void e(String msg) %7B%0D%0A        if (ENABLE_DEBUG) %7B%0D%0A            Log.e(getTag(), buildMessage(msg));%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A    public static void printTraceStack(String msg)%7B%0D%0A        Exception e = (msg != null) ? new Exception(msg) : new Exception(%22Stack state%22);%0D%0A        e.printStackTrace();%0D%0A    %7D%0D%0A%7D%0D%0A

Add LogUtil