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

Commit 0052dbf7 authored by James Mattis's avatar James Mattis Committed by android-build-merger
Browse files

Merge "SUMMARY Only going to access the sPhones array for an index that exists." am: ed26975f

am: 01a579d0

Change-Id: Ia4f519f564b68da445b854b53aa11fe731a30d02
parents 7660b8f3 01a579d0
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -307,13 +307,16 @@ public class PhoneFactory {
                throw new IllegalStateException("Default phones haven't been made yet!");
                // CAF_MSIM FIXME need to introduce default phone id ?
            } else if (phoneId == SubscriptionManager.DEFAULT_PHONE_INDEX) {
                if (DBG) dbgInfo = "phoneId == DEFAULT_PHONE_ID return sPhone";
                if (DBG) {
                    dbgInfo = "phoneId == DEFAULT_PHONE_ID return sPhone";
                }
                phone = sPhone;
            } else {
                if (DBG) dbgInfo = "phoneId != DEFAULT_PHONE_ID return sPhones[phoneId]";
                phone = (((phoneId >= 0)
                                && (phoneId < TelephonyManager.getDefault().getPhoneCount()))
                        ? sPhones[phoneId] : null);
                if (DBG) {
                    dbgInfo = "phoneId != DEFAULT_PHONE_ID return sPhones[phoneId]";
                }
                phone = (phoneId >= 0 && phoneId < sPhones.length)
                            ? sPhones[phoneId] : null;
            }
            if (DBG) {
                Rlog.d(LOG_TAG, "getPhone:- " + dbgInfo + " phoneId=" + phoneId +