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

Commit ddc3b9af authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "MSIM: Fix for getSimOperatorName() returning empty string"

parents 408594c7 c797cd1f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -26,10 +26,12 @@ import android.os.Message;
import android.os.Registrant;
import android.os.RegistrantList;

import android.telephony.TelephonyManager;
import com.android.internal.telephony.CommandsInterface;
import com.android.internal.telephony.uicc.IccCardApplicationStatus.AppState;
import com.android.internal.telephony.uicc.IccCardApplicationStatus.AppType;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.SubscriptionController;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -849,4 +851,14 @@ public abstract class IccRecords extends Handler implements IccConstants {
        return !mContext.getResources().getBoolean(
                com.android.internal.R.bool.skip_radio_power_off_on_sim_refresh_reset);
    }

    protected void setSystemProperty(String property, String value) {
        if (mParentApp == null) return;
        int slotId = mParentApp.getUiccCard().getSlotId();

        SubscriptionController subController = SubscriptionController.getInstance();
        long subId = subController.getSubIdUsingSlotId(slotId)[0];

        TelephonyManager.setTelephonyProperty(property, subId, value);
    }
}
+0 −7
Original line number Diff line number Diff line
@@ -902,11 +902,4 @@ public final class RuimRecords extends IccRecords {
        pw.flush();
    }

    private void setSystemProperty(String key, String val) {
        // Update the system properties only in case NON-DSDS.
        // TODO: Shall have a better approach!
        if (!TelephonyManager.getDefault().isMultiSimEnabled()) {
            SystemProperties.set(key, val);
        }
    }
}
+0 −7
Original line number Diff line number Diff line
@@ -1917,11 +1917,4 @@ public class SIMRecords extends IccRecords {
        pw.flush();
    }

    private void setSystemProperty(String key, String val) {
        // Update the system properties only in case NON-DSDS.
        // TODO: Shall have a better approach!
        if (!TelephonyManager.getDefault().isMultiSimEnabled()) {
            SystemProperties.set(key, val);
        }
    }
}
+6 −6
Original line number Diff line number Diff line
@@ -99,12 +99,6 @@ public class UiccCard {

    int mSlotId;

    public UiccCard(Context c, CommandsInterface ci, IccCardStatus ics) {
        if (DBG) log("Creating");
        mCardState = ics.mCardState;
        update(c, ci, ics);
    }

    public UiccCard(Context c, CommandsInterface ci, IccCardStatus ics, int slotId) {
        mCardState = ics.mCardState;
        mSlotId = slotId;
@@ -419,6 +413,12 @@ public class UiccCard {
        }
    }

    public int getSlotId() {
        synchronized (mLock) {
            return mSlotId;
        }
    }

    public UiccCardApplication getApplication(int family) {
        synchronized (mLock) {
            int index = IccCardStatus.CARD_MAX_APPS;