Commit Graph

4729 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
e49cf94e4e Merge "Add method to NetworkStatsService for UID stats." am: db89ca3c12
am: ff5f0b7f6c

Change-Id: I2527d95000c7500c824ede70f87ecb38e21ed323
2018-03-23 04:01:09 +00:00
Remi NGUYEN VAN
ff5f0b7f6c Merge "Add method to NetworkStatsService for UID stats."
am: db89ca3c12

Change-Id: I2c6cba3ebbc8c23ade754cfd411ac54a561b020a
2018-03-23 03:54:13 +00:00
Remi NGUYEN VAN
6f124c455f Add method to NetworkStatsService for UID stats.
Useful for clients such as BatteryStats which currently rely
on NetworkStatsFactory. Data at that stage is incomplete as
it does not account for tethering, VT data and corresponding
464xlat corrections.

Test: runtest frameworks-net, CTS tests pass.
Change-Id: I763b77f601c827fd2963204694fb5b45425cc791
2018-03-22 15:31:28 +09:00
Nathan Harold
c4da680712 Merge changes I4c26aea7,I79911434 into pi-dev
am: 095b9e8e1c  -s ours

Change-Id: I19626bf87d31c759939c6aafc42ae679f6cb18e4
2018-03-21 21:35:13 +00:00
Benedict Wong
129024a0e2 Merge "Added implementation for VTI add/remove address" into pi-dev
am: f801b8ae69  -s ours

Change-Id: I1f77872860e705606ba9f0c7f95200ee5bdbe499
2018-03-21 17:39:56 +00:00
nharold
c981b410f6 Merge "Check mOwnedByTransform to avoid DELSA on SPI" am: 94d8fa0da6
am: aee8c2e040

Change-Id: Ie505e32e6f3bef3fe39198396a40a2b534e2bcda
2018-03-21 05:01:47 +00:00
nharold
aee8c2e040 Merge "Check mOwnedByTransform to avoid DELSA on SPI"
am: 94d8fa0da6

Change-Id: Id194eb67947e9dae369b2a2d30b55e7e1cf2d7c8
2018-03-21 03:36:44 +00:00
Nathan Harold
75e48d2435 Check mOwnedByTransform to avoid DELSA on SPI
The owned by transform flag prevents the removal
of an SPI from accidentally deleting an associated
SA in the kernel. That flag wasn't actually being
checked, so deleting an SPI would result in the
transform being removed.

The existing code already guarantees that the SA is
deleted when the transform is deleted

Bug: 73258845
Test: runtest frameworks-net
Merged-In: I4c26aea7af817a5d9e54da5db1cdf4f943bcae06
Change-Id: I4c26aea7af817a5d9e54da5db1cdf4f943bcae06
(cherry picked from commit 22795302be4ec35449908cf566aa7c16945df836)
2018-03-20 18:29:02 -07:00
Benedict Wong
8520015095 Added implementation for VTI add/remove address
This change adds implementation details for add/remove addresses onto a
VTI.

Bug: 73675031
Test: New tests added, passing on Walleye
Merged-In: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
Change-Id: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
(cherry picked from commit ecc9f7cc08804e3fa15fea04ae94ea1bc74edbfe)
2018-03-20 16:01:27 -07:00
Nathan Harold
f2057a9450 Check mOwnedByTransform to avoid DELSA on SPI
The owned by transform flag prevents the removal
of an SPI from accidentally deleting an associated
SA in the kernel. That flag wasn't actually being
checked, so deleting an SPI would result in the
transform being removed.

The existing code already guarantees that the SA is
deleted when the transform is deleted

Bug: 73258845
Test: runtest frameworks-net
Change-Id: I4c26aea7af817a5d9e54da5db1cdf4f943bcae06
2018-03-20 11:26:29 -07:00
Benedict Wong
b1cd868123 Merge "Added implementation for VTI add/remove address" am: b1b83365e4
am: f5c3f92797

