Fix error response handling for RIL request

Settings ANR observed if triggered PLMN scan immediately after modem
SSR. When network scan starts, telephony layer sent
REQUEST_GET_PREFERRED_NETWORK_TYPE to RIL for which RIL responded with
error. In the current code, there is an unhandled error case for this
RIL request, which causes the corresponding thread to run in an
infinite loop

This change adds a condition to ensure that the loop breaks even
in an error scenario.

Bug: 161215902
Change-Id: I06d7b02a4a1ac1e85e1d7b1d1611ba2315e50290
1 file changed