Java Code Examples for android.util.Log#v()

The following examples show how to use android.util.Log#v() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChannelBuilder.java    From libcommon with Apache License 2.0 6 votes vote down vote up
/**
 * コンストラクタ
 * 新規に作成するとわかっている場合・既存設定を上書きする場合を除いて#getBuilderを使うほうがいい。
 * @param channelId nullならチャネルidはDEFAULT_CHANNEL_IDになる
 * @param name
 * @param importance
 * @param groupId
 * @param groupName
 */
public ChannelBuilder(
	@NonNull final Context context,
	@Nullable final String channelId,
	@Nullable final CharSequence name,
	@Importance final int importance,
	@Nullable final String groupId, @Nullable final String groupName) {

	if (DEBUG) Log.v(TAG, "Constructor:");
	this.mContext = context;
	this.channelId = TextUtils.isEmpty(channelId)
		? DEFAULT_CHANNEL_ID : channelId;
	this.name = name;
	this.importance = importance;
	this.groupId = groupId;
	this.groupName = groupName;
}
 
Example 2
Source File: NetworkUtils.java    From android-dev-challenge with Apache License 2.0 6 votes vote down vote up
/**
 * Builds the URL used to talk to the weather server using a location. This location is based
 * on the query capabilities of the weather provider that we are using.
 *
 * @param locationQuery The location that will be queried for.
 * @return The URL to use to query the weather server.
 */
private static URL buildUrlWithLocationQuery(String locationQuery) {
    Uri weatherQueryUri = Uri.parse(FORECAST_BASE_URL).buildUpon()
            .appendQueryParameter(QUERY_PARAM, locationQuery)
            .appendQueryParameter(FORMAT_PARAM, format)
            .appendQueryParameter(UNITS_PARAM, units)
            .appendQueryParameter(DAYS_PARAM, Integer.toString(numDays))
            .build();

    try {
        URL weatherQueryUrl = new URL(weatherQueryUri.toString());
        Log.v(TAG, "URL: " + weatherQueryUrl);
        return weatherQueryUrl;
    } catch (MalformedURLException e) {
        e.printStackTrace();
        return null;
    }
}
 
Example 3
Source File: Utility.java    From Image-Steganography-Library-Android with MIT License 6 votes vote down vote up
/**
 * This method converts the byte array to an integer array.
 *
 * @return : Integer Array
 * @parameter : b {the byte array}
 */

public static int[] byteArrayToIntArray(byte[] b) {

    Log.v("Size byte array", b.length + "");

    int size = b.length / 3;

    Log.v("Size Int array", size + "");

    System.runFinalization();
    //Garbage collection
    System.gc();

    Log.v("FreeMemory", Runtime.getRuntime().freeMemory() + "");
    int[] result = new int[size];
    int offset = 0;
    int index = 0;

    while (offset < b.length) {
        result[index++] = byteArrayToInt(b, offset);
        offset = offset + 3;
    }

    return result;
}
 
Example 4
Source File: CustomViewAbove.java    From WeatherStream with Apache License 2.0 5 votes vote down vote up
private boolean thisSlideAllowed(float dx) {
	boolean allowed = false;
	if (isMenuOpen()) {
		allowed = mViewBehind.menuOpenSlideAllowed(dx);
	} else {
		allowed = mViewBehind.menuClosedSlideAllowed(dx);
	}
	if (DEBUG)
		Log.v(TAG, "this slide allowed " + allowed + " dx: " + dx);
	return allowed;
}
 
Example 5
Source File: CheckRecentRun.java    From WhatsApp-Cleaner with MIT License 5 votes vote down vote up
public void setAlarm() {

        Intent serviceIntent = new Intent(this, CheckRecentRun.class);
        PendingIntent pi = PendingIntent.getService(this, 131313, serviceIntent,
                PendingIntent.FLAG_CANCEL_CURRENT);

        AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
        if (am != null) {
            am.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + delay, pi);
        }
        Log.v(TAG, "Alarm set");
    }
 
Example 6
Source File: EGLBase.java    From Fatigue-Detection with MIT License 5 votes vote down vote up
private void init(EGLContext shared_context, final boolean with_depth_buffer, final boolean isRecordable) {
	if (DEBUG) Log.v(TAG, "init:");
       if (mEglDisplay != EGL14.EGL_NO_DISPLAY) {
           throw new RuntimeException("EGL already set up");
       }

       mEglDisplay = EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY);
       if (mEglDisplay == EGL14.EGL_NO_DISPLAY) {
           throw new RuntimeException("eglGetDisplay failed");
       }

	final int[] version = new int[2];
       if (!EGL14.eglInitialize(mEglDisplay, version, 0, version, 1)) {
       	mEglDisplay = null;
           throw new RuntimeException("eglInitialize failed");
       }

	shared_context = shared_context != null ? shared_context : EGL14.EGL_NO_CONTEXT;
       if (mEglContext == EGL14.EGL_NO_CONTEXT) {
           mEglConfig = getConfig(with_depth_buffer, isRecordable);
           if (mEglConfig == null) {
               throw new RuntimeException("chooseConfig failed");
           }
           // create EGL rendering context
        mEglContext = createContext(shared_context);
       }
       // confirm whether the EGL rendering context is successfully created
       final int[] values = new int[1];
       EGL14.eglQueryContext(mEglDisplay, mEglContext, EGL14.EGL_CONTEXT_CLIENT_VERSION, values, 0);
       if (DEBUG) Log.d(TAG, "EGLContext created, client version " + values[0]);
       makeDefault();	// makeCurrent(EGL14.EGL_NO_SURFACE);
}
 
Example 7
Source File: ServiceRecorder.java    From libcommon with Apache License 2.0 5 votes vote down vote up
/**
 * 関係するリソースを破棄する
 */
