APISonar


android.util.Log.INFO

> android > util > Log > INFO
android APIs util APIs Log APIs INFO APIs

Example 1
public static void i(String msg) {
        if (enableLog(Log.INFO)) {
            sILogger.log(Log.INFO, sTag, msg, null);
        }
    }
Example 2
public void info(Object str) {
	    if (logLevel <= Log.INFO) {	        
	        String name = getFunctionName();
	        String ls=(name==null?str.toString():(name+" - "+str));
	        Log.i(tag, ls);
	    }
	}
Example 3
public static void i(String... msg) {
        if (ADB && LOG_DEGREE <= Log.INFO) {
        	getMethodNames(new Throwable().getStackTrace());
        	String msgStr = createLog(msg);
        	
            Log.i(className, msgStr);
            
            writeLogToFile(Log.INFO, className, msgStr, null);
        }
    }
Example 4
public int i(Object s1, Object... args) {
        if( getLoggingLevel()> Log.INFO )
            return 0;

        final String s = Strings.toString(s1);
        final String message = formatArgs(s, args);
        return println(Log.INFO, message);
    }
Example 5
public void setWorkingDir(File workingDir) {
        try {
            this.workingDir = workingDir.getCanonicalFile().getAbsoluteFile();
        } catch (IOException e) {
            myLog.l(Log.INFO, "SessionThread canonical error");
        }
    }
Example 6
public static void i(String format, Object... args) {
        if (Log.INFO >= sLevel) {
            Log.i(sTag, buildMsg(String.format(format, args)));
        }
    }
Example 7
private void writeMetaData() throws IOException, FileNotFoundException {
		File out = new File(Util.getUserDataDirectory(Process.myUid()) + File.separator + "meta.xml");
		Util.log(null, Log.INFO, "Writing meta=" + out.getAbsolutePath());
		InputStream is = getContext().getAssets().open("meta.xml");
		OutputStream os = new FileOutputStream(out.getAbsolutePath());
		byte[] buffer = new byte[1024];
		int read;
		while ((read = is.read(buffer)) != -1)
			os.write(buffer, 0, read);
		is.close();
		os.flush();
		os.close();
		out.setReadable(true, false);
	}
Example 8
public static void i(Object obj) {
        if (Log.INFO > DEBUG_LEVEL) {
            String tag = getClassName();
            String msg = obj != null ? obj.toString() : "obj == null";
            Log.i(tag, msg);
        }
    }
Example 9
protected void before(MethodHookParam param) throws Throwable {
		Util.log(this, Log.INFO, getMethodName() + "=true");
		param.setResult(true);
	}
Example 10
public void i_shouldLogAppropriately_withThrowable() {
    Throwable throwable = new Throwable();

    Log.i("tag", "msg", throwable);

    assertLogged(Log.INFO, "tag", "msg", throwable);
  }
Example 11
public static boolean isProEnablerInstalled(Context context) {
		Version version = getProEnablerVersion(context);
		if (version != null && isValidProEnablerVersion(version) && hasValidProEnablerSignature(context)) {
			Util.log(null, Log.INFO, "Licensing: enabler installed");
			return true;
		}
		Util.log(null, Log.INFO, "Licensing: enabler not installed");
		return false;
	}
Example 12
public void logi(String message) {
        if (LOGTAG == null)
            return;
        if (logLevel > Log.INFO)
            return;
        Log.i(LOGTAG, getLogMessage(message));
    }
Example 13
public static void deleteRestrictions(Context context, int uid) {
		context.getContentResolver().delete(PrivacyProvider.URI_RESTRICTION, null,
				new String[] { Integer.toString(uid) });
		Util.log(null, Log.INFO, "Delete restrictions uid=" + uid);
	}
Example 14
private static void registerNativeMethod(final XHook hook, Method method, XC_MethodHook.Unhook unhook) {
		if (Process.myUid() > 0) {
			synchronized (mUnhookNativeMethod) {
				mUnhookNativeMethod.add(unhook);
				Util.log(hook, Log.INFO, "Native " + method + " uid=" + Process.myUid());
			}
		}
	}
Example 15
void setIsPreload(String url) {
        this.isPreload = true;
        this.srcUrl = statistics.srcUrl = url.trim();
        if (SonicUtils.shouldLog(Log.INFO)) {
            SonicUtils.log(TAG, Log.INFO, "session(" + sId + ") is preload, new url=" + url + ".");
        }
    }
