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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user