Commit Graph

5441 Commits

Author SHA1 Message Date
Cody Kesting
a1d9d811a0 Merge "Forward unknown Data Stall types to Connectivity Diagnostics." am: 54d9df0f04 am: 3e0895155f am: a4b2c9a62f am: e496213404 am: d24caf9c5d
Change-Id: I145df9380a84ddfee6b242cc838a81fe0a50c1d9
2020-05-22 00:28:02 +00:00
Cody Kesting
a4b2c9a62f Merge "Forward unknown Data Stall types to Connectivity Diagnostics." am: 54d9df0f04 am: 3e0895155f
Change-Id: I31d17c5c353e822f3d48166ffe9cc39abd31c198
2020-05-21 23:35:38 +00:00
Cody Kesting
3e0895155f Merge "Forward unknown Data Stall types to Connectivity Diagnostics." am: 54d9df0f04
Change-Id: Ifc49eb81c219d1ba036c11887e2bc686a68dd67d
2020-05-21 23:19:30 +00:00
Cody Kesting
44dbde0f6e Forward unknown Data Stall types to Connectivity Diagnostics.
This CL forwards suspected Data Stall events detected with unknown
detection methods to ConnectivityDiagnostics.

Currently, ConnectivityService drops any data stall events with unknown
detection methods, which leads to false negatives for Connectivity
Diagnostics registrants. This change ensures that registrants will still
be notified as NetworkStack is updated to use new detection methods.

The documentation for ConnectivityDiagnosticsManager#DataStallReport is
also updated to reflect that the detection methods included in the
report are a bit mask of detection methods used. Implicitly, this means
that data stalls detected via unknown methods will have an empty bit
mask (0x00).

Bug: 156294356
Test: atest ConnectivityDiagnosticsManager
Change-Id: I62d0bf91fcc17c7921afd519c72551399906bd6b
2020-05-19 10:57:29 -07:00
Benedict Wong
9e18eeb4a6 Merge "Add methods for IKEv2/IPsec test mode profiles" am: f44b90fdc4 am: 8b0b9d8a26 am: d84c77544b am: faea94fccd am: c4b78b72fd
Change-Id: Ica5592c8b02effa49a8d672fb30ee703147e025e
2020-05-15 03:50:20 +00:00
Benedict Wong
d84c77544b Merge "Add methods for IKEv2/IPsec test mode profiles" am: f44b90fdc4 am: 8b0b9d8a26
Change-Id: I353d999ebcdd108a900abfe20be232e83147b6d2
2020-05-15 02:51:43 +00:00
Benedict Wong
8b0b9d8a26 Merge "Add methods for IKEv2/IPsec test mode profiles" am: f44b90fdc4
Change-Id: I9ff22188a641fce6b7bd44f7619d1b825988667a
2020-05-15 02:35:39 +00:00
Benedict Wong
f44b90fdc4 Merge "Add methods for IKEv2/IPsec test mode profiles" 2020-05-15 02:18:02 +00:00
Benedict Wong
63d2bfd257 Add methods for IKEv2/IPsec test mode profiles
This change adds the ability for IKEv2/IPsec VPN profiles to run on Test
Networks. If enabled, the IKEv2/IPsec VPN profiles will request ONLY
test networks.

