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

Commit 2aa2c23e authored by Rambo Wang's avatar Rambo Wang Committed by Automerger Merge Worker
Browse files

Merge "ServiceStateTracker: remove synchronization from mSignalRequestRecords"...

Merge "ServiceStateTracker: remove synchronization from mSignalRequestRecords" am: a44f53d6 am: 838f8e6c

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1568708

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic8b9720cae8f311365ed015e18fb3283f49f3aeb
parents ed9b9341 838f8e6c
Loading
Loading
Loading
Loading
+20 −28
Original line number Diff line number Diff line
@@ -651,7 +651,6 @@ public class ServiceStateTracker extends Handler {
    private final Object mLteRsrpBoostLock = new Object();
    private static final int INVALID_LTE_EARFCN = -1;

    // @GuardedBy("mSignalRequestRecords")
    private final List<SignalRequestRecord> mSignalRequestRecords = new ArrayList<>();

    public ServiceStateTracker(GsmCdmaPhone phone, CommandsInterface ci) {
@@ -1790,10 +1789,7 @@ public class ServiceStateTracker extends Handler {
                    break;
                }

                synchronized (mSignalRequestRecords) {
                mSignalRequestRecords.add(record);
                }

                updateAlwaysReportSignalStrength();
                updateReportingCriteria(getCarrierConfig());

@@ -1807,7 +1803,6 @@ public class ServiceStateTracker extends Handler {
                SignalRequestRecord record = pair.first;
                Message onCompleted = pair.second;

                synchronized (mSignalRequestRecords) {
                // for loop with removal may cause ConcurrentModificationException
                Iterator<SignalRequestRecord> it = mSignalRequestRecords.iterator();
                while (it.hasNext()) {
@@ -1816,7 +1811,6 @@ public class ServiceStateTracker extends Handler {
                        it.remove();
                    }
                }
                }

                updateAlwaysReportSignalStrength();
                updateReportingCriteria(getCarrierConfig());
@@ -6083,7 +6077,6 @@ public class ServiceStateTracker extends Handler {

        final boolean isDeviceIdle = mPhone.isDeviceIdle();
        final int curSubId = mPhone.getSubId();
        synchronized (mSignalRequestRecords) {
        // The total number of record is small (10~15 tops). With each request has at most 5
        // SignalThresholdInfo which has at most 8 thresholds arrays. So the nested loop should
        // not be a concern here.
@@ -6101,7 +6094,6 @@ public class ServiceStateTracker extends Handler {
                }
            }
        }
        }

        int[] targetArray = new int[target.size()];
        int i = 0;