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

Commit 82ac45cb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add profile class in SubscriptionInfo database"

parents e7d185bc be523f0a
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
                    + ");";
        }