diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-13 14:08:09 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-13 14:08:09 +0000 |
commit | c07db67c1fbfec5ba93d8056f95dc9fb354f7391 (patch) | |
tree | e6387a74e8890e84e8026a53bd28c64d27b957ef | |
parent | 3bfc7d8558ce184977fec6b830dd423e6bd7abbb (diff) | |
parent | fd0d814c25fc1d51d5309eddd9dd1db71cb2700e (diff) |
Merge cherrypicks of [16191693] into sc-qpr1-d-release.
Change-Id: I1ccf0cf773124ca669f9b11a94cd9585cd320bb0
-rw-r--r-- | core/java/android/net/NetworkTemplate.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/core/java/android/net/NetworkTemplate.java b/core/java/android/net/NetworkTemplate.java index 249154aa9129..762816dd9f11 100644 --- a/core/java/android/net/NetworkTemplate.java +++ b/core/java/android/net/NetworkTemplate.java @@ -782,8 +782,8 @@ public class NetworkTemplate implements Parcelable { } /** - * Examine the given template and normalize if it refers to a "merged" - * mobile subscriber. We pick the "lowest" merged subscriber as the primary + * Examine the given template and normalize it. + * We pick the "lowest" merged subscriber as the primary * for key purposes, and expand the template to match all other merged * subscribers. * <p> @@ -798,8 +798,8 @@ public class NetworkTemplate implements Parcelable { } /** - * Examine the given template and normalize if it refers to a "merged" - * mobile subscriber. We pick the "lowest" merged subscriber as the primary + * Examine the given template and normalize it. + * We pick the "lowest" merged subscriber as the primary * for key purposes, and expand the template to match all other merged * subscribers. * @@ -811,7 +811,12 @@ public class NetworkTemplate implements Parcelable { * A, but also matches B. */ public static NetworkTemplate normalize(NetworkTemplate template, List<String[]> mergedList) { - if (!template.isMatchRuleMobile()) return template; + // Now there are several types of network which uses SubscriberId to store network + // information. For instances: + // The TYPE_WIFI with subscriberId means that it is a merged carrier wifi network. + // The TYPE_CARRIER means that the network associate to specific carrier network. + + if (template.mSubscriberId == null) return template; for (String[] merged : mergedList) { if (ArrayUtils.contains(merged, template.mSubscriberId)) { |