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

Commit cfb14d58 authored by Ling Ma's avatar Ling Ma Committed by Jack Yu
Browse files

QNS anomaly report only track frequent HO

Refine the anomaly detection only to track HO between IWLAN and WWAN,
as we allow frequent change within WWAN due to data_registration state
changes, which triggers false positive.

Fix: 234704405
Test: manual basic
Merged-In: I0c332cca3263cd1cf94feab03e67db2c2f2ba9a0
Change-Id: I0c332cca3263cd1cf94feab03e67db2c2f2ba9a0
parent 4fee4095
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -364,14 +364,19 @@ public class AccessNetworksManager extends Handler {
            }

            List<QualifiedNetworks> qualifiedNetworksList = new ArrayList<>();
            // For anomaly report, only track frequent HO between cellular and IWLAN
            boolean isRequestedNetworkOnIwlan = Arrays.stream(qualifiedNetworkTypes)
                    .anyMatch(network -> network == AccessNetworkType.IWLAN);
            int satisfiedApnTypes = 0;
            for (int apnType : SUPPORTED_APN_TYPES) {
                if ((apnTypes & apnType) == apnType) {
                    // skip the APN anomaly detection if not using the T data stack
                    if (mDataConfigManager != null) {
                        satisfiedApnTypes |= apnType;
                        if (isRequestedNetworkOnIwlan) {
                            trackFrequentApnTypeChange(apnType);
                        }
                    }

                    if (mAvailableNetworks.get(apnType) != null) {
                        if (Arrays.equals(mAvailableNetworks.get(apnType),