Commit Graph

4488 Commits

Author SHA1 Message Date
Xiangyu/Malcolm Chen
b3f0c30231 Merge changes from topic "135105735" into qt-r1-dev am: 896cdfa547
am: dbb897ee22

Change-Id: I02bdf3635298cc331e5b3bd794df772b759463ab
2019-07-12 11:03:22 -07:00
Xiangyu/Malcolm Chen
dbb897ee22 Merge changes from topic "135105735" into qt-r1-dev
am: 896cdfa547

Change-Id: Ie661fdc8a29645fa1b319cf1db8a896a8d21deae
2019-07-12 10:43:52 -07:00
Malcolm Chen
07fcb5bb24 Use new API to get mergedSubscriberIds based on grouping.
In addition, make mMergedSubscriberIds a list to fit usage of multi-SIM
devices.

Bug: 135105735
Bug: 137137221
Test: manual
Change-Id: I364262559789112f35b88f4c298463bf4af2e82a
2019-07-11 13:19:54 -07:00
Fedor Kudasov
a504224109 Merge "Return NonNull and other imports" into stage-aosp-master am: ee24c6da27 am: 6619c84f7f
am: 431d4415e0

Change-Id: Ic66313bca08673e7bec89547d47cb435202530d5
2019-07-09 07:55:46 -07:00
Fedor Kudasov
c064c84b5f Return NonNull and other imports
Change-Id: Ia38b13209b45d8228ac02f06663e4dc12be9de60
2019-07-09 14:19:04 +00:00
Fedor Kudasov
e202d97a97 Merge changes from topic "fix_master_build" am: 2e5319117a am: 8125047183 am: 95cc083588
am: 10fbf5b18a

Change-Id: Ic58f839b76369b9adcef2a17da289c1b8c2fd0ca
2019-07-09 06:53:38 -07:00
Fedor Kudasov
8125047183 Merge changes from topic "fix_master_build"
am: 2e5319117a

Change-Id: If49999e7ce6149e847a678b03ccf8b4549f8365b
2019-07-09 06:10:01 -07:00
Fedor Kudasov
559e91e0ef Revert "Cherry-pick the relevant parts of master change"
This reverts commit dd16d44fe8.

Reason for revert: multiple build breakages b/137069068

Change-Id: If48bfa2d2cab0877a053743b3ec53820d0c4ed6b
2019-07-09 09:29:17 +00:00
Fedor Kudasov
e5cb0a2216 Revert "Remove providesRoutesToMostDestinations."
This reverts commit d85b09a06f.

Reason for revert: multiple build breakages b/137069068

Change-Id: I60a4f71e13fe82f970b177a07c0b58439cbc64ff
2019-07-09 09:23:25 +00:00
Chalard Jean
6365796fab Merge changes Ia43f8811,I7de4f672 am: 3ef04b8e3c am: cbaed4e7ba am: 40b8170b09
am: c900f7e69b

Change-Id: Ie13685fab53fb7f2482b9cf0a3294ccb284b71bd
2019-07-09 01:29:24 -07:00
Chalard Jean
cbaed4e7ba Merge changes Ia43f8811,I7de4f672
am: 3ef04b8e3c

Change-Id: Ifcacd81d343a29b17fdb79f4c8b54c89a293a2b8
2019-07-09 00:56:57 -07:00
Chalard Jean
d85b09a06f Remove providesRoutesToMostDestinations.
This function is not used any more.

Test: FrameworksNetTests
Change-Id: Ia43f8811cb9d575e16735b0f4b76d91e7cd42ebc
2019-07-08 20:36:33 +09:00
Chalard Jean
dd16d44fe8 Cherry-pick the relevant parts of master change
I566437e4fe10e1346858149120c50b3c20ca073f to avoid a conflict

Test: atest FrameworksNetTests
Change-Id: I7de4f67234bf97d58bddffa22272c7670398f56d
2019-07-08 20:25:45 +09:00
Lorenzo Colitti
a86f18783f Merge "Unit tests for new explicitlySelected behaviour." am: d1379a4a80 am: 10c1a704c0 am: 736194dfbf
am: 210310427d

Change-Id: Ib289e1c933f34b2712258a258cc312342d9005c3
2019-06-29 02:31:48 -07:00
Lorenzo Colitti
736194dfbf Merge "Unit tests for new explicitlySelected behaviour." am: d1379a4a80
am: 10c1a704c0

