From 431bb2269532f2514861b908d5fafda8fa64da79 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Mon, 18 Oct 2010 19:13:23 -0400 Subject: Reduce logging. Remember, the system and main logs are - Shared resources - Primarily for recording problems - To be used only for large grained events during normal operation Bug: 3104855 Change-Id: I136fbd101917dcbc8ebc3f96f276426b48bde7b7 --- voip/java/com/android/server/sip/SipService.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'voip') diff --git a/voip/java/com/android/server/sip/SipService.java b/voip/java/com/android/server/sip/SipService.java index 1df08c0..a6f0d88 100644 --- a/voip/java/com/android/server/sip/SipService.java +++ b/voip/java/com/android/server/sip/SipService.java @@ -68,7 +68,7 @@ import javax.sip.SipException; public final class SipService extends ISipService.Stub { static final String TAG = "SipService"; static final boolean DEBUGV = false; - private static final boolean DEBUG = true; + private static final boolean DEBUG = false; private static final boolean DEBUG_TIMER = DEBUG && false; private static final int EXPIRY_TIME = 3600; private static final int SHORT_EXPIRY_TIME = 10; @@ -104,7 +104,7 @@ public final class SipService extends ISipService.Stub { if (SipManager.isApiSupported(context)) { ServiceManager.addService("sip", new SipService(context)); context.sendBroadcast(new Intent(SipManager.ACTION_SIP_SERVICE_UP)); - Log.i(TAG, "SIP service started"); + if (DEBUG) Log.i(TAG, "SIP service started"); } } @@ -222,7 +222,7 @@ public final class SipService extends ISipService.Stub { SipSessionGroupExt group = mSipGroups.get(localProfileUri); if (group == null) return; if (!isCallerCreatorOrRadio(group)) { - Log.d(TAG, "only creator or radio can close this profile"); + Log.w(TAG, "only creator or radio can close this profile"); return; } @@ -244,7 +244,7 @@ public final class SipService extends ISipService.Stub { if (isCallerCreatorOrRadio(group)) { return group.isOpened(); } else { - Log.i(TAG, "only creator or radio can query on the profile"); + Log.w(TAG, "only creator or radio can query on the profile"); return false; } } @@ -257,7 +257,7 @@ public final class SipService extends ISipService.Stub { if (isCallerCreatorOrRadio(group)) { return group.isRegistered(); } else { - Log.i(TAG, "only creator or radio can query on the profile"); + Log.w(TAG, "only creator or radio can query on the profile"); return false; } } @@ -271,7 +271,7 @@ public final class SipService extends ISipService.Stub { if (isCallerCreator(group)) { group.setListener(listener); } else { - Log.i(TAG, "only creator can set listener on the profile"); + Log.w(TAG, "only creator can set listener on the profile"); } } @@ -285,7 +285,7 @@ public final class SipService extends ISipService.Stub { SipSessionGroupExt group = createGroup(localProfile); return group.createSession(listener); } catch (SipException e) { - Log.w(TAG, "createSession()", e); + if (DEBUG) Log.d(TAG, "createSession()", e); return null; } } @@ -303,7 +303,7 @@ public final class SipService extends ISipService.Stub { s.connect(InetAddress.getByName("192.168.1.1"), 80); return s.getLocalAddress().getHostAddress(); } catch (IOException e) { - Log.w(TAG, "determineLocalIp()", e); + if (DEBUG) Log.d(TAG, "determineLocalIp()", e); // dont do anything; there should be a connectivity change going return null; } @@ -467,7 +467,7 @@ public final class SipService extends ISipService.Stub { return createSipSessionGroup(null, localProfile, password); } else { // recursive - Log.wtf(TAG, "impossible!"); + Log.wtf(TAG, "impossible! recursive!"); throw new RuntimeException("createSipSessionGroup"); } } -- cgit v1.1