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

Commit c05d2fa7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Enable preventSystemServerAndPhoneDeadlock fix" into 24D1-dev am: ed0aa700

parents 973a4ae7 ed0aa700
Loading
Loading
Loading
Loading
+11 −35
Original line number Diff line number Diff line
@@ -1132,9 +1132,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
            return;
        }

        int phoneId = -1;
        int subscriptionId = SubscriptionManager.DEFAULT_SUBSCRIPTION_ID;
        if(Flags.preventSystemServerAndPhoneDeadlock()) {
        // Legacy applications pass SubscriptionManager.DEFAULT_SUB_ID,
        // force all illegal subId to SubscriptionManager.DEFAULT_SUB_ID
        if (!SubscriptionManager.isValidSubscriptionId(subId)) {
@@ -1144,8 +1142,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
        } else { //APP specify subID
            subscriptionId = subId;
        }
            phoneId = getPhoneIdFromSubId(subscriptionId);
        }
        int phoneId = getPhoneIdFromSubId(subscriptionId);

        synchronized (mRecords) {
            // register
@@ -1166,23 +1163,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
            r.renounceFineLocationAccess = renounceFineLocationAccess;
            r.callerUid = Binder.getCallingUid();
            r.callerPid = Binder.getCallingPid();

            if(!Flags.preventSystemServerAndPhoneDeadlock()) {
                // Legacy applications pass SubscriptionManager.DEFAULT_SUB_ID,
                // force all illegal subId to SubscriptionManager.DEFAULT_SUB_ID
                if (!SubscriptionManager.isValidSubscriptionId(subId)) {
                    if (DBG) {
                        log("invalid subscription id, use default id");
                    }
                    r.subId = SubscriptionManager.DEFAULT_SUBSCRIPTION_ID;
                } else {//APP specify subID
                    r.subId = subId;
                }
                r.phoneId = getPhoneIdFromSubId(r.subId);
            } else {
            r.subId = subscriptionId;
            r.phoneId = phoneId;
            }
            r.eventList = events;

            if (DBG) {
@@ -1928,14 +1910,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
    }

    private void notifyCarrierNetworkChangeWithPermission(int subId, boolean active) {
        int phoneId = -1;
        if(Flags.preventSystemServerAndPhoneDeadlock()) {
            phoneId = getPhoneIdFromSubId(subId);
        }
        int phoneId = getPhoneIdFromSubId(subId);
        synchronized (mRecords) {
            if(!Flags.preventSystemServerAndPhoneDeadlock()) {
                phoneId = getPhoneIdFromSubId(subId);
            }
            mCarrierNetworkChangeState[phoneId] = active;

            if (VDBG) {