List of usage examples for android.util Log i
public static int i(String tag, String msg)
From source file:com.nxp.ltsm.ltsmclient.tools.VCDescriptionFile.java
public static byte[] createVc(byte[] VCData, String appName, short VC_Entry) { String TAG = "VCDescriptionFile:createVC"; Log.i(TAG, "Enter"); ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] VC_EntryBytes = Utils.shortToByteArr(VC_Entry); try {//ww w. ja va 2s . c o m out.write(createTlv(0x4F, Hex.decodeHex(appName.toCharArray()))); out.write(createTlv(0x40, VC_EntryBytes)); return (createTlv(0x70, Utils.append(out.toByteArray(), VCData))); } catch (Exception e) { e.printStackTrace(); } return null; }
From source file:Main.java
public static void prepareHPCCData(Context context) { if (HPCCSTATS_USER == "" || getHPCCPage() == "") { SharedPreferences prefs = context.getSharedPreferences("org.linuxguy.HPCCMonWidget", 0); HPCCSTATS_USER = prefs.getString("hpccmonwidget_user", ""); setHPCCPage(prefs.getString("hpccmonwidget_url", "")); Log.i("Status", "prepareHPCCData()"); }//w ww . j ava 2 s . co m }
From source file:Main.java
/** * Check whether a ratio is valid.//from w w w .ja v a 2 s . co m * @param ratio The string containing the proposed ratio. * @param split The amount of shares the ratio should be split in. * Pass less than 2 to avoid checking shares. * @return Whether ratio is valid for required shares. */ public static boolean validRatio(String ratio, int split) { boolean result = false; if (ratio.matches("^[0-9][0-9]*:[[0-9]:]*[0-9]*[0-9]$")) { Log.v(TAG, "Checking ratio " + ratio + " results follow..."); Log.i(TAG, "RATIO PATTERN MATCHED"); if (split > 1) { String[] ratios = ratio.split(":"); if (ratios.length == split) { Log.i(TAG, "RATIO IS VALID, hoorah!"); result = true; } else { Log.w(TAG, "INVALID AMOUNT OF SHARES, RATIO INVALID"); } } else { result = true; } } else { Log.w(TAG, "INVALID RATIO"); } return result; }
From source file:Main.java
private static void print(int mode, final String tag, String msg) { if (!isPrint) { return;/*from ww w. jav a 2 s .c om*/ } if (msg == null) { Log.e(tag, MSG); return; } switch (mode) { case Log.VERBOSE: Log.v(tag, msg); break; case Log.DEBUG: Log.d(tag, msg); break; case Log.INFO: Log.i(tag, msg); break; case Log.WARN: Log.w(tag, msg); break; case Log.ERROR: Log.e(tag, msg); break; default: Log.d(tag, msg); break; } }
From source file:Main.java
public static void IcsMakeNewCalendarEntry(String title, String description, String location, long startTime, long endTime, int allDay, int hasAlarm, int calendarId, int selectedReminderValue) { ContentResolver cr = activityObj.getContentResolver(); ContentValues values = new ContentValues(); values.put(Events.DTSTART, startTime); values.put(Events.DTEND, endTime);/*from w ww . j a v a 2 s . c o m*/ values.put(Events.TITLE, title); values.put(Events.DESCRIPTION, description); values.put(Events.CALENDAR_ID, calendarId); if (allDay == 1) { values.put(Events.ALL_DAY, true); } if (hasAlarm == 1) { values.put(Events.HAS_ALARM, true); } //Get current timezone values.put(Events.EVENT_TIMEZONE, TimeZone.getDefault().getID()); Log.i(DEBUG_TAG, "Timezone retrieved=>" + TimeZone.getDefault().getID()); Uri uri = cr.insert(Events.CONTENT_URI, values); Log.i(DEBUG_TAG, "Uri returned=>" + uri.toString()); // get the event ID that is the last element in the Uri long eventID = Long.parseLong(uri.getLastPathSegment()); if (hasAlarm == 1) { ContentValues reminders = new ContentValues(); reminders.put(Reminders.EVENT_ID, eventID); reminders.put(Reminders.METHOD, Reminders.METHOD_ALERT); reminders.put(Reminders.MINUTES, selectedReminderValue); Uri uri2 = cr.insert(Reminders.CONTENT_URI, reminders); } }
From source file:Main.java
/** * Sets the camera focus mode to infinity * @param parameters parameters of a camera *///from w w w . java 2s .co m protected static void setFocus(Camera.Parameters parameters) { List<String> supportedFocusModes = parameters.getSupportedFocusModes(); String focusMode = findSettableValue("focus mode", supportedFocusModes, parameters.FOCUS_MODE_INFINITY); if (focusMode != null) { parameters.setFocusMode(focusMode); } Log.i(TAG, "Focus mode already set to " + focusMode); }
From source file:Main.java
public static void setFocusArea(Camera.Parameters parameters) { if (parameters.getMaxNumFocusAreas() > 0) { //Log.i(TAG, "Old focus areas: " + toString(parameters.getFocusAreas())); List<Camera.Area> middleArea = buildMiddleArea(AREA_PER_1000); //Log.i(TAG, "Setting focus area to : " + toString(middleArea)); parameters.setFocusAreas(middleArea); } else {//from ww w . j ava 2s . c o m Log.i(TAG, "Device does not support focus areas"); } }
From source file:Main.java
public static void setMetering(Camera.Parameters parameters) { if (parameters.getMaxNumMeteringAreas() > 0) { //Log.i(TAG, "Old metering areas: " + parameters.getMeteringAreas()); List<Camera.Area> middleArea = buildMiddleArea(AREA_PER_1000); //Log.i(TAG, "Setting metering area to : " + toString(middleArea)); parameters.setMeteringAreas(middleArea); } else {/* www . j a v a2 s . c o m*/ Log.i(TAG, "Device does not support metering areas"); } }
From source file:com.turbulenz.turbulenz.googlepayment.java
static private void _print(String msg) { Log.i("tzbilling(google)", msg); }
From source file:Main.java
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public static void setFocusArea(Camera.Parameters parameters) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { if (parameters.getMaxNumFocusAreas() > 0) { Log.i(TAG, "Old focus areas: " + toString(parameters.getFocusAreas())); List<Camera.Area> middleArea = buildMiddleArea(AREA_PER_1000); Log.i(TAG, "Setting focus area to : " + toString(middleArea)); parameters.setFocusAreas(middleArea); } else {// w w w .j av a2s .c om Log.i(TAG, "Device does not support focus areas"); } } else { Log.i(TAG, "Device does not support focus areas"); } }