Add a new internal api for receiving the new intent in satellite CTS test which to configure intent component with the necessary values.

Bug: 362405259
Test: atest SatelliteManagerTest, SatelliteManagerTestOnMockService
Flag: com.android.internal.telephony.flags.carrier_roaming_nb_iot_ntn

Change-Id: Icebd22f0389d9154bca8711a4ce97b790f9688ad
diff --git a/src/com/android/phone/TelephonyShellCommand.java b/src/com/android/phone/TelephonyShellCommand.java
index 7a424cb..08b041b 100644
--- a/src/com/android/phone/TelephonyShellCommand.java
+++ b/src/com/android/phone/TelephonyShellCommand.java
@@ -209,6 +209,8 @@
             "set-should-send-datagram-to-modem-in-demo-mode";
     private static final String SET_IS_SATELLITE_COMMUNICATION_ALLOWED_FOR_CURRENT_LOCATION_CACHE =
             "set-is-satellite-communication-allowed-for-current-location-cache";
+    private static final String SET_SATELLITE_SUBSCRIBERID_LIST_CHANGED_INTENT_COMPONENT =
+            "set-satellite-subscriberid-list-changed-intent-component";
 
     private static final String DOMAIN_SELECTION_SUBCOMMAND = "domainselection";
     private static final String DOMAIN_SELECTION_SET_SERVICE_OVERRIDE = "set-dss-override";
@@ -422,6 +424,8 @@
                 return handleSetOemEnabledSatelliteProvisionStatus();
             case SET_IS_SATELLITE_COMMUNICATION_ALLOWED_FOR_CURRENT_LOCATION_CACHE:
                 return handleSetIsSatelliteCommunicationAllowedForCurrentLocationCache();
+            case SET_SATELLITE_SUBSCRIBERID_LIST_CHANGED_INTENT_COMPONENT:
+                return handleSetSatelliteSubscriberIdListChangedIntentComponent();
             default: {
                 return handleDefaultCommands(cmd);
             }
@@ -3766,6 +3770,54 @@
         return 0;
     }
 
+    private int handleSetSatelliteSubscriberIdListChangedIntentComponent() {
+        final String cmd = SET_SATELLITE_SUBSCRIBERID_LIST_CHANGED_INTENT_COMPONENT;
+        PrintWriter errPw = getErrPrintWriter();
+        String opt;
+        String name;
+
+        if ((opt = getNextArg()) == null) {
+            errPw.println("adb shell cmd phone " + cmd + ": Invalid Argument");
+            return -1;
+        } else {
+            switch (opt) {
+                case "-p": {
+                    name = opt + "/" + "android.telephony.cts";
+                    break;
+                }
+                case "-c": {
+                    name = opt + "/" + "android.telephony.cts.SatelliteReceiver";
+                    break;
+                }
+                case "-r": {
+                    name = "reset";
+                    break;
+                }
+                default:
+                    errPw.println("adb shell cmd phone " + cmd + ": Invalid Argument");
+                    return -1;
+            }
+        }
+
+        Log.d(LOG_TAG, "handleSetSatelliteSubscriberIdListChangedIntentComponent("
+                + name + ")");
+
+        try {
+            boolean result = mInterface.setSatelliteSubscriberIdListChangedIntentComponent(name);
+            if (VDBG) {
+                Log.v(LOG_TAG, "handleSetSatelliteSubscriberIdListChangedIntentComponent "
+                        + "returns: " + result);
+            }
+            getOutPrintWriter().println(result);
+        } catch (RemoteException e) {
+            Log.w(LOG_TAG, "handleSetSatelliteSubscriberIdListChangedIntentComponent("
+                    + name + "), error = " + e.getMessage());
+            errPw.println("Exception: " + e.getMessage());
+            return -1;
+        }
+        return 0;
+    }
+
     /**
      * Sample inputStr = "US,UK,CA;2,1,3"
      * Sample output: {[US,2], [UK,1], [CA,3]}