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

Commit ce65922c authored by andychou's avatar andychou Committed by Sooraj Sasindran
Browse files

Notify physical channel configuration with phoneId and subId

Physical channel configuration may be retrieved before SIM loaded. So
configuration will not be able to report via TelephonyRegistry.
Therefore, use phoneId to mapping record and notify

Bug: 123904518
Test: Manual test and make sure physical channel configuration is
displayed in RadioInfo

Change-Id: I11c89b9cf68c3f3d7523ad8dfc21520f44fa7ce3
parent d4fd22c9
Loading
Loading
Loading
Loading
+6 −8
Original line number Original line Diff line number Diff line
@@ -1255,23 +1255,21 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
        }
        }
    }
    }


    public void notifyPhysicalChannelConfiguration(List<PhysicalChannelConfig> configs) {
    /**
        notifyPhysicalChannelConfigurationForSubscriber(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID,
     * Notify physical channel configuration according to subscripton ID and phone ID
                configs);
     */
    }
    public void notifyPhysicalChannelConfigurationForSubscriber(int phoneId, int subId,

    public void notifyPhysicalChannelConfigurationForSubscriber(int subId,
            List<PhysicalChannelConfig> configs) {
            List<PhysicalChannelConfig> configs) {
        if (!checkNotifyPermission("notifyPhysicalChannelConfiguration()")) {
        if (!checkNotifyPermission("notifyPhysicalChannelConfiguration()")) {
            return;
            return;
        }
        }


        if (VDBG) {
        if (VDBG) {
            log("notifyPhysicalChannelConfiguration: subId=" + subId + " configs=" + configs);
            log("notifyPhysicalChannelConfiguration: subId=" + subId + " phoneId=" + phoneId
                    + " configs=" + configs);
        }
        }


        synchronized (mRecords) {
        synchronized (mRecords) {
            int phoneId = SubscriptionManager.getPhoneId(subId);
            if (validatePhoneId(phoneId)) {
            if (validatePhoneId(phoneId)) {
                mPhysicalChannelConfigs.set(phoneId, configs);
                mPhysicalChannelConfigs.set(phoneId, configs);
                for (Record r : mRecords) {
                for (Record r : mRecords) {
+1 −2
Original line number Original line Diff line number Diff line
@@ -68,8 +68,7 @@ interface ITelephonyRegistry {
    void notifyOtaspChanged(in int subId, in int otaspMode);
    void notifyOtaspChanged(in int subId, in int otaspMode);
    @UnsupportedAppUsage
    @UnsupportedAppUsage
    void notifyCellInfo(in List<CellInfo> cellInfo);
    void notifyCellInfo(in List<CellInfo> cellInfo);
    void notifyPhysicalChannelConfiguration(in List<PhysicalChannelConfig> configs);
    void notifyPhysicalChannelConfigurationForSubscriber(in int phoneId, in int subId,
    void notifyPhysicalChannelConfigurationForSubscriber(in int subId,
            in List<PhysicalChannelConfig> configs);
            in List<PhysicalChannelConfig> configs);
    void notifyPreciseCallState(int phoneId, int subId, int ringingCallState,
    void notifyPreciseCallState(int phoneId, int subId, int ringingCallState,
            int foregroundCallState, int backgroundCallState);
            int foregroundCallState, int backgroundCallState);