Enhance StateMachine Quitting and logging support.

Make StateMachine#quit non-conditional and remove the need to
process the SM_QUIT_CMD it is now private.

Rename halting to onHalting.

Add onQuitting

Change the message specific logging to be more generic and change
the xxxProcessedMessagesYyy methods to xxxLogRecXyy names. Also add
addLogRec(String) and addLogRec(String, State) as the generic logging
methods.


bug: 5678189
Change-Id: I22f66d11828bfd70498db625fe1be728b90478b7
This commit is contained in:
Wink Saville
2012-05-29 12:40:46 -07:00
parent 0883995604
commit 358f5d40b1

View File

@@ -109,8 +109,8 @@ public class NsdService extends INsdManager.Stub {
private final EnabledState mEnabledState = new EnabledState();
@Override
protected String getMessageInfo(Message msg) {
return cmdToString(msg.what);
protected String getWhatToString(int what) {
return cmdToString(what);
}
NsdStateMachine(String name) {
@@ -123,7 +123,7 @@ public class NsdService extends INsdManager.Stub {
} else {
setInitialState(mDisabledState);
}
setProcessedMessagesSize(25);
setLogRecSize(25);
}
class DefaultState extends State {