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

Commit 4b479deb authored by Roman Birg's avatar Roman Birg Committed by Gerrit Code Review
Browse files

DctController: fix mismerge with getTopPriorityRequestPhoneId()



Add back logic from change-id
I57fee028d9ac0e91d94eb70f8ea75c7fcb5f7087

Change-Id: Ice8026fa75126903bdb756c663008b68fafef60b
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 658eea80
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -560,12 +560,24 @@ public class DctController extends Handler {
        int priority = -1;
        int subId;

        int activePhoneId = -1;
        for (int i=0; i<mDcSwitchStateMachine.length; i++) {
            if (!mDcSwitchAsyncChannel[i].isIdleSync()) {
                activePhoneId = i;
                break;
            }
        }

        for (RequestInfo requestInfo : mRequestInfos.values()) {
            logd("getTopPriorityRequestPhoneId requestInfo=" + requestInfo);
            if (requestInfo.priority > priority) {
                priority = requestInfo.priority;
                topSubId = requestInfo.request.networkCapabilities.getNetworkSpecifier();
                retRequestInfo = requestInfo;
            } else if (priority == requestInfo.priority) {
                if (requestInfo.executedPhoneId == activePhoneId) {
                   topSubId = requestInfo.request.networkCapabilities.getNetworkSpecifier();
               }
            }
        }
        if (TextUtils.isEmpty(topSubId)) {