Add getSubscriptionId API

The old getSubId or getSubscriptionIds return multiple sub ids
per slot index, which is not possible in today's implementation
because the slot index here refers to the logical slot index,
which is also known as phone id, or the logical modem index. In
today's telephony, one logical phone can only have one
subscription at one time, so does the modem.

Bug: 239607619
Test: Manual
Change-Id: I7e1e44509169b11024455d52749531f021ab7383
diff --git a/src/com/android/phone/TelephonyShellCommand.java b/src/com/android/phone/TelephonyShellCommand.java
index 0cf120a..fdaf1bb 100644
--- a/src/com/android/phone/TelephonyShellCommand.java
+++ b/src/com/android/phone/TelephonyShellCommand.java
@@ -1099,7 +1099,7 @@
     private int handleBarringSendCommand() {
         PrintWriter errPw = getErrPrintWriter();
         int slotId = getDefaultSlot();
-        int subId = SubscriptionManager.getSubId(slotId)[0];
+        int subId = SubscriptionManager.getSubscriptionId(slotId);
         @BarringInfo.BarringServiceInfo.BarringType int barringType =
                 BarringInfo.BarringServiceInfo.BARRING_TYPE_UNCONDITIONAL;
         boolean isConditionallyBarred = false;
@@ -1111,7 +1111,7 @@
                 case "-s": {
                     try {
                         slotId = Integer.parseInt(getNextArgRequired());
-                        subId = SubscriptionManager.getSubId(slotId)[0];
+                        subId = SubscriptionManager.getSubscriptionId(slotId);
                     } catch (NumberFormatException e) {
                         errPw.println("barring send requires an integer as a SLOT_ID.");
                         return -1;
@@ -2162,8 +2162,7 @@
                 return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
             }
         }
-        int[] subIds = SubscriptionManager.getSubId(slotId);
-        return subIds[0];
+        return SubscriptionManager.getSubscriptionId(slotId);
     }
 
     private int handleGbaSetServiceCommand() {