Commit Graph

2206 Commits

Author SHA1 Message Date
Junyu Lai
3086d8ccbc Merge "[SM09] Add helper class to monitor RAT type change per sub" into rvc-dev am: cc0c65dbb5 am: 7aaca95d10
Change-Id: I50f05bf5de55707e9758f7ffef6da8711c651cbf
2020-04-08 10:47:39 +00:00
Junyu Lai
7aaca95d10 Merge "[SM09] Add helper class to monitor RAT type change per sub" into rvc-dev am: cc0c65dbb5
Change-Id: I95d1a1c1931c194c7f751a444e669adc16a65897
2020-04-08 10:35:10 +00:00
junyulai
5d0d638f54 [SM09] Add helper class to monitor RAT type change per sub
In current design, Rat type change in NSS is only for default
subscription. This is only correct for single sim project.
However, it does not correct for multi-sim scenarios such as
CBRS or DSDS, given that all data usage will be attributed
to the Rat type of default sub.

Thus, add a helper class to monitor subscription change event,
and register/unregister dynamically for Rat type change for
every subscription.

Note that unit test of the helper class will be addressed
in follow-up patch.

Test: m -j
Bug: 146415925
Change-Id: I0055f6b55c209a073ce997fc7a144477f9db7069
Merged-In: I0055f6b55c209a073ce997fc7a144477f9db7069
(cherry picked from commit 306de26c138ec135846f2a74a952464cf00dce54)
2020-04-08 08:50:22 +00:00
Junyu Lai
ad0f8d4c5e [automerger skipped] Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev am: ae9a901cbb -s ours am: 1d29cc9ca2 -s ours
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 6ec40a86dd is in history

Change-Id: I91c97fec88b2275764d5804523a39922c6257340
2020-04-06 04:52:38 +00:00
junyulai
99f9ef95c3 [automerger skipped] [SP26.2] add a method in NetworkStats that removes empty entries am: d81034383d am: f3c0573441 -s ours
am skip reason: Change-Id I40a76935d55712b8083ee1e17e137a8a4ef5e029 with SHA-1 5d9bc0c75e is in history

Change-Id: If3793def11b38b66cc7dd788af82f6c0f394cd99
2020-04-06 04:52:05 +00:00
Junyu Lai
1d29cc9ca2 [automerger skipped] Merge changes from topic "am-5ce58db354ac494a84904378ca35c013-rvc-dev" into rvc-dev am: ae9a901cbb -s ours
am skip reason: Change-Id I690704b43cfd16de70c4c83916f6d750cf613f67 with SHA-1 863f390810 is in history

Change-Id: I1a97a8cb46302c29425781b9252640c1eec4b50b
2020-04-06 04:27:56 +00:00
junyulai
d81034383d [SP26.2] add a method in NetworkStats that removes empty entries
In current design, entries with zeros are preserved after
addition/subtraction. These entries are not very useful
and lead to difficulty of verifying the result of
addition/subtraction.

However, change the behavior in the original NetworkStats
is considered risky in current stage.

Thus, this change provide a function that could remove these
empty entries in tests.

Test: atest FrameworksNetTests
Bug: 152827872
Bug: 150644692

Change-Id: I40a76935d55712b8083ee1e17e137a8a4ef5e029
Merged-In: I40a76935d55712b8083ee1e17e137a8a4ef5e029
(cherry picked from commit 6c7bef3064dbe949b7b213036b8e70c125ddd343)
2020-04-06 02:18:50 +00:00
Junyu Lai
da6f50ce5e Merge changes from topic "sp26-networkstats-cts" am: 4d4ddc78cf am: d9074a21fc am: b1c77732ee
Change-Id: I0dc9884b3f36ecc6678d741d74e5c85ac0756378
2020-04-02 03:11:17 +00:00
junyulai
b75b73fcdc [SP26.2] add a method in NetworkStats that removes empty entries am: 5d9bc0c75e am: ba57ab6eb9 am: 06a3b668d3
Change-Id: Ice87baf7326ad333b611a348b3bceebe71d0858e
2020-04-02 03:11:14 +00:00
Junyu Lai
b1c77732ee Merge changes from topic "sp26-networkstats-cts" am: 4d4ddc78cf am: d9074a21fc
Change-Id: I0964b1752acbba767135c960aba12f169b3f852c
2020-04-02 02:40:53 +00:00
junyulai
06a3b668d3 [SP26.2] add a method in NetworkStats that removes empty entries am: 5d9bc0c75e am: ba57ab6eb9
Change-Id: I388b1d3677d362da2595739913880efa9a643a03
2020-04-02 02:40:42 +00:00
Junyu Lai
d9074a21fc Merge changes from topic "sp26-networkstats-cts" am: 4d4ddc78cf
Change-Id: I124f0def6fdaad8f1726df23edc87b6aa7856586
2020-04-02 02:21:26 +00:00
junyulai
ba57ab6eb9 [SP26.2] add a method in NetworkStats that removes empty entries am: 5d9bc0c75e
Change-Id: Ieee0896672625f3bab9ec02a5efa495a9d1f001b
2020-04-02 02:21:20 +00:00
Junyu Lai
4d4ddc78cf Merge changes from topic "sp26-networkstats-cts"
* changes:
  [SP26] add CTS for NetworkStats
  [SP26.2] add a method in NetworkStats that removes empty entries
