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

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

Snap for 11865526 from 61a3d64e to 24Q3-release

Change-Id: I5519980e3d8c146caa8f46e7010167dab6f59055
parents 086aa313 61a3d64e
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -466,16 +466,19 @@ public class RIL extends BaseCommands implements CommandsInterface {
    private final class BinderServiceDeathRecipient implements IBinder.DeathRecipient {
        private IBinder mBinder;
        private final int mService;
        private long mLinkedFlags;

        BinderServiceDeathRecipient(int service) {
            mService = service;
            mLinkedFlags = 0;
        }

        public void linkToDeath(IBinder service) throws RemoteException {
            if (service != null) {
                riljLog("Linked to death for service " + serviceToString(mService));
                mBinder = service;
                mBinder.linkToDeath(this, (int) mServiceCookies.get(mService).incrementAndGet());
                mLinkedFlags = mServiceCookies.get(mService).incrementAndGet();
                mBinder.linkToDeath(this, (int) mLinkedFlags);
            } else {
                riljLoge("Unable to link to death for service " + serviceToString(mService));
            }
@@ -483,8 +486,9 @@ public class RIL extends BaseCommands implements CommandsInterface {

        public synchronized void unlinkToDeath() {
            if (mBinder != null) {
                mBinder.unlinkToDeath(this, 0);
                mBinder.unlinkToDeath(this, (int) mLinkedFlags);
                mBinder = null;
                mLinkedFlags = 0;
            }
        }

@@ -494,10 +498,10 @@ public class RIL extends BaseCommands implements CommandsInterface {
            if (mFeatureFlags.combineRilDeathHandle()) {
                mRilHandler.sendMessageAtFrontOfQueue(mRilHandler.obtainMessage(
                        EVENT_AIDL_PROXY_DEAD, mService, 0 /* ignored arg2 */,
                        mServiceCookies.get(mService).get()));
                        mLinkedFlags));
            } else {
                mRilHandler.sendMessage(mRilHandler.obtainMessage(EVENT_AIDL_PROXY_DEAD, mService,
                        0 /* ignored arg2 */, mServiceCookies.get(mService).get()));
                        0 /* ignored arg2 */, mLinkedFlags));
            }
            unlinkToDeath();
        }
+2 −7
Original line number Diff line number Diff line
@@ -1097,12 +1097,7 @@ public class DataNetwork extends StateMachine {
                mPhone.getPhoneId());
        final NetworkProvider provider = (null == factory) ? null : factory.getProvider();

        // Always prefer IWLAN network for MMS designated network.
        // TODO(b/293656884) Proper use of primary transport to avoid conflicting with DSDA.
        boolean isPreferred = mTransport == AccessNetworkConstants.TRANSPORT_TYPE_WLAN
                && getApnTypeNetworkCapability() == NetworkCapabilities.NET_CAPABILITY_MMS;

        mNetworkScore = new NetworkScore.Builder().setTransportPrimary(isPreferred)
        mNetworkScore = new NetworkScore.Builder()
               .setKeepConnectedReason(isHandoverInProgress()
                        ? NetworkScore.KEEP_CONNECTED_FOR_HANDOVER
                        : NetworkScore.KEEP_CONNECTED_NONE).build();
+0 −22
Original line number Diff line number Diff line
@@ -1359,28 +1359,6 @@ public class DataNetworkController extends Handler {
            // When reaching here, it means this data network can satisfy all the network requests.
            logv("Found a compatible data network " + dataNetwork + ". Attaching "
                    + requestList);

            // If WLAN preferred, see whether a more suitable data profile shall be used to satisfy
            // a short-lived request that doesn't perform handover.
            int capability = requestList.getFirst().getApnTypeNetworkCapability();
            int preferredTransport = mAccessNetworksManager
                    .getPreferredTransportByNetworkCapability(capability);
            if (capability == NetworkCapabilities.NET_CAPABILITY_MMS
                    && preferredTransport != dataNetwork.getTransport()
                    && preferredTransport == AccessNetworkConstants.TRANSPORT_TYPE_WLAN) {
                DataProfile candidate = mDataProfileManager
                        .getDataProfileForNetworkRequest(requestList.getFirst(),
                                TelephonyManager.NETWORK_TYPE_IWLAN,
                                mServiceState.isUsingNonTerrestrialNetwork(),
                                isEsimBootStrapProvisioningActivated(),
                                false/*ignorePermanentFailure*/);
                if (candidate != null && !dataNetwork.getDataProfile().equals(candidate)) {
                    logv("But skipped because found better data profile " + candidate
                            + DataUtils.networkCapabilityToString(capability) + " preferred on "
                            + AccessNetworkConstants.transportTypeToString(preferredTransport));
                    continue;
                }
            }
            return dataNetwork.attachNetworkRequests(requestList);
        }
        return false;
