APISonar


android.util.Log.i

> android > util > Log > i
android APIs util APIs Log APIs i APIs

Example 1
public void dump()
    {
        ArrayList<String> a = dumpInternal();
        for (String s : a) {
            Log.i(mTag, s);
        }
    }
Example 2
public static void i(String msg) {
        try {
            try {
                Log.i("fqrouter", msg);
                writeLogFile("INFO", msg);
            }  catch (Exception e) {
                System.out.println(msg);
            }
        } catch (Exception e) {
            // ignore
        }
    }
Example 3
private void log(String message, Throwable e) {
		if (e != null) {
			Log.e(TAG, message, e);
			
		} else {
			Log.i(TAG, message);			
		}
		
		if (mLog != null)
		{
			try {
				mLog.println(message);
			} catch (IOException ex) {}
		}		
	}
Example 4
void showLogMessage(String message)
    {
        Log.i(TAG_LOG,message);
        System.out.println(message);
    }
Example 5
private File getCacheDir(Context c) {
        File dir = c.getExternalCacheDir();

        if (dir == null) {
            dir = c.getCacheDir();
        }

        if (dir == null) {
            Log.i(LOG_TAG, "No tile storage available");
            return null;
        }

        return new File(dir, "osmdroid");
    }
Example 6
public final void launch(Context context, View v) {
        Log.i("log", "Launching " + pojo.id);

        recordLaunch(context);

        // Launch
        doLaunch(context, v);
    }
Example 7
public void writeOutput(String s) {
        Log.i(mTag, s);
        if (mOutputWriter == null) {
            return;
        }
        try {
            mOutputWriter.write(s + "\n");
            mOutputWriter.flush();
        } catch (IOException e) {
            Log.w(mTag, "Could not write to output file", e);
        }
    }
Example 8
public InputStream getResourceAsStream(Class cls, String resource) {
        try {
            if (resource.startsWith("/")) {
                resource = resource.substring(1);
            }
            return activity.getAssets().open(resource);
        } catch (IOException ex) {
            Log.i("Codename One", "Failed to load resource: " + resource);
            return null;
        }
    }