2020-04-02 02:00:59 +00:00
junyulai
5d9bc0c75e [SP26.2] add a method in NetworkStats that removes empty entries
In current design, entries with zeros are preserved after
addition/subtraction. These entries are not very useful
and lead to difficulty of verifying the result of
addition/subtraction.

However, change the behavior in the original NetworkStats
is considered risky in current stage.

Thus, this change provide a function that could remove these
empty entries in tests.

Test: atest FrameworksNetTests
Bug: 152827872
Bug: 150644692
Change-Id: I40a76935d55712b8083ee1e17e137a8a4ef5e029
2020-04-01 16:46:08 +08:00
TreeHugger Robot
a64bd6d19e Merge "[SM06] Collect mobile NetworkStats metrics by collapsed rat type" into rvc-dev am: 8444a9440f am: de5bb18c21
Change-Id: Ica3bb4d054510662993c7c4958321fa93b7a8c4d
2020-04-01 01:39:58 +00:00
TreeHugger Robot
a811598819 Merge "[SM06] Collect mobile NetworkStats metrics by collapsed rat type" into rvc-dev am: 8444a9440f am: 1596f03415
Change-Id: Ib1f614fcbd49b8b0fbc9a37cca0800664a23f425
2020-04-01 01:39:39 +00:00
TreeHugger Robot
de5bb18c21 Merge "[SM06] Collect mobile NetworkStats metrics by collapsed rat type" into rvc-dev am: 8444a9440f
Change-Id: I70609ad40ecb40a8b6b352e6789a4900313f91fb
2020-04-01 01:29:09 +00:00
TreeHugger Robot
8444a9440f Merge "[SM06] Collect mobile NetworkStats metrics by collapsed rat type" into rvc-dev 2020-04-01 01:12:41 +00:00
Benedict Wong
f3763681e4 [automerger skipped] Merge "Automatically set IPsec tunnel interface as up" into rvc-dev am: ef5732b053 -s ours am: 3ebc200d00 -s ours
am skip reason: Change-Id I55b63a748463a388e1e2991d2d5d6b3023545e60 with SHA-1 3fafd684c5 is in history

Change-Id: I8e5cf4b83f05068ca2715b9715204af268320ca0
2020-03-31 20:15:44 +00:00
Lorenzo Colitti
5b8a95cb93 [automerger skipped] Merge "Relax IPsec resource count restrictions." into rvc-dev am: 0741d3b855 -s ours am: 8375dbdb87 -s ours
am skip reason: Change-Id Id53d14e5698e5fcc410868424176b00350c7ae79 with SHA-1 fd266f85b6 is in history

Change-Id: I55dc1361e00724cce808fec175d57281e88d28ac
2020-03-31 17:52:51 +00:00
Benedict Wong
95f6343d7a [automerger skipped] Merge "Automatically set IPsec tunnel interface as up" into rvc-dev am: ef5732b053 am: 175fa3c682 -s ours
am skip reason: Change-Id I55b63a748463a388e1e2991d2d5d6b3023545e60 with SHA-1 529e8aae25 is in history

Change-Id: I192079b09c3fc9292fabc2208059f2c8698a9e4d
2020-03-31 17:35:12 +00:00
Benedict Wong
3ebc200d00 [automerger skipped] Merge "Automatically set IPsec tunnel interface as up" into rvc-dev am: ef5732b053 -s ours
am skip reason: Change-Id I55b63a748463a388e1e2991d2d5d6b3023545e60 with SHA-1 529e8aae25 is in history

Change-Id: I10aae07c044231d9b6fcdd61488a146b21d8dd8f
2020-03-31 17:03:21 +00:00
junyulai
eba72cd4ef [SM06] Collect mobile NetworkStats metrics by collapsed rat type
Test: adb shell cmd stats pull-source 10000~10003
      adb shell dumpsys netstats --uid
Bug: 129082217

