Turn off extra debugging
Change-Id: I3d7c68d3d7bcef5be084398807389f4a485bedb0
This commit is contained in:
@@ -34,7 +34,6 @@ import android.os.Message;
|
||||
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 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
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 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
|
||||
@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 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
|
||||
@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 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
|
||||
@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 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
|
||||
@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 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
} 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 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
} 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 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
}
|
||||
|
||||
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 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
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 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,9 +80,9 @@ import com.android.server.am.BatteryStatsService;
|
||||
*/
|
||||
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;
|
||||
|
||||
@@ -50,7 +50,8 @@ import java.util.List;
|
||||
* 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 @@ public class PhoneStateListener {
|
||||
|
||||
/** @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 @@ public class PhoneStateListener {
|
||||
Message.obtain(mHandler, LISTEN_VOLTE_STATE, 0, 0, lteState).sendToTarget();
|
||||
}
|
||||
};
|
||||
|
||||
private void log(String s) {
|
||||
Rlog.d(LOG_TAG, s);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user