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

Commit ad73c5aa authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 13355977 from 741f2aab to 25Q3-release

Change-Id: I74d0fe1d3caf3391974c9d3e9e001edd715fa66c
parents a74b8520 741f2aab
Loading
Loading
Loading
Loading
+0 −8
Original line number Original line Diff line number Diff line
@@ -59,14 +59,6 @@ flag {
    bug:"312101946"
    bug:"312101946"
}
}


# OWNER=apsankar TARGET=24Q3
flag {
    name: "call_extra_for_non_hold_supported_carriers"
    namespace: "telephony"
    description: "For DSDA devices, controls whether the existing call will be dropped when an incoming call on a different sub is answered, when either sub does not support hold capability."
    bug:"315993953"
}

# OWNER=joonhunshin TARGET=24Q3
# OWNER=joonhunshin TARGET=24Q3
flag {
flag {
    name: "update_roaming_state_to_set_wfc_mode"
    name: "update_roaming_state_to_set_wfc_mode"
+10 −10
Original line number Original line Diff line number Diff line
@@ -235,9 +235,6 @@ public abstract class SMSDispatcher extends Handler {
    @VisibleForTesting
    @VisibleForTesting
    public int mCarrierMessagingTimeout = 10 * 60 * 1000; //10 minutes
    public int mCarrierMessagingTimeout = 10 * 60 * 1000; //10 minutes


    /** Used for storing last TP - Message Reference used*/
    private int mMessageRef = -1;

    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    protected static int getNextConcatenatedRef() {
    protected static int getNextConcatenatedRef() {
        sConcatenatedRef += 1;
        sConcatenatedRef += 1;
@@ -450,12 +447,13 @@ public abstract class SMSDispatcher extends Handler {
                   if sim was used on another device and inserted in a new device,
                   if sim was used on another device and inserted in a new device,
                   that device will start sending the next TPMR after reading from the SIM.
                   that device will start sending the next TPMR after reading from the SIM.
                 */
                 */
                mMessageRef = getTpmrValueFromSIM();
                mSmsDispatchersController.setMessageReference(getTpmrValueFromSIM());
                if (mMessageRef == -1) {
                if (mSmsDispatchersController.getMessageReference() == -1) {
                    SubscriptionInfoInternal subInfo = SubscriptionManagerService.getInstance()
                    SubscriptionInfoInternal subInfo = SubscriptionManagerService.getInstance()
                            .getSubscriptionInfoInternal(msg.arg1);
                            .getSubscriptionInfoInternal(msg.arg1);
                    if (subInfo != null) {
                    if (subInfo != null) {
                        mMessageRef = subInfo.getLastUsedTPMessageReference();
                        mSmsDispatchersController.setMessageReference(
                                subInfo.getLastUsedTPMessageReference());
                    }
                    }
                }
                }
                break;
                break;
@@ -475,11 +473,12 @@ public abstract class SMSDispatcher extends Handler {
    }
    }


    private void updateTPMessageReference() {
    private void updateTPMessageReference() {
        updateSIMLastTPMRValue(mMessageRef);
        updateSIMLastTPMRValue(mSmsDispatchersController.getMessageReference());
        final long identity = Binder.clearCallingIdentity();
        final long identity = Binder.clearCallingIdentity();
        try {
        try {
            SubscriptionManagerService.getInstance()
            SubscriptionManagerService.getInstance()
                    .setLastUsedTPMessageReference(getSubId(), mMessageRef);
                    .setLastUsedTPMessageReference(getSubId(),
                    mSmsDispatchersController.getMessageReference());
        } catch (SecurityException e) {
        } catch (SecurityException e) {
            Rlog.e(TAG, "Security Exception caused on messageRef updation to DB " + e.getMessage());
            Rlog.e(TAG, "Security Exception caused on messageRef updation to DB " + e.getMessage());
        } finally {
        } finally {
@@ -521,9 +520,10 @@ public abstract class SMSDispatcher extends Handler {
            return 0;
            return 0;
        }
        }


        mMessageRef = (mMessageRef + 1) % 256;
        int messageRef = mSmsDispatchersController.incrementMessageReference();
        Rlog.d(TAG, "nextMessageRef: " + messageRef);
        updateTPMessageReference();
        updateTPMessageReference();
        return mMessageRef;
        return messageRef;
    }
    }


    /**
    /**
+21 −0
Original line number Original line Diff line number Diff line
@@ -144,6 +144,9 @@ public class SmsDispatchersController extends Handler {
    private SMSDispatcher mGsmDispatcher;
    private SMSDispatcher mGsmDispatcher;
    private ImsSmsDispatcher mImsSmsDispatcher;
    private ImsSmsDispatcher mImsSmsDispatcher;


    /** Used for storing last TP - Message Reference used.*/
    private int mMessageRef = -1;

    private GsmInboundSmsHandler mGsmInboundSmsHandler;
    private GsmInboundSmsHandler mGsmInboundSmsHandler;
    private CdmaInboundSmsHandler mCdmaInboundSmsHandler = null;
    private CdmaInboundSmsHandler mCdmaInboundSmsHandler = null;


@@ -2297,6 +2300,24 @@ public class SmsDispatchersController extends Handler {
        }
        }
    }
    }


    public int getMessageReference() {
        return mMessageRef;
    }

    public void setMessageReference(int messageReference) {
        mMessageRef = messageReference;
    }

    /**
     * Increment the value of the message reference by 1.
     *
     * @return The new value of the message reference.
     */
    public int incrementMessageReference() {
        mMessageRef = (mMessageRef + 1) % 256;
        return mMessageRef;
    }

    public interface SmsInjectionCallback {
    public interface SmsInjectionCallback {
        void onSmsInjectedResult(int result);
        void onSmsInjectedResult(int result);
    }
    }
+9 −0
Original line number Original line Diff line number Diff line
@@ -702,6 +702,13 @@ public class DataNetworkController extends Handler {
         * @param qosBearerSessions The latest QOS bearer sessions.
         * @param qosBearerSessions The latest QOS bearer sessions.
         */
         */
        public void onQosSessionsChanged(@NonNull List<QosBearerSession> qosBearerSessions) {}
        public void onQosSessionsChanged(@NonNull List<QosBearerSession> qosBearerSessions) {}

        /**
         * Called when the SIM state changed.
         *
         * @param simState The SIM state.
         */
        public void onSimStateChanged(@SimState int simState) {}
    }
    }


    /**
    /**
@@ -3591,6 +3598,8 @@ public class DataNetworkController extends Handler {
            mSimState = simState;
            mSimState = simState;
            if (simState == TelephonyManager.SIM_STATE_ABSENT) {
            if (simState == TelephonyManager.SIM_STATE_ABSENT) {
                onSimAbsent();
                onSimAbsent();
                mDataNetworkControllerCallbacks.forEach(callback -> callback.invokeFromExecutor(
                    () -> callback.onSimStateChanged(simState)));
            } else if (simState == TelephonyManager.SIM_STATE_LOADED) {
            } else if (simState == TelephonyManager.SIM_STATE_LOADED) {
                sendMessage(obtainMessage(EVENT_REEVALUATE_UNSATISFIED_NETWORK_REQUESTS,
                sendMessage(obtainMessage(EVENT_REEVALUATE_UNSATISFIED_NETWORK_REQUESTS,
                        DataEvaluationReason.SIM_LOADED));
                        DataEvaluationReason.SIM_LOADED));
+21 −3
Original line number Original line Diff line number Diff line
@@ -344,6 +344,13 @@ public class DataStallRecoveryManager extends Handler {
                                    : "All InternetDataNetwork Disconnected");
                                    : "All InternetDataNetwork Disconnected");
                        }
                        }
                    }
                    }
                    @Override
                    public void onSimStateChanged(int simState) {
                        if (simState == TelephonyManager.SIM_STATE_ABSENT) {
                            log("SIM state is ABSENT, reset DSRM.");
                            reset(true);
                        }
                    }
                });
                });
        mPhone.mCi.registerForRadioStateChanged(this, EVENT_RADIO_STATE_CHANGED, null);
        mPhone.mCi.registerForRadioStateChanged(this, EVENT_RADIO_STATE_CHANGED, null);


@@ -549,8 +556,13 @@ public class DataStallRecoveryManager extends Handler {
    /**
    /**
     * Called when internet validation status passed. We will initialize all parameters.
     * Called when internet validation status passed. We will initialize all parameters.
     */
     */
    private void reset() {
    private void reset(boolean isSimAbsent) {
        if (isSimAbsent) {
            // state set to never passed due to SIM absent
            mIsValidNetwork = false;
        } else {
            mIsValidNetwork = true;
            mIsValidNetwork = true;
        }
        mRecoveryTriggered = false;
        mRecoveryTriggered = false;
        mIsAttemptedAllSteps = false;
        mIsAttemptedAllSteps = false;
        mRadioStateChangedDuringDataStall = false;
        mRadioStateChangedDuringDataStall = false;
@@ -578,7 +590,7 @@ public class DataStallRecoveryManager extends Handler {
        if (isValid) {
        if (isValid) {
            // Broadcast intent that data stall recovered.
            // Broadcast intent that data stall recovered.
            broadcastDataStallDetected(mLastAction);
            broadcastDataStallDetected(mLastAction);
            reset();
            reset(false);
        } else if (isRecoveryNeeded(true)) {
        } else if (isRecoveryNeeded(true)) {
            // Set the network as invalid, because recovery is needed
            // Set the network as invalid, because recovery is needed
            mIsValidNetwork = false;
            mIsValidNetwork = false;
@@ -616,6 +628,12 @@ public class DataStallRecoveryManager extends Handler {
     */
     */
    @VisibleForTesting
    @VisibleForTesting
    public void setRecoveryAction(@RecoveryAction int action) {
    public void setRecoveryAction(@RecoveryAction int action) {
        if (!mIsValidNetwork && !isRecoveryAlreadyStarted()) {
            log(
                    "Skip set recovery action because the network still remains invalid and"
                    + " recovery was not started yet.");
            return;
        }
        // Reset the validation count for action change
        // Reset the validation count for action change
        if (mRecoveryAction != action) {
        if (mRecoveryAction != action) {
            mActionValidationCount = 0;
            mActionValidationCount = 0;
Loading