Change-Id: Id77a5d6a58e7ab4fdaa0b7c15b824270863b83fd
2019-06-29 02:01:55 -07:00
Lorenzo Colitti
b5ad613839 Unit tests for new explicitlySelected behaviour.
ag/7905088 added the ability to pass in acceptUnvalidated without
passing in explicitlySelected. Add unit tests for that code.

While I'm at it, convert a couple of "== 1"s to toBool(), and
update the comments in NetworkAgent.

Bug: 130766237
Test: atest FrameworksNetTests
Change-Id: I6b550bd621e3596975f83464c7b4b8a14269120b
2019-06-28 23:57:22 +09:00
Lorenzo Colitti
bc0842ef8a Merge "Remove all static members from NetworkStatsFactory." am: 63f94f411b am: 5409264cee am: e6e57b2c8f
am: ad7a77e39f

Change-Id: I83c93bb4fbd0302fe31c38a1dcbf6691d0043be3
2019-06-27 20:14:02 -07:00
Lorenzo Colitti
e6e57b2c8f Merge "Remove all static members from NetworkStatsFactory." am: 63f94f411b
am: 5409264cee

Change-Id: Iada14a1fea74197014e75a1112c7a5b35d6b1a1d
2019-06-27 19:40:01 -07:00
Neil Fuller
b167ed32d7 Merge "Track change of type from short -> int" am: d854e6e0b4 am: 9881c6f3d7 am: 8a334f433b
am: 0c4d852cf4

Change-Id: Ib39e8d6e53e194fb625539b61dfd4df5440cc1c2
2019-06-27 12:25:45 -07:00
Neil Fuller
8a334f433b Merge "Track change of type from short -> int" am: d854e6e0b4
am: 9881c6f3d7

Change-Id: Iab8db7985b5cdd52b22aa2b72e3273c2d8f2f892
2019-06-27 02:43:34 -07:00
Lorenzo Colitti
4aa8760a68 Remove all static members from NetworkStatsFactory.
NetworkStatsFactory is owned by NetworkStatsService, and any
accesses to NSF data should go through NSS.

Test: atest FrameworksNetTests
Change-Id: Idbd0dbbaeb11313f63474e7ec0e01f974349fc89
2019-06-27 17:39:05 +09:00
Neil Fuller
d854e6e0b4 Merge "Track change of type from short -> int" 2019-06-27 08:26:31 +00:00
Lorenzo Colitti
f80234a9b0 Merge changes If7d41052,I66f263d7,Id45ae956,Iba752fed,I575a7e4f, ... into qt-r1-dev
* changes:
  Inline readNetworkStatsDetailInternal, make mUseBpfStats final
  Remove VPN info arrays from NetworkStats(Observer|Recorder)
  NetworkStatsFactory: Take VPNs into account for network/battery stats
  Remove duplicate line in clat_simple test file
  Remove unused lastStats parameter
  Revert "Revert "Take all VPN underlying networks into account when migrating traffic for""
2019-06-24 03:37:23 +00:00
Benedict Wong
c9511e7525 NetworkStatsFactory: Take VPNs into account for network/battery stats
This change fixes detailed UID stats to ensure network and battery stats
both take VPNs into account. NetworkStatsFactory is being made aware of
VPNs enabled, and the full set of underlying networks present.

Since traffic can only be migrated over a NetworkStats delta, NSF
maintains a NetworkStats snapshot across all UIDs/ifaces/tags.

This snapshot gets updated whenever NSF records a new snapshot
(based on various hooks such as VPN updating its underlying networks,
network getting lost, etc.), or NetworkStatsService's
getDetailedUidStats() method being called.

This change widens the scope of the existing mPersistentSnapshot lock,
renaming it to mPersistentDataLock, and ensures that TUN migrations are
not done in parallel. Additionally, mVpnInfos is updated via
pointer-swapping, to reduce the scope of the mPersistentDataLock.

The safety of this change is predicated on:
1. NetworkStatsFactory lock not held, so services cannot deadlock through
the cyclical lock.

2. The broadening of the scope of the lock in NetworkStatsFactory has no
threading implications, as it is always the last (leaf node) lock held,
and therefore is impossible to have lock inversion.

Additionally, to ensure VPNs work with 464xlat, the VPN info passed to
the NetworkStatsFactory includes all underlying interfaces, instead of
only passing the first one.

This (partially) re-applies changes from:
aosp/972848: Add one more test for VPN usage stats.
aosp/972847: Addressing comments for http://ag/7700679.
aosp/885338: NetworkStatsService: Fix getDetailedUidStats to take VPNs
             into account.
Co-developed with: Varun Anand <vaanand@google.com>

