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

Commit 750e30bc authored by Pengquan Meng's avatar Pengquan Meng
Browse files

Fixed CME for SubscriptionController

SubscriptionController should pass a copy of mCacheSubscriptionInfoList instead
of unmodifiable list to the TelephonyMetrics because unmodifiable list is not
thread safe.

Bug: 129315608
Test: build & current test
Merged-In: I35d8d3832aad8645ca2161464feaf094ffe4a8cc
Change-Id: I35d8d3832aad8645ca2161464feaf094ffe4a8cc
(cherry picked from commit 85d9b6d8)
parent c4962701
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -316,8 +316,11 @@ public class SubscriptionController extends ISub.Stub {

        MultiSimSettingController.getInstance().onSubscriptionsChanged();
        TelephonyMetrics metrics = TelephonyMetrics.getInstance();
        metrics.updateActiveSubscriptionInfoList(
                Collections.unmodifiableList(mCacheActiveSubInfoList));
        List<SubscriptionInfo> subInfos;
        synchronized (mSubInfoListLock) {
            subInfos = new ArrayList<>(mCacheActiveSubInfoList);
        }
        metrics.updateActiveSubscriptionInfoList(subInfos);
    }

    /**