This is minor, but AMCommand is an enum so you can use == instead of .equals.  This also removes the null check.  (really minor)

```java
if (am_command == AMCommand.AM_SHUTDOWN || am_command == AM_RESYNC) {
```