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

Commit 863ed014 authored by Aishwarya Mallampati's avatar Aishwarya Mallampati Committed by Android (Google) Code Review
Browse files

Merge "Modified ICCID strings in SQLite Query"

parents 359d5771 17af8ba0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1267,7 +1267,7 @@ public class SubscriptionController extends ISub.Stub {
            if (i > 0) {
                whereClause.append(",");
            }
            whereClause.append("\"").append(embeddedIccids[i]).append("\"");
            whereClause.append("'").append(embeddedIccids[i]).append("'");
        }
        whereClause.append(")");

@@ -3928,9 +3928,9 @@ public class SubscriptionController extends ISub.Stub {
        selection.append(SubscriptionManager.ICC_ID);
        selection.append(" IN (");
        for (int i = 0; i < iccIds.length - 1; i++) {
            selection.append("\"" + iccIds[i] + "\", ");
            selection.append("'" + iccIds[i] + "', ");
        }
        selection.append("\"" + iccIds[iccIds.length - 1] + "\"");
        selection.append("'" + iccIds[iccIds.length - 1] + "'");
        selection.append(")");

        return selection.toString();
+2 −2
Original line number Diff line number Diff line
@@ -1075,7 +1075,7 @@ public class SubscriptionInfoUpdater extends Handler {
            }
            hasChanges = true;
            contentResolver.update(SubscriptionManager.CONTENT_URI, values,
                    SubscriptionManager.ICC_ID + "=\"" + embeddedProfile.getIccid() + "\"", null);
                    SubscriptionManager.ICC_ID + "='" + embeddedProfile.getIccid() + "'", null);

            // refresh Cached Active Subscription Info List
            mSubscriptionController.refreshCachedActiveSubscriptionInfoList();
@@ -1095,7 +1095,7 @@ public class SubscriptionInfoUpdater extends Handler {
                SubscriptionInfo info = existingSubscriptions.get(i);
                if (info.isEmbedded()) {
                    if (DBG) logd("Removing embedded subscription of IccId " + info.getIccId());
                    iccidsToRemove.add("\"" + info.getIccId() + "\"");
                    iccidsToRemove.add("'" + info.getIccId() + "'");
                }
            }
            String whereClause = SubscriptionManager.ICC_ID + " IN ("
+3 −3
Original line number Diff line number Diff line
@@ -625,12 +625,12 @@ public class SubscriptionInfoUpdaterTest extends TelephonyTest {
        // Info for 1 and 3 should be updated as active embedded subscriptions.
        ArgumentCaptor<ContentValues> iccid1Values = ArgumentCaptor.forClass(ContentValues.class);
        verify(mContentProvider).update(eq(SubscriptionManager.CONTENT_URI), iccid1Values.capture(),
                eq(SubscriptionManager.ICC_ID + "=\"1\""), isNull());
                eq(SubscriptionManager.ICC_ID + "='1'"), isNull());
        assertEquals(1,
                iccid1Values.getValue().getAsInteger(SubscriptionManager.IS_EMBEDDED).intValue());
        ArgumentCaptor<ContentValues> iccid3Values = ArgumentCaptor.forClass(ContentValues.class);
        verify(mContentProvider).update(eq(SubscriptionManager.CONTENT_URI), iccid3Values.capture(),
                eq(SubscriptionManager.ICC_ID + "=\"3\""), isNull());
                eq(SubscriptionManager.ICC_ID + "='3'"), isNull());
        assertEquals(1,
                iccid3Values.getValue().getAsInteger(SubscriptionManager.IS_EMBEDDED).intValue());

@@ -638,7 +638,7 @@ public class SubscriptionInfoUpdaterTest extends TelephonyTest {
        // in the list provided by the LPA.
        ArgumentCaptor<ContentValues> iccid2Values = ArgumentCaptor.forClass(ContentValues.class);
        verify(mContentProvider).update(eq(SubscriptionManager.CONTENT_URI), iccid2Values.capture(),
                eq(SubscriptionManager.ICC_ID + " IN (\"2\")"), isNull());
                eq(SubscriptionManager.ICC_ID + " IN ('2')"), isNull());
        assertEquals(0,
                iccid2Values.getValue().getAsInteger(SubscriptionManager.IS_EMBEDDED).intValue());
    }