Change-Id: Idaab45998f4765655bde6cf0274f2ba3c1b3ecf1
2018-03-20 00:09:15 +00:00
Benedict Wong
f5c3f92797 Merge "Added implementation for VTI add/remove address"
am: b1b83365e4

Change-Id: Id49ef89d3076c9a6d5257b006965844ab77743ce
2018-03-19 23:45:10 +00:00
Benedict Wong
b1b83365e4 Merge "Added implementation for VTI add/remove address" 2018-03-19 22:05:09 +00:00
Benedict Wong
0a2d9edaa9 Added implementation for VTI add/remove address
This change adds implementation details for add/remove addresses onto a
VTI.

Bug: 73675031
Test: New tests added, passing on Walleye
Change-Id: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
2018-03-16 10:25:43 -07:00
Pavel Maltsev
84eab7e76c Merge "Fixing comments in Network Capabilities" am: d6da5146e7
am: fd41459278

Change-Id: If3c0d76f9598d931d801271c4d0634e15f4b9ed4
2018-03-12 08:08:31 +00:00
Pavel Maltsev
fd41459278 Merge "Fixing comments in Network Capabilities"
am: d6da5146e7

Change-Id: Iacbcac2e740099ea6b6a6f7a646f046370fd16f5
2018-03-12 07:57:07 +00:00
Treehugger Robot
d6da5146e7 Merge "Fixing comments in Network Capabilities" 2018-03-12 07:42:58 +00:00
Chalard Jean
cf5ddb8f76 Merge "Deprecate most of NetworkInfo." into pi-dev
am: c0c8a768a7

Change-Id: I3ee0f03e1d1dc8985fc2eea516dd80d902310f4c
2018-03-10 08:08:09 +00:00
Chalard Jean
c0c8a768a7 Merge "Deprecate most of NetworkInfo." into pi-dev 2018-03-10 07:51:11 +00:00
Chad Brubaker
dffbfd9172 Merge "Expose CONNECTIVITY_ACTION to Instant Apps" into pi-dev
am: aa72b2036a

Change-Id: I0434f8c7292a85e25df3da2858e4d89cf55fab3d
2018-03-10 06:20:56 +00:00
Pavel Maltsev
c30002742f Fixing comments in Network Capabilities
Clean up after aosp/606338

Test: m -j (only comments has been changed)
Change-Id: I2627654450244024c2be92f9067534dfc2a80891
2018-03-09 10:42:32 -08:00
Chalard Jean
b295d028c8 Merge "Deprecate most of NetworkInfo." am: 12c57e795c
am: 94d7da3a7c

Change-Id: Ia00fbfa38a28583198278df2a94642ed8139d7d1
2018-03-09 13:12:08 +00:00
Chalard Jean
94d7da3a7c Merge "Deprecate most of NetworkInfo."
am: 12c57e795c

Change-Id: I1d12c161f7e388451059a92b68a1511fbf8006a1
2018-03-09 12:57:15 +00:00
Chalard Jean
12c57e795c Merge "Deprecate most of NetworkInfo." 2018-03-09 09:46:11 +00:00
Chalard Jean
5acb7b709a Deprecate most of NetworkInfo.
getType, getTypeName, isConnectedOrConnecting, isConnected,
isAvaisable, isFailover, isRoaming, getState, getDetailedState,
getReason, and the TYPE_* constants in ConnectivityManager
along with methods that use them are now stacked on a boat
bound for the other side of the Styx.

Test: no code changes
Bug: 62844794
Change-Id: Idd70763de5b1af5580b4734cd443ac4b570069cc
2018-03-09 16:52:20 +09:00
Chalard Jean
28857b2a31 Deprecate most of NetworkInfo.
getType, getTypeName, isConnectedOrConnecting, isConnected,
isAvaisable, isFailover, isRoaming, getState, getDetailedState,
getReason, and the TYPE_* constants in ConnectivityManager
along with methods that use them are now stacked on a boat
bound for the other side of the Styx.