Bug: 113122541
Bug: 120145746
Bug: 129264869
Bug: 134244752
Test: FrameworksNetTest passing
Test: Manual tests show data usage fixes maintained.
Merged-In: I6466ec1411fc5ed6954125d27d353b6cd1be719e
Change-Id: Id45ae956ad7165be346ecc010e17d260563ac1c0
(cherry picked from commit 9fbbdebc61)
2019-06-21 01:12:27 +00:00
Benedict Wong
edcd5ad555 Revert "Revert "Take all VPN underlying networks into account when migrating traffic for""
This reverts commit d8220c2050.

Reason for revert: Fix available for deadlocks.

Bug: 113122541
Bug: 134244752
Merged-In: Ib65214598837289bd39dbf040b56ab7835f893ba
Change-Id: Ia90bf2c72ef686e80800d113d03548e0efcadb66
(cherry picked from commit a84d9fa572)
2019-06-21 01:09:49 +00:00
Neil Fuller
2350886e09 Merge "Switch to a single PacketSocketAddress constructor" am: 2d24f7a39e am: a357696c2f am: 9ec43cc7fe
am: dcf7d6e377

Change-Id: I999d61e1086f9a1cfcf9cf38522eb4c2779b607c
2019-06-20 14:42:30 -07:00
Chalard Jean
aa0d4adc2b Merge "Factorize custom asserts." am: 6c176efa3d am: 99fbb40990 am: f1eab99357
am: bef7ff11e2

Change-Id: I1eecc5dd9f8c77287b8cca76f5d647a23a9a2f7a
2019-06-20 14:29:43 -07:00
Neil Fuller
9ec43cc7fe Merge "Switch to a single PacketSocketAddress constructor" am: 2d24f7a39e
am: a357696c2f

Change-Id: I7db11188d9dd42e25b0aebd79acc92a9ba2f56a0
2019-06-20 14:06:50 -07:00
Chalard Jean
f1eab99357 Merge "Factorize custom asserts." am: 6c176efa3d
am: 99fbb40990

Change-Id: I65ea7497abb8b77ebd10ba622075ef3b6c49b2a8
2019-06-20 14:01:31 -07:00
Neil Fuller
f8d8fc1247 Track change of type from short -> int
Remove (now) unnecessary cast: PacketSocketAddress
uses ints.

Bug: 124232146
Bug: 135660232
Test: build only
Change-Id: Ifa99e0d2e970f1b8f605afe8a394c4f575bc6eca
2019-06-20 17:09:40 +01:00
Neil Fuller
2d24f7a39e Merge "Switch to a single PacketSocketAddress constructor" 2019-06-20 14:09:15 +00:00
Neil Fuller
6ae89f2f9c Switch to a single PacketSocketAddress constructor
Switch to a single PacketSocketAddress constructor to
avoid multiple unnecessary overloads in the
Core Platform API.

Bug: 133196453
Bug: 124232146
Test: build only
Change-Id: I30533ac3aa99c2cd09e8c624fedf6000b0f52c11
2019-06-20 09:24:43 +01:00
Chalard Jean
9c0ff1b005 Factorize custom asserts.
Also a few utilities that were in the way, and some opportunistic
cleanups.

Test: FrameworksNetTest NetworkStackTest
Change-Id: I385070e2044fd967cb18f1ffea9a86a4627b742e
2019-06-20 16:24:25 +09:00
Junyu Lai
544e00d382 Merge "Move the test of minimum supported keepalive slots to CTS" into qt-dev 2019-06-20 05:35:07 +00:00
Junyu Lai
a248130fc9 Correct value of supported keepalive count for cellular
Cellular only supports 1 keepalive connection so correct the default
supported value to 1.

Bug: 134037217
Bug: 134352656
Test: - atest FrameworksNetTests
      - atest android.net.cts.ConnectivityManagerTest \
        #testSocketKeepaliveLimitTelephony

Merged-In: Ia3761f2e78d54866bb2e156d58004396bbc8adc3
Change-Id: If833b813ba00eeff913160598f1ea9c74e6e35d8
(cherry picked from commit 680abbb591)
2019-06-20 04:02:38 +00:00
Junyu Lai
70c06b5e52 Move the test of minimum supported keepalive slots to CTS
This change also enables log when keepalive is started.

Bug: 134352656
Test: 1. atest android.net.cts.ConnectivityManagerTest#testSocketKeepaliveLimitTelephony
      2. atest FrameworksNetTests