+1 −1
Original line number Diff line number Diff line
@@ -1044,7 +1044,7 @@ public class SubscriptionDatabaseManager extends Handler {
                throw new IllegalArgumentException("updateSubscription: subscription does not "
                        + "exist. subId=" + subId);
            }
            if (oldSubInfo.equals(newSubInfo)) return;
            if (oldSubInfo.equalsDbItemsOnly(newSubInfo)) return;

            if (updateDatabase(subId, createDeltaContentValues(oldSubInfo, newSubInfo)) > 0) {
                mAllSubscriptionInfoInternalCache.put(subId, newSubInfo);
+19 −7
Original line number Diff line number Diff line
@@ -454,12 +454,13 @@ public class SubscriptionInfoInternal {
     */
    private final int mIsOnlyNonTerrestrialNetwork;

    // Below are the fields that do not exist in the SimInfo table.
    // This field does not exist in the SimInfo table.
    /**
     * The card ID of the SIM card. This maps uniquely to {@link #mCardString}.
     */
    private final int mCardId;

    // This field does not exist in the SimInfo table.
    /**
     * Whether group of the subscription is disabled. This is only useful if it's a grouped
     * opportunistic subscription. In this case, if all primary (non-opportunistic) subscriptions
@@ -1370,11 +1371,14 @@ public class SubscriptionInfoInternal {
                + "]";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SubscriptionInfoInternal that = (SubscriptionInfoInternal) o;
    /**
     * Campare only the columns existing in the SimInfo table and the mapped variables to see if
     * they are equal.
     *
     * @param that SubscriptionInfoInternal to be compared
     * @return {@code true} if equals.
     */
    public boolean equalsDbItemsOnly(@NonNull SubscriptionInfoInternal that) {
        return mId == that.mId && mSimSlotIndex == that.mSimSlotIndex
                && mDisplayNameSource == that.mDisplayNameSource && mIconTint == that.mIconTint
                && mDataRoaming == that.mDataRoaming && mIsEmbedded == that.mIsEmbedded
@@ -1407,7 +1411,6 @@ public class SubscriptionInfoInternal {
                && mPortIndex == that.mPortIndex && mUsageSetting == that.mUsageSetting
                && mLastUsedTPMessageReference == that.mLastUsedTPMessageReference
                && mUserId == that.mUserId && mIsSatelliteEnabled == that.mIsSatelliteEnabled
                && mCardId == that.mCardId && mIsGroupDisabled == that.mIsGroupDisabled
                && mIccId.equals(that.mIccId) && mDisplayName.equals(that.mDisplayName)
                && mCarrierName.equals(that.mCarrierName) && mNumber.equals(that.mNumber)
                && mMcc.equals(that.mMcc) && mMnc.equals(that.mMnc) && mEhplmns.equals(
@@ -1430,6 +1433,15 @@ public class SubscriptionInfoInternal {
                && mSatelliteEntitlementPlmns == that.mSatelliteEntitlementPlmns;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SubscriptionInfoInternal that = (SubscriptionInfoInternal) o;
        return equalsDbItemsOnly(that)
                && mCardId == that.mCardId && mIsGroupDisabled == that.mIsGroupDisabled;
    }

    @Override
    public int hashCode() {
        int result = Objects.hash(mId, mIccId, mSimSlotIndex, mDisplayName, mCarrierName,
Loading