Example usage for android.util Log VERBOSE

List of usage examples for android.util Log VERBOSE

Introduction

In this page you can find the example usage for android.util Log VERBOSE.

Prototype

int VERBOSE

To view the source code for android.util Log VERBOSE.

Click Source Link

Document

Priority constant for the println method; use Log.v.

Usage

From source file:android.percent.support.PercentLayoutHelper.java

private static PercentLayoutInfo setTextSizeSupportVal(TypedArray array, PercentLayoutInfo info) {
    //textSizePercent ???        PercentLayoutInfo.PercentVal percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_textSizePercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent text size: " + percentVal.percent);
        }// w w  w  .j a  v  a2  s .  c o m
        info = checkForInfoExists(info);
        info.textSizePercent = percentVal;
    }

    return info;
}

From source file:org.restcomm.android.olympus.MainActivity.java

@Override
public void onServiceConnected(ComponentName className, IBinder service) {
    Log.i(TAG, "%% onServiceConnected");
    // We've bound to LocalService, cast the IBinder and get LocalService instance
    RCDevice.RCDeviceBinder binder = (RCDevice.RCDeviceBinder) service;
    device = binder.getService();//from  w  w w.  j  a va  2  s .co m

    if (!device.isInitialized()) {
        HashMap<String, Object> params = new HashMap<String, Object>();
        params.put(RCDevice.ParameterKeys.INTENT_INCOMING_CALL,
                new Intent(RCDevice.ACTION_INCOMING_CALL, null, getApplicationContext(), CallActivity.class));
        params.put(RCDevice.ParameterKeys.INTENT_INCOMING_MESSAGE, new Intent(RCDevice.ACTION_INCOMING_MESSAGE,
                null, getApplicationContext(), MessageActivity.class));
        params.put(RCDevice.ParameterKeys.SIGNALING_DOMAIN,
                prefs.getString(RCDevice.ParameterKeys.SIGNALING_DOMAIN, ""));
        params.put(RCDevice.ParameterKeys.SIGNALING_USERNAME,
                prefs.getString(RCDevice.ParameterKeys.SIGNALING_USERNAME, "android-sdk"));
        params.put(RCDevice.ParameterKeys.SIGNALING_PASSWORD,
                prefs.getString(RCDevice.ParameterKeys.SIGNALING_PASSWORD, "1234"));
        params.put(RCDevice.ParameterKeys.MEDIA_ICE_URL,
                prefs.getString(RCDevice.ParameterKeys.MEDIA_ICE_URL, ""));
        params.put(RCDevice.ParameterKeys.MEDIA_ICE_USERNAME,
                prefs.getString(RCDevice.ParameterKeys.MEDIA_ICE_USERNAME, ""));
        params.put(RCDevice.ParameterKeys.MEDIA_ICE_PASSWORD,
                prefs.getString(RCDevice.ParameterKeys.MEDIA_ICE_PASSWORD, ""));
        params.put(RCDevice.ParameterKeys.MEDIA_ICE_DOMAIN,
                prefs.getString(RCDevice.ParameterKeys.MEDIA_ICE_DOMAIN, ""));
        params.put(RCDevice.ParameterKeys.MEDIA_TURN_ENABLED,
                prefs.getBoolean(RCDevice.ParameterKeys.MEDIA_TURN_ENABLED, true));
        params.put(RCDevice.ParameterKeys.SIGNALING_SECURE_ENABLED,
                prefs.getBoolean(RCDevice.ParameterKeys.SIGNALING_SECURE_ENABLED, true));
        // The SDK provides the user with default sounds for calling, ringing, busy (declined) and message, but the user can override them
        // by providing their own resource files (i.e. .wav, .mp3, etc) at res/raw passing them with Resource IDs like R.raw.user_provided_calling_sound
        //params.put(RCDevice.ParameterKeys.RESOURCE_SOUND_CALLING, R.raw.user_provided_calling_sound);
        //params.put(RCDevice.ParameterKeys.RESOURCE_SOUND_RINGING, R.raw.user_provided_ringing_sound);
        //params.put(RCDevice.ParameterKeys.RESOURCE_SOUND_DECLINED, R.raw.user_provided_declined_sound);
        //params.put(RCDevice.ParameterKeys.RESOURCE_SOUND_MESSAGE, R.raw.user_provided_message_sound);

        // These are for debugging purposes, NOT for release builds!
        //params.put(RCDevice.ParameterKeys.DEBUG_JAIN_SIP_LOGGING_ENABLED, prefs.getBoolean(RCDevice.ParameterKeys.DEBUG_JAIN_SIP_LOGGING_ENABLED, true));
        //params.put(RCDevice.ParameterKeys.DEBUG_JAIN_DISABLE_CERTIFICATE_VERIFICATION, prefs.getBoolean(RCDevice.ParameterKeys.DEBUG_JAIN_DISABLE_CERTIFICATE_VERIFICATION, true));

        device.setLogLevel(Log.VERBOSE);
        device.initialize(getApplicationContext(), params, this);
    }

    if (device.getState() == RCDevice.DeviceState.OFFLINE) {
        getSupportActionBar()
                .setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.colorTextSecondary)));
    } else {
        getSupportActionBar()
                .setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.colorPrimary)));
        handleExternalCall();
    }

    serviceBound = true;
}

From source file:com.googlecode.eyesfree.testing.BaseAccessibilityInstrumentationTestCase.java

private boolean assertAccessibilityStateSync(boolean enabled) {
    final boolean state;

    final long startTime = SystemClock.uptimeMillis();

    synchronized (mAccessibilityStateLock) {
        mManager.addAccessibilityStateChangeListener(mStateListener);

        try {//www  .  j a va  2s  .c o  m
            while (true) {
                if (mManager.isEnabled() == enabled) {
                    break;
                }

                final long elapsed = (SystemClock.uptimeMillis() - startTime);
                final long timeLeft = (STATE_CHANGE_TIMEOUT - elapsed);
                if (timeLeft <= 0) {
                    break;
                }

                mAccessibilityStateLock.wait(timeLeft);
            }
        } catch (InterruptedException e) {
            // Do nothing.
        }

        state = mManager.isEnabled();

        assertEquals("Toggled accessibility state", enabled, state);

        mManager.removeAccessibilityStateChangeListener(mStateListener);
    }

    LogUtils.log(this, Log.VERBOSE, "Took %d ms to enable accessibility",
            (SystemClock.uptimeMillis() - startTime));

    return state;
}

From source file:com.neuwill.support.PercentLayoutHelper.java

private static PercentLayoutInfo setTextSizeSupportVal(TypedArray array, PercentLayoutInfo info) {
    // textSizePercent 
    PercentLayoutInfo.PercentVal percentVal = getPercentVal(array,
            R.styleable.PercentLayout_Layout_layout_textSizePercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent text size: " + percentVal.percent);
        }/*w ww  .  j a  v  a2  s . c om*/
        info = checkForInfoExists(info);
        info.textSizePercent = percentVal;
    }

    return info;
}

From source file:com.concentriclivers.mms.com.android.mms.transaction.MessagingNotification.java

/**
 * Checks to see if there are any "unseen" messages or delivery
 * reports and builds a sorted (by delivery date) list of unread notifications.
 *
 * @param context the context to use/*from   w ww . j  a  va  2 s.  c o m*/
 * @param newMsgThreadId The thread ID of a new message that we're to notify about; if there's
 *  no new message, use THREAD_NONE. If we should notify about multiple or unknown thread IDs,
 *  use THREAD_ALL.
 * @param isStatusMessage
 */
public static void blockingUpdateNewMessageIndicator(Context context, long newMsgThreadId,
        boolean isStatusMessage) {
    // TDH
    Log.d("NotificationDebug", "blockingUpdateNewMessageIndicator: newMsgThreadId: " + newMsgThreadId);

    synchronized (sCurrentlyDisplayedThreadLock) {
        if (newMsgThreadId > 0 && newMsgThreadId == sCurrentlyDisplayedThreadId) {
            if (DEBUG) {
                Log.d(TAG,
                        "blockingUpdateNewMessageIndicator: newMsgThreadId == "
                                + "sCurrentlyDisplayedThreadId so NOT showing notification,"
                                + " but playing soft sound. threadId: " + newMsgThreadId);
            }
            // TDH
            Log.d("NotificationDebug", "Calling playInConversationNotificationSound");

            playInConversationNotificationSound(context);
            return;
        }
    }
    // TDH
    Log.d("NotificationDebug", "Calling sNotificationSet.clear();");

    sNotificationSet.clear();

    MmsSmsDeliveryInfo delivery = null;
    Set<Long> threads = new HashSet<Long>(4);

    int count = 0;
    addMmsNotificationInfos(context, threads);
    addSmsNotificationInfos(context, threads);

    // TDH
    Log.d("NotificationDebug", "Cancelling notification");

    cancelNotification(context, NOTIFICATION_ID);
    if (!sNotificationSet.isEmpty()) {
        if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {
            Log.d(TAG,
                    "blockingUpdateNewMessageIndicator: count=" + count + ", newMsgThreadId=" + newMsgThreadId);
        }
        // TDH
        Log.d("NotificationDebug", "Calling updateNotification()");

        updateNotification(context, newMsgThreadId != THREAD_NONE, threads.size());
    }

    // And deals with delivery reports (which use Toasts). It's safe to call in a worker
    // thread because the toast will eventually get posted to a handler.
    delivery = getSmsNewDeliveryInfo(context);
    if (delivery != null) {
        delivery.deliver(context, isStatusMessage);
    }
}

From source file:com.dirkgassen.wator.ui.activity.MainActivity.java

/** Notifies all {@link #worldObservers} of a world change */
private void worldUpdated() {
    synchronized (worldObserverMutex) {
        if (worldObserverCount > 0) {
            Simulator.WorldInspector world = simulator.getWorldToPaint();
            try {
                for (int observerNo = 0; observerNo < worldObserverCount; observerNo++) {
                    worldObservers[observerNo].worldUpdated(world);
                    world.reset();/*ww  w .  ja v  a2 s  .co m*/
                }
                if (Log.isLoggable("Wa-Tor", Log.VERBOSE)) {
                    Log.v("Wa-Tor", "Fish: " + world.getFishCount() + "; sharks: " + world.getSharkCount());
                }
                if (world.getSharkCount() == 0) {
                    simulatorRunnable.stopTicking();
                }
            } finally {
                world.release();
            }
        }
    }
    // Note: not synchronizing here, but rather a rudimentary check to avoid posting if it's not
    // necessary. If the drawer opens while we are executing and one of these fields change to non-null
    // then the frame rate will be update next time. If it's the other way around the updateFpsRunnable
    // should synchronize and check again.
    if (currentSimFps != null || currentDrawFps != null && nextFpsUpdate < System.currentTimeMillis()) {
        handler.post(updateFpsRunnable);
        nextFpsUpdate = System.currentTimeMillis() + 6000L;
    }
}

From source file:com.kth.common.utils.etc.LogUtil.java

/**
 * VERBOSE  ? ?  ?.
 */
public static boolean isVerboseEnabled() {
    return Log.isLoggable(TAG, Log.VERBOSE);
}

From source file:com.android.utils.AccessibilityNodeInfoUtils.java

public static boolean shouldFocusNode(final AccessibilityNodeInfoCompat node,
        final Map<AccessibilityNodeInfoCompat, Boolean> speakingNodeCache, boolean checkChildren) {
    if (node == null) {
        return false;
    }/* w w  w.  ja v  a  2  s. c  o  m*/

    // Inside views that support web navigation, we delegate focus to the view itself and
    // assume that it navigates to and focuses the correct elements.
    if (WebInterfaceUtils.supportsWebActions(node)) {
        return true;
    }

    if (!isVisible(node)) {
        LogUtils.log(AccessibilityNodeInfoUtils.class, Log.VERBOSE, "Don't focus, node is not visible");
        return false;
    }

    // Only allow node with same bounds as window if it is clickable or leaf.
    if (areBoundsIdenticalToWindow(node) && !isClickable(node) && node.getChildCount() > 0) {
        LogUtils.log(AccessibilityNodeInfoUtils.class, Log.VERBOSE,
                "Don't focus, node bounds are same as window root node bounds");
        return false;
    }

    HashSet<AccessibilityNodeInfoCompat> visitedNodes = new HashSet<>();
    try {
        boolean accessibilityFocusable = isAccessibilityFocusableInternal(node, speakingNodeCache,
                visitedNodes);

        if (!checkChildren) {
            // End of the line. Don't check children and don't allow any recursion.
            return accessibilityFocusable;
        }

        if (accessibilityFocusable) {
            AccessibilityNodeInfoUtils.recycleNodes(visitedNodes);
            visitedNodes.clear();
            // TODO: This may still result in focusing non-speaking nodes, but it
            // won't prevent unlabeled buttons from receiving focus.
            if (!hasVisibleChildren(node)) {
                LogUtils.log(AccessibilityNodeInfoUtils.class, Log.VERBOSE,
                        "Focus, node is focusable and has no visible children");
                return true;
            } else if (isSpeakingNode(node, speakingNodeCache, visitedNodes)) {
                LogUtils.log(AccessibilityNodeInfoUtils.class, Log.VERBOSE,
                        "Focus, node is focusable and has something to speak");
                return true;
            } else {
                LogUtils.log(AccessibilityNodeInfoUtils.class, Log.VERBOSE,
                        "Don't focus, node is focusable but has nothing to speak");
                return false;
            }
        }
    } finally {
        AccessibilityNodeInfoUtils.recycleNodes(visitedNodes);
    }

    // If this node has no focusable ancestors, but it still has text,
    // then it should receive focus from navigation and be read aloud.
    NodeFilter filter = new NodeFilter() {
        @Override
        public boolean accept(AccessibilityNodeInfoCompat node) {
            return shouldFocusNode(node, speakingNodeCache, false);
        }
    };

    if (!hasMatchingAncestor(node, filter) && hasText(node)) {
        LogUtils.log(AccessibilityNodeInfoUtils.class, Log.VERBOSE,
                "Focus, node has text and no focusable ancestors");
        return true;
    }

    LogUtils.log(AccessibilityNodeInfoUtils.class, Log.VERBOSE, "Don't focus, failed all focusability tests");
    return false;
}

From source file:com.icenler.lib.view.support.percentlayout.PercentLayoutHelper.java

private static PercentLayoutInfo setMarginRelatedVal(TypedArray array, PercentLayoutInfo info) {
    //margin?//from   www  .  j  av  a  2 s  .  c  om
    PercentLayoutInfo.PercentVal percentVal = getPercentVal(array,
            com.zhy.android.percent.support.R.styleable.PercentLayout_Layout_layout_marginPercent, true);

    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
        info.topMarginPercent = percentVal;
        info.rightMarginPercent = percentVal;
        info.bottomMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array,
            com.zhy.android.percent.support.R.styleable.PercentLayout_Layout_layout_marginLeftPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent left margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array,
            com.zhy.android.percent.support.R.styleable.PercentLayout_Layout_layout_marginTopPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent top margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.topMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array,
            com.zhy.android.percent.support.R.styleable.PercentLayout_Layout_layout_marginRightPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent right margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.rightMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array,
            com.zhy.android.percent.support.R.styleable.PercentLayout_Layout_layout_marginBottomPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent bottom margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.bottomMarginPercent = percentVal;
    }
    percentVal = getPercentVal(array,
            com.zhy.android.percent.support.R.styleable.PercentLayout_Layout_layout_marginStartPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent start margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.startMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array,
            com.zhy.android.percent.support.R.styleable.PercentLayout_Layout_layout_marginEndPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent end margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.endMarginPercent = percentVal;
    }

    return info;
}

From source file:com.google.android.dialer.provider.DialerProvider.java

private Location getLastLocation() {
    LocationManager locationManager = (LocationManager) getContext().getSystemService(Context.LOCATION_SERVICE);
    locationManager.requestSingleUpdate(new Criteria(), new LocationListener() {
        @Override//from   ww w  .j  a  v a 2s  .  com
        public void onLocationChanged(Location location) {
            if (Log.isLoggable("DialerProvider", Log.VERBOSE)) {
                Log.v("DialerProvider", "onLocationChanged: " + location);
            }
        }

        @Override
        public void onProviderDisabled(String provider) {
            if (Log.isLoggable("DialerProvider", Log.VERBOSE)) {
                Log.v("DialerProvider", "onProviderDisabled: " + provider);
            }
        }

        @Override
        public void onProviderEnabled(String provider) {
            if (Log.isLoggable("DialerProvider", Log.VERBOSE)) {
                Log.v("DialerProvider", "onProviderEnabled: " + provider);
            }
        }

        @Override
        public void onStatusChanged(String provider, int status, Bundle extras) {
            if (Log.isLoggable("DialerProvider", Log.VERBOSE)) {
                Log.v("DialerProvider", "onStatusChanged: " + provider + ", " + status + ", " + extras);
            }
        }
    }, DialerProvider.mLooper);
    return locationManager.getLastLocation();
}