Merge "Fix some potential power-draining race conditions" into cw-f-dev