Allow more RIL callbacks when the radio is "off"

This fixes an issue where Cuttlefish's "mobile network" did not come
back correctly after turning airplane mode on and off. The framework was
not requesting a new data call, causing it to never re-initialize.

The problem was that the framework expects some operations to still work
on the RIL despite the device being "off" - these are invoked by one
part of the framework while another part is turning the radio on.

This change adds the minimum set of callbacks to make airplane mode
recover correctly to the ones supported while the radio is "off".

Notably, the reference RIL also supports a greater set of callbacks
while the radio is off (but not RIL_REQUEST_OPERATOR).

https://android.googlesource.com/platform/hardware/ril/+/master/reference-ril/reference-ril.c#2362

Change-Id: I29f6b70839539c302f62f064ebd4d9906e771cdd
Tested: Ran aosp_cf_x86_phone-userdebug and messed with airplane mode.
Bug: 67978118
diff --git a/guest/hals/ril/vsoc_ril.cpp b/guest/hals/ril/vsoc_ril.cpp
index 1eeff5b..e332de9 100644
--- a/guest/hals/ril/vsoc_ril.cpp
+++ b/guest/hals/ril/vsoc_ril.cpp
@@ -2207,13 +2207,19 @@
     return;
   }
 
-  // Ignore all non-power requests when RADIO_STATE_OFF (except
-  // RIL_REQUEST_GET_SIM_STATUS)
-  if (gRadioPowerState == RADIO_STATE_OFF &&
-      !(request == RIL_REQUEST_RADIO_POWER ||
-        request == RIL_REQUEST_GET_SIM_STATUS)) {
-    gce_ril_env->OnRequestComplete(t, RIL_E_RADIO_NOT_AVAILABLE, NULL, 0);
-    return;
+  // Ignore all non-power requests when RADIO_STATE_OFF.
+  if (gRadioPowerState == RADIO_STATE_OFF) {
+    switch (request) {
+      case RIL_REQUEST_GET_SIM_STATUS:
+      case RIL_REQUEST_OPERATOR:
+      case RIL_REQUEST_RADIO_POWER:
+      case RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE:
+        // Process all the above, even though the radio is off
+        break;
+      default:
+        gce_ril_env->OnRequestComplete(t, RIL_E_RADIO_NOT_AVAILABLE, NULL, 0);
+        return;
+    }
   }
 
   ALOGV("Received request %d", request);