Moved the foreground service promotion to the very start of the command handler to satisfy OS requirements