Example 9
public void  exec(Runnable runnable) {
        if (runnable == null) throw new NullPointerException();
        if(coreSize < poolSize){
            addThread(runnable);
        }else{
            //System.out.println("offer" +  runnable.toString() + "   " + queue.size());
            try {
                Log.i("qy","put");
                queue.put(runnable);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
Example 10
public void onValueSelected(Entry e, Highlight h) {

        if (e == null)
            return;
        Log.i("VAL SELECTED",
                "Value: " + e.getY() + ", index: " + h.getX()
                        + ", DataSet index: " + h.getDataSetIndex());
    }
Example 11
public static void i(String message){
        if (!isDebuggable())
            return;

        getMethodNames(new Throwable().getStackTrace());
        Log.i(className, createLog(message));
    }
Example 12
public static void i(String msg) {
        Throwable t = new Throwable();
        StackTraceElement[] elements = t.getStackTrace();

        String callerClassName = elements[1].getFileName();
        Log.i(LOG_TAG, "[" + callerClassName + "] " + msg);
    }
Example 13
@Override public List<InetAddress> lookup(String hostname) throws UnknownHostException {
        if (hostname == null) throw new UnknownHostException("hostname == null");
        Log.i("CustomGlobalDns", "lookup " + hostname);
        try {
            return Arrays.asList(InetAddress.getAllByName(hostname));
        } catch (NullPointerException e) {
            UnknownHostException unknownHostException =
                    new UnknownHostException("Broken system behaviour for dns lookup of " + hostname);
            unknownHostException.initCause(e);
            throw unknownHostException;
        }
    }
Example 14
protected void onPostExecute(List<String> output) {
        super.onPostExecute(output);
        if (null != output) {
            for (String outputLine: output) {
                Log.i(getClass().getSimpleName(), outputLine);
            }
        }
        showRebootDialog();
    }
Example 15
@SuppressWarnings("UnusedDeclaration") public void dump() {
    Buffer buffer = new Buffer();
    try {
      dump(buffer);
    } catch (IOException e) {
      throw new AssertionError(e);
    }
    Log.i(TAG, buffer.readUtf8());
  }
Example 16
private void printMethodStackTrace(String methodName){
        StackTraceElement[] invokers = Thread.currentThread().getStackTrace();
        StringBuilder sb = new StringBuilder("printMethodStackTrace ");
        sb.append(methodName);
        sb.append(" ");
        for(int i= invokers.length -1;i >= 4;i--){
            StackTraceElement invoker = invokers[i];
            sb.append(String.format("%s(%d).%s",invoker.getFileName(),invoker.getLineNumber(),invoker.getMethodName()));
            if(i > 4){
                sb.append("-->");
            }
        }
        Log.i("printMethodStackTrace",sb.toString());
    }
Example 17
void removeProcess(Map<String, Object> process) {
		synchronized (mListSelected) {
			Iterator<Map<String, Object>> i = mListSelected.iterator();
			while (i.hasNext())
				if (i.next().get(C.pId).equals(process.get(C.pId))) {
					i.remove();
					Log.i(getString(R.string.w_processes_dead_notification), (String) process.get(C.pName));
				}
		}
	}
Example 18
public static boolean isTrackedObjectCollected(String key, boolean stopTrackingIfCollected) {
    System.gc();
    WeakReference<Object> ref = TRACKED_OBJECTS.get(key);
    if (ref != null) {
      Object o = ref.get();
      String tag = key.substring(key.indexOf("_") + 1);
      Log.i(LOG_TAG, "Object with tag " + tag + " has " +
          ((o != null) ? "not " : "") + "been garbage collected.");
      if (stopTrackingIfCollected && o == null) {
        TRACKED_OBJECTS.remove(key);
      }
      return o == null;
    }
    throw new IllegalArgumentException("key not found");
  }
Example 19
public void logInterval(String tag, String message) {

        Log.i(tag, message
                + "\n Interval: " + (System.currentTimeMillis() - intervalTime)
                + "\n Total: " + (System.currentTimeMillis() - initialTime)
        );
        intervalTime = System.currentTimeMillis();
    }
Example 20
public static Properties getProperties(String name, Context context) {
        Resources resources = context.getResources();
        AssetManager assetManager = resources.getAssets();

        // Read from the /assets directory
        try {
            InputStream inputStream = assetManager.open(name);
            Properties properties = new Properties();
            properties.load(inputStream);
            return properties;
        } catch (IOException e) {
            Log.i("ChatSecure", "no chatsecure.properties available");
            return null;
        }
    }
Example 21
private void log(String str) {
    if (logEnabled) {
      Log.i(LOG_TAG, str);
    }
  }
Example 22
public void printStack() {
        StringBuilder sb = new StringBuilder();
        sb.append(getFragmentTAG());
        Stack<String> stack = mStackManager.getFragmentStack();
        printStack(sb, this, stack, 1);
        Log.i("Rigger", sb.toString());
    }
Example 23
public static boolean readZipFile(String zipFileName, StringBuffer crc) {
		try {
			ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFileName));
			ZipEntry entry;
			while ((entry = zis.getNextEntry()) != null) {
				long size = entry.getSize();
				crc.append(entry.getCrc() + ", size: " + size);
	        }
	        zis.close();
		} catch (Exception ex) {
			Log.i(TAG,"Exception: " + ex.toString());
			return false;
		}
		return true;
	}
Example 24
public void printService()
	{
		Service[] services = device.findServices();
		for (Service service : services)
		{
			Log.i(TAG, "\t Service : " + service);
			for (Action a : service.getActions())
			{
				Log.i(TAG, "\t\t Action : " + a);
			}
		}
	}
Example 25
public void getCurrentPosition(String coorType) {
        if (locating) {
            return;
        }
        locateOnce = true;
        locating = true;
        if (locationClient == null) {
            initLocationClient(coorType);
        }
        Log.i("getCurrentPosition", "getCurrentPosition");
        locationClient.start();
    }