Change-Id: I726e74f5c63a6ed456cb13ea259b58c7a33bec76
Merged-In: I726e74f5c63a6ed456cb13ea259b58c7a33bec76
(cherry picked from commit c82dfeb4225e1a8a17eedc969a90f921e0bf845c)
2020-03-31 09:25:27 +00:00
Lorenzo Colitti
05f0ce2252 [automerger skipped] Merge "Relax IPsec resource count restrictions." into rvc-dev am: 0741d3b855 am: 52ad9bedc6 -s ours
am skip reason: Change-Id Id53d14e5698e5fcc410868424176b00350c7ae79 with SHA-1 7bcf9c28ac is in history

Change-Id: If0b5a493a4a8555a4ba40ab9c8a1ed528bd5343a
2020-03-30 18:51:03 +00:00
Lorenzo Colitti
8375dbdb87 [automerger skipped] Merge "Relax IPsec resource count restrictions." into rvc-dev am: 0741d3b855 -s ours
am skip reason: Change-Id Id53d14e5698e5fcc410868424176b00350c7ae79 with SHA-1 7bcf9c28ac is in history

Change-Id: Icb265e846177c8ee1013529034534f46dec4de47
2020-03-30 07:06:45 +00:00
Daulet Zhanguzin
b59e6dbe5f [automerger skipped] Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" am: f8098ddadf am: 35045271d1 -s ours am: a62847119f -s ours
am skip reason: Change-Id Idb1b6ba41af3b52f3376b1157259af3c30328c4e with SHA-1 c120601182 is in history

Change-Id: I99ef30e8307aca34d78d1beb733b1ecd1b8d402e
2020-03-27 12:34:23 +00:00
Daulet Zhanguzin
a62847119f [automerger skipped] Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" am: f8098ddadf am: 35045271d1 -s ours
am skip reason: Change-Id Idb1b6ba41af3b52f3376b1157259af3c30328c4e with SHA-1 c120601182 is in history

Change-Id: Ib70273007ee56039d0645f33f59c677ea5f7b1aa
2020-03-27 12:28:12 +00:00
Daulet Zhanguzin
35045271d1 Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" am: f8098ddadf
Change-Id: I9f9ba24036e19f568942466c866c7be23112c10a
2020-03-27 12:07:53 +00:00
Daulet Zhanguzin
a12c44da4d Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330
Bug: 149348618

Test: Treehugger
Change-Id: Idb1b6ba41af3b52f3376b1157259af3c30328c4e
Merged-In: Idb1b6ba41af3b52f3376b1157259af3c30328c4e
2020-03-26 12:44:56 +00:00
Benedict Wong
3fafd684c5 Automatically set IPsec tunnel interface as up
This change makes IPsec tunnel interfaces automatically get brought up
once they are created. Originally this was considered to be an
additional safety check, as they would not be start routing traffic
until explicitly brought up. However, in the intervening time, the
NetworkManagementController now requires the NETWORK_STACK permission to
set an interface as up. Additionally, that call is a hidden API, and
thus not usable for use cases such as IWLAN.

Bug: 149348618
Test: FrameworksNetTests, CtsNetTestCases passing.
Change-Id: I55b63a748463a388e1e2991d2d5d6b3023545e60
Merged-In: I55b63a748463a388e1e2991d2d5d6b3023545e60
(cherry picked from commit 7c5704d177a903034ae1b6ae4800cc3b8457977a)
2020-03-25 06:14:13 +00:00
Automerger Merge Worker
fd266f85b6 Relax IPsec resource count restrictions.
IPsec resource counts were selected to be conservative, due to unknowns
about device capabilities. Since then, it appears that we no longer need
such stringent quotas, and this can be relaxed.

