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

Commit fb885aee authored by Xin Li's avatar Xin Li Committed by Gerrit Code Review
Browse files

Merge "Merge Android 13 QPR1"

parents 8d5dd538 b4cf7280
Loading
Loading
Loading
Loading
+19 −1
Original line number Original line Diff line number Diff line
@@ -23,7 +23,7 @@ option java_outer_classname = "PersistAtomsProto";


// Holds atoms to store on persist storage in case of power cycle or process crash.
// Holds atoms to store on persist storage in case of power cycle or process crash.
// NOTE: using int64 rather than google.protobuf.Timestamp for timestamps simplifies implementation.
// NOTE: using int64 rather than google.protobuf.Timestamp for timestamps simplifies implementation.
// Next id: 50
// Next id: 53
message PersistAtoms {
message PersistAtoms {
    /* Aggregated RAT usage during the call. */
    /* Aggregated RAT usage during the call. */
    repeated VoiceCallRatUsage voice_call_rat_usage = 1;
    repeated VoiceCallRatUsage voice_call_rat_usage = 1;
@@ -177,6 +177,9 @@ message PersistAtoms {


    /* Timestamp of last network_requests_v2 pull. */
    /* Timestamp of last network_requests_v2 pull. */
    optional int64 network_requests_v2_pull_timestamp_millis = 51;
    optional int64 network_requests_v2_pull_timestamp_millis = 51;

    /* Unmetered networks information. */
    repeated UnmeteredNetworks unmetered_networks = 52;
}
}


// The canonical versions of the following enums live in:
// The canonical versions of the following enums live in:
@@ -245,6 +248,10 @@ message IncomingSms {
    optional bool is_esim = 12;
    optional bool is_esim = 12;
    optional int32 carrier_id = 13;
    optional int32 carrier_id = 13;
    optional int64 message_id = 14;
    optional int64 message_id = 14;
    optional int32 count = 15;

    // Internal use only
    optional int32 hashCode = 10001;
}
}


message OutgoingSms {
message OutgoingSms {
@@ -262,6 +269,10 @@ message OutgoingSms {
    optional int64 message_id = 12;
    optional int64 message_id = 12;
    optional int32 retry_id = 13;
    optional int32 retry_id = 13;
    optional int64 interval_millis = 14;
    optional int64 interval_millis = 14;
    optional int32 count = 15;

    // Internal use only
    optional int32 hashCode = 10001;
}
}


message CarrierIdMismatch {
message CarrierIdMismatch {
@@ -292,6 +303,7 @@ message DataCallSession {
    optional bool ongoing = 18;
    optional bool ongoing = 18;
    optional int32 band_at_end = 19;
    optional int32 band_at_end = 19;
    repeated int32 handover_failure_causes = 20;
    repeated int32 handover_failure_causes = 20;
    repeated int32 handover_failure_rat = 21;
}
}


message CellularServiceState {
message CellularServiceState {
@@ -498,3 +510,9 @@ message GbaEvent {
    optional int32 failed_reason = 4;
    optional int32 failed_reason = 4;
    optional int32 count = 5;
    optional int32 count = 5;
}
}

message UnmeteredNetworks {
    optional int32 phone_id = 1;
    optional int32 carrier_id = 2;
    optional int64 unmetered_networks_bitmask = 3;
}
+22 −136
Original line number Original line Diff line number Diff line
@@ -20,21 +20,14 @@ import android.app.Notification;
import android.app.NotificationManager;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Context;
import android.content.Intent;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.IntentFilter;
import android.content.res.Resources;
import android.content.res.Resources;
import android.content.SharedPreferences;
import android.database.ContentObserver;
import android.os.Handler;
import android.os.Handler;
import android.os.HandlerExecutor;
import android.os.HandlerExecutor;
import android.os.Message;
import android.os.Message;
import android.os.PersistableBundle;
import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.net.Uri;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.provider.Settings;
import android.telephony.CarrierConfigManager;
import android.telephony.CarrierConfigManager;
import android.telephony.RadioAccessFamily;
import android.telephony.RadioAccessFamily;
@@ -44,14 +37,12 @@ import android.telephony.SubscriptionManager.OnSubscriptionsChangedListener;
import android.telephony.TelephonyCallback;
import android.telephony.TelephonyCallback;
import android.telephony.TelephonyManager;
import android.telephony.TelephonyManager;
import android.telephony.TelephonyManager.NetworkTypeBitMask;
import android.telephony.TelephonyManager.NetworkTypeBitMask;
import android.telephony.ims.ImsMmTelManager;


import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.util.ArrayUtils;
import com.android.internal.telephony.util.ArrayUtils;
import com.android.internal.telephony.util.NotificationChannelController;
import com.android.internal.telephony.util.NotificationChannelController;
import com.android.telephony.Rlog;
import com.android.telephony.Rlog;


import java.lang.CharSequence;
import java.util.HashMap;
import java.util.HashMap;
import java.util.Map;
import java.util.Map;


@@ -74,10 +65,6 @@ public class CarrierServiceStateTracker extends Handler {
    private ServiceStateTracker mSST;
    private ServiceStateTracker mSST;
    private final Map<Integer, NotificationType> mNotificationTypeMap = new HashMap<>();
    private final Map<Integer, NotificationType> mNotificationTypeMap = new HashMap<>();
    private int mPreviousSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
    private int mPreviousSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
    private static final String WFC_IMS_ENABLED = SubscriptionManager.WFC_IMS_ENABLED;
    private static final String EMERGENCY_NOTIFICATION_PACKAGE = "com.android.phone";
    private static final String EMERGENCY_NOTIFICATION_ACTIVITY
            = "com.android.phone.LimitedServiceActivity";
    public static final int NOTIFICATION_PREF_NETWORK = 1000;
    public static final int NOTIFICATION_PREF_NETWORK = 1000;
    public static final int NOTIFICATION_EMERGENCY_NETWORK = 1001;
    public static final int NOTIFICATION_EMERGENCY_NETWORK = 1001;


@@ -110,9 +97,6 @@ public class CarrierServiceStateTracker extends Handler {
        }
        }
    }
    }


    private WfcSettingObserver mWfcSettingObserver;
    private SharedPreferences mPreferences;

    public CarrierServiceStateTracker(Phone phone, ServiceStateTracker sst) {
    public CarrierServiceStateTracker(Phone phone, ServiceStateTracker sst) {
        this.mPhone = phone;
        this.mPhone = phone;
        this.mSST = sst;
        this.mSST = sst;
@@ -120,8 +104,6 @@ public class CarrierServiceStateTracker extends Handler {
                TelephonyManager.class).createForSubscriptionId(mPhone.getSubId());
                TelephonyManager.class).createForSubscriptionId(mPhone.getSubId());
        phone.getContext().registerReceiver(mBroadcastReceiver, new IntentFilter(
        phone.getContext().registerReceiver(mBroadcastReceiver, new IntentFilter(
                CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED));
                CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED));
        phone.getContext().registerReceiver(mBroadcastReceiver, new IntentFilter(
                Intent.ACTION_LOCALE_CHANGED));
        // Listen for subscriber changes
        // Listen for subscriber changes
        SubscriptionManager.from(mPhone.getContext()).addOnSubscriptionsChangedListener(
        SubscriptionManager.from(mPhone.getContext()).addOnSubscriptionsChangedListener(
                new OnSubscriptionsChangedListener(this.getLooper()) {
                new OnSubscriptionsChangedListener(this.getLooper()) {
@@ -133,20 +115,16 @@ public class CarrierServiceStateTracker extends Handler {
                            mTelephonyManager = mTelephonyManager.createForSubscriptionId(
                            mTelephonyManager = mTelephonyManager.createForSubscriptionId(
                                    mPhone.getSubId());
                                    mPhone.getSubId());
                            registerAllowedNetworkTypesListener();
                            registerAllowedNetworkTypesListener();
                            registerWfcSettingObserver();
                        }
                        }
                    }
                    }
                });
                });


        mWfcSettingObserver = new WfcSettingObserver();
        mPreferences = PreferenceManager.getDefaultSharedPreferences(mPhone.getContext());
        registerNotificationTypes();
        registerNotificationTypes();
        mAllowedNetworkType = RadioAccessFamily.getNetworkTypeFromRaf(
        mAllowedNetworkType = RadioAccessFamily.getNetworkTypeFromRaf(
                (int) mPhone.getAllowedNetworkTypes(
                (int) mPhone.getAllowedNetworkTypes(
                        TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER));
                        TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER));
        mAllowedNetworkTypesListener = new AllowedNetworkTypesListener();
        mAllowedNetworkTypesListener = new AllowedNetworkTypesListener();
        registerAllowedNetworkTypesListener();
        registerAllowedNetworkTypesListener();
        registerWfcSettingObserver();
    }
    }


    /**
    /**
@@ -184,8 +162,7 @@ public class CarrierServiceStateTracker extends Handler {
        mNotificationTypeMap.put(NOTIFICATION_PREF_NETWORK,
        mNotificationTypeMap.put(NOTIFICATION_PREF_NETWORK,
                new PrefNetworkNotification(NOTIFICATION_PREF_NETWORK));
                new PrefNetworkNotification(NOTIFICATION_PREF_NETWORK));
        mNotificationTypeMap.put(NOTIFICATION_EMERGENCY_NETWORK,
        mNotificationTypeMap.put(NOTIFICATION_EMERGENCY_NETWORK,
                new EmergencyNetworkNotification(NOTIFICATION_EMERGENCY_NETWORK,
                new EmergencyNetworkNotification(NOTIFICATION_EMERGENCY_NETWORK));
                mPhone.getContext()));
    }
    }


    @Override
    @Override
@@ -374,32 +351,18 @@ public class CarrierServiceStateTracker extends Handler {
    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
        @Override
        @Override
        public void onReceive(Context context, Intent intent) {
        public void onReceive(Context context, Intent intent) {
            switch (intent.getAction()) {
                case CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED:
            CarrierConfigManager carrierConfigManager = (CarrierConfigManager)
            CarrierConfigManager carrierConfigManager = (CarrierConfigManager)
                    context.getSystemService(Context.CARRIER_CONFIG_SERVICE);
                    context.getSystemService(Context.CARRIER_CONFIG_SERVICE);
            PersistableBundle b = carrierConfigManager.getConfigForSubId(mPhone.getSubId());
            PersistableBundle b = carrierConfigManager.getConfigForSubId(mPhone.getSubId());


                    for (Map.Entry<Integer, NotificationType> entry :
            for (Map.Entry<Integer, NotificationType> entry : mNotificationTypeMap.entrySet()) {
                            mNotificationTypeMap.entrySet()) {
                NotificationType notificationType = entry.getValue();
                NotificationType notificationType = entry.getValue();
                notificationType.setDelay(b);
                notificationType.setDelay(b);
            }
            }
            handleConfigChanges();
            handleConfigChanges();
                    break;
                case Intent.ACTION_LOCALE_CHANGED:
                    // Upon receiving the locale change broadcast, update the notification's
                    // language
                    handleImsCapabilitiesChanged();
                    break;
            }
        }
        }
    };
    };


    private void unregisterBroadcastReceiver() {
        mPhone.getContext().unregisterReceiver(mBroadcastReceiver);
    }

    /**
    /**
     * Post a notification to the NotificationManager for changing network type.
     * Post a notification to the NotificationManager for changing network type.
     */
     */
@@ -413,6 +376,7 @@ public class CarrierServiceStateTracker extends Handler {
        Notification.Builder builder = getNotificationBuilder(notificationType);
        Notification.Builder builder = getNotificationBuilder(notificationType);
        // set some common attributes
        // set some common attributes
        builder.setWhen(System.currentTimeMillis())
        builder.setWhen(System.currentTimeMillis())
                .setAutoCancel(true)
                .setSmallIcon(com.android.internal.R.drawable.stat_sys_warning)
                .setSmallIcon(com.android.internal.R.drawable.stat_sys_warning)
                .setColor(context.getResources().getColor(
                .setColor(context.getResources().getColor(
                       com.android.internal.R.color.system_notification_accent_color));
                       com.android.internal.R.color.system_notification_accent_color));
@@ -435,8 +399,6 @@ public class CarrierServiceStateTracker extends Handler {
     */
     */
    public void dispose() {
    public void dispose() {
        unregisterAllowedNetworkTypesListener();
        unregisterAllowedNetworkTypesListener();
        unregisterWfcSettingObserver();
        unregisterBroadcastReceiver();
    }
    }


    /**
    /**
@@ -551,7 +513,6 @@ public class CarrierServiceStateTracker extends Handler {
            CharSequence details = res.getText(
            CharSequence details = res.getText(
                    com.android.internal.R.string.NetworkPreferenceSwitchSummary);
                    com.android.internal.R.string.NetworkPreferenceSwitchSummary);
            return new Notification.Builder(context)
            return new Notification.Builder(context)
                    .setAutoCancel(true)
                    .setContentTitle(title)
                    .setContentTitle(title)
                    .setStyle(new Notification.BigTextStyle().bigText(details))
                    .setStyle(new Notification.BigTextStyle().bigText(details))
                    .setContentText(details)
                    .setContentText(details)
@@ -567,12 +528,10 @@ public class CarrierServiceStateTracker extends Handler {
    public class EmergencyNetworkNotification implements NotificationType {
    public class EmergencyNetworkNotification implements NotificationType {


        private final int mTypeId;
        private final int mTypeId;
        private Context mContext;
        private int mDelay = UNINITIALIZED_DELAY_VALUE;
        private int mDelay = UNINITIALIZED_DELAY_VALUE;


        EmergencyNetworkNotification(int typeId, Context context) {
        EmergencyNetworkNotification(int typeId) {
            mTypeId = typeId;
            this.mTypeId = typeId;
            mContext = context;
        }
        }


        /** sets the interval by which the message is delayed.
        /** sets the interval by which the message is delayed.
@@ -586,10 +545,6 @@ public class CarrierServiceStateTracker extends Handler {
            this.mDelay = bundle.getInt(
            this.mDelay = bundle.getInt(
                    CarrierConfigManager.KEY_EMERGENCY_NOTIFICATION_DELAY_INT);
                    CarrierConfigManager.KEY_EMERGENCY_NOTIFICATION_DELAY_INT);
            Rlog.i(LOG_TAG, "reading time to delay notification emergency: " + mDelay);
            Rlog.i(LOG_TAG, "reading time to delay notification emergency: " + mDelay);
            if (mDelay == UNINITIALIZED_DELAY_VALUE) {
                unregisterWfcSettingObserver();
                return;
            }
        }
        }


        public int getDelay() {
        public int getDelay() {
@@ -614,9 +569,8 @@ public class CarrierServiceStateTracker extends Handler {
        public boolean sendMessage() {
        public boolean sendMessage() {
            Rlog.i(LOG_TAG, "EmergencyNetworkNotification: sendMessage() w/values: "
            Rlog.i(LOG_TAG, "EmergencyNetworkNotification: sendMessage() w/values: "
                    + "," + mDelay + "," + isPhoneRegisteredForWifiCalling() + ","
                    + "," + mDelay + "," + isPhoneRegisteredForWifiCalling() + ","
                    + mSST.isRadioOn() + "," + getEmergencyNotificationPreference());
                    + mSST.isRadioOn());
            if (mDelay == UNINITIALIZED_DELAY_VALUE || !isPhoneRegisteredForWifiCalling() ||
            if (mDelay == UNINITIALIZED_DELAY_VALUE || !isPhoneRegisteredForWifiCalling()) {
                    getEmergencyNotificationPreference())  {
                return false;
                return false;
            }
            }
            return true;
            return true;
@@ -626,86 +580,18 @@ public class CarrierServiceStateTracker extends Handler {
         * Builds a partial notificaiton builder, and returns it.
         * Builds a partial notificaiton builder, and returns it.
         */
         */
        public Notification.Builder getNotificationBuilder() {
        public Notification.Builder getNotificationBuilder() {
            Intent notifyIntent = new Intent(TelephonyIntents.ACTION_VOWIFI_ENABLED);
            Context context = mPhone.getContext();
            notifyIntent.putExtra(PhoneConstants.PHONE_KEY, mPhone.getPhoneId());
            Resources res = SubscriptionManager.getResourcesForSubId(context, mPhone.getSubId());
            notifyIntent.setComponent(new ComponentName(EMERGENCY_NOTIFICATION_PACKAGE,
            CharSequence title = res.getText(
                    EMERGENCY_NOTIFICATION_ACTIVITY));
            // Set the Activity to start in a new, empty task
            notifyIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
                    | Intent.FLAG_ACTIVITY_CLEAR_TASK);
            // Create the PendingIntent
            PendingIntent emergencyIntent = PendingIntent.getActivity(
                    mContext, mPhone.getPhoneId(), notifyIntent, PendingIntent.FLAG_UPDATE_CURRENT
                    | PendingIntent.FLAG_IMMUTABLE);
            CharSequence title = mContext.getText(
                    com.android.internal.R.string.EmergencyCallWarningTitle);
                    com.android.internal.R.string.EmergencyCallWarningTitle);
            String details = String.format(mContext.getResources().getString(
            CharSequence details = res.getText(
                    com.android.internal.R.string.EmergencyCallWarningSummary),
                    com.android.internal.R.string.EmergencyCallWarningSummary);
                    mSST.getServiceProviderNameOrPlmn().trim());
            return new Notification.Builder(context)
            boolean isCancellable = (mDelay == UNINITIALIZED_DELAY_VALUE) ? true : false;
            return new Notification.Builder(mContext)
                    .setAutoCancel(isCancellable)
                    .setOngoing(true)
                    .setContentTitle(title)
                    .setContentTitle(title)
                    .setStyle(new Notification.BigTextStyle().bigText(details))
                    .setStyle(new Notification.BigTextStyle().bigText(details))
                    .setContentText(details)
                    .setContentText(details)
                    .setChannel(NotificationChannelController.CHANNEL_ID_WFC)
                    .setFlag(Notification.FLAG_NO_CLEAR, true)
                    .setVisibility(Notification.VISIBILITY_PUBLIC)
                    .setChannelId(NotificationChannelController.CHANNEL_ID_WFC);
                    .setContentIntent(emergencyIntent);
        }
        }
    }
    }

    private class WfcSettingObserver extends ContentObserver {

        WfcSettingObserver() {
            super(null);
        }

        @Override
        public void onChange(boolean selfChange) {
            final boolean wfcSetting;
            int subId = mPhone.getSubId();
            ImsMmTelManager mgr = ImsMmTelManager.createForSubscriptionId(subId);
            wfcSetting = mgr.isVoWiFiSettingEnabled();
            if (!wfcSetting) {
                // Reset Do not show again preference if user disables WFC setting
                // so that notification shows up again when WFC is re-enabled
                resetEmergencyNotificationPreference();
            }
            Rlog.i(LOG_TAG, "WfcSetting onChange on subId:" + subId + " " + wfcSetting
                    + " " + getEmergencyNotificationPreference());
        }
    }

    private void registerWfcSettingObserver() {
        int subId = mPhone.getSubId();
        unregisterWfcSettingObserver();
        if (SubscriptionManager.isValidSubscriptionId(subId)) {
            Uri uri = getUriForWfcEnableSetting();
            Rlog.d(LOG_TAG,"registerWfcSettingObserver " + uri.toString());
            mPhone.getContext().getContentResolver().registerContentObserver(
                    uri, false, mWfcSettingObserver);
        }
    }

    private void unregisterWfcSettingObserver() {
        mPhone.getContext().getContentResolver().unregisterContentObserver(
                mWfcSettingObserver);
    }

    private void resetEmergencyNotificationPreference() {
        mPreferences.edit().putBoolean(Phone.KEY_DO_NOT_SHOW_LIMITED_SERVICE_ALERT
                + mPhone.getSubId(), false).apply();
    }

    private Uri getUriForWfcEnableSetting() {
        Uri uri = Uri.withAppendedPath(SubscriptionManager.getUriForSubscriptionId(
                mPhone.getSubId()), WFC_IMS_ENABLED);
        return uri;
    }

    private boolean getEmergencyNotificationPreference() {
        return mPreferences.getBoolean(Phone.KEY_DO_NOT_SHOW_LIMITED_SERVICE_ALERT
                    + mPhone.getSubId(), false);
    }
}
}
+16 −0
Original line number Original line Diff line number Diff line
@@ -500,6 +500,14 @@ public class CellularNetworkService extends NetworkService {
            final String rplmn = regResult.registeredPlmn;
            final String rplmn = regResult.registeredPlmn;
            final int reasonForDenial = regResult.reasonForDenial;
            final int reasonForDenial = regResult.reasonForDenial;


            if (regState == NetworkRegistrationInfo.REGISTRATION_STATE_DENIED
                    && reasonForDenial
                    == android.hardware.radio.network.RegistrationFailCause.NONE) {
                AnomalyReporter.reportAnomaly(
                        UUID.fromString("62ed270f-e139-418a-a427-8bcc1bca8f20"),
                            "RIL Missing Reg Fail Reason", mPhone.getCarrierId());
            }

            int networkType = ServiceState.rilRadioTechnologyToNetworkType(regResult.rat);
            int networkType = ServiceState.rilRadioTechnologyToNetworkType(regResult.rat);
            if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) {
            if (networkType == TelephonyManager.NETWORK_TYPE_LTE_CA) {
                networkType = TelephonyManager.NETWORK_TYPE_LTE;
                networkType = TelephonyManager.NETWORK_TYPE_LTE;
@@ -582,6 +590,14 @@ public class CellularNetworkService extends NetworkService {
            networkType =
            networkType =
                    getNetworkTypeForCellIdentity(networkType, cellIdentity, mPhone.getCarrierId());
                    getNetworkTypeForCellIdentity(networkType, cellIdentity, mPhone.getCarrierId());


            if (regState == NetworkRegistrationInfo.REGISTRATION_STATE_DENIED
                    && reasonForDenial
                    == android.hardware.radio.network.RegistrationFailCause.NONE) {
                AnomalyReporter.reportAnomaly(
                        UUID.fromString("62ed270f-e139-418a-a427-8bcc1bca8f20"),
                            "RIL Missing Reg Fail Reason", mPhone.getCarrierId());
            }

            // Conditional parameters for specific RANs
            // Conditional parameters for specific RANs
            boolean cssSupported = false;
            boolean cssSupported = false;
            int roamingIndicator = 0;
            int roamingIndicator = 0;
+10 −7
Original line number Original line Diff line number Diff line
@@ -55,7 +55,7 @@ public class DataIndication extends IRadioDataIndication.Stub {
            android.hardware.radio.data.SetupDataCallResult[] dcList) {
            android.hardware.radio.data.SetupDataCallResult[] dcList) {
        mRil.processIndication(RIL.DATA_SERVICE, indicationType);
        mRil.processIndication(RIL.DATA_SERVICE, indicationType);


        if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_DATA_CALL_LIST_CHANGED, dcList);
        if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_DATA_CALL_LIST_CHANGED, dcList);
        ArrayList<DataCallResponse> response = RILUtils.convertHalDataCallResultList(dcList);
        ArrayList<DataCallResponse> response = RILUtils.convertHalDataCallResultList(dcList);
        mRil.mDataCallListChangedRegistrants.notifyRegistrants(
        mRil.mDataCallListChangedRegistrants.notifyRegistrants(
                new AsyncResult(null, response, null));
                new AsyncResult(null, response, null));
@@ -70,9 +70,10 @@ public class DataIndication extends IRadioDataIndication.Stub {
            android.hardware.radio.data.KeepaliveStatus halStatus) {
            android.hardware.radio.data.KeepaliveStatus halStatus) {
        mRil.processIndication(RIL.DATA_SERVICE, indicationType);
        mRil.processIndication(RIL.DATA_SERVICE, indicationType);


        if (RIL.RILJ_LOGD) {
        if (mRil.isLogOrTrace()) {
            mRil.unsljLogRet(RIL_UNSOL_KEEPALIVE_STATUS, "handle=" + halStatus.sessionHandle
            mRil.unsljLogRet(
                    + " code=" +  halStatus.code);
                    RIL_UNSOL_KEEPALIVE_STATUS,
                    "handle=" + halStatus.sessionHandle + " code=" + halStatus.code);
        }
        }


        KeepaliveStatus ks = new KeepaliveStatus(
        KeepaliveStatus ks = new KeepaliveStatus(
@@ -90,7 +91,7 @@ public class DataIndication extends IRadioDataIndication.Stub {


        PcoData response = new PcoData(pco.cid, pco.bearerProto, pco.pcoId, pco.contents);
        PcoData response = new PcoData(pco.cid, pco.bearerProto, pco.pcoId, pco.contents);


        if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_PCO_DATA, response);
        if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_PCO_DATA, response);


        mRil.mPcoDataRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
        mRil.mPcoDataRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
    }
    }
@@ -106,7 +107,7 @@ public class DataIndication extends IRadioDataIndication.Stub {
        mRil.processIndication(RIL.DATA_SERVICE, indicationType);
        mRil.processIndication(RIL.DATA_SERVICE, indicationType);
        DataProfile response = RILUtils.convertToDataProfile(dpi);
        DataProfile response = RILUtils.convertToDataProfile(dpi);


        if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_UNTHROTTLE_APN, response);
        if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_UNTHROTTLE_APN, response);


        mRil.mApnUnthrottledRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
        mRil.mApnUnthrottledRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
    }
    }
@@ -120,7 +121,9 @@ public class DataIndication extends IRadioDataIndication.Stub {
    public void slicingConfigChanged(int indicationType,
    public void slicingConfigChanged(int indicationType,
            android.hardware.radio.data.SlicingConfig slicingConfig) throws RemoteException {
            android.hardware.radio.data.SlicingConfig slicingConfig) throws RemoteException {
        mRil.processIndication(RIL.DATA_SERVICE, indicationType);
        mRil.processIndication(RIL.DATA_SERVICE, indicationType);
        if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_SLICING_CONFIG_CHANGED, slicingConfig);
        if (mRil.isLogOrTrace()) {
            mRil.unsljLogRet(RIL_UNSOL_SLICING_CONFIG_CHANGED, slicingConfig);
        }
        NetworkSlicingConfig ret = RILUtils.convertHalSlicingConfig(slicingConfig);
        NetworkSlicingConfig ret = RILUtils.convertHalSlicingConfig(slicingConfig);
        mRil.mSlicingConfigChangedRegistrants.notifyRegistrants(
        mRil.mSlicingConfigChangedRegistrants.notifyRegistrants(
                new AsyncResult(null, ret, null));
                new AsyncResult(null, ret, null));
+8 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@


package com.android.internal.telephony;
package com.android.internal.telephony;


import android.os.Build;

import com.android.internal.telephony.metrics.TelephonyMetrics;
import com.android.internal.telephony.metrics.TelephonyMetrics;
import com.android.telephony.Rlog;
import com.android.telephony.Rlog;


@@ -53,6 +55,12 @@ public class DebugService {
                    log("Saving atoms..");
                    log("Saving atoms..");
                    PhoneFactory.getMetricsCollector().getAtomsStorage().flushAtoms();
                    PhoneFactory.getMetricsCollector().getAtomsStorage().flushAtoms();
                    return;
                    return;
                case "--clearatoms":
                    if (Build.IS_DEBUGGABLE) {
                        log("Clearing atoms..");
                        PhoneFactory.getMetricsCollector().getAtomsStorage().clearAtoms();
                    }
                    return;
            }
            }
        }
        }
        log("Dump telephony.");
        log("Dump telephony.");
Loading