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

Commit b375bd6c authored by Holly Jiuyu Sun's avatar Holly Jiuyu Sun
Browse files

Use the EuiccManager with correct cardId.

Bug: 37355373
Test: test on phone
Change-Id: Ie5c6f70bfbe49acde7206527d66e943d5a6c3214
parent f6d5e705
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1601,9 +1601,10 @@ public class SubscriptionController extends ISub.Stub {
            SubscriptionInfo sub = getSubscriptionInfo(subId);
            if (sub != null && sub.isEmbedded()) {
                // Ignore the result.
                if (DBG) logd("Updating embedded sub nickname.");
                EuiccManager euiccManager = (EuiccManager)
                        mContext.getSystemService(Context.EUICC_SERVICE);
                int cardId = sub.getCardId();
                if (DBG) logd("Updating embedded sub nickname on cardId: " + cardId);
                EuiccManager euiccManager = ((EuiccManager)
                        mContext.getSystemService(Context.EUICC_SERVICE)).createForCardId(cardId);
                euiccManager.updateSubscriptionNickname(subId, displayName,
                        PendingIntent.getService(
                            mContext, 0 /* requestCode */, new Intent(), 0 /* flags */));