Test: no code changes
Bug: 62844794
Change-Id: Idd70763de5b1af5580b4734cd443ac4b570069cc
2018-03-09 15:38:25 +09:00
Chad Brubaker
88a4e80cf0 Expose CONNECTIVITY_ACTION to Instant Apps
Test: Broadcast is visible to Instant Apps
Bug: 69421898
Change-Id: I8435e7723cf7a722668b97ff087d1f4453d3e7b7
2018-03-08 10:37:09 -08:00
Pavel Maltsev
fbb48a210f Merge "Minor clean-up in NetworkCapabilities" am: 98dc002acc
am: 6d8274ebf1

Change-Id: Ie6839576f61563f2a82fec53afc42208f5a37f3c
2018-03-07 23:09:04 +00:00
Pavel Maltsev
6d8274ebf1 Merge "Minor clean-up in NetworkCapabilities"
am: 98dc002acc

Change-Id: Ic70f545a4886461f38f1af934600f4e1afe0179f
2018-03-07 23:00:53 +00:00
Treehugger Robot
98dc002acc Merge "Minor clean-up in NetworkCapabilities" 2018-03-07 21:06:59 +00:00
Andreas Gampe
38bc90d5a6 Merge "Connectivity: Fix map access" into pi-dev
am: 1fff4c000d  -s ours

Change-Id: I03b95b31613c6cfd702497e822c5690f78547b21
2018-03-07 05:01:53 +00:00
Andreas Gampe
32323983bf Connectivity: Fix map access
Found by Errorprone.

Bug: 73288226
Test: mmma frameworks/base/services
Merged-In: I1c4b35811c72d389e53e28c3eb1b411009471b92
Merged-In: Ice91ac58257551485231da4664027a281237de4b
Merged-In: I7d2f578b54c69139be8b887a2381ac1b2e0673a3
Change-Id: I63edad58dbc909c1e772bde85a1b9dd98c551fb1
(cherry picked from commit 3ba8106c23cdf518527f75beaabb48bf3182fb4d)
2018-03-07 11:36:57 +09:00
Remi NGUYEN VAN
2e65c25a1d Merge "Allow null subscriberId in NetworkStatsManager." am: 0b9c645be1
am: 2067767d99

Change-Id: I1e4e283c6eaecf33d12488e41e0c524f6ff83954
2018-03-06 19:52:57 +00:00
Andreas Gampe
c826cccc8d Merge "Connectivity: Fix map access" am: da5e6f2b0e
am: 75b5a67cb4

Change-Id: Ice91ac58257551485231da4664027a281237de4b
2018-03-06 19:38:18 +00:00
Remi NGUYEN VAN
2067767d99 Merge "Allow null subscriberId in NetworkStatsManager."
am: 0b9c645be1

Change-Id: I900ac14224284fc3a1422e8791bc54d6a9ee77ba
2018-03-06 19:37:13 +00:00
Andreas Gampe
75b5a67cb4 Merge "Connectivity: Fix map access"
am: da5e6f2b0e

Change-Id: I3c1fea926fda1d70e38746378191100bb825758f
2018-03-06 19:20:32 +00:00
Lorenzo Colitti
c6eac511f4 Merge "Minor cleanups to NetworkStats interface tracking." am: 6455e31b76
am: 4d8eedc35f

Change-Id: Ifa76adb79440b1d97c6cfc637509c0ddaefa76fa
2018-03-06 07:47:11 +00:00
Lorenzo Colitti
4d8eedc35f Merge "Minor cleanups to NetworkStats interface tracking."
am: 6455e31b76

