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

Commit dfdf9c40 authored by Wink Saville's avatar Wink Saville
Browse files

Update API and documentation for invalid subscriptions id's

Bug: 18668873
Change-Id: I3ee987b77fef856e97ea09898c695147cb87a517
parent 957b01a0
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -241,8 +241,7 @@ public final class Telephony {

        /**
         * The subscription to which the message belongs to. Its value will be
         * {@link android.telephony.SubscriptionManager#INVALID_SUBSCRIPTION_ID} if
         * the sub id cannot be determined.
         * < 0 if the sub id cannot be determined.
         * <p>Type: INTEGER (long) </p>
         */
        public static final String SUBSCRIPTION_ID = "sub_id";
@@ -1719,8 +1718,7 @@ public final class Telephony {

        /**
         * The subscription to which the message belongs to. Its value will be
         * {@link android.telephony.SubscriptionManager#INVALID_SUBSCRIPTION_ID} if
         * the sub id cannot be determined.
         * < 0 if the sub id cannot be determined.
         * <p>Type: INTEGER (long)</p>
         */
        public static final String SUBSCRIPTION_ID = "sub_id";
@@ -2559,8 +2557,7 @@ public final class Telephony {

            /**
             * The subscription to which the message belongs to. Its value will be
             * {@link android.telephony.SubscriptionManager#INVALID_SUBSCRIPTION_ID} if
             * the sub id cannot be determined.
             * < 0 if the sub id cannot be determined.
             * <p>Type: INTEGER (long) </p>
             */
            public static final String SUBSCRIPTION_ID = "pending_sub_id";
+4 −5
Original line number Diff line number Diff line
@@ -486,9 +486,8 @@ public final class SmsManager {
    /**
     * Get the associated subscription id. If the instance was returned by {@link #getDefault()},
     * then this method may return different values at different points in time (if the user
     * changes the default subscription id). It will return
     * {@link android.telephony.SubscriptionManager#INVALID_SUBSCRIPTION_ID}
     * if the default subscription id cannot be determined.
     * changes the default subscription id). It will return < 0 if the default subscription id
     * cannot be determined.
     *
     * @return associated subscription id
     */
@@ -877,9 +876,9 @@ public final class SmsManager {
            iccISms = ISms.Stub.asInterface(ServiceManager.getService("isms"));
            return iccISms.getPreferredSmsSubscription();
        } catch (RemoteException ex) {
            return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
            return -1;
        } catch (NullPointerException ex) {
            return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
            return -1;
        }
    }