Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4eac519 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "[API feedback] api fixed for getSlotMapping" am: 9931252c am:...

Merge "Merge "[API feedback] api fixed for getSlotMapping" am: 9931252c am: 58fed7fa am: 91ae1512"
parents ec8de623 4d16fb67
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8031,7 +8031,7 @@ package android.telephony {
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean getEmergencyCallbackMode();
    method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimDomain();
    method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimIst();
    method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<android.util.Pair<java.lang.Integer,java.lang.Integer>> getLogicalToPhysicalSlotMapping();
    method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.Map<java.lang.Integer,java.lang.Integer> getLogicalToPhysicalSlotMapping();
    method public static long getMaxNumberVerificationTimeoutMillis();
    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getPreferredNetworkTypeBitmask();
    method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public int getRadioPowerState();
+7 −8
Original line number Diff line number Diff line
@@ -3346,26 +3346,25 @@ public class TelephonyManager {
    }

    /**
     * Get the mapping from logical slots to physical slots. The mapping represent by a pair list.
     * The key of the piar is the logical slot id and the value of the pair is the physical
     * slots id mapped to this logical slot id.
     * Get the mapping from logical slots to physical slots. The key of the map is the logical slot
     * id and the value is the physical slots id mapped to this logical slot id.
     *
     * @return an pair list indicates the mapping from logical slots to physical slots. The size of
     * the list should be {@link #getPhoneCount()} if success, otherwise return an empty list.
     * @return a map indicates the mapping from logical slots to physical slots. The size of the map
     * should be {@link #getPhoneCount()} if success, otherwise return an empty map.
     *
     * @hide
     */
    @SystemApi
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    @NonNull
    public List<Pair<Integer, Integer>> getLogicalToPhysicalSlotMapping() {
        List<Pair<Integer, Integer>> slotMapping = new ArrayList<>();
    public Map<Integer, Integer> getLogicalToPhysicalSlotMapping() {
        Map<Integer, Integer> slotMapping = new HashMap<>();
        try {
            ITelephony telephony = getITelephony();
            if (telephony != null) {
                int[] slotMappingArray = telephony.getSlotsMapping();
                for (int i = 0; i < slotMappingArray.length; i++) {
                    slotMapping.add(new Pair(i, slotMappingArray[i]));
                    slotMapping.put(i, slotMappingArray[i]);
                }
            }
        } catch (RemoteException e) {