Merge "Move the wait-for-barrier command to after the battery state change." into udc-dev