Bug: 152368091
Test: FrameworksNetTest passing
Change-Id: Id53d14e5698e5fcc410868424176b00350c7ae79
Merged-In: Id53d14e5698e5fcc410868424176b00350c7ae79
(cherry picked from commit 224699fc0b485dd75e6157a88f66a53d64e5a6fd)
2020-03-25 06:07:24 +00:00
Benedict Wong
36cbb00f6b Merge "Automatically set IPsec tunnel interface as up" am: 1f1da2083a am: 1e6fcb32b1 am: 43a6ad2f9e
Change-Id: Ibcc7a955dcd48cab57ff5d4c6d5e918d825f2733
2020-03-25 05:16:24 +00:00
Benedict Wong
43a6ad2f9e Merge "Automatically set IPsec tunnel interface as up" am: 1f1da2083a am: 1e6fcb32b1
Change-Id: I01d10d2e1c0fcc52b88901609fae068d6d5268f7
2020-03-25 05:01:20 +00:00
Benedict Wong
1e6fcb32b1 Merge "Automatically set IPsec tunnel interface as up" am: 1f1da2083a
Change-Id: I068814590192decaf353cdd8c46cc7f65badc746
2020-03-25 04:35:03 +00:00
Benedict Wong
1f1da2083a Merge "Automatically set IPsec tunnel interface as up" 2020-03-25 04:18:50 +00:00
Benedict Wong
9c4df64d77 Merge "Relax IPsec resource count restrictions." am: cae8b10659 am: 40cc67b7eb am: 60f9dc1cf1
Change-Id: I630677ddb7a27868279a9b1669d41bd6279e38eb
2020-03-25 00:10:31 +00:00
Benedict Wong
60f9dc1cf1 Merge "Relax IPsec resource count restrictions." am: cae8b10659 am: 40cc67b7eb
Change-Id: I1b0b3dcff81c226a4ffc123c974f1a0e89ca6b89
2020-03-25 00:07:52 +00:00
Benedict Wong
40cc67b7eb Merge "Relax IPsec resource count restrictions." am: cae8b10659
Change-Id: I18314d4d512ca3d63440ce1287cc651b7dc44231
2020-03-24 23:47:24 +00:00
Benedict Wong
cae8b10659 Merge "Relax IPsec resource count restrictions." 2020-03-24 23:31:37 +00:00
TreeHugger Robot
55ad7fd1d2 [automerger skipped] Merge "DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp@6304901 into stage-aosp-master" into stage-aosp-master am: 4c1f620af6 -s ours am: 64712431fb
Change-Id: I0972ebb372991b37c21c7e90a2033b14b21b4860
2020-03-20 18:45:24 +00:00
TreeHugger Robot
64712431fb [automerger skipped] Merge "DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp@6304901 into stage-aosp-master" into stage-aosp-master am: 4c1f620af6 -s ours
am skip reason: subject contains skip directive

Change-Id: Ia1f95f590e25c34b4bb6dcf91c06f46a1494c523
2020-03-20 18:31:59 +00:00
Xin Li
7b8a4a253f DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp@6304901 into stage-aosp-master
Bug: 151763422
Change-Id: I62d3293f617f630d3d2a3d5f67b764bf272769bf
2020-03-19 10:10:35 -07:00
Lorenzo Colitti
26a948dd18 [automerger skipped] Make Ethernet interfaces more testable. am: 8723291cee -s ours am: 5fbe4c856a -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 013187d3e3 is in history

Change-Id: I7257757ec5e2ac358746bc3c262917f45fac96fa
2020-03-19 15:00:06 +00:00
Lorenzo Colitti
3e3c154772 [automerger skipped] Make Ethernet interfaces more testable. am: 8723291cee am: fc3330912a -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 013187d3e3 is in history

Change-Id: Ia18110f4eb32f3539533919e65741ef17a66fa05
2020-03-19 14:59:45 +00:00
Lorenzo Colitti
5fbe4c856a [automerger skipped] Make Ethernet interfaces more testable. am: 8723291cee -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 013187d3e3 is in history

Change-Id: I3673d68d69670828a6ecb96073a0d9d2c3d7eca1
2020-03-19 14:44:23 +00:00
Lorenzo Colitti
8723291cee Make Ethernet interfaces more testable.
This CL adds a setIncludeTestInterfaces method to EthernetManager
that, when called, causes the Ethernet service to recognize and
manage test interfaces created by TestNetworkManager.

Bug: 150644681
Test: Tested by EthernetTetheringTest in same topic
Change-Id: I86eef7a93267f800dbfc8eafd307effa76a344ca
Merged-In: I86eef7a93267f800dbfc8eafd307effa76a344ca
(cherry picked from commit 3410fb0aa92bbd4f9d7dc031e89f6f528ff34245)
2020-03-19 12:30:39 +00:00
Lorenzo Colitti
7867c10d42 Merge "Make Ethernet interfaces more testable." am: e7ff9d5e6d am: 6b37362b14 am: ddc85d466f
Change-Id: Idcb7b2bfef2848d5f90b22b8ff27a087072676ae
2020-03-19 11:49:12 +00:00
Lorenzo Colitti
ddc85d466f Merge "Make Ethernet interfaces more testable." am: e7ff9d5e6d am: 6b37362b14
Change-Id: I5a73dc5ad6576573bcac6c7ac6f1270dfbb97470
2020-03-19 11:46:55 +00:00
Lorenzo Colitti
6b37362b14 Merge "Make Ethernet interfaces more testable." am: e7ff9d5e6d
Change-Id: I456acb05d548b3d0281e500cfd91d888441d7f94
2020-03-19 11:30:33 +00:00