public void release() {
	if (!mReleased) {
		mReleased = true;
		if (DEBUG) Log.v(TAG, "release:");
		internalRelease();
	}
}
 
Example 8
Source File: PtrCLog.java    From Study_Android_Demo with Apache License 2.0 5 votes vote down vote up
/**
 * Send a VERBOSE log message.
 *
 * @param tag
 * @param msg
 * @param args
 */
public static void v(String tag, String msg, Object... args) {
    if (sLevel > LEVEL_VERBOSE) {
        return;
    }
    if (args.length > 0) {
        msg = String.format(msg, args);
    }
    Log.v(tag, msg);
}
 
Example 9
Source File: PrinterLogger.java    From ViewPrinter with Apache License 2.0 5 votes vote down vote up
void v(String message) {
    if (should(LEVEL_VERBOSE)) {
        Log.v(mTag, message);
        lastMessage = message;
        lastTag = mTag;
    }
}
 
Example 10
Source File: RenderHandler.java    From Fatigue-Detection with MIT License 5 votes vote down vote up
public static final RenderHandler createHandler(final String name,int width, int height) {
	if (DEBUG) Log.v(TAG, "createHandler:");
	final RenderHandler handler = new RenderHandler(width,height);
	synchronized (handler.mSync) {
		new Thread(handler, !TextUtils.isEmpty(name) ? name : TAG).start();
		try {
			handler.mSync.wait();
		} catch (final InterruptedException e) {
		}
	}
	return handler;
}
 
Example 11
Source File: WXSvgContainer.java    From Svg-for-Apache-Weex with Apache License 2.0 5 votes vote down vote up
@WXComponentProp(name = "viewBox")
public void setViewBox(String viewBox) {
  String box = viewBox;
  Log.v("WXSvgContainer", "box is " + box);
  if (!TextUtils.isEmpty(box)) {
    String[] p = box.split(" ");
    if (p != null && p.length == 4) {
      mViewBoxX = Integer.valueOf(p[0]);
      mViewBoxY = Integer.valueOf(p[1]);
      mviewBoxWidth = Integer.valueOf(p[2]);
      mviewBoxHeight = Integer.valueOf(p[3]);
    }
  }
}
 
Example 12
Source File: GnssLocationProvider.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
/**
 * called from native code to update our status
 */
private void reportStatus(int status) {
    if (DEBUG) Log.v(TAG, "reportStatus status: " + status);

    boolean wasNavigating = mNavigating;
    switch (status) {
        case GPS_STATUS_SESSION_BEGIN:
            mNavigating = true;
            mEngineOn = true;
            break;
        case GPS_STATUS_SESSION_END:
            mNavigating = false;
            break;
        case GPS_STATUS_ENGINE_ON:
            mEngineOn = true;
            break;
        case GPS_STATUS_ENGINE_OFF:
            mEngineOn = false;
            mNavigating = false;
            break;
    }

    if (wasNavigating != mNavigating) {
        mListenerHelper.onStatusChanged(mNavigating);

        // send an intent to notify that the GPS has been enabled or disabled
        Intent intent = new Intent(LocationManager.GPS_ENABLED_CHANGE_ACTION);
        intent.putExtra(LocationManager.EXTRA_GPS_ENABLED, mNavigating);
        mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
    }
}
 
Example 13
Source File: RadioDevice.java    From monkeyboard-radio-android with GNU General Public License v3.0 5 votes vote down vote up
public void startPollLoop() {
    Log.v(TAG, "startPollLoop()");

    if (pollThread != null) {
        pollThread.interrupt();
    }

    Log.v(TAG, "Starting poll loop");
    pollThread = new Thread(pollLoop);
    pollThread.start();
}
 
Example 14
Source File: LogUtils.java    From Torchie-Android with GNU General Public License v2.0 5 votes vote down vote up
public static void LOGV(final String tag, String message, Throwable cause) {
    if (LOGGING_ENABLED) {
        if (Log.isLoggable(tag, Log.VERBOSE)) {
            Log.v(tag, message, cause);
        }
    }
}
 
Example 15
Source File: PhaseAlignController.java    From libsoftwaresync with Apache License 2.0 4 votes vote down vote up
public PhaseAlignController(PhaseConfig config, MainActivity context) {
  handler = new Handler();
  phaseAligner = new PhaseAligner(config);
  Log.v(TAG, "Loaded phase align config.");
  this.context = context;
}
 
Example 16
Source File: StarsListFragment.java    From GitJourney with Apache License 2.0 4 votes vote down vote up
@Override
public Loader<List<StarsDataEntry>> onCreateLoader(int id, Bundle args) {
    Log.v(TAG, "onCreateLoader " + args);
    return new StarsLoader(getContext(), args.getInt("page"));
}
 
Example 17
Source File: DalvikPositionService.java    From attach with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
    if (debug) {
        Log.v(TAG, String.format("Status for LocationProvider %s changed to %d.", provider, status));
    }
}
 
Example 18
Source File: AbstractRendererHolder.java    From libcommon with Apache License 2.0 4 votes vote down vote up
@Override
public void release() {
	if (DEBUG) Log.v(TAG, "release:");
	mEglTask.release();
	super.release();
}
 
Example 19
Source File: LogUtils.java    From Reader with Apache License 2.0 4 votes vote down vote up
public static void v(String tag, String outMessage) {
    if (DEV_BUILD) {
        Log.v(tag, outMessage);
    }
}
 
Example 20
Source File: VolleyLog.java    From SaveVolley with Apache License 2.0 4 votes vote down vote up
public static void v(String format, Object... args) {
    if (DEBUG) {
        Log.v(TAG, buildMessage(format, args));
    }
}