Turn off extra debugging
Change-Id: I3d7c68d3d7bcef5be084398807389f4a485bedb0
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index dbf0c32..4e9f37d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -34,7 +34,6 @@
import android.os.Messenger;
import android.provider.Settings;
import android.telephony.PhoneStateListener;
-import android.telephony.Rlog;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
import android.telephony.TelephonyManager;
@@ -471,8 +470,8 @@
PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
@Override
public void onSignalStrengthsChanged(SignalStrength signalStrength) {
- if (true/*DEBUG*/) {
- Rlog.d(TAG, "onSignalStrengthsChanged signalStrength=" + signalStrength +
+ if (DEBUG) {
+ Log.d(TAG, "onSignalStrengthsChanged signalStrength=" + signalStrength +
((signalStrength == null) ? "" : (" level=" + signalStrength.getLevel())));
}
mSignalStrength = signalStrength;
@@ -482,8 +481,8 @@
@Override
public void onServiceStateChanged(ServiceState state) {
- if (true/*DEBUG*/) {
- Rlog.d(TAG, "onServiceStateChanged voiceState=" + state.getVoiceRegState()
+ if (DEBUG) {
+ Log.d(TAG, "onServiceStateChanged voiceState=" + state.getVoiceRegState()
+ " dataState=" + state.getDataRegState());
}
mServiceState = state;
@@ -495,8 +494,8 @@
@Override
public void onCallStateChanged(int state, String incomingNumber) {
- if (true/*DEBUG*/) {
- Rlog.d(TAG, "onCallStateChanged state=" + state);
+ if (DEBUG) {
+ Log.d(TAG, "onCallStateChanged state=" + state);
}
// In cdma, if a voice call is made, RSSI should switch to 1x.
if (isCdma()) {
@@ -507,8 +506,8 @@
@Override
public void onDataConnectionStateChanged(int state, int networkType) {
- if (true/*DEBUG*/) {
- Rlog.d(TAG, "onDataConnectionStateChanged: state=" + state
+ if (DEBUG) {
+ Log.d(TAG, "onDataConnectionStateChanged: state=" + state
+ " type=" + networkType);
}
mDataState = state;
@@ -520,8 +519,8 @@
@Override
public void onDataActivity(int direction) {
- if (true/*DEBUG*/) {
- Rlog.d(TAG, "onDataActivity: direction=" + direction);
+ if (DEBUG) {
+ Log.d(TAG, "onDataActivity: direction=" + direction);
}
mDataActivity = direction;
updateDataIcon();
@@ -552,7 +551,7 @@
} else {
mSimState = IccCardConstants.State.UNKNOWN;
}
- Rlog.d(TAG, "updateSimState: mSimState=" + mSimState);
+ if (DEBUG) Log.d(TAG, "updateSimState: mSimState=" + mSimState);
}
private boolean isCdma() {
@@ -580,7 +579,7 @@
} else {
retVal = false;
}
- Rlog.d(TAG, "hasService: mServiceState=" + mServiceState + " retVal=" + retVal);
+ if (DEBUG) Log.d(TAG, "hasService: mServiceState=" + mServiceState + " retVal=" + retVal);
return retVal;
}
@@ -594,15 +593,18 @@
}
private final void updateTelephonySignalStrength() {
- Rlog.d(TAG, "updateTelephonySignalStrength: hasService=" + hasService() + " ss=" + mSignalStrength);
+ if (DEBUG) {
+ Log.d(TAG, "updateTelephonySignalStrength: hasService=" + hasService()
+ + " ss=" + mSignalStrength);
+ }
if (!hasService()) {
- if (true/*CHATTY*/) Log.d(TAG, "updateTelephonySignalStrength: !hasService()");
+ if (CHATTY) Log.d(TAG, "updateTelephonySignalStrength: !hasService()");
mPhoneSignalIconId = R.drawable.stat_sys_signal_null;
mQSPhoneSignalIconId = R.drawable.ic_qs_signal_no_signal;
mDataSignalIconId = R.drawable.stat_sys_signal_null;
} else {
if (mSignalStrength == null) {
- if (true/*CHATTY*/) Rlog.d(TAG, "updateTelephonySignalStrength: mSignalStrength == null");
+ if (CHATTY) Log.d(TAG, "updateTelephonySignalStrength: mSignalStrength == null");
mPhoneSignalIconId = R.drawable.stat_sys_signal_null;
mQSPhoneSignalIconId = R.drawable.ic_qs_signal_no_signal;
mDataSignalIconId = R.drawable.stat_sys_signal_null;
@@ -613,9 +615,12 @@
int[] iconList;
if (isCdma() && mAlwaysShowCdmaRssi) {
mLastSignalLevel = iconLevel = mSignalStrength.getCdmaLevel();
- if(true/*DEBUG*/) Rlog.d(TAG, "updateTelephonySignalStrength: mAlwaysShowCdmaRssi=" + mAlwaysShowCdmaRssi
+ if (DEBUG) {
+ Log.d(TAG, "updateTelephonySignalStrength:"
+ + " mAlwaysShowCdmaRssi=" + mAlwaysShowCdmaRssi
+ " set to cdmaLevel=" + mSignalStrength.getCdmaLevel()
+ " instead of level=" + mSignalStrength.getLevel());
+ }
} else {
mLastSignalLevel = iconLevel = mSignalStrength.getLevel();
}
@@ -640,7 +645,7 @@
mContentDescriptionPhoneSignal = mContext.getString(
AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[iconLevel]);
mDataSignalIconId = TelephonyIcons.DATA_SIGNAL_STRENGTH[mInetCondition][iconLevel];
- Rlog.d(TAG, "updateTelephonySignalStrength: iconLevel=" + iconLevel);
+ if (DEBUG) Log.d(TAG, "updateTelephonySignalStrength: iconLevel=" + iconLevel);
}
}
}
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index cb410ef..7624314 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -80,9 +80,9 @@
*/
class TelephonyRegistry extends ITelephonyRegistry.Stub {
private static final String TAG = "TelephonyRegistry";
- private static final boolean DBG = true; // STOPSHIP if true
+ private static final boolean DBG = false; // STOPSHIP if true
private static final boolean DBG_LOC = false; // STOPSHIP if true
- private static final boolean VDBG = true; // STOPSHIP if true
+ private static final boolean VDBG = false; // STOPSHIP if true
private static class Record {
String pkgForDebug;
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index c8c3063..91afc62 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -50,7 +50,8 @@
* appropriate LISTEN_ flags.
*/
public class PhoneStateListener {
- private static final String TAG = "PhoneStateListener";
+ private static final String LOG_TAG = "PhoneStateListener";
+ private static final boolean DBG = false; // STOPSHIP if true
/**
* Stop listening for updates.
@@ -233,12 +234,14 @@
/** @hide */
public PhoneStateListener(long subId, Looper looper) {
- Rlog.d(TAG, "ctor: subId=" + subId + " looper=" + looper);
+ if (DBG) log("ctor: subId=" + subId + " looper=" + looper);
mSubId = subId;
mHandler = new Handler(looper) {
public void handleMessage(Message msg) {
- Rlog.d(TAG, "mSubId=" + mSubId + " what=0x" + Integer.toHexString(msg.what)
- + " msg=" + msg);
+ if (DBG) {
+ if (DBG) log("mSubId=" + mSubId + " what=0x" + Integer.toHexString(msg.what)
+ + " msg=" + msg);
+ }
switch (msg.what) {
case LISTEN_SERVICE_STATE:
PhoneStateListener.this.onServiceStateChanged((ServiceState)msg.obj);
@@ -528,4 +531,8 @@
Message.obtain(mHandler, LISTEN_VOLTE_STATE, 0, 0, lteState).sendToTarget();
}
};
+
+ private void log(String s) {
+ Rlog.d(LOG_TAG, s);
+ }
}