Bug: 148582947
Test: FrameworksNetTests passing
Test: Added for testing
Change-Id: I2511b39b27a1e29ae97907cdb12728d13fb1628f
2020-05-12 22:55:55 -07:00
Automerger Merge Worker
b06463a002 Merge "Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: 655b811c3d am: 63d8b0ef99" into rvc-dev-plus-aosp am: abd8340a70 am: 7775ebea4a am: f6ea431f94
Change-Id: I287a77da7cfc176a4f159318d8847ba65c093da4
2020-05-12 18:48:04 +00:00
Cody Kesting
35782280a2 Merge "Set owner and administrator UIDs for test networks." am: b54e6b4377 am: 9f62246445 am: b07eaa5015 am: 8b9d02bc50 am: a68878a09d
Change-Id: I4925d5a7f9c4dd063e87b138806a7b562a7390e4
2020-05-12 18:47:10 +00:00
Cody Kesting
89ad5568da Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: 655b811c3d am: 63d8b0ef99
Change-Id: I17839cd271d984f76c203889293cc51375bb8bcb
2020-05-12 17:27:09 +00:00
Cody Kesting
b07eaa5015 Merge "Set owner and administrator UIDs for test networks." am: b54e6b4377 am: 9f62246445
Change-Id: I7af702ff5eafbd0f5bb2247e0debf975e51accd1
2020-05-12 17:26:44 +00:00
Cody Kesting
63d8b0ef99 Merge "Create TestApi for simulating a Data Stall on ConnectivityService." am: 655b811c3d
Change-Id: Ie14ab9cbcf8f7b291fb88f4b4abedab1b5978c3e
2020-05-12 17:10:10 +00:00
Cody Kesting
9f62246445 Merge "Set owner and administrator UIDs for test networks." am: b54e6b4377
Change-Id: I3b1c29b30912c4dddc3524a9a28fb3ad8c3ac318
2020-05-12 17:09:14 +00:00
Cody Kesting
655b811c3d Merge "Create TestApi for simulating a Data Stall on ConnectivityService." 2020-05-12 16:52:35 +00:00
Cody Kesting
b54e6b4377 Merge "Set owner and administrator UIDs for test networks." 2020-05-12 16:52:07 +00:00
Sarah Chin
09a2ff81c7 Merge "Added a new capability for temporarily unmetered network." am: c5c7994da9
Change-Id: I94eb37627875f96c7e70a5df9d273266bc4def66
2020-05-07 06:01:20 +00:00
Jack Yu
de8b8c39e2 Added a new capability for temporarily unmetered network.
Added a new network capability TEMOPORARILY_NOT_METERED to support
the case that a network can temporarily become unmetered. This
allows carriers to deploy unmetered 5G network. When devices
camp on 5G network, this capability will be dynamically added
to the network and will be removed once leaving 5G coverage.

Bug: 153081494
Test: Manual
Change-Id: I10e26cb0852e67f614e7b9c4e49f95e078602e21
Merged-In: I10e26cb0852e67f614e7b9c4e49f95e078602e21
2020-05-06 13:13:45 -07:00
Andrew Sapperstein
23d5746e06 Fix broken @see tags in public documentation. am: 1f6e22cbd8
Change-Id: I04a78c9ba3770a4d651177aae697890094a52add
2020-05-05 21:12:04 +00:00
Treehugger Robot
1ac3746aa8 Merge changes from topic "ctor-refs"
* changes:
  Update inner class constructor refs to use proper syntax.
  Fix broken @see tags in public documentation.
