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

Commit de4d5798 authored by Jordan Liu's avatar Jordan Liu Committed by android-build-merger
Browse files

Merge "Use SubscriptionId instead of SubId" am: 4b433b3e

am: 3052bdde

Change-Id: Ia044a15753aeef7b9a90ed2344aab06681e777fe
parents 7ebd809e 3052bdde
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -3007,12 +3007,12 @@ public final class Telephony {
         * Note, however, that using a {@link JobService} does not guarantee timely delivery of
         * updates to the {@link Uri}.
         *
         * @param subId the subId to receive updates on
         * @param subscriptionId the subscriptionId to receive updates on
         * @param field the ServiceState field to receive updates on
         * @return the Uri used to observe {@link ServiceState} changes
         */
        public static Uri getUriForSubIdAndField(int subId, String field) {
            return CONTENT_URI.buildUpon().appendEncodedPath(String.valueOf(subId))
        public static Uri getUriForSubscriptionIdAndField(int subscriptionId, String field) {
            return CONTENT_URI.buildUpon().appendEncodedPath(String.valueOf(subscriptionId))
                    .appendEncodedPath(field).build();
        }

@@ -3026,11 +3026,12 @@ public final class Telephony {
         * Note, however, that using a {@link JobService} does not guarantee timely delivery of
         * updates to the {@link Uri}.
         *
         * @param subId the subId to receive updates on
         * @param subscriptionId the subscriptionId to receive updates on
         * @return the Uri used to observe {@link ServiceState} changes
         */
        public static Uri getUriForSubId(int subId) {
            return CONTENT_URI.buildUpon().appendEncodedPath(String.valueOf(subId)).build();
        public static Uri getUriForSubscriptionId(int subscriptionId) {
            return CONTENT_URI.buildUpon()
                    .appendEncodedPath(String.valueOf(subscriptionId)).build();
        }

        /**
+4 −3
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
package com.android.internal.telephony;

import static android.provider.Telephony.ServiceStateTable.getContentValuesForServiceState;
import static android.provider.Telephony.ServiceStateTable.getUriForSubId;
import static android.provider.Telephony.ServiceStateTable.getUriForSubscriptionId;

import static com.android.internal.telephony.CarrierActionAgent.CARRIER_ACTION_SET_RADIO_ENABLED;

@@ -2859,7 +2859,8 @@ public class ServiceStateTracker extends Handler {
            mPhone.notifyServiceStateChanged(mSS);

            // insert into ServiceStateProvider. This will trigger apps to wake through JobScheduler
            mPhone.getContext().getContentResolver().insert(getUriForSubId(mPhone.getSubId()),
            mPhone.getContext().getContentResolver()
                    .insert(getUriForSubscriptionId(mPhone.getSubId()),
                            getContentValuesForServiceState(mSS));

            TelephonyMetrics.getInstance().writeServiceStateChanged(mPhone.getPhoneId(), mSS);