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

Commit f53c3074 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5367932 from 93cd25cd to qt-release

Change-Id: I64d7dffcd4abbdb02e4f1fa97dec82f006c8f67d
parents 2f7bf9e0 93cd25cd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -393,12 +393,16 @@ public class RadioConfig extends Handler {

    static String requestToString(int request) {
        switch (request) {
            case RIL_REQUEST_GET_PHONE_CAPABILITY:
                return "GET_PHONE_CAPABILITY";
            case RIL_REQUEST_GET_SLOT_STATUS:
                return "GET_SLOT_STATUS";
            case RIL_REQUEST_SET_LOGICAL_TO_PHYSICAL_SLOT_MAPPING:
                return "SET_LOGICAL_TO_PHYSICAL_SLOT_MAPPING";
            case RIL_REQUEST_SET_PREFERRED_DATA_MODEM:
                return "SET_PREFERRED_DATA_MODEM";
            case RIL_REQUEST_SWITCH_DUAL_SIM_CONFIG:
                return "RIL_REQUEST_SWITCH_DUAL_SIM_CONFIG";
                return "SWITCH_DUAL_SIM_CONFIG";
            default:
                return "<unknown request>";
        }
+13 −3
Original line number Diff line number Diff line
@@ -422,6 +422,7 @@ public class ServiceStateTracker extends Handler {
    public static final int CS_NORMAL_ENABLED = 1005;     // Access Control blocks normal voice/sms service
    public static final int CS_EMERGENCY_ENABLED = 1006;  // Access Control blocks emergency call service
    public static final int CS_REJECT_CAUSE_ENABLED = 2001;     // Notify MM rejection cause
    public static final int CS_REJECT_CAUSE_DISABLED = 2002;    // Cancel MM rejection cause
    /** Notification id. */
    public static final int PS_NOTIFICATION = 888;  // Id to update and cancel PS restricted
    public static final int CS_NOTIFICATION = 999;  // Id to update and cancel CS restricted
@@ -3873,6 +3874,8 @@ public class ServiceStateTracker extends Handler {

        Context context = mPhone.getContext();

        boolean autoCancelCsRejectNotification = false;

        CarrierConfigManager configManager = (CarrierConfigManager)
                context.getSystemService(Context.CARRIER_CONFIG_SERVICE);
        if (configManager != null) {
@@ -3886,6 +3889,8 @@ public class ServiceStateTracker extends Handler {
                    if (DBG) log("Voice/emergency call barred notification disabled");
                    return;
                }
                autoCancelCsRejectNotification = bundle.getBoolean(
                        CarrierConfigManager.KEY_AUTO_CANCEL_CS_REJECT_NOTIFICATION, false);
            }
        }

@@ -3946,8 +3951,12 @@ public class ServiceStateTracker extends Handler {
                notificationId = CS_REJECT_CAUSE_NOTIFICATION;
                int resId = selectResourceForRejectCode(mRejectCode, multipleSubscriptions);
                if (0 == resId) {
                    if (autoCancelCsRejectNotification) {
                        notifyType = CS_REJECT_CAUSE_DISABLED;
                    } else {
                        loge("setNotification: mRejectCode=" + mRejectCode + " is not handled.");
                        return;
                    }
                } else {
                    icon = com.android.internal.R.drawable.stat_notify_mmcc_indication_icn;
                    // if using the single SIM resource, simNumber will be ignored
@@ -3978,7 +3987,8 @@ public class ServiceStateTracker extends Handler {
        NotificationManager notificationManager = (NotificationManager)
                context.getSystemService(Context.NOTIFICATION_SERVICE);

        if (notifyType == PS_DISABLED || notifyType == CS_DISABLED) {
        if (notifyType == PS_DISABLED || notifyType == CS_DISABLED
                || notifyType == CS_REJECT_CAUSE_DISABLED) {
            // cancel previous post notification
            notificationManager.cancel(Integer.toString(mSubId), notificationId);
        } else {
+4 −4
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ import java.util.stream.Collectors;
public class SubscriptionController extends ISub.Stub {
    static final String LOG_TAG = "SubscriptionController";
    static final boolean DBG = true;
    static final boolean VDBG = false;
    static final boolean VDBG = Rlog.isLoggable(LOG_TAG, Log.VERBOSE);
    static final boolean DBG_CACHE = false;
    static final int MAX_LOCAL_LOG_LINES = 500; // TODO: Reduce to 100 when 17678050 is fixed
    private static final int DEPRECATED_SETTING = -1;
@@ -612,7 +612,7 @@ public class SubscriptionController extends ISub.Stub {
     */
    @Override
    public List<SubscriptionInfo> getAllSubInfoList(String callingPackage) {
        if (DBG) logd("[getAllSubInfoList]+");
        if (VDBG) logd("[getAllSubInfoList]+");

        // This API isn't public, so no need to provide a valid subscription ID - we're not worried
        // about carrier-privileged callers not having access.
@@ -628,9 +628,9 @@ public class SubscriptionController extends ISub.Stub {
            List<SubscriptionInfo> subList = null;
            subList = getSubInfo(null, null);
            if (subList != null) {
                if (DBG) logd("[getAllSubInfoList]- " + subList.size() + " infos return");
                if (VDBG) logd("[getAllSubInfoList]- " + subList.size() + " infos return");
            } else {
                if (DBG) logd("[getAllSubInfoList]- no info return");
                if (VDBG) logd("[getAllSubInfoList]- no info return");
            }
            return subList;
        } finally {
+5 −5
Original line number Diff line number Diff line
@@ -245,13 +245,13 @@ public class AccessNetworksManager extends Handler {
            return;
        }

        if (mIQualifiedNetworksService != null
                && mIQualifiedNetworksService.asBinder().isBinderAlive()) {
            if (packageName.equals(mTargetBindingPackageName)) {
        if (TextUtils.equals(packageName, mTargetBindingPackageName)) {
            if (DBG) log("Service " + packageName + " already bound or being bound.");
            return;
        }

        if (mIQualifiedNetworksService != null
                && mIQualifiedNetworksService.asBinder().isBinderAlive()) {
            // Remove the network availability updater and then unbind the service.
            try {
                mIQualifiedNetworksService.removeNetworkAvailabilityUpdater(mPhone.getPhoneId());
+56 −16
Original line number Diff line number Diff line
@@ -141,6 +141,8 @@ public class DataConnection extends StateMachine {

    private String[] mPcscfAddr;

    private final String mTagSuffix;

    /**
     * Used internally for saving connecting parameters.
     */
@@ -326,9 +328,9 @@ public class DataConnection extends StateMachine {
        String transportType = (dataServiceManager.getTransportType() == TransportType.WWAN)
                ? "C"   // Cellular
                : "I";  // IWLAN
        DataConnection dc = new DataConnection(phone,
                "DC-" + transportType + "-" + mInstanceNumber.incrementAndGet(), id, dct,
                dataServiceManager, failBringUpAll, dcc);
        DataConnection dc = new DataConnection(phone, transportType + "-"
                + mInstanceNumber.incrementAndGet(), id, dct, dataServiceManager, failBringUpAll,
                dcc);
        dc.start();
        if (DBG) dc.log("Made " + dc.getName());
        return dc;
@@ -505,10 +507,11 @@ public class DataConnection extends StateMachine {
    }

    //***** Constructor (NOTE: uses dcc.getHandler() as its Handler)
    private DataConnection(Phone phone, String name, int id,
    private DataConnection(Phone phone, String tagSuffix, int id,
                           DcTracker dct, DataServiceManager dataServiceManager,
                           DcTesterFailBringUpAll failBringUpAll, DcController dcc) {
        super(name, dcc.getHandler());
        super("DC-" + tagSuffix, dcc.getHandler());
        mTagSuffix = tagSuffix;
        setLogRecSize(300);
        setLogOnlyTransitions(true);
        if (DBG) log("DataConnection created");
@@ -1877,6 +1880,8 @@ public class DataConnection extends StateMachine {
                if (dc != null) {
                    mNetworkAgent = dc.getNetworkAgent();
                    if (mNetworkAgent != null) {
                        mNetworkAgent.setTransportType(mDataServiceManager.getTransportType());
                        log("Transfer the network agent from " + dc.getName() + " successfully.");
                        mNetworkAgent.sendNetworkCapabilities(getNetworkCapabilities());
                        mNetworkAgent.sendLinkProperties(mLinkProperties);
                    } else {
@@ -1888,8 +1893,8 @@ public class DataConnection extends StateMachine {
            } else {
                mScore = calculateScore();
                mNetworkAgent = new DcNetworkAgent(getHandler().getLooper(), mPhone.getContext(),
                        "DcNetworkAgent", mNetworkInfo, getNetworkCapabilities(), mLinkProperties,
                        mScore, misc);
                        "DcNetworkAgent" + mTagSuffix, mNetworkInfo, getNetworkCapabilities(),
                        mLinkProperties, mScore, misc);
            }
            if (mDataServiceManager.getTransportType() == TransportType.WWAN) {
                mPhone.mCi.registerForNattKeepaliveStatus(
@@ -1923,14 +1928,7 @@ public class DataConnection extends StateMachine {
                mPhone.mCi.unregisterForLceInfo(getHandler());
            }
            if (mNetworkAgent != null) {
                // We do not want to update the network info if this is a handover. For all other
                // cases we need to update connectivity service with the latest network info.
                //
                // For handover, the network agent is transferred to the other data connection.
                if (mDisconnectParams == null
                        || mDisconnectParams.mReleaseType != DcTracker.RELEASE_TYPE_HANDOVER) {
                mNetworkAgent.sendNetworkInfo(mNetworkInfo);
                }
                mNetworkAgent = null;
            }
            TelephonyMetrics.getInstance().writeRilDataCallEvent(mPhone.getPhoneId(),
@@ -2333,6 +2331,8 @@ public class DataConnection extends StateMachine {

    private class DcNetworkAgent extends NetworkAgent {

        private final AtomicInteger mTransportType;

        private NetworkCapabilities mNetworkCapabilities;

        public final DcKeepaliveTracker keepaliveTracker = new DcKeepaliveTracker();
@@ -2342,6 +2342,11 @@ public class DataConnection extends StateMachine {
            super(l, c, TAG, ni, nc, lp, score, misc);
            mNetCapsLocalLog.log("New network agent created. capabilities=" + nc);
            mNetworkCapabilities = nc;
            mTransportType = new AtomicInteger(mDataServiceManager.getTransportType());
        }

        public void setTransportType(int transportType) {
            mTransportType.set(transportType);
        }

        @Override
@@ -2385,6 +2390,11 @@ public class DataConnection extends StateMachine {

        @Override
        public void sendNetworkCapabilities(NetworkCapabilities networkCapabilities) {
            if (mTransportType.get() != mDataServiceManager.getTransportType()) {
                log("sendNetworkCapabilities: Data connection has been handover to transport "
                        + TransportType.toString(mTransportType.get()));
                return;
            }
            if (!networkCapabilities.equals(mNetworkCapabilities)) {
                String logStr = "Changed from " + mNetworkCapabilities + " to "
                        + networkCapabilities + ", Data RAT="
@@ -2397,6 +2407,36 @@ public class DataConnection extends StateMachine {
            super.sendNetworkCapabilities(networkCapabilities);
        }

        @Override
        public void sendLinkProperties(LinkProperties linkProperties) {
            if (mTransportType.get() != mDataServiceManager.getTransportType()) {
                log("sendLinkProperties: Data connection has been handover to transport "
                        + TransportType.toString(mTransportType.get()));
                return;
            }
            super.sendLinkProperties(linkProperties);
        }

        @Override
        public void sendNetworkScore(int score) {
            if (mTransportType.get() != mDataServiceManager.getTransportType()) {
                log("sendNetworkScore: Data connection has been handover to transport "
                        + TransportType.toString(mTransportType.get()));
                return;
            }
            super.sendNetworkScore(score);
        }

        @Override
        public void sendNetworkInfo(NetworkInfo networkInfo) {
            if (mTransportType.get() != mDataServiceManager.getTransportType()) {
                log("sendNetworkScore: Data connection has been handover to transport "
                        + TransportType.toString(mTransportType.get()));
                return;
            }
            super.sendNetworkInfo(networkInfo);
        }

        @Override
        protected void startSocketKeepalive(Message msg) {
            if (msg.obj instanceof NattKeepalivePacketData) {
@@ -2597,7 +2637,7 @@ public class DataConnection extends StateMachine {
     */
    public void tearDownAll(String reason, @ReleaseNetworkType int releaseType,
                            Message onCompletedMsg) {
        if (DBG) log("tearDownAll: reason=" + reason + " onCompletedMsg=" + onCompletedMsg);
        if (DBG) log("tearDownAll: reason=" + reason + ", releaseType=" + releaseType);
        sendMessage(DataConnection.EVENT_DISCONNECT_ALL,
                new DisconnectParams(null, reason, releaseType, onCompletedMsg));
    }
Loading