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

Commit d50b1e69 authored by Malcolm Chen's avatar Malcolm Chen Committed by Xiangyu/Malcolm Chen
Browse files

Connect to CellularNetworkService in SST.

Re-route SST to get cellular registration states from
CellularNetworkService instead of calling CommandsInterface
directly

Bug: 64132030
Test: unittest
Change-Id: I50a9cf548a142a147eb027659f72b83c68b9b8e1
Merged-In: I50a9cf548a142a147eb027659f72b83c68b9b8e1
parent 96364167
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -167,8 +167,7 @@ public class CellularNetworkService extends NetworkService {
            }
        }

        private int[] getAvailableServices(int regState, int domain,
                boolean emergencyOnly) {
        private int[] getAvailableServices(int regState, int domain, boolean emergencyOnly) {
            int[] availableServices = null;

            // In emergency only states, only SERVICE_TYPE_EMERGENCY is available.
@@ -177,7 +176,7 @@ public class CellularNetworkService extends NetworkService {
            if (emergencyOnly) {
                availableServices = new int[] {NetworkRegistrationState.SERVICE_TYPE_EMERGENCY};
            } else if (regState == NetworkRegistrationState.REG_STATE_ROAMING
                    || regState != NetworkRegistrationState.REG_STATE_HOME) {
                    || regState == NetworkRegistrationState.REG_STATE_HOME) {
                if (domain == NetworkRegistrationState.DOMAIN_PS) {
                    availableServices = new int[] {NetworkRegistrationState.SERVICE_TYPE_DATA};
                } else if (domain == NetworkRegistrationState.DOMAIN_CS) {
@@ -243,6 +242,10 @@ public class CellularNetworkService extends NetworkService {

        private CellIdentity convertHalCellIdentityToCellIdentity(
                android.hardware.radio.V1_0.CellIdentity cellIdentity) {
            if (cellIdentity == null) {
                return null;
            }

            CellIdentity result = null;
            switch(cellIdentity.cellInfoType) {
                case CellInfoType.GSM: {
+116 −146

File changed.

Preview size limit exceeded, changes collapsed.

+5 −4

File changed.

Preview size limit exceeded, changes collapsed.

+17 −2

File changed.

Preview size limit exceeded, changes collapsed.

+169 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading