Android Open Source - chirpradio-android Debug






From Project

Back to project page chirpradio-android.

License

The source code is released under:

Apache License

If you think the Android project chirpradio-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

// Copyright 2011 The Chicago Independent Radio Project 
// Copyright 2010 Google Inc.
///* w w  w . j  a  v  a2 s .  com*/
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * Wrapper around debug logging to simplify things and get fine
 * grained control
 *
 * @author Nick Gamroth
 */

package org.chirpradio.mobile;

import android.util.Log;
import java.util.List;
import java.util.LinkedList;
import java.util.Collections;

public class Debug
{
    private final static List<String> shutup;
    static {
        List<String> shh = new LinkedList<String>();
        shh.add("Request");
        shutup = Collections.unmodifiableList(shh);
    }

    private final static String LOG_TAG = "CHIRP";
    public static void log(Object caller, String message) {
        if(!shutup.contains(caller.getClass().getSimpleName()))
            Log.d(LOG_TAG, caller.getClass().getSimpleName() + ":\t" + message);
    }
}




Java Source Code List

org.chirpradio.mobile.Debug.java
org.chirpradio.mobile.MainMenu.java
org.chirpradio.mobile.NotificationUpdateReceiver.java
org.chirpradio.mobile.NotificationUpdateTask.java
org.chirpradio.mobile.OnPlaybackStartedListener.java
org.chirpradio.mobile.OnPlaybackStoppedListener.java
org.chirpradio.mobile.PlaybackService.java
org.chirpradio.mobile.Playing.java
org.chirpradio.mobile.Request.java
org.chirpradio.mobile.Track.java
org.npr.android.news.StreamProxy.java