Merge "Turn off logspam" into oc-dev am: 6fb15ea9d4
am: 541f9cf576
Change-Id: Ib2846b83d6775c124f1b2dc1ca1b4a496bc14446
diff --git a/core/java/com/android/internal/util/DumpUtils.java b/core/java/com/android/internal/util/DumpUtils.java
index ce89501..66b777e 100644
--- a/core/java/com/android/internal/util/DumpUtils.java
+++ b/core/java/com/android/internal/util/DumpUtils.java
@@ -31,7 +31,7 @@
*/
public final class DumpUtils {
private static final String TAG = "DumpUtils";
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private DumpUtils() {
}
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index fa2ce77..27c1789 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -16,7 +16,7 @@
#define ATRACE_TAG ATRACE_TAG_DALVIK
#define LOG_TAG "AndroidRuntime"
-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 1
#include <android_runtime/AndroidRuntime.h>
#include <binder/IBinder.h>
@@ -659,7 +659,7 @@
checkJni = true;
}
}
- ALOGD("CheckJNI is %s\n", checkJni ? "ON" : "OFF");
+ ALOGV("CheckJNI is %s\n", checkJni ? "ON" : "OFF");
if (checkJni) {
/* extended JNI checking */
addOption("-Xcheck:jni");
diff --git a/core/jni/android_hardware_Radio.cpp b/core/jni/android_hardware_Radio.cpp
index dd33173..39e615c 100644
--- a/core/jni/android_hardware_Radio.cpp
+++ b/core/jni/android_hardware_Radio.cpp
@@ -15,7 +15,7 @@
** limitations under the License.
*/
-//#define LOG_NDEBUG 0
+#define LOG_NDEBUG 1
#define LOG_TAG "Radio-JNI"
#include <utils/Log.h>
@@ -961,7 +961,7 @@
int ret = RegisterMethodsOrDie(env, kRadioModuleClassPathName, gModuleMethods, NELEM(gModuleMethods));
- ALOGI("%s DONE", __FUNCTION__);
+ ALOGV("%s DONE", __FUNCTION__);
return ret;
}
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 978b282..248c93a 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -13524,7 +13524,9 @@
return;
}
if (pr.hasTopUi != hasTopUi) {
- Slog.i(TAG, "Setting hasTopUi=" + hasTopUi + " for pid=" + pid);
+ if (DEBUG_OOM_ADJ) {
+ Slog.d(TAG, "Setting hasTopUi=" + hasTopUi + " for pid=" + pid);
+ }
pr.hasTopUi = hasTopUi;
changed = true;
}
diff --git a/services/core/java/com/android/server/am/BatteryStatsService.java b/services/core/java/com/android/server/am/BatteryStatsService.java
index 2439062..e15b135 100644
--- a/services/core/java/com/android/server/am/BatteryStatsService.java
+++ b/services/core/java/com/android/server/am/BatteryStatsService.java
@@ -87,6 +87,7 @@
implements PowerManagerInternal.LowPowerModeListener,
BatteryStatsImpl.PlatformIdleStateCallback {
static final String TAG = "BatteryStatsService";
+ static final boolean DBG = false;
/**
* How long to wait on an individual subsystem to return its stats.
@@ -152,11 +153,11 @@
case MSG_WRITE_TO_DISK:
updateExternalStatsSync("write", UPDATE_ALL);
- Slog.d(TAG, "begin writeAsyncLocked");
+ if (DBG) Slog.d(TAG, "begin writeAsyncLocked");
synchronized (mStats) {
mStats.writeAsyncLocked();
}
- Slog.d(TAG, "end writeAsyncLocked");
+ if (DBG) Slog.d(TAG, "end writeAsyncLocked");
break;
}
}
@@ -196,7 +197,7 @@
@Override
public String getPlatformLowPowerStats() {
- Slog.d(TAG, "begin getPlatformLowPowerStats");
+ if (DBG) Slog.d(TAG, "begin getPlatformLowPowerStats");
try {
mUtf8BufferStat.clear();
mUtf16BufferStat.clear();
@@ -212,7 +213,7 @@
mUtf16BufferStat.flip();
return mUtf16BufferStat.toString();
} finally {
- Slog.d(TAG, "end getPlatformLowPowerStats");
+ if (DBG) Slog.d(TAG, "end getPlatformLowPowerStats");
}
}
@@ -561,11 +562,11 @@
public void noteScreenState(int state) {
enforceCallingPermission();
- Slog.d(TAG, "begin noteScreenState");
+ if (DBG) Slog.d(TAG, "begin noteScreenState");
synchronized (mStats) {
mStats.noteScreenStateLocked(state);
}
- Slog.d(TAG, "end noteScreenState");
+ if (DBG) Slog.d(TAG, "end noteScreenState");
}
public void noteScreenBrightness(int brightness) {
@@ -718,11 +719,11 @@
public void noteStartCamera(int uid) {
enforceCallingPermission();
- Slog.d(TAG, "begin noteStartCamera");
+ if (DBG) Slog.d(TAG, "begin noteStartCamera");
synchronized (mStats) {
mStats.noteCameraOnLocked(uid);
}
- Slog.d(TAG, "end noteStartCamera");
+ if (DBG) Slog.d(TAG, "end noteStartCamera");
}
public void noteStopCamera(int uid) {
@@ -1342,23 +1343,23 @@
}
}
}
- Slog.d(TAG, "begin dumpCheckinLocked from UID " + Binder.getCallingUid());
+ if (DBG) Slog.d(TAG, "begin dumpCheckinLocked from UID " + Binder.getCallingUid());
synchronized (mStats) {
mStats.dumpCheckinLocked(mContext, pw, apps, flags, historyStart);
if (writeData) {
mStats.writeAsyncLocked();
}
}
- Slog.d(TAG, "end dumpCheckinLocked");
+ if (DBG) Slog.d(TAG, "end dumpCheckinLocked");
} else {
- Slog.d(TAG, "begin dumpLocked from UID " + Binder.getCallingUid());
+ if (DBG) Slog.d(TAG, "begin dumpLocked from UID " + Binder.getCallingUid());
synchronized (mStats) {
mStats.dumpLocked(mContext, pw, flags, reqUid, historyStart);
if (writeData) {
mStats.writeAsyncLocked();
}
}
- Slog.d(TAG, "end dumpLocked");
+ if (DBG) Slog.d(TAG, "end dumpLocked");
}
}
@@ -1480,11 +1481,11 @@
SynchronousResultReceiver bluetoothReceiver = null;
SynchronousResultReceiver modemReceiver = null;
- Slog.d(TAG, "begin updateExternalStatsSync reason=" + reason);
+ if (DBG) Slog.d(TAG, "begin updateExternalStatsSync reason=" + reason);
synchronized (mExternalStatsLock) {
if (mContext == null) {
// Don't do any work yet.
- Slog.d(TAG, "end updateExternalStatsSync");
+ if (DBG) Slog.d(TAG, "end updateExternalStatsSync");
return;
}
@@ -1583,7 +1584,7 @@
}
}
}
- Slog.d(TAG, "end updateExternalStatsSync");
+ if (DBG) Slog.d(TAG, "end updateExternalStatsSync");
}
/**
@@ -1603,7 +1604,7 @@
return getHealthStatsForUidLocked(requestUid);
}
} catch (Exception ex) {
- Slog.d(TAG, "Crashed while writing for takeUidSnapshot(" + requestUid + ")", ex);
+ Slog.w(TAG, "Crashed while writing for takeUidSnapshot(" + requestUid + ")", ex);
throw ex;
} finally {
Binder.restoreCallingIdentity(ident);
@@ -1633,7 +1634,7 @@
return results;
}
} catch (Exception ex) {
- Slog.d(TAG, "Crashed while writing for takeUidSnapshots("
+ if (DBG) Slog.d(TAG, "Crashed while writing for takeUidSnapshots("
+ Arrays.toString(requestUids) + ") i=" + i, ex);
throw ex;
} finally {
diff --git a/services/core/java/com/android/server/am/ProcessStatsService.java b/services/core/java/com/android/server/am/ProcessStatsService.java
index deb3b28..39aed7c 100644
--- a/services/core/java/com/android/server/am/ProcessStatsService.java
+++ b/services/core/java/com/android/server/am/ProcessStatsService.java
@@ -233,7 +233,8 @@
updateFile();
}
mLastWriteTime = SystemClock.uptimeMillis();
- Slog.i(TAG, "Prepared write state in " + (SystemClock.uptimeMillis()-now) + "ms");
+ if (DEBUG) Slog.d(TAG, "Prepared write state in "
+ + (SystemClock.uptimeMillis()-now) + "ms");
if (!sync) {
BackgroundThread.getHandler().post(new Runnable() {
@Override public void run() {
diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
index 1b4eaf5..da90e5a 100644
--- a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
+++ b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
@@ -30,7 +30,7 @@
*/
public class KeyguardServiceDelegate {
private static final String TAG = "KeyguardServiceDelegate";
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private static final int SCREEN_STATE_OFF = 0;
private static final int SCREEN_STATE_TURNING_ON = 1;
diff --git a/services/core/java/com/android/server/vr/VrManagerService.java b/services/core/java/com/android/server/vr/VrManagerService.java
index 4044fdb..b937f9d 100644
--- a/services/core/java/com/android/server/vr/VrManagerService.java
+++ b/services/core/java/com/android/server/vr/VrManagerService.java
@@ -96,6 +96,7 @@
public class VrManagerService extends SystemService implements EnabledComponentChangeListener{
public static final String TAG = "VrManagerService";
+ static final boolean DBG = false;
private static final int PENDING_STATE_DELAY_MS = 300;
private static final int EVENT_LOG_SIZE = 32;
@@ -157,7 +158,7 @@
private void setVrModeAllowedLocked(boolean allowed) {
if (mVrModeAllowed != allowed) {
mVrModeAllowed = allowed;
- Slog.i(TAG, "VR mode is " + ((allowed) ? "allowed" : "disallowed"));
+ if (DBG) Slog.d(TAG, "VR mode is " + ((allowed) ? "allowed" : "disallowed"));
if (mVrModeAllowed) {
consumeAndApplyPendingStateLocked();
} else {