diff --git a/core/java/com/android/internal/util/HierarchicalStateMachine.java b/core/java/com/android/internal/util/HierarchicalStateMachine.java index aaaa1948b15f6..7920b72dbb953 100644 --- a/core/java/com/android/internal/util/HierarchicalStateMachine.java +++ b/core/java/com/android/internal/util/HierarchicalStateMachine.java @@ -1094,7 +1094,9 @@ public class HierarchicalStateMachine { * @param msg that couldn't be handled. */ protected void unhandledMessage(Message msg) { - Log.e(TAG, mName + " - unhandledMessage: msg.what=" + msg.what); + if (false) { + Log.e(TAG, mName + " - unhandledMessage: msg.what=" + msg.what); + } } /** diff --git a/libs/utils/StreamingZipInflater.cpp b/libs/utils/StreamingZipInflater.cpp index 7ebde78cd85b9..1f62ac51896e9 100644 --- a/libs/utils/StreamingZipInflater.cpp +++ b/libs/utils/StreamingZipInflater.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#define LOG_NDEBUG 1 #define LOG_TAG "szipinf" #include @@ -157,7 +158,7 @@ ssize_t StreamingZipInflater::read(void* outBuf, size_t count) { */ int result = Z_OK; if (mStreamNeedsInit) { - LOGI("Initializing zlib to inflate"); + LOGD("Initializing zlib to inflate"); result = inflateInit2(&mInflateState, -MAX_WBITS); mStreamNeedsInit = false; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java index e0019b59c2303..fb74e70f61a4f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarPolicy.java @@ -699,7 +699,6 @@ public class StatusBarPolicy { NetworkInfo info = (NetworkInfo)(intent.getParcelableExtra( ConnectivityManager.EXTRA_NETWORK_INFO)); int connectionStatus = intent.getIntExtra(ConnectivityManager.EXTRA_INET_CONDITION, 0); - Slog.d(TAG, "got CONNECTIVITY_ACTION - info=" + info + ", status = " + connectionStatus); int inetCondition = (connectionStatus > INET_CONDITION_THRESHOLD ? 1 : 0); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java index 5594a47fb7b31..a7e5d736605f7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java @@ -44,6 +44,7 @@ import com.android.systemui.R; public abstract class StatusBarService extends Service implements CommandQueue.Callbacks { static final String TAG = "StatusBarService"; + private static final boolean SPEW = false; protected CommandQueue mCommandQueue; protected IStatusBarService mBarService; @@ -121,11 +122,12 @@ public abstract class StatusBarService extends Service implements CommandQueue.C // TODO lp.windowAnimations = R.style.Animation_StatusBar; WindowManagerImpl.getDefault().addView(sb, lp); - Slog.d(TAG, "Added status bar view: gravity=0x" + Integer.toHexString(lp.gravity) - + " icons=" + iconList.size() - + " lights=" + (switches[0]?"on":"off") - + " menu=" + (switches[1]?"visible":"invisible") - ); + if (SPEW) { + Slog.d(TAG, "Added status bar view: gravity=0x" + Integer.toHexString(lp.gravity) + + " icons=" + iconList.size() + + " lights=" + (switches[0]?"on":"off") + + " menu=" + (switches[1]?"visible":"invisible") + ); + } } } - diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java index d19f318ed4f69..165107c985e4e 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java @@ -97,8 +97,8 @@ import android.view.WindowManagerPolicy; public class KeyguardViewMediator implements KeyguardViewCallback, KeyguardUpdateMonitor.SimStateCallback { private static final int KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT = 30000; - private final static boolean DEBUG = false && Config.LOGD; - private final static boolean DBG_WAKE = DEBUG || true; + private final static boolean DEBUG = false; + private final static boolean DBG_WAKE = false; private final static String TAG = "KeyguardViewMediator"; @@ -642,7 +642,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback, * @see #onWakeKeyWhenKeyguardShowingTq(int) */ private void wakeWhenReadyLocked(int keyCode) { - if (DBG_WAKE) Log.d(TAG, "wakeWhenReadyLocked(" + keyCode + ")"); + if (true || DBG_WAKE) Log.d(TAG, "wakeWhenReadyLocked(" + keyCode + ")"); /** * acquire the handoff lock that will keep the cpu running. this will @@ -1169,5 +1169,3 @@ public class KeyguardViewMediator implements KeyguardViewCallback, } } } - - diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java index 50b3abebe083a..90ebf3f3d7072 100644 --- a/services/java/com/android/server/BackupManagerService.java +++ b/services/java/com/android/server/BackupManagerService.java @@ -664,11 +664,11 @@ class BackupManagerService extends IBackupManager.Stub { // backup. RandomAccessFile in = null; try { - Slog.i(TAG, "Found stale backup journal, scheduling:"); + Slog.i(TAG, "Found stale backup journal, scheduling"); in = new RandomAccessFile(f, "r"); while (true) { String packageName = in.readUTF(); - Slog.i(TAG, " + " + packageName); + Slog.i(TAG, " " + packageName); dataChangedImpl(packageName); } } catch (EOFException e) { diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java index 15eaa9e15aa95..8066fa70991f5 100755 --- a/services/java/com/android/server/NotificationManagerService.java +++ b/services/java/com/android/server/NotificationManagerService.java @@ -700,9 +700,6 @@ public class NotificationManagerService extends INotificationManager.Stub public void enqueueNotificationInternal(String pkg, int callingUid, int callingPid, String tag, int id, Notification notification, int[] idOut) { - Slog.d(TAG, "enqueueNotificationWithTag: calling uid=" + callingUid - + ", pid=" + callingPid); - checkIncomingCall(pkg); // Limit the number of notifications that any given package except the android diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java index 666bb2671c06c..c50a01e9de2ee 100644 --- a/services/java/com/android/server/PackageManagerService.java +++ b/services/java/com/android/server/PackageManagerService.java @@ -2500,7 +2500,9 @@ class PackageManagerService extends IPackageManager.Stub { return; } - Log.d(TAG, "Scanning app dir " + dir); + if (false) { + Log.d(TAG, "Scanning app dir " + dir); + } int i; for (i=0; i Got mCallerInfo: " + mCallerInfo); + if (DBG) Log.d(LOG_TAG, "==> Got mCallerInfo: " + mCallerInfo); // Use the number entered by the user for display. if (!TextUtils.isEmpty(cw.number)) { @@ -241,7 +241,7 @@ public class CallerInfoAsyncQuery { } } - if (DBG) log("constructing CallerInfo object for token: " + token); + if (DBG) Log.d(LOG_TAG, "constructing CallerInfo object for token: " + token); //notify that we can clean up the queue after this. CookieWrapper endMarker = new CookieWrapper(); @@ -251,7 +251,7 @@ public class CallerInfoAsyncQuery { //notify the listener that the query is complete. if (cw.listener != null) { - if (DBG) log("notifying listener: " + cw.listener.getClass().toString() + + if (DBG) Log.d(LOG_TAG, "notifying listener: " + cw.listener.getClass().toString() + " for token: " + token + mCallerInfo); cw.listener.onQueryComplete(token, cw.cookie, mCallerInfo); } @@ -274,7 +274,7 @@ public class CallerInfoAsyncQuery { CallerInfoAsyncQuery c = new CallerInfoAsyncQuery(); c.allocate(context, contactRef); - if (DBG) log("starting query for URI: " + contactRef + " handler: " + c.toString()); + if (DBG) Log.d(LOG_TAG, "starting query for URI: " + contactRef + " handler: " + c.toString()); //create cookieWrapper, start query CookieWrapper cw = new CookieWrapper(); @@ -301,9 +301,9 @@ public class CallerInfoAsyncQuery { public static CallerInfoAsyncQuery startQuery(int token, Context context, String number, OnQueryCompleteListener listener, Object cookie) { if (DBG) { - log("##### CallerInfoAsyncQuery startQuery()... #####"); - log("- number: " + /*number*/ "xxxxxxx"); - log("- cookie: " + cookie); + Log.d(LOG_TAG, "##### CallerInfoAsyncQuery startQuery()... #####"); + Log.d(LOG_TAG, "- number: " + /*number*/ "xxxxxxx"); + Log.d(LOG_TAG, "- cookie: " + cookie); } // Construct the URI object and query params, and start the query. @@ -314,7 +314,7 @@ public class CallerInfoAsyncQuery { if (PhoneNumberUtils.isUriNumber(number)) { // "number" is really a SIP address. - if (DBG) log(" - Treating number as a SIP address: " + /*number*/ "xxxxxxx"); + if (DBG) Log.d(LOG_TAG, " - Treating number as a SIP address: " + /*number*/ "xxxxxxx"); // We look up SIP addresses directly in the Data table: contactRef = Data.CONTENT_URI; @@ -346,11 +346,11 @@ public class CallerInfoAsyncQuery { } if (DBG) { - log("==> contactRef: " + sanitizeUriToString(contactRef)); - log("==> selection: " + selection); + Log.d(LOG_TAG, "==> contactRef: " + sanitizeUriToString(contactRef)); + Log.d(LOG_TAG, "==> selection: " + selection); if (selectionArgs != null) { for (int i = 0; i < selectionArgs.length; i++) { - log("==> selectionArgs[" + i + "]: " + selectionArgs[i]); + Log.d(LOG_TAG, "==> selectionArgs[" + i + "]: " + selectionArgs[i]); } } } @@ -388,7 +388,7 @@ public class CallerInfoAsyncQuery { */ public void addQueryListener(int token, OnQueryCompleteListener listener, Object cookie) { - if (DBG) log("adding listener to query: " + sanitizeUriToString(mHandler.mQueryUri) + + if (DBG) Log.d(LOG_TAG, "adding listener to query: " + sanitizeUriToString(mHandler.mQueryUri) + " handler: " + mHandler.toString()); //create cookieWrapper, add query request to end of queue. @@ -436,11 +436,4 @@ public class CallerInfoAsyncQuery { return ""; } } - - /** - * static logging method - */ - private static void log(String msg) { - Log.d(LOG_TAG, msg); - } } diff --git a/voip/java/com/android/server/sip/SipService.java b/voip/java/com/android/server/sip/SipService.java index 1df08c0b42010..a6f0d8878da1b 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"); } }