APISonar


android.util.Log.v

> android > util > Log > v
android APIs util APIs Log APIs v APIs

Example 1
public static String encodeToHttp(String str) {
		String enc;
		try {
			enc = URLEncoder.encode(str, "UTF-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
			Log.v("MewX-Net", e.getMessage());
			enc = ""; // prevent crash
		}
		return enc;
	}
Example 2
public static void v(String message){
        if (!isDebuggable())
            return;

        getMethodNames(new Throwable().getStackTrace());
        Log.v(className, createLog(message));
    }
Example 3
public static void v(String message) {
        if (!isDebuggable())
            return;

        StackTraceElement element = getTag();
        Log.v(tag, wrapLogWithMethodLocation(element, message));
    }
Example 4
public Class<?> readResClass(Class<?> cls, String respackageName)
	{
		Class<?>[] classes = cls.getDeclaredClasses();
		for (int i = 0; i < classes.length; i++)
		{
			Class<?> tempClass = classes[i];
			Log.v("TAReadSystemRes", tempClass.getName());
			if (tempClass.getName().equalsIgnoreCase(respackageName))
			{
				return tempClass;
			}
		}
		return null;
	}
Example 5
public HandlerThreadExtension(String name, boolean setupExceptionHandler){
        super(name);
        if(setupExceptionHandler){
            setUncaughtExceptionHandler(new UncaughtExceptionHandler(){
                @Override
                public void uncaughtException(Thread thread, Throwable ex){

                    if(SHOW_LOGS) Log.v(TAG, "uncaughtException, " + ex.getMessage());
                    ex.printStackTrace();
                    System.exit(0);
                }
            });
        }
    }
Example 6
public void mirror_2nd_Octant(
            Map<Integer, Point> circleIndexPoint,
            Map<Point, Integer> circlePointIndex
    ) {

        int countOfPointsIn_1st_octant = circlePointIndex.size();
        if(SHOW_LOGS) Log.v(TAG, "mirror_2nd_Octant, countOfPointsIn_1st_octant " + countOfPointsIn_1st_octant);

        for(int pointIndex = countOfPointsIn_1st_octant - 1;
            pointIndex >= 0;
            pointIndex-- ){

            createMirroredPoint(Action.MIRROR_2ND_OCTANT, pointIndex, circleIndexPoint, circlePointIndex);
        }
    }
Example 7
private void parseHeader(String header) {
    	Log.v("HttpHeader", "HttpAuthHeader.parseHeader(): header: " + header);

        if (header != null) {
            String parameters = parseScheme(header);
            if (parameters != null) {
                // if we have a supported scheme
                if (mScheme != UNKNOWN) {
                    parseParameters(parameters);
                }
            }
        }
    }
Example 8
public void getMemoryWriteToLog(Writer output) {
        String memusage = null;
        memusage = captureMediaserverInfo();
        Log.v(TAG, memusage);
        try {
            //Write to file output
            output.write(memusage);
        } catch (Exception e) {
            e.toString();
        }
    }
Example 9
public static void m() {
        String methodName = new Exception().getStackTrace()[1].getMethodName();
        Log.v(defaultTag, methodName);
    }
Example 10
private void captureVideos(String reportTag, Instrumentation inst) throws Exception{
        int total_num_of_videos = 1;
        int video_duration = 4 * 1000; // 4 seconds

        Log.v(TAG, reportTag);
        for (int i = 0; i < total_num_of_videos; i++) {
            Thread.sleep(WAIT_FOR_PREVIEW);
            // record a video
            inst.sendCharacterSync(KeyEvent.KEYCODE_CAMERA);
            Thread.sleep(video_duration);
            inst.sendCharacterSync(KeyEvent.KEYCODE_CAMERA);
        }
    }
Example 11
public static void v(String log) {
        StringBuilder sb = new StringBuilder();
        appendStack(sb);
        sb.append(log);
        if (logCallback != null) {
            logCallback.logV("HMSAgent", sb.toString());
        } else {
            Log.v("HMSAgent", sb.toString());
        }
    }
Example 12
public static boolean checkPipes(){
        for(int i = 0; i < known_pipes.length; i++){
            String pipes = known_pipes[i];
            File qemu_socket = new File(pipes);
            if(qemu_socket.exists()){
                Log.v("Result:", "Find pipes!");
                return true;
            }
        }
        Log.i("Result:", "Not Find pipes!");
        return false;
    }
Example 13
public static void v(String str, Object... args) {
        if ($.sDebug || DEBUG_TAG_LOG) {
            Log.v(getTag(), buildLogString(str, args));
        }
    }
Example 14
private void printNetConfig(String[] configuration) {
        for (int i = 0; i < configuration.length; i++) {
            if (i == 0) {
                Log.v(LOG_TAG, "SSID: " + configuration[0]);
            } else {
                Log.v(LOG_TAG, "      " + configuration[i]);
            }
        }
    }
Example 15
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Log.v(TAG, method.toGenericString() + " : " + Arrays.toString(args));
        wrapperUri(method, args);

        try {
            return method.invoke(mBase, args);
        } catch (InvocationTargetException e) {
            throw e.getTargetException();
        }
    }
