broadband-modem: report an error when enabling a modem in FAILED state

If the initialization of the Modem3gpp / ModemCdma interface fails, the
modem transitions to the FAILED state. But since the Modem interface is
already initialized and exported over DBus, it is possible to invoke the
Enable method on the Modem interface. This patch changes
MMBroadbandModem to report an error if one tries to enable the modem in
the FAILED state instead of raising an assertion.

(cherry picked from commit 4213d2fe69ed66b2541f8245ad4e2f2d1a3ea61f)

BUG=chromium:379648
TEST=`FEATURES=test emerge-$BOARD modemmanager-next`

Change-Id: I4c9ad65e963db0c5f74972d2c4eddda1e5614cae
Reviewed-on: https://chromium-review.googlesource.com/202542
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
1 file changed