Merge "Turn off logspam" into oc-dev
This commit is contained in:
@@ -31,7 +31,7 @@ import java.io.StringWriter;
|
||||
*/
|
||||
public final class DumpUtils {
|
||||
private static final String TAG = "DumpUtils";
|
||||
private static final boolean DEBUG = true;
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
private DumpUtils() {
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -661,7 +661,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote)
|
||||
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");
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -955,7 +955,7 @@ int register_android_hardware_Radio(JNIEnv *env)
|
||||
|
||||
int ret = RegisterMethodsOrDie(env, kRadioModuleClassPathName, gModuleMethods, NELEM(gModuleMethods));
|
||||
|
||||
ALOGI("%s DONE", __FUNCTION__);
|
||||
ALOGV("%s DONE", __FUNCTION__);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -13545,7 +13545,9 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
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 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
|
||||
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 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
|
||||
@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 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
mUtf16BufferStat.flip();
|
||||
return mUtf16BufferStat.toString();
|
||||
} finally {
|
||||
Slog.d(TAG, "end getPlatformLowPowerStats");
|
||||
if (DBG) Slog.d(TAG, "end getPlatformLowPowerStats");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,11 +562,11 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
|
||||
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 final class BatteryStatsService extends IBatteryStats.Stub
|
||||
|
||||
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 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
}
|
||||
}
|
||||
}
|
||||
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 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
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 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
}
|
||||
}
|
||||
}
|
||||
Slog.d(TAG, "end updateExternalStatsSync");
|
||||
if (DBG) Slog.d(TAG, "end updateExternalStatsSync");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1603,7 +1604,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
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 @@ public final class BatteryStatsService extends IBatteryStats.Stub
|
||||
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 {
|
||||
|
||||
@@ -233,7 +233,8 @@ public final class ProcessStatsService extends IProcessStats.Stub {
|
||||
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() {
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.io.PrintWriter;
|
||||
*/
|
||||
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;
|
||||
|
||||
@@ -96,6 +96,7 @@ import java.util.Objects;
|
||||
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 @@ public class VrManagerService extends SystemService implements EnabledComponentC
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user