Example usage for android.util Log d

List of usage examples for android.util Log d

Introduction

In this page you can find the example usage for android.util Log d.

Prototype

public static int d(String tag, String msg) 

Source Link

Document

Send a #DEBUG log message.

Usage

From source file:Main.java

public static Bitmap LogCreate(String tag, Bitmap bitmap) {
    Log.d("DecodeUtils", "[BMP_CREATE][ID:" + getBitmapNativeId(bitmap) + "][" + tag + "]");
    return bitmap;
}

From source file:Main.java

public static float[] matrix9to16(float[] matrix) {
    float[] out = { matrix[0], matrix[1], matrix[2], 0, matrix[3], matrix[4], matrix[5], 0, matrix[6],
            matrix[7], matrix[8], 0, 0, 0, 0, 1 };
    Log.d("Util", "Input  : " + Arrays.toString(matrix));
    Log.d("Util", "Output :" + Arrays.toString(out));
    return out;//w  w  w  .j  av a  2 s  .c o  m
}

From source file:Main.java

protected static void log(String table, String methodAndArgs, Object result) {
    Log.d(LOG_TAG, table.toLowerCase() + "." + methodAndArgs + "--->" + result);
}

From source file:Main.java

public static void releaseCamera() {
    if (mCamera != null) {
        mCamera.stopPreview();/*from  w ww .  jav a  2 s .c  o  m*/
        mCamera.release();
        mCamera = null;
        Log.d("Visionin", "releaseCamera -- done");
    }
}

From source file:Main.java

/**
 * Logs a life cycle method for a given object.  Log message is debug and will include class name.
 *
 * @param object/*  w ww .j av  a  2s. co m*/
 * @param lifeCycleMethodName
 */
public static void logLC(Object object, String lifeCycleMethodName) {
    Log.d("LifeC - " + object.getClass().getSimpleName(), lifeCycleMethodName);
}

From source file:Main.java

public static void compressAFileToZip(File zip, File source) throws IOException {
    Log.d("source: " + source.getAbsolutePath(), ", length: " + source.length());
    Log.d("zip:", zip.getAbsolutePath());
    zip.getParentFile().mkdirs();/*from   ww w .  j  ava 2s . c  o m*/
    File tempFile = new File(zip.getAbsolutePath() + ".tmp");
    FileOutputStream fos = new FileOutputStream(tempFile);
    BufferedOutputStream bos = new BufferedOutputStream(fos);
    ZipOutputStream zos = new ZipOutputStream(bos);
    ZipEntry zipEntry = new ZipEntry(source.getName());
    zipEntry.setTime(source.lastModified());
    zos.putNextEntry(zipEntry);

    FileInputStream fis = new FileInputStream(source);
    BufferedInputStream bis = new BufferedInputStream(fis);
    byte[] bArr = new byte[4096];
    int byteRead = 0;
    while ((byteRead = bis.read(bArr)) != -1) {
        zos.write(bArr, 0, byteRead);
    }
    zos.flush();
    zos.closeEntry();
    zos.close();
    Log.d("zipEntry: " + zipEntry, "compressedSize: " + zipEntry.getCompressedSize());
    bos.flush();
    fos.flush();
    bos.close();
    fos.close();
    bis.close();
    fis.close();
    zip.delete();
    tempFile.renameTo(zip);
}

From source file:Main.java

public static void logd(long message) {
    Log.d(TAG, "" + message);
}

From source file:Main.java

public static void setFitsSystemWindows(Activity activity, boolean values) {
    ViewGroup rootView = (ViewGroup) ((ViewGroup) activity.findViewById(android.R.id.content)).getChildAt(0);
    Log.d("statusbar", "rootViewid  " + rootView.getId());
    rootView.setFitsSystemWindows(values);
    rootView.setClipToPadding(true);/*  w  ww .  ja  v a 2 s  .  co  m*/
}

From source file:Main.java

public static boolean canChildScrollUp(View view) {
    if (view instanceof AbsListView) {
        AbsListView absListView = (AbsListView) view;
        Log.d("debug", absListView.getChildAt(0).getTop() + "v2top");
        return absListView.getChildCount() > 0 && (absListView.getFirstVisiblePosition() > 0
                || absListView.getChildAt(0).getTop() < absListView.getPaddingTop());
    }//from  ww w . ja  va 2 s. c  o  m
    if (Build.VERSION.SDK_INT < 14) {
        return view.getScrollY() > 0;
    } else {
        return view.canScrollVertically(-1);
    }
}

From source file:Main.java

/**
 * debug log//from   ww  w.j a  v a2s .  c o  m
 * @param msg log msg
 */
public static void d(String msg) {
    if (LOG_ENABLE) {
        Log.d(TAG, buildMsg(msg));
    }
}