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

Commit abf11436 authored by Jack Yu's avatar Jack Yu
Browse files

Fixed crash in subscription controller

Added null pointer check when no active subscription info
is returned.

Test: Telephony sanity tests
Bug: 77695179
Merged-In: Ifcab0f57eff5cf7e89421f0c4d378f112eadb073
Change-Id: Ifcab0f57eff5cf7e89421f0c4d378f112eadb073
(cherry picked from commit 33814154)
parent 7303122f
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -647,10 +647,13 @@ public class SubscriptionController extends ISub.Stub {

        synchronized (mCacheActiveSubInfoList) {
            mCacheActiveSubInfoList.clear();
            mCacheActiveSubInfoList.addAll(getSubInfo(
                    SubscriptionManager.SIM_SLOT_INDEX + ">=0", null));
            List<SubscriptionInfo> activeSubscriptionInfoList = getSubInfo(
                    SubscriptionManager.SIM_SLOT_INDEX + ">=0", null);
            if (activeSubscriptionInfoList != null) {
                mCacheActiveSubInfoList.addAll(activeSubscriptionInfoList);
            }
            if (DBG_CACHE) {
                if (mCacheActiveSubInfoList != null) {
                if (!mCacheActiveSubInfoList.isEmpty()) {
                    for (SubscriptionInfo si : mCacheActiveSubInfoList) {
                        logd("[refreshCachedActiveSubscriptionInfoList] Setting Cached info="
                                + si);