Example 16
public static void i(String message) {
        if (!DEVELOP_MODE || TextUtils.isEmpty(message)) {
            return;
        }
        final StackTraceElement[] stack = new Throwable().getStackTrace();
        final int i = 1;
        final StackTraceElement ste = stack[i];
        Log.println(Log.INFO, LOG_TAG, String.format("[%s][%s][%s]%s", ste.getFileName(), ste.getMethodName(), ste.getLineNumber(), message));
    }
Example 17
private static void logRestriction(
			XHook hook, Context context,
			int uid, String prefix, String restrictionName, String methodName,
			boolean restricted, boolean cached, long ms) {
		Util.log(hook, Log.INFO, String.format("%s %d/%s %s=%srestricted%s%s",
				prefix, uid, methodName, restrictionName,
				(restricted ? "" : "!"),
				(cached ? " (cached)" : (context == null ? " (file)" : "")),
				(ms > 1 ? " " + ms + " ms" : "")));
	}
Example 18
public void writeBytes(byte[] bytes) {
        try {
            // TODO: do we really want to do all of this on each write? Why?
            BufferedOutputStream out = new BufferedOutputStream(cmdSocket
                    .getOutputStream(), Defaults.dataChunkSize);
            out.write(bytes);
            out.flush();
            dataSocketFactory.reportTraffic(bytes.length);
        } catch (IOException e) {
            myLog.l(Log.INFO, "Exception writing socket");
            closeSocket();
            return;
        }
    }
Example 19
private int deleteRestrictions(int uid) {
		int rows = 0;
		SharedPreferences prefs = getContext().getSharedPreferences(PREF_RESTRICTION + "." + uid,
				Context.MODE_WORLD_READABLE);
		SharedPreferences.Editor editor = prefs.edit();
		for (String pref : prefs.getAll().keySet()) {
			Util.log(null, Log.INFO, "Removed restriction=" + pref + " uid=" + uid);
			editor.remove(pref);
			rows++;
		}
		editor.commit();
		setPrefFileReadable(PREF_RESTRICTION, uid);
		return rows;
	}
Example 20
private void handleClientCoreMessage_ServiceUnavailable(Message msg) {
        if (wasLoadUrlInvoked.compareAndSet(false, true)) {
            if (SonicUtils.shouldLog(Log.INFO)) {
                SonicUtils.log(TAG, Log.INFO, "handleClientCoreMessage_ServiceUnavailable:load src url.");
            }
            sessionClient.loadUrl(srcUrl, null);
        }
    }
Example 21
public static synchronized boolean isLoggable(String tag, int level) {
    if (tagToLevel.containsKey(tag)) {
      return level >= tagToLevel.get(tag);
    }
    return stream != null || level >= Log.INFO;
  }
Example 22
private void handlePortChangedLocked(PortInfo portInfo, IndentingPrintWriter pw) {
        logAndPrint(Log.INFO, pw, "USB port changed: " + portInfo);
        sendPortChangedBroadcastLocked(portInfo);
    }
Example 23
public static List<XHook> getInstances(Object instance) {
		String className = instance.getClass().getName();
		Util.log(null, Log.INFO, "Hooking ActivityRecognitionApi class=" + className + " uid=" + Binder.getCallingUid());

		List<XHook> listHook = new ArrayList<XHook>();
		listHook.add(new XActivityRecognitionApi(Methods.removeActivityUpdates, null, className));
		listHook.add(new XActivityRecognitionApi(Methods.requestActivityUpdates, PrivacyManager.cLocation, className));
		return listHook;
	}
Example 24
protected void after(MethodHookParam param) throws Throwable {
		if (mMethod == Methods.onDestroy) {
			Util.log(this, Log.INFO, "Service destroyed uid=" + Process.myUid());
			try {
				PrivacyManager.sendUsageData(this, (Context) param.thisObject);
			} catch (Throwable ex) {
				Util.bug(this, ex);
			}
		} else
			Util.log(this, Log.WARN, "Unknown method=" + param.method.getName());
	}
Example 25
public boolean onClientPageFinished(String url) {
        if (isMatchCurrentUrl(url)) {
            SonicUtils.log(TAG, Log.INFO, "session(" + sId + ") onClientPageFinished:url=" + url + ".");
            wasOnPageFinishInvoked.set(true);
            return true;
        }
        return false;
    }