am f55e0346: Merge "Remove or disable some verbose debugging." into honeycomb-LTE
* commit 'f55e0346a5a40714be8a7e1571ff65e6ef1a9949': Remove or disable some verbose debugging.
This commit is contained in:
@@ -62,6 +62,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||||||
*/
|
*/
|
||||||
public abstract class DataConnection extends StateMachine {
|
public abstract class DataConnection extends StateMachine {
|
||||||
protected static final boolean DBG = true;
|
protected static final boolean DBG = true;
|
||||||
|
protected static final boolean VDBG = false;
|
||||||
|
|
||||||
protected static Object mCountLock = new Object();
|
protected static Object mCountLock = new Object();
|
||||||
protected static int mCount;
|
protected static int mCount;
|
||||||
@@ -290,7 +291,7 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
lastFailTime = timeStamp;
|
lastFailTime = timeStamp;
|
||||||
AsyncResult.forMessage(connectionCompletedMsg, cause, new Exception());
|
AsyncResult.forMessage(connectionCompletedMsg, cause, new Exception());
|
||||||
}
|
}
|
||||||
if (DBG) log("notifyConnection at " + timeStamp + " cause=" + cause);
|
if (DBG) log("notifyConnectionCompleted at " + timeStamp + " cause=" + cause);
|
||||||
|
|
||||||
connectionCompletedMsg.sendToTarget();
|
connectionCompletedMsg.sendToTarget();
|
||||||
}
|
}
|
||||||
@@ -301,12 +302,14 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
* @param dp is the DisconnectParams.
|
* @param dp is the DisconnectParams.
|
||||||
*/
|
*/
|
||||||
private void notifyDisconnectCompleted(DisconnectParams dp) {
|
private void notifyDisconnectCompleted(DisconnectParams dp) {
|
||||||
if (DBG) log("NotifyDisconnectCompleted");
|
if (VDBG) log("NotifyDisconnectCompleted");
|
||||||
|
|
||||||
if (dp.onCompletedMsg != null) {
|
if (dp.onCompletedMsg != null) {
|
||||||
Message msg = dp.onCompletedMsg;
|
Message msg = dp.onCompletedMsg;
|
||||||
log(String.format("msg=%s msg.obj=%s", msg.toString(),
|
if (VDBG) {
|
||||||
|
log(String.format("msg=%s msg.obj=%s", msg.toString(),
|
||||||
((msg.obj instanceof String) ? (String) msg.obj : "<no-reason>")));
|
((msg.obj instanceof String) ? (String) msg.obj : "<no-reason>")));
|
||||||
|
}
|
||||||
AsyncResult.forMessage(msg);
|
AsyncResult.forMessage(msg);
|
||||||
msg.sendToTarget();
|
msg.sendToTarget();
|
||||||
}
|
}
|
||||||
@@ -472,7 +475,7 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
result = DataCallState.SetupResult.ERR_RilError;
|
result = DataCallState.SetupResult.ERR_RilError;
|
||||||
result.mFailCause = FailCause.fromInt(response.status);
|
result.mFailCause = FailCause.fromInt(response.status);
|
||||||
} else {
|
} else {
|
||||||
log("onSetupConnectionCompleted received DataCallState: " + response);
|
if (DBG) log("onSetupConnectionCompleted received DataCallState: " + response);
|
||||||
cid = response.cid;
|
cid = response.cid;
|
||||||
// set link properties based on data call response
|
// set link properties based on data call response
|
||||||
result = setLinkProperties(response, mLinkProperties);
|
result = setLinkProperties(response, mLinkProperties);
|
||||||
@@ -558,53 +561,53 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
switch (msg.what) {
|
switch (msg.what) {
|
||||||
case AsyncChannel.CMD_CHANNEL_FULL_CONNECTION: {
|
case AsyncChannel.CMD_CHANNEL_FULL_CONNECTION: {
|
||||||
if (mAc != null) {
|
if (mAc != null) {
|
||||||
log("Disconnecting to previous connection mAc=" + mAc);
|
if (VDBG) log("Disconnecting to previous connection mAc=" + mAc);
|
||||||
mAc.replyToMessage(msg, AsyncChannel.CMD_CHANNEL_FULLY_CONNECTED,
|
mAc.replyToMessage(msg, AsyncChannel.CMD_CHANNEL_FULLY_CONNECTED,
|
||||||
AsyncChannel.STATUS_FULL_CONNECTION_REFUSED_ALREADY_CONNECTED);
|
AsyncChannel.STATUS_FULL_CONNECTION_REFUSED_ALREADY_CONNECTED);
|
||||||
} else {
|
} else {
|
||||||
mAc = new AsyncChannel();
|
mAc = new AsyncChannel();
|
||||||
mAc.connected(null, getHandler(), msg.replyTo);
|
mAc.connected(null, getHandler(), msg.replyTo);
|
||||||
log("DcDefaultState: FULL_CONNECTION reply connected");
|
if (VDBG) log("DcDefaultState: FULL_CONNECTION reply connected");
|
||||||
mAc.replyToMessage(msg, AsyncChannel.CMD_CHANNEL_FULLY_CONNECTED,
|
mAc.replyToMessage(msg, AsyncChannel.CMD_CHANNEL_FULLY_CONNECTED,
|
||||||
AsyncChannel.STATUS_SUCCESSFUL, mId, "hi");
|
AsyncChannel.STATUS_SUCCESSFUL, mId, "hi");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AsyncChannel.CMD_CHANNEL_DISCONNECT: {
|
case AsyncChannel.CMD_CHANNEL_DISCONNECT: {
|
||||||
log("CMD_CHANNEL_DISCONNECT");
|
if (VDBG) log("CMD_CHANNEL_DISCONNECT");
|
||||||
mAc.disconnect();
|
mAc.disconnect();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AsyncChannel.CMD_CHANNEL_DISCONNECTED: {
|
case AsyncChannel.CMD_CHANNEL_DISCONNECTED: {
|
||||||
log("CMD_CHANNEL_DISCONNECTED");
|
if (VDBG) log("CMD_CHANNEL_DISCONNECTED");
|
||||||
mAc = null;
|
mAc = null;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataConnectionAc.REQ_IS_INACTIVE: {
|
case DataConnectionAc.REQ_IS_INACTIVE: {
|
||||||
boolean val = getCurrentState() == mInactiveState;
|
boolean val = getCurrentState() == mInactiveState;
|
||||||
log("REQ_IS_INACTIVE isInactive=" + val);
|
if (VDBG) log("REQ_IS_INACTIVE isInactive=" + val);
|
||||||
mAc.replyToMessage(msg, DataConnectionAc.RSP_IS_INACTIVE, val ? 1 : 0);
|
mAc.replyToMessage(msg, DataConnectionAc.RSP_IS_INACTIVE, val ? 1 : 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataConnectionAc.REQ_GET_CID: {
|
case DataConnectionAc.REQ_GET_CID: {
|
||||||
log("REQ_GET_CID cid=" + cid);
|
if (VDBG) log("REQ_GET_CID cid=" + cid);
|
||||||
mAc.replyToMessage(msg, DataConnectionAc.RSP_GET_CID, cid);
|
mAc.replyToMessage(msg, DataConnectionAc.RSP_GET_CID, cid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataConnectionAc.REQ_GET_APNSETTING: {
|
case DataConnectionAc.REQ_GET_APNSETTING: {
|
||||||
log("REQ_GET_APNSETTING apnSetting=" + mApn);
|
if (VDBG) log("REQ_GET_APNSETTING apnSetting=" + mApn);
|
||||||
mAc.replyToMessage(msg, DataConnectionAc.RSP_GET_APNSETTING, mApn);
|
mAc.replyToMessage(msg, DataConnectionAc.RSP_GET_APNSETTING, mApn);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataConnectionAc.REQ_GET_LINK_PROPERTIES: {
|
case DataConnectionAc.REQ_GET_LINK_PROPERTIES: {
|
||||||
LinkProperties lp = new LinkProperties(mLinkProperties);
|
LinkProperties lp = new LinkProperties(mLinkProperties);
|
||||||
log("REQ_GET_LINK_PROPERTIES linkProperties" + lp);
|
if (VDBG) log("REQ_GET_LINK_PROPERTIES linkProperties" + lp);
|
||||||
mAc.replyToMessage(msg, DataConnectionAc.RSP_GET_LINK_PROPERTIES, lp);
|
mAc.replyToMessage(msg, DataConnectionAc.RSP_GET_LINK_PROPERTIES, lp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataConnectionAc.REQ_SET_LINK_PROPERTIES_HTTP_PROXY: {
|
case DataConnectionAc.REQ_SET_LINK_PROPERTIES_HTTP_PROXY: {
|
||||||
ProxyProperties proxy = (ProxyProperties) msg.obj;
|
ProxyProperties proxy = (ProxyProperties) msg.obj;
|
||||||
log("REQ_SET_LINK_PROPERTIES_HTTP_PROXY proxy=" + proxy);
|
if (VDBG) log("REQ_SET_LINK_PROPERTIES_HTTP_PROXY proxy=" + proxy);
|
||||||
mLinkProperties.setHttpProxy(proxy);
|
mLinkProperties.setHttpProxy(proxy);
|
||||||
mAc.replyToMessage(msg, DataConnectionAc.RSP_SET_LINK_PROPERTIES_HTTP_PROXY);
|
mAc.replyToMessage(msg, DataConnectionAc.RSP_SET_LINK_PROPERTIES_HTTP_PROXY);
|
||||||
break;
|
break;
|
||||||
@@ -612,7 +615,7 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
case DataConnectionAc.REQ_UPDATE_LINK_PROPERTIES_DATA_CALL_STATE: {
|
case DataConnectionAc.REQ_UPDATE_LINK_PROPERTIES_DATA_CALL_STATE: {
|
||||||
DataCallState newState = (DataCallState) msg.obj;
|
DataCallState newState = (DataCallState) msg.obj;
|
||||||
DataConnectionAc.LinkPropertyChangeAction action = updateLinkProperty(newState);
|
DataConnectionAc.LinkPropertyChangeAction action = updateLinkProperty(newState);
|
||||||
if (DBG) {
|
if (VDBG) {
|
||||||
log("REQ_UPDATE_LINK_PROPERTIES_DATA_CALL_STATE action="
|
log("REQ_UPDATE_LINK_PROPERTIES_DATA_CALL_STATE action="
|
||||||
+ action + " newState=" + newState);
|
+ action + " newState=" + newState);
|
||||||
}
|
}
|
||||||
@@ -623,18 +626,18 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
}
|
}
|
||||||
case DataConnectionAc.REQ_GET_LINK_CAPABILITIES: {
|
case DataConnectionAc.REQ_GET_LINK_CAPABILITIES: {
|
||||||
LinkCapabilities lc = new LinkCapabilities(mCapabilities);
|
LinkCapabilities lc = new LinkCapabilities(mCapabilities);
|
||||||
log("REQ_GET_LINK_CAPABILITIES linkCapabilities" + lc);
|
if (VDBG) log("REQ_GET_LINK_CAPABILITIES linkCapabilities" + lc);
|
||||||
mAc.replyToMessage(msg, DataConnectionAc.RSP_GET_LINK_CAPABILITIES, lc);
|
mAc.replyToMessage(msg, DataConnectionAc.RSP_GET_LINK_CAPABILITIES, lc);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DataConnectionAc.REQ_RESET:
|
case DataConnectionAc.REQ_RESET:
|
||||||
if (DBG) log("DcDefaultState: msg.what=REQ_RESET");
|
if (VDBG) log("DcDefaultState: msg.what=REQ_RESET");
|
||||||
clearSettings();
|
clearSettings();
|
||||||
mAc.replyToMessage(msg, DataConnectionAc.RSP_RESET);
|
mAc.replyToMessage(msg, DataConnectionAc.RSP_RESET);
|
||||||
transitionTo(mInactiveState);
|
transitionTo(mInactiveState);
|
||||||
break;
|
break;
|
||||||
case DataConnectionAc.REQ_GET_REFCOUNT: {
|
case DataConnectionAc.REQ_GET_REFCOUNT: {
|
||||||
log("REQ_GET_REFCOUNT refCount=" + mRefCount);
|
if (VDBG) log("REQ_GET_REFCOUNT refCount=" + mRefCount);
|
||||||
mAc.replyToMessage(msg, DataConnectionAc.RSP_GET_REFCOUNT, mRefCount);
|
mAc.replyToMessage(msg, DataConnectionAc.RSP_GET_REFCOUNT, mRefCount);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -666,7 +669,8 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if (DBG) {
|
if (DBG) {
|
||||||
log("DcDefaultState: shouldn't happen but ignore msg.what=" + msg.what);
|
log("DcDefaultState: shouldn't happen but ignore msg.what=0x" +
|
||||||
|
Integer.toHexString(msg.what));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -685,13 +689,13 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
private DisconnectParams mDisconnectParams = null;
|
private DisconnectParams mDisconnectParams = null;
|
||||||
|
|
||||||
public void setEnterNotificationParams(ConnectionParams cp, FailCause cause) {
|
public void setEnterNotificationParams(ConnectionParams cp, FailCause cause) {
|
||||||
log("DcInactiveState: setEnterNoticationParams cp,cause");
|
if (VDBG) log("DcInactiveState: setEnterNoticationParams cp,cause");
|
||||||
mConnectionParams = cp;
|
mConnectionParams = cp;
|
||||||
mFailCause = cause;
|
mFailCause = cause;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEnterNotificationParams(DisconnectParams dp) {
|
public void setEnterNotificationParams(DisconnectParams dp) {
|
||||||
log("DcInactiveState: setEnterNoticationParams dp");
|
if (VDBG) log("DcInactiveState: setEnterNoticationParams dp");
|
||||||
mDisconnectParams = dp;
|
mDisconnectParams = dp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -707,11 +711,11 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
* call to isInactive.
|
* call to isInactive.
|
||||||
*/
|
*/
|
||||||
if ((mConnectionParams != null) && (mFailCause != null)) {
|
if ((mConnectionParams != null) && (mFailCause != null)) {
|
||||||
log("DcInactiveState: enter notifyConnectCompleted");
|
if (VDBG) log("DcInactiveState: enter notifyConnectCompleted");
|
||||||
notifyConnectCompleted(mConnectionParams, mFailCause);
|
notifyConnectCompleted(mConnectionParams, mFailCause);
|
||||||
}
|
}
|
||||||
if (mDisconnectParams != null) {
|
if (mDisconnectParams != null) {
|
||||||
log("DcInactiveState: enter notifyDisconnectCompleted");
|
if (VDBG) log("DcInactiveState: enter notifyDisconnectCompleted");
|
||||||
notifyDisconnectCompleted(mDisconnectParams);
|
notifyDisconnectCompleted(mDisconnectParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -751,7 +755,10 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (DBG) log("DcInactiveState nothandled msg.what=" + msg.what);
|
if (VDBG) {
|
||||||
|
log("DcInactiveState nothandled msg.what=0x" +
|
||||||
|
Integer.toHexString(msg.what));
|
||||||
|
}
|
||||||
retVal = NOT_HANDLED;
|
retVal = NOT_HANDLED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -856,7 +863,10 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (DBG) log("DcActivatingState not handled msg.what=" + msg.what);
|
if (VDBG) {
|
||||||
|
log("DcActivatingState not handled msg.what=0x" +
|
||||||
|
Integer.toHexString(msg.what));
|
||||||
|
}
|
||||||
retVal = NOT_HANDLED;
|
retVal = NOT_HANDLED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -873,7 +883,7 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
private FailCause mFailCause = null;
|
private FailCause mFailCause = null;
|
||||||
|
|
||||||
public void setEnterNotificationParams(ConnectionParams cp, FailCause cause) {
|
public void setEnterNotificationParams(ConnectionParams cp, FailCause cause) {
|
||||||
log("DcInactiveState: setEnterNoticationParams cp,cause");
|
if (VDBG) log("DcInactiveState: setEnterNoticationParams cp,cause");
|
||||||
mConnectionParams = cp;
|
mConnectionParams = cp;
|
||||||
mFailCause = cause;
|
mFailCause = cause;
|
||||||
}
|
}
|
||||||
@@ -887,7 +897,7 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
* call to isActive.
|
* call to isActive.
|
||||||
*/
|
*/
|
||||||
if ((mConnectionParams != null) && (mFailCause != null)) {
|
if ((mConnectionParams != null) && (mFailCause != null)) {
|
||||||
log("DcActiveState: enter notifyConnectCompleted");
|
if (VDBG) log("DcActiveState: enter notifyConnectCompleted");
|
||||||
notifyConnectCompleted(mConnectionParams, mFailCause);
|
notifyConnectCompleted(mConnectionParams, mFailCause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -930,7 +940,10 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (DBG) log("DcActiveState nothandled msg.what=" + msg.what);
|
if (VDBG) {
|
||||||
|
log("DcActiveState not handled msg.what=0x" +
|
||||||
|
Integer.toHexString(msg.what));
|
||||||
|
}
|
||||||
retVal = NOT_HANDLED;
|
retVal = NOT_HANDLED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -972,7 +985,10 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (DBG) log("DcDisconnectingState not handled msg.what=" + msg.what);
|
if (VDBG) {
|
||||||
|
log("DcDisconnectingState not handled msg.what=0x" +
|
||||||
|
Integer.toHexString(msg.what));
|
||||||
|
}
|
||||||
retVal = NOT_HANDLED;
|
retVal = NOT_HANDLED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1014,9 +1030,9 @@ public abstract class DataConnection extends StateMachine {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (DBG) {
|
if (VDBG) {
|
||||||
log("DcDisconnectionErrorCreatingConnection not handled msg.what="
|
log("DcDisconnectionErrorCreatingConnection not handled msg.what=0x"
|
||||||
+ msg.what);
|
+ Integer.toHexString(msg.what));
|
||||||
}
|
}
|
||||||
retVal = NOT_HANDLED;
|
retVal = NOT_HANDLED;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import android.os.Message;
|
|||||||
* AsyncChannel to a DataConnection
|
* AsyncChannel to a DataConnection
|
||||||
*/
|
*/
|
||||||
public class DataConnectionAc extends AsyncChannel {
|
public class DataConnectionAc extends AsyncChannel {
|
||||||
private static final boolean DBG = true;
|
private static final boolean DBG = false;
|
||||||
private String mLogTag;
|
private String mLogTag;
|
||||||
|
|
||||||
public DataConnection dataConnection;
|
public DataConnection dataConnection;
|
||||||
@@ -367,7 +367,7 @@ public class DataConnectionAc extends AsyncChannel {
|
|||||||
if ((response != null) && (response.what == RSP_RESET)) {
|
if ((response != null) && (response.what == RSP_RESET)) {
|
||||||
if (DBG) log("restSync ok");
|
if (DBG) log("restSync ok");
|
||||||
} else {
|
} else {
|
||||||
if (DBG) log("restSync error response=" + response);
|
log("restSync error response=" + response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2889,7 +2889,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
|
|
||||||
String s = p.readString();
|
String s = p.readString();
|
||||||
|
|
||||||
if (RILJ_LOGD) riljLog("< iccIO: "
|
if (RILJ_LOGV) riljLog("< iccIO: "
|
||||||
+ " 0x" + Integer.toHexString(sw1)
|
+ " 0x" + Integer.toHexString(sw1)
|
||||||
+ " 0x" + Integer.toHexString(sw2) + " "
|
+ " 0x" + Integer.toHexString(sw2) + " "
|
||||||
+ s);
|
+ s);
|
||||||
@@ -3052,7 +3052,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
|
|||||||
responseSetupDataCall(Parcel p) {
|
responseSetupDataCall(Parcel p) {
|
||||||
int ver = p.readInt();
|
int ver = p.readInt();
|
||||||
int num = p.readInt();
|
int num = p.readInt();
|
||||||
if (RILJ_LOGD) riljLog("responseSetupDataCall ver=" + ver + " num=" + num);
|
if (RILJ_LOGV) riljLog("responseSetupDataCall ver=" + ver + " num=" + num);
|
||||||
|
|
||||||
DataCallState dataCall;
|
DataCallState dataCall;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user