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

Commit 9f2235e9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add profile class in SubscriptionInfo database"

parents bed4c9c9 45c241c0
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 */, carrierId);
            isMetered, false /* isGroupDisabled */, carrierId, profileClass);
    }

    /**
+1 −0
Original line number Diff line number Diff line
@@ -808,6 +808,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
                    + ");";
        }