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

Commit 8b31b6fe authored by Wink Saville's avatar Wink Saville Committed by Android (Google) Code Review
Browse files

Merge "Update API and documentation for invalid subscriptions id's" into lmp-mr1-dev

parents 8b25624b dfdf9c40
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;
        }
    }