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

Commit cf564420 authored by Wink Saville's avatar Wink Saville Committed by Android Git Automerger
Browse files

am 3d74e690: am 01632c82: am 07aa9ded: am af23987e: Merge "Add SM...

am 3d74e690: am 01632c82: am 07aa9ded: am af23987e: Merge "Add SM isUsableSubIdValue" into lmp-sprout-dev

* commit '3d74e690724ada5f011e0f6c7217a31ce5681a96':
  Add SM isUsableSubIdValue
parents e111acc1 8ac6bb33
Loading
Loading
Loading
Loading
+18 −0
Original line number Original line Diff line number Diff line
@@ -65,6 +65,15 @@ public class SubscriptionManager implements BaseColumns {
    /** Indicates the caller wants the default sub id. */
    /** Indicates the caller wants the default sub id. */
    public static final long DEFAULT_SUB_ID = Long.MAX_VALUE;
    public static final long DEFAULT_SUB_ID = Long.MAX_VALUE;


    /** Minimum possible subid that represents a subscription */
    /** @hide */
    public static final long MIN_SUB_ID_VALUE = 0;

    /** Maximum possible subid that represents a subscription */
    /** @hide */
    public static final long MAX_SUB_ID_VALUE = DEFAULT_SUB_ID - 1;


    /** @hide */
    /** @hide */
    public static final Uri CONTENT_URI = Uri.parse("content://telephony/siminfo");
    public static final Uri CONTENT_URI = Uri.parse("content://telephony/siminfo");


@@ -914,6 +923,15 @@ public class SubscriptionManager implements BaseColumns {
        return subId > INVALID_SUB_ID ;
        return subId > INVALID_SUB_ID ;
    }
    }


    /**
     * @return true if subId is an usable subId value else false. A
     * usable subId means its neither a INVALID_SUB_ID nor a DEFAUL_SUB_ID.
     * @hide
     */
    public static boolean isUsableSubIdValue(long subId) {
        return subId >= MIN_SUB_ID_VALUE && subId <= MAX_SUB_ID_VALUE;
    }

    /** @hide */
    /** @hide */
    public static boolean isValidSlotId(int slotId) {
    public static boolean isValidSlotId(int slotId) {
        // We are testing INVALID_SLOT_ID and slotId >= 0 independently because we should
        // We are testing INVALID_SLOT_ID and slotId >= 0 independently because we should