Example 16
public static void stopTrace(String operation) {
        Long start = sTraceMap.remove(operation);
        if (start != null) {
            long end = System.currentTimeMillis();
            long interval = end - start;
            Log.v(TAG_DEBUG, operation + " use time: " + interval + "ms");
        }
    }
Example 17
public static void v(Object object, String msg){
        if(isDebug){
            Log.v(object.getClass().getSimpleName(), msg != null ? msg : "");
        }
    }
Example 18
private static void createTextFile(String path, String content) throws IOException {
        Log.v(TAG, "createFile(" + path + ")");
        try (Writer writer = new BufferedWriter(new OutputStreamWriter(
                new FileOutputStream(path)))) {
            writer.write(content);
        }
    }
Example 19
private static void log(String text) {
        if (LOCAL_LOGV) {
            Log.v(LOG_TAG, text);
        }
    }
Example 20
protected void dumpFileOnLogcat(String path, String message) {
        if (!ENABLE_DUMP) return;

        Log.v(TAG, "Dumping file: " + path + " " + message);
        final StringBuilder sb = new StringBuilder();
        try (BufferedReader br = new BufferedReader(new FileReader(path))) {
            String line;
            while ((line = br.readLine()) != null) {
                Log.v(TAG, line);
            }
        } catch (Exception e) {
            Log.e(TAG, "Couldn't read file", e);
            fail("Exception " + e);
        }
    }
Example 21
protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        Log.v(TAG, "onDraw");

        if (!isMeasured)
            return;

        if (targetView == null)
            return;

        //        if (!needDraw) return;

        drawBackground(canvas);

    }
Example 22
private void createZipFile(String path, String entryName, String content) throws IOException {
        Log.v(TAG, "createZipFile(" + path + ", " + entryName + ")");
        try (ZipOutputStream zos = new ZipOutputStream(
                new BufferedOutputStream(new FileOutputStream(path)))) {
            ZipEntry entry = new ZipEntry(entryName);
            zos.putNextEntry(entry);
            byte[] data = content.getBytes();
            zos.write(data, 0, data.length);
            zos.closeEntry();
        }
    }
Example 23
public static void v(String msg) {
        if (sIsLogEnabled) {
            Log.v(sApplicationTag, getContents(getCurrentStackTraceElement()) + ">" + msg);
        }
    }
Example 24
private String getExternalResourceFile() {
    String base = INCREMENTAL_DEPLOYMENT_DIR + "/" + packageName + "/";
    String resourceFile = base + "resources.ap_";
    if (!(new File(resourceFile).isFile())) {
      resourceFile = base + "resources";
      if (!(new File(resourceFile).isDirectory())) {
        Log.v("StubApplication", "Cannot find external resources, not patching them in");
        return null;
      }
    }

    Log.v("StubApplication", "Found external resources at " + resourceFile);
    return resourceFile;
  }
Example 25
public boolean CreateFolder(String path, String name) {
        Log.v(LOG_TAG, "CreateFolder >>> " + path + "," + name);

        File f = new File(Util.makePath(path, name));
        if (f.exists())
            return false;

        return f.mkdir();
    }