Change-Id: I84aad4b9815196e0362d6adba34359a260853f46
2018-03-06 07:28:20 +00:00
Remi NGUYEN VAN
0b9c645be1 Merge "Allow null subscriberId in NetworkStatsManager." 2018-03-06 06:52:35 +00:00
Treehugger Robot
da5e6f2b0e Merge "Connectivity: Fix map access" 2018-03-06 05:39:39 +00:00
Remi NGUYEN VAN
ccd9b36e7b Allow null subscriberId in NetworkStatsManager.
Use a MATCH_MOBILE_WILDCARD template to avoid filtering by
subscriberId when querying statistics from NetworkStatsService.

Bug: 74038898
Change-Id: I4b39e7031416cb33b23d89aa36ff0f774eaa942f
Fixes: 74038898
Test: runtest frameworks-net, CTS tests pass
2018-03-06 13:28:19 +09:00
Andreas Gampe
c77e9e60ee Connectivity: Fix map access
Found by Errorprone.

Bug: 73288226
Test: mmma frameworks/base/services
Change-Id: I63edad58dbc909c1e772bde85a1b9dd98c551fb1
2018-03-05 17:23:07 -08:00
Lorenzo Colitti
e96e2e221c Minor cleanups to NetworkStats interface tracking.
Currently, when a network goes into CONNECTED state, we call
updateLinkProperties and then notifyIfacesChangedForNetworkStats.
The latter is unnecessary, as there are exactly two cases:

1. networkAgent.linkProperties != null: updateLinkProperties will
   call notifyIfacesChangedForNetworkStats, because oldLp is null
   and networkAgent.linkProperties is not null.
2. networkAgent.linkProperties is null: there is no need to call
   notifyIfacesChangedForNetworkStats, because no interfaces were
   added or removed. When they are, updateLinkProperties will be
   called again.

Removing the call to notifyIfacesChangedForNetworkStats avoids
a stats poll, which is a minor performance improvement.

Also, remove the NetworkStatsService code to do asynchronous
interface updates, since it has no callers.

Bug: 72107146
Test: builds, boots
Test: runtest frameworks-net
Change-Id: I9337ea26c0505a1c66ceda01254b68e25cd7972c
2018-03-05 15:48:23 +09:00
Pavel Maltsev
07aeacfbd5 Merge "Extend network request to query networks w/o capabilites" am: 762a14565b am: 76136de729
am: 60bcd4b9d9

Change-Id: I3bf776767be61577f1bca0d98d4aaf82a0e45336
2018-03-03 00:14:52 +00:00
Pavel Maltsev
60bcd4b9d9 Merge "Extend network request to query networks w/o capabilites" am: 762a14565b
am: 76136de729

Change-Id: Ie0c4fa4648c235589fecd79a25d28f1e62025fb7
2018-03-03 00:03:37 +00:00
Pavel Maltsev
76136de729 Merge "Extend network request to query networks w/o capabilites"
am: 762a14565b

Change-Id: Id1d86938fa2d5aff4dbf9cde87548d80c76674d9
2018-03-02 23:52:18 +00:00
Treehugger Robot
762a14565b Merge "Extend network request to query networks w/o capabilites" 2018-03-02 19:04:31 +00:00
Chalard Jean
0c788ec3df Merge "Give apps with NETWORK_SETTINGS right to see any VPN." am: dce4d4ca32 am: e999899287
am: f6c1bf66ba

Change-Id: I9a9d0eb212f6de105abc070a1eb5ff698b4e67bc
2018-03-02 13:25:02 +00:00
Chalard Jean
f6c1bf66ba Merge "Give apps with NETWORK_SETTINGS right to see any VPN." am: dce4d4ca32
am: e999899287

Change-Id: I7f08217c5abc86a8784b91145f1b02d6693b3919
2018-03-02 13:17:23 +00:00
Chalard Jean
e999899287 Merge "Give apps with NETWORK_SETTINGS right to see any VPN."
am: dce4d4ca32

Change-Id: Iab9c8df6071e6dec35b5f492eb8344ba370e0036
2018-03-02 13:10:45 +00:00