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

Commit 517b9b43 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/30814116',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/30814116', 'googleplex-android-review.googlesource.com/30842615', 'googleplex-android-review.googlesource.com/31018053', 'googleplex-android-review.googlesource.com/30997947'] into 25Q1-release.

Change-Id: Id4798fa0ebaa409d93d63727579ba390c9dd13cd
parents b27a58ef 3eba115e
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -723,6 +723,9 @@ message SatelliteController {
    optional int32 count_of_satellite_allowed_state_changed_events = 31;
    optional int32 count_of_successful_location_queries = 32;
    optional int32 count_of_failed_location_queries = 33;
    optional int32 count_of_p2p_sms_available_notification_shown = 34;
    optional int32 count_of_p2p_sms_available_notification_removed = 35;
    optional bool is_ntn_only_carrier = 36;
}

message SatelliteSession {
@@ -743,6 +746,9 @@ message SatelliteSession {
    optional int32 count_of_satellite_notification_displayed = 15;
    optional int32 count_of_auto_exit_due_to_screen_off = 16;
    optional int32 count_of_auto_exit_due_to_tn_network = 17;
    optional bool is_emergency = 18;
    optional bool is_ntn_only_carrier = 19;
    optional int32 max_inactivity_duration_sec = 20;
}

message SatelliteIncomingDatagram {
@@ -751,6 +757,7 @@ message SatelliteIncomingDatagram {
    optional int64 datagram_transfer_time_millis = 3;
    optional bool is_demo_mode = 4;
    optional int32 carrier_id = 5;
    optional bool is_ntn_only_carrier = 6;
}

message SatelliteOutgoingDatagram {
@@ -760,6 +767,7 @@ message SatelliteOutgoingDatagram {
    optional int64 datagram_transfer_time_millis = 4;
    optional bool is_demo_mode = 5;
    optional int32 carrier_id = 6;
    optional bool is_ntn_only_carrier = 7;
}

message SatelliteProvision {
@@ -768,6 +776,7 @@ message SatelliteProvision {
    optional bool is_provision_request = 3;
    optional bool is_canceled = 4;
    optional int32 carrier_id = 5;
    optional bool is_ntn_only_carrier = 6;
}

message SatelliteSosMessageRecommender {
@@ -781,6 +790,7 @@ message SatelliteSosMessageRecommender {
    optional bool is_satellite_allowed_in_current_location = 8;
    optional bool is_wifi_connected = 9;
    optional int32 carrier_id = 10;
    optional bool is_ntn_only_carrier = 11;
}

message DataNetworkValidation {
@@ -851,4 +861,5 @@ message SatelliteAccessController {
    optional int32 config_data_source = 9;
    optional int32 carrier_id = 10;
    optional int32 triggering_event = 11;
    optional bool is_ntn_only_carrier = 12;
}
+18 −7
Original line number Diff line number Diff line
@@ -1480,7 +1480,10 @@ public class MetricsCollector implements StatsManager.StatsPullAtomCallback {
                satelliteController.carrierId,
                satelliteController.countOfSatelliteAllowedStateChangedEvents,
                satelliteController.countOfSuccessfulLocationQueries,
                satelliteController.countOfFailedLocationQueries);
                satelliteController.countOfFailedLocationQueries,
                satelliteController.countOfP2PSmsAvailableNotificationShown,
                satelliteController.countOfP2PSmsAvailableNotificationRemoved,
                satelliteController.isNtnOnlyCarrier);
    }

    private static StatsEvent buildStatsEvent(SatelliteSession satelliteSession) {
@@ -1502,7 +1505,10 @@ public class MetricsCollector implements StatsManager.StatsPullAtomCallback {
                satelliteSession.carrierId,
                satelliteSession.countOfSatelliteNotificationDisplayed,
                satelliteSession.countOfAutoExitDueToScreenOff,
                satelliteSession.countOfAutoExitDueToTnNetwork);
                satelliteSession.countOfAutoExitDueToTnNetwork,
                satelliteSession.isEmergency,
                satelliteSession.isNtnOnlyCarrier,
                satelliteSession.maxInactivityDurationSec);
    }

    private static StatsEvent buildStatsEvent(SatelliteIncomingDatagram stats) {
@@ -1512,7 +1518,8 @@ public class MetricsCollector implements StatsManager.StatsPullAtomCallback {
                stats.datagramSizeBytes,
                stats.datagramTransferTimeMillis,
                stats.isDemoMode,
                stats.carrierId);
                stats.carrierId,
                stats.isNtnOnlyCarrier);
    }

    private static StatsEvent buildStatsEvent(SatelliteOutgoingDatagram stats) {
@@ -1523,7 +1530,8 @@ public class MetricsCollector implements StatsManager.StatsPullAtomCallback {
                stats.datagramSizeBytes,
                stats.datagramTransferTimeMillis,
                stats.isDemoMode,
                stats.carrierId);
                stats.carrierId,
                stats.isNtnOnlyCarrier);
    }

    private static StatsEvent buildStatsEvent(SatelliteProvision stats) {
@@ -1533,7 +1541,8 @@ public class MetricsCollector implements StatsManager.StatsPullAtomCallback {
                stats.provisioningTimeSec,
                stats.isProvisionRequest,
                stats.isCanceled,
                stats.carrierId);
                stats.carrierId,
                stats.isNtnOnlyCarrier);
    }

    private static StatsEvent buildStatsEvent(SatelliteSosMessageRecommender stats) {
@@ -1548,7 +1557,8 @@ public class MetricsCollector implements StatsManager.StatsPullAtomCallback {
                stats.recommendingHandoverType,
                stats.isSatelliteAllowedInCurrentLocation,
                stats.isWifiConnected,
                stats.carrierId);
                stats.carrierId,
                stats.isNtnOnlyCarrier);
    }

    private static StatsEvent buildStatsEvent(DataNetworkValidation stats) {
@@ -1629,7 +1639,8 @@ public class MetricsCollector implements StatsManager.StatsPullAtomCallback {
                stats.countryCodes,
                stats.configDataSource,
                stats.carrierId,
                stats.triggeringEvent);
                stats.triggeringEvent,
                stats.isNtnOnlyCarrier);
    }

    /** Returns all phones in {@link PhoneFactory}, or an empty array if phones not made yet. */