2020-05-05 21:00:06 +00:00
Adrian Roos
16c424fa7d Merge "Suppress existing CallbackMethodName lint" am: 91d1ca097a
Change-Id: I9f7f6cd6fe5f2a27b1993a27128617eea98b2bcc
2020-05-05 14:07:56 +00:00
Adrian Roos
bc04e9c172 Suppress existing CallbackMethodName lint
Bug: 149430296
Change-Id: I787437f0bcb2391064564036c22688132b7450a8
Merged-In: I17258fb333a9bee7eae8ad6488ffeb35dee72ac6
Exempt-From-Owner-Approval: Fixing API lint
2020-05-05 13:38:41 +00:00
Andrew Sapperstein
f181c2f44b Fix broken @see tags in public documentation. am: 8fe35e5f21
Change-Id: Ic95104f61b736d05f18c7465e77951771f39fcbf
2020-05-02 00:36:07 +00:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
Andrew Sapperstein
1f6e22cbd8 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
2020-05-01 00:42:22 +00:00
Andrew Sapperstein
6b1e3188a3 Merge "Fix broken @see tags in public documentation." 2020-05-01 00:27:47 +00:00
Automerger Merge Worker
3b33e6fb35 Merge "Merge "Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied" into rvc-dev am: 767b58716b am: 82c577767e" into rvc-d1-dev-plus-aosp am: cb4807f190 am: 92afdae9bd
Change-Id: I9956cd267a8d1394293c2f52ebc3af2dd559e9fe
2020-04-30 23:27:12 +00:00
Rambo Wang
58384beb21 Merge "Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied" into rvc-dev am: 767b58716b am: 82c577767e
Change-Id: If62e7535d1417ceb0b2869007b87e37b34325972
2020-04-30 22:49:08 +00:00
Rambo Wang
2b79933004 Merge "Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied" into rvc-dev am: 767b58716b
Change-Id: I84be6ef46eb2e99749a86f24304555bff51ebfe6
2020-04-30 22:40:29 +00:00
Rambo Wang
767b58716b Merge "Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied" into rvc-dev 2020-04-30 22:23:13 +00:00
Rambo Wang
c73045e82c Merge "Rename satisfiedBy to canBeSatisfiedBy for MatchAllNetworkSpecifier" am: b86d989fce am: 9544c8a20b am: e4acbd16d6 am: 1bf141dae1 am: 5f5cdb27ec
Change-Id: Ib6de8d56a91183fa20ab840cd17ac14dd825cc9a
2020-04-30 16:33:53 +00:00
Rambo Wang
e4acbd16d6 Merge "Rename satisfiedBy to canBeSatisfiedBy for MatchAllNetworkSpecifier" am: b86d989fce am: 9544c8a20b
Change-Id: I80164890061f1f3ba6900e6f5e73e3bc6fc04b5c
2020-04-30 15:31:31 +00:00
Rambo Wang
9544c8a20b Merge "Rename satisfiedBy to canBeSatisfiedBy for MatchAllNetworkSpecifier" am: b86d989fce
Change-Id: Ia4f99dcf6c86a356c1490b6500dd5e5016ff7257
2020-04-30 15:19:24 +00:00
Rambo Wang
b86d989fce Merge "Rename satisfiedBy to canBeSatisfiedBy for MatchAllNetworkSpecifier" 2020-04-30 15:07:18 +00:00
Rambo Wang
6fc5438dfd Rename satisfiedBy to canBeSatisfiedBy for MatchAllNetworkSpecifier
MatchAllNetworkSpecifier is a subclass of NetworkSpecifer. The method
satisfiedBy should be renamed to canBeSatisfiedBy together with other
subclass of NetworkSpecifer in b/152238712.

Add annotation @Overide for the method to make sure it will not get
ignored when refactor in the future.

Bug: 154956584
Test: atest android.net.MatchAllNetworkSpecifierTest
Change-Id: Ibe32fd50fae43aa635c1c0dad66eaea82011c8b7
2020-04-30 15:06:35 +00:00
Benedict Wong
4fab295446 Add filtering for IPsec algorithms in IKEv2 VPNs
This commit adds support for validating and filtering IPsec algorithms.
Without a public API exposing IKEv2 algorithms (and their respective
public APIs), the allowedAlgorithms can only filter the proposals for
IPsec (Child) SA algorithms.

Additionally, this removes the HMAC_SHA1 from the IKE SA's integrity
algorithm proposals due to insecurity