Merged-In: I408750fa0bceb0c1c26afb5fead4e44fb824fbc1
Change-Id: Ib9b06d3458782a648a2f5b8fd5a9ca1d34bd11f9
(cherry picked from commit aed835f086)
2019-06-20 02:26:58 +00:00
Junyu Lai
f4d70dc9e3 Merge "Move the test of minimum supported keepalive slots to CTS" am: 579a99e558 am: 6ff00fee75 am: aed835f086
am: d2098f84d0

Change-Id: I13f47ed986756933172886d7e0c9b5d653fc34e7
2019-06-19 07:44:59 -07:00
Junyu Lai
c399dc1fb0 Merge "Correct value of supported keepalive count for cellular" am: 68a4599a37 am: 056eeae27c am: 680abbb591
am: 734d90759a

Change-Id: I621066b8c4cd9b244b4d70f84d428b5b784e0387
2019-06-19 07:44:39 -07:00
Junyu Lai
aed835f086 Merge "Move the test of minimum supported keepalive slots to CTS" am: 579a99e558
am: 6ff00fee75

Change-Id: Ib9b06d3458782a648a2f5b8fd5a9ca1d34bd11f9
2019-06-19 07:29:11 -07:00
Junyu Lai
680abbb591 Merge "Correct value of supported keepalive count for cellular" am: 68a4599a37
am: 056eeae27c

Change-Id: If833b813ba00eeff913160598f1ea9c74e6e35d8
2019-06-19 07:28:53 -07:00
Junyu Lai
579a99e558 Merge "Move the test of minimum supported keepalive slots to CTS" 2019-06-19 14:08:31 +00:00
Junyu Lai
68a4599a37 Merge "Correct value of supported keepalive count for cellular" 2019-06-19 14:08:31 +00:00
junyulai
edde28b709 Move the test of minimum supported keepalive slots to CTS
This change also enables log when keepalive is started.

Bug: 134352656
Test: 1. atest android.net.cts.ConnectivityManagerTest#testSocketKeepaliveLimitTelephony
      2. atest FrameworksNetTests
Change-Id: I408750fa0bceb0c1c26afb5fead4e44fb824fbc1
2019-06-19 16:25:19 +08:00
Chalard Jean
449b9c378c Remove the <= P restriction for WIFI_P2P
This is still sent in an intent.

Bug: 131764329
Fixes: 131764329
Merged-In: I56c86b0c1912064d5a642991df32d2cefb6a8d5b
Change-Id: I64b9d632be97dc51e6085162371bb8c19f410258
(cherry picked from commit e546cb0bd16b7359feeb3c46ba52e64cf91ae4d3)
2019-06-18 06:15:58 +00:00
TreeHugger Robot
0c0d9bd53d Merge "Flatten Uri.AbstractPart.Representation." 2019-06-17 18:13:39 +00:00
Varun Anand
2135806a00 Merge changes Ieb8645ac,I6466ec14,I87deb82b,I995b108e,Ib6521459 am: f4c10e8bc2 am: 48f59a0fdf am: 2471441b2d
am: 8775b0a135

Change-Id: I8415a7c91158cce99e91e6054ed4f40e44563b89
2019-06-17 10:59:29 -07:00
Varun Anand
2471441b2d Merge changes Ieb8645ac,I6466ec14,I87deb82b,I995b108e,Ib6521459 am: f4c10e8bc2
am: 48f59a0fdf

Change-Id: I960e94b03b29282ae2b03f78a19ed2692bd88e05
2019-06-17 10:33:53 -07:00
Varun Anand
f4c10e8bc2 Merge changes Ieb8645ac,I6466ec14,I87deb82b,I995b108e,Ib6521459
* changes:
  Remove VPN info arrays from NetworkStats(Observer|Recorder)
  NetworkStatsFactory: Take VPNs into account for network/battery stats
  Remove duplicate line in clat_simple test file
  Remove unused lastStats parameter
  Revert "Revert "Take all VPN underlying networks into account when migrating traffic for""
2019-06-17 15:56:24 +00:00
Chalard Jean
88a98dec60 Merge "Remove the <= P restriction for WIFI_P2P" am: 4e8973e9a8 am: bb754c9c8d am: b199795653
am: cd8755aa9e

Change-Id: I78bc539eb0504473f67914414b8bf062dee093b4
2019-06-17 08:43:32 -07:00
Chalard Jean
b199795653 Merge "Remove the <= P restriction for WIFI_P2P" am: 4e8973e9a8
am: bb754c9c8d

Change-Id: I14f5865249740587d550ac31b59883f4a87fd4a1
2019-06-17 08:20:18 -07:00