+21 −9
Original line number Diff line number Diff line
@@ -766,14 +766,17 @@ public class PersistAtomsStorage {
            existingStats.countOfDisallowedSatelliteAccess
                    += stats.countOfDisallowedSatelliteAccess;
            existingStats.countOfSatelliteAccessCheckFail += stats.countOfSatelliteAccessCheckFail;

            existingStats.isProvisioned = stats.isProvisioned;

            // Does not update isProvisioned and carrierId due to they are dimension fields.
            existingStats.countOfSatelliteAllowedStateChangedEvents
                    += stats.countOfSatelliteAllowedStateChangedEvents;
            existingStats.countOfSuccessfulLocationQueries +=
                    stats.countOfSuccessfulLocationQueries;
            existingStats.countOfFailedLocationQueries += stats.countOfFailedLocationQueries;
            existingStats.countOfP2PSmsAvailableNotificationShown
                    += stats.countOfP2PSmsAvailableNotificationShown;
            existingStats.countOfP2PSmsAvailableNotificationRemoved
                    += stats.countOfP2PSmsAvailableNotificationRemoved;
            // Does not update isNtnOnlyCarrier due to it is a dimension field.
        } else {
            mAtoms.satelliteController = insertAtRandomPlace(mAtoms.satelliteController, stats,
                    mMaxNumSatelliteStats);
@@ -861,7 +864,6 @@ public class PersistAtomsStorage {
            CarrierRoamingSatelliteControllerStats stats) {
        CarrierRoamingSatelliteControllerStats existingStats = find(stats);
        if (existingStats != null) {
            existingStats.configDataSource = stats.configDataSource;
            existingStats.countOfEntitlementStatusQueryRequest +=
                    stats.countOfEntitlementStatusQueryRequest;
            existingStats.countOfSatelliteConfigUpdateRequest +=
@@ -871,6 +873,8 @@ public class PersistAtomsStorage {
            existingStats.satelliteSessionGapMinSec = stats.satelliteSessionGapMinSec;
            existingStats.satelliteSessionGapAvgSec = stats.satelliteSessionGapAvgSec;
            existingStats.satelliteSessionGapMaxSec = stats.satelliteSessionGapMaxSec;
            // Does not update configDataSource, carrierId, isDeviceEntitled, due to  they are
            // dimension fields.
            existingStats.isDeviceEntitled = stats.isDeviceEntitled;
        } else {
            mAtoms.carrierRoamingSatelliteControllerStats = insertAtRandomPlace(
@@ -2342,7 +2346,9 @@ public class PersistAtomsStorage {
                    && stats.countOfSatelliteNotificationDisplayed
                    == key.countOfSatelliteNotificationDisplayed
                    && stats.countOfAutoExitDueToScreenOff == key.countOfAutoExitDueToScreenOff
                    && stats.countOfAutoExitDueToTnNetwork == key.countOfAutoExitDueToTnNetwork) {
                    && stats.countOfAutoExitDueToTnNetwork == key.countOfAutoExitDueToTnNetwork
                    && stats.isEmergency == key.isEmergency
                    && stats.maxInactivityDurationSec == key.maxInactivityDurationSec) {
                return stats;
            }
        }
@@ -2362,6 +2368,8 @@ public class PersistAtomsStorage {
                    && stats.cellularServiceState == key.cellularServiceState
                    && stats.isMultiSim == key.isMultiSim
                    && stats.recommendingHandoverType == key.recommendingHandoverType
                    && stats.isSatelliteAllowedInCurrentLocation
                    == key.isSatelliteAllowedInCurrentLocation
                    && stats.isWifiConnected == key.isWifiConnected
                    && stats.carrierId == key.carrierId) {
                return stats;
@@ -2388,12 +2396,14 @@ public class PersistAtomsStorage {
    }

    /**
     * Returns SatelliteController atom that has same carrier_id value or
     * {@code null} if does not exist.
     * Returns the SatelliteController atom with the matching `carrier_id`, `is_provisioned`, and
     * `is_ntn_only_carrier` values, or {@code null} if does not exist.
     */
    private @Nullable SatelliteController find(SatelliteController key) {
        for (SatelliteController stats : mAtoms.satelliteController) {
            if (stats.carrierId == key.carrierId) {
            if (stats.carrierId == key.carrierId
                    && stats.isProvisioned == key.isProvisioned
                    && stats.isNtnOnlyCarrier == key.isNtnOnlyCarrier) {
                return stats;
            }
        }
@@ -2408,7 +2418,9 @@ public class PersistAtomsStorage {
            CarrierRoamingSatelliteControllerStats key) {
        for (CarrierRoamingSatelliteControllerStats stats :
                mAtoms.carrierRoamingSatelliteControllerStats) {
            if (stats.carrierId == key.carrierId) {
            if (stats.carrierId == key.carrierId
                    && stats.configDataSource == key.configDataSource
                    && stats.isDeviceEntitled == key.isDeviceEntitled) {
                return stats;
            }
        }
+209 −5

File changed.

Preview size limit exceeded, changes collapsed.

+25 −5
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ import android.telephony.PersistentLogger;
import android.telephony.Rlog;
import android.telephony.satellite.SatelliteDatagram;
import android.telephony.satellite.SatelliteManager;
import android.telephony.satellite.SatelliteSessionStats;
import android.util.Log;

import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
@@ -272,6 +274,7 @@ public class DatagramDispatcher extends Handler {
                request = (DatagramDispatcherHandlerRequest) msg.obj;
                SendSatelliteDatagramArgument argument =
                        (SendSatelliteDatagramArgument) request.argument;
                argument.setDatagramStartTime();
                onCompleted = obtainMessage(EVENT_SEND_SATELLITE_DATAGRAM_DONE, request);

                synchronized (mLock) {
@@ -480,7 +483,6 @@ public class DatagramDispatcher extends Handler {
                // Modem can be busy receiving datagrams, so send datagram only when modem is
                // not busy.
                mSendingInProgress = true;
                datagramArgs.setDatagramStartTime();
                mDatagramController.updateSendStatus(subId, datagramType,
                        SatelliteManager.SATELLITE_DATAGRAM_TRANSFER_STATE_SENDING,
                        getPendingMessagesCount(), SatelliteManager.SATELLITE_RESULT_SUCCESS);
@@ -639,7 +641,6 @@ public class DatagramDispatcher extends Handler {

            mSendingInProgress = true;
            // Sets the trigger time for getting pending datagrams
            datagramArg.setDatagramStartTime();
            mDatagramController.updateSendStatus(datagramArg.subId, datagramArg.datagramType,
                    SatelliteManager.SATELLITE_DATAGRAM_TRANSFER_STATE_SENDING,
                    getPendingMessagesCount(), SatelliteManager.SATELLITE_RESULT_SUCCESS);
@@ -767,6 +768,7 @@ public class DatagramDispatcher extends Handler {
                        .setDatagramTransferTimeMillis(datagramTransmissionTime)
                        .setIsDemoMode(mIsDemoMode)
                        .setCarrierId(SatelliteController.getInstance().getSatelliteCarrierId())
                        .setIsNtnOnlyCarrier(SatelliteController.getInstance().isNtnOnlyCarrier())
                        .build());
        if (resultCode == SatelliteManager.SATELLITE_RESULT_SUCCESS) {
            mControllerMetricsStats.reportOutgoingDatagramSuccessCount(argument.datagramType,
@@ -1361,9 +1363,8 @@ public class DatagramDispatcher extends Handler {
        if (!mIsAligned) return false;

        boolean isModemStateConnectedOrTransferring =
                mModemState == SatelliteManager.SATELLITE_MODEM_STATE_CONNECTED
                        || mModemState
                                == SatelliteManager.SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING;
                mModemState == SATELLITE_MODEM_STATE_CONNECTED
                        || mModemState == SATELLITE_MODEM_STATE_DATAGRAM_TRANSFERRING;
        if (!isModemStateConnectedOrTransferring && !allowCheckMessageInNotConnected()) {
            plogd("EVENT_MT_SMS_POLLING_THROTTLE_TIMED_OUT:"
                    + " allow_check_message_in_not_connected is disabled");
@@ -1421,4 +1422,23 @@ public class DatagramDispatcher extends Handler {
            mPersistentLogger.error(TAG, log);
        }
    }

    public void updateSessionStatsWithPendingUserMsgCount(SatelliteSessionStats datagramStats) {
        Log.d("SessionMetricsStats1",
                " mPendingEmergencyDatagramsMap size = " + mPendingEmergencyDatagramsMap.size());
        Log.d("SessionMetricsStats1", " mPendingNonEmergencyDatagramsMap size = "
                + mPendingNonEmergencyDatagramsMap.size());
        for (Entry<Long, SendSatelliteDatagramArgument> entry :
                mPendingEmergencyDatagramsMap.entrySet()) {
            SendSatelliteDatagramArgument argument = entry.getValue();
            Log.d("SessionMetricsStats1", "DataGramType1 =  " + argument.datagramType);
            datagramStats.updateCountOfUserMessagesInQueueToBeSent(argument.datagramType);
        }
        for (Entry<Long, SendSatelliteDatagramArgument> entry :
                mPendingNonEmergencyDatagramsMap.entrySet()) {
            SendSatelliteDatagramArgument argument = entry.getValue();
            Log.d("SessionMetricsStats1", "DataGramType2 =  " + argument.datagramType);
            datagramStats.updateCountOfUserMessagesInQueueToBeSent(argument.datagramType);
        }
    }
}
Loading