Bug: 153701879
Test: FrameworksNetTests passing, new tests added
Change-Id: I7e61a1612692db275b751330af5bacbf86836a8c
Merged-In: I7e61a1612692db275b751330af5bacbf86836a8c
(cherry picked from commit 94e1c08a9a)
2020-04-29 23:05:35 -07:00
Andrew Sapperstein
e0624c7a40 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
2020-04-28 12:37:15 -07:00
Benedict Wong
94e1c08a9a Merge "Add filtering for IPsec algorithms in IKEv2 VPNs" am: 7e2fe6eeee am: 331c924374 am: bc03521467 am: c2542125db am: bd109853d9
Change-Id: I60426f87a51f46bbcddf6da911a8df0db03fc0f8
2020-04-28 19:26:15 +00:00
Benedict Wong
bc03521467 Merge "Add filtering for IPsec algorithms in IKEv2 VPNs" am: 7e2fe6eeee am: 331c924374
Change-Id: I7ef93d318b795754eea3511caf7c3ae9187a88b2
2020-04-28 18:17:10 +00:00
Benedict Wong
331c924374 Merge "Add filtering for IPsec algorithms in IKEv2 VPNs" am: 7e2fe6eeee
Change-Id: Ib3e7bea4ad17eaf0b64bc157ed682c672a17f79a
2020-04-28 17:59:07 +00:00
Benedict Wong
7e2fe6eeee Merge "Add filtering for IPsec algorithms in IKEv2 VPNs" 2020-04-28 17:33:46 +00:00
TreeHugger Robot
d3df7540ff Merge "Enforce permission check in getUidStats function" into rvc-dev am: f6288ea881 am: 2fe55ed6d4 am: 6fca71ec1a am: 711f841dfd
Change-Id: Ib264aa6768baf3c4780d8ffc397b0bcf2ad3e159
2020-04-28 10:45:07 +00:00
TreeHugger Robot
6fca71ec1a Merge "Enforce permission check in getUidStats function" into rvc-dev am: f6288ea881 am: 2fe55ed6d4
Change-Id: I99eb5b4bfe193a8415ff01ada0078fff634a200f
2020-04-28 09:53:59 +00:00
TreeHugger Robot
8a68fd2e70 Merge "Enforce permission check in getUidStats function" into rvc-dev am: f6288ea881
Change-Id: I2b7c846497690bfca7b12ad70aa778c785c416a2
2020-04-28 09:30:09 +00:00
TreeHugger Robot
f6288ea881 Merge "Enforce permission check in getUidStats function" into rvc-dev 2020-04-28 09:13:32 +00:00
Cody Kesting
5228aad2c1 Create TestApi for simulating a Data Stall on ConnectivityService.
This change adds a TestApi for simulating a Data Stall to
ConnectivityService. This allows for Data Stalls to be triggered without
having to manipulate the signals used by NetworkMonitor . This also
allows NetworkMonitor to update the ways it detects Data Stalls without
affecting CTS tests for ConnectivityDiagnosticsManager.

Bug: 148032944
Test: atest ConnectivityDiagnosticsManagerTest
Change-Id: Icad439efa2ab4c872c21d3ee6ceaae8c5b49f18d
2020-04-27 20:55:00 -07:00
Cody Kesting
47cf27f64d Set owner and administrator UIDs for test networks.
This change sets the owner and administrator UIDs for test networks when
their initial values match the UID for the app creating the test
network. This ensures that apps registering test networks can only make
themselves owners / administrators of the network.

Bug: 153449964
Test: atest NetworkAgentTest
Change-Id: I3a974700aa1d83cb285295ed1de0aa263e2e5b58
2020-04-27 20:54:57 -07:00
Rambo Wang
0417f6972a Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied
TelephonyNetworkSpecifier will now treat null as matching nothing. When
the request specifies a TelephonyNetworkSpecifier while the network does
not, this should not be treated as a match.

Bug: 154703135
Test: atest android.net.TelephonyNetworkSpecifierTest
Change-Id: I329110e929995c9eae6c6ce33b5414777acea1e1
2020-04-27 14:25:39 -07:00
Chenbo Feng
78cd384e86 Enforce permission check in getUidStats function
The NetworkStatsService.getUidStats() currently doesn't have any
permission check to make sure unpriviledged apps cannot read the stats
of a different uid. It will protentially have security problem since
apps with ACCESS_NETWORK_STATS permission can directly calling into
NetworkStatsService and bypass the check in TrafficStats. Move the uid
check from TrafficStats to NetworkStatsService to fix the problem.

Bug: 129151407
Test: atest AppSecurityTests#testAppFailAccessPrivateData_full
Test: atest AppSecurityTests#testAppFailAccessPrivateData_instant
Test: atest android.app.usage.cts.NetworkUsageStatsTest
Test: atest NetworkStatsBinderTest

Change-Id: Iae85676cfe5f114da69ec278afc2c904bc907234
2020-04-27 18:38:56 +08:00