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

Commit 52fe3c86 authored by Grace Chen's avatar Grace Chen Committed by android-build-merger
Browse files

Merge "Add profile class in SubscriptionInfo database" am: 82ac45cb

am: 02210cb6

Change-Id: I12982a3506a46f8da6582d1e82e891321bf51edb
parents 39efef43 02210cb6
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -327,6 +327,8 @@ public class SubscriptionController extends ISub.Stub {
                SubscriptionManager.GROUP_UUID));
        boolean isMetered = cursor.getInt(cursor.getColumnIndexOrThrow(
                SubscriptionManager.IS_METERED)) == 1;
        int profileClass = cursor.getInt(cursor.getColumnIndexOrThrow(
                SubscriptionManager.PROFILE_CLASS));

        if (VDBG) {
            String iccIdToPrint = SubscriptionInfo.givePrintableIccid(iccId);
@@ -339,7 +341,7 @@ public class SubscriptionController extends ISub.Stub {
                    + isEmbedded + " accessRules:" + Arrays.toString(accessRules)
                    + " cardId:" + cardIdToPrint + " publicCardId:" + publicCardId
                    + " isOpportunistic:" + isOpportunistic + " groupUUID:" + groupUUID
                    + " isMetered:" + isMetered);
                    + " isMetered:" + isMetered + " profileClass:" + profileClass);
        }

        // If line1number has been set to a different number, use it instead.
@@ -350,7 +352,7 @@ public class SubscriptionController extends ISub.Stub {
        return new SubscriptionInfo(id, iccId, simSlotIndex, displayName, carrierName,
            nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso,
            isEmbedded, accessRules, cardId, publicCardId, isOpportunistic, groupUUID,
                isMetered, false /* isGroupDisabled = false */, carrierId);
            isMetered, false /* isGroupDisabled */, carrierId, profileClass);
    }

    /**
+1 −0
Original line number Diff line number Diff line
@@ -785,6 +785,7 @@ public class SubscriptionInfoUpdater extends Handler {
            values.put(SubscriptionManager.IS_REMOVABLE, isRemovable);
            values.put(SubscriptionManager.DISPLAY_NAME, embeddedProfile.getNickname());
            values.put(SubscriptionManager.NAME_SOURCE, SubscriptionManager.NAME_SOURCE_USER_INPUT);
            values.put(SubscriptionManager.PROFILE_CLASS, embeddedProfile.getProfileClass());
            hasChanges = true;
            contentResolver.update(SubscriptionManager.CONTENT_URI, values,
                    SubscriptionManager.ICC_ID + "=\"" + embeddedProfile.getIccid() + "\"", null);
+3 −1
Original line number Diff line number Diff line
@@ -101,7 +101,9 @@ public class FakeTelephonyProvider extends MockContentProvider {
                    + SubscriptionManager.GROUP_UUID + " TEXT,"
                    + SubscriptionManager.IS_METERED + " INTEGER DEFAULT 1,"
                    + SubscriptionManager.ISO_COUNTRY_CODE + " TEXT,"
                    + SubscriptionManager.CARRIER_ID + " INTEGER DEFAULT -1"
                    + SubscriptionManager.CARRIER_ID + " INTEGER DEFAULT -1,"
                    + SubscriptionManager.PROFILE_CLASS
                    + " INTEGER DEFAULT " + SubscriptionManager.PROFILE_CLASS_DEFAULT
                    + ");";
        }