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

Commit e76c66d3 authored by Aishwarya Mallampati's avatar Aishwarya Mallampati
Browse files

Display auto connected to satellite notification only for auto

connection.

Bug: 372544302
Test: atest SatelliteControllerTest
Test: Manully testeed SMS/MMS/CALLS/DATA
FLAG: EXEMPT bugfix
Change-Id: I30c9d4ea8e34b5820134e60a1c0cd02d34708c66
parent 1162635a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.internal.telephony.satellite;
import static android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_INNER_PRIMARY;
import static android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY;
import static android.provider.Settings.ACTION_SATELLITE_SETTING;
import static android.telephony.CarrierConfigManager.CARRIER_ROAMING_NTN_CONNECT_AUTOMATIC;
import static android.telephony.CarrierConfigManager.CARRIER_ROAMING_NTN_CONNECT_MANUAL;
import static android.telephony.CarrierConfigManager.CARRIER_ROAMING_NTN_CONNECT_TYPE;
import static android.telephony.CarrierConfigManager.KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT;
@@ -5857,7 +5858,8 @@ public class SatelliteController extends Handler {
                    + mIsNotificationShowing);
        }
        if (isNtn.first) {
            if (!notificationKeyStatus) {
            if (!notificationKeyStatus && getCarrierRoamingNtnConnectType(isNtn.second)
                    == CARRIER_ROAMING_NTN_CONNECT_AUTOMATIC) {
                updateSatelliteSystemNotification(isNtn.second,
                        CarrierConfigManager.CARRIER_ROAMING_NTN_CONNECT_AUTOMATIC,
                        /*visible*/ true);
+5 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.internal.telephony.satellite;

import static android.telephony.CarrierConfigManager.CARRIER_ROAMING_NTN_CONNECT_AUTOMATIC;
import static android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_INNER_PRIMARY;
import static android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY;
import static android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_HARDWARE_CONFIGURATION_FOLD_IN_CLOSED;
@@ -3601,6 +3602,10 @@ public class SatelliteControllerTest extends TelephonyTest {
    @Test
    public void testHandleEventServiceStateChanged() {
        when(mFeatureFlags.carrierEnabledSatelliteFlag()).thenReturn(true);
        mCarrierConfigBundle.putInt(KEY_CARRIER_ROAMING_NTN_CONNECT_TYPE_INT,
                CARRIER_ROAMING_NTN_CONNECT_AUTOMATIC);
        invokeCarrierConfigChanged();

        // Do nothing when the satellite is not connected
        doReturn(false).when(mServiceState).isUsingNonTerrestrialNetwork();
        sendServiceStateChangedEvent();