Commit Graph

4986 Commits

Author SHA1 Message Date
Erik Kline
9a30db497c Support bypassing TLS in the framework
This change comprises the following parts:

    [1] android.net.dns.ResolvUtil, containing methods that encapsulate the
        use of the high bit in netids used in DNS resolution contexts.

    [2] Updates to captive portal apps to call the ResolvUtil method that
        enables DNS-over-TLS bypass for the captive portal app process.

Test: as follows
    - builds
    - flashes
    - boots
    - runtest frameworks-net passes
Bug: 64133961
Bug: 72345192

Merged-In: I0994b53d24ed25a2eb9e65429c61cf6fa87c7513
Merged-In: I4c49e23d8caa4d485df1c1d2f135a7282d439c0b
Change-Id: I2072c1f68d6978fa0d7e9d8693135a2c51bb0f87
(cherry picked from commit 2140529d9b8e116d88c2a385a0b3179c2ede5ad7)
2018-04-03 15:36:02 -07:00
Nathan Harold
78fd96e934 Merge "Add AppOps Checks for MANAGE_IPSEC_TUNNELS" into pi-dev
am: 80a2bba9a6

Change-Id: Icd1b2cfc699ab44e4ca536b98298d5b23db7372e
2018-04-03 14:41:56 -07:00
Erik Kline
6f8546b8c3 Merge "Support bypassing TLS in the framework" am: aef9956de2
am: 30f8707244

Change-Id: I0994b53d24ed25a2eb9e65429c61cf6fa87c7513
2018-04-03 14:26:39 -07:00
Erik Kline
30f8707244 Merge "Support bypassing TLS in the framework"
am: aef9956de2

Change-Id: I5b8cc38ec136f10a4e61f7edf7a9b4945b80b595
2018-04-03 14:17:23 -07:00
Nathan Harold
68a7edf1cb Add AppOps Checks for MANAGE_IPSEC_TUNNELS
Adds support for a new AppOp to permit services to
use IpSec tunnel mode. The IpSecService now needs
a context so change the service mode to a cached
service rather than a static service.

Bug: 66955045
Test: runtest frameworks-net
Change-Id: I17a4a286225b432c3e15ea1587d946189931b4f4
2018-04-03 18:23:11 +00:00
Erik Kline
0162dba80d Support bypassing TLS in the framework
This change comprises the following parts:

    [1] android.net.dns.ResolvUtil, containing methods that encapsulate the
        use of the high bit in netids used in DNS resolution contexts.

    [2] Updates to captive portal apps to call the ResolvUtil method that
        enables DNS-over-TLS bypass for the captive portal app process.

Test: as follows
    - builds
    - flashes
    - boots
    - runtest frameworks-net passes
Bug: 64133961
Bug: 72345192

Change-Id: I2072c1f68d6978fa0d7e9d8693135a2c51bb0f87
2018-04-03 00:35:30 -07:00
Erik Kline
fcd878365d [automerger skipped] Merge "Refactor isTetheringSupported() calls" into pi-dev
am: a9a759bea0  -s ours

Change-Id: I2a970420521d9447d71dedb373bcf3098afd3d02
2018-04-02 21:53:07 -07:00
Remi NGUYEN VAN
d3ad25b311 [automerger skipped] Merge "Fix network usage stats on 464xlat tethered." into pi-dev
am: e4bcfd8889  -s ours

Change-Id: I49845b0bc0183d4d1a6c694a70e30a90a9a59759
2018-04-02 20:15:50 -07:00
TreeHugger Robot
a9a759bea0 Merge "Refactor isTetheringSupported() calls" into pi-dev 2018-04-03 02:25:49 +00:00
Erik Kline
126502d506 Refactor isTetheringSupported() calls
Tethering currently wants access to complex isTetheringSupported
logic that is only available in ConnectivityService. Instead of
trying to access that via ConnectivityManager, pass this capability
in to Tethering directly, in the TetheringDependencies object.

Also:
    - ConnectivityManager is only a source of static constants now,
      so "import static" all the constants that are actually used.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net works
    - manual USB towards WiFi tethering works
Bug: 68951715

Merged-In: Ifa121b057f9959ddb980edc940327929e48ea973
Merged-In: Iad6358dc2f1d10b322d22ec90543adc50882962d
Change-Id: Ia64faaadefb4a5d84a50da98bdebd544b6fda101
(cherry picked from commit 465ff3a0c1da8afd5cb13b25ed9a3c95ee0dd2c4)
2018-04-02 16:59:23 -07:00
Remi NGUYEN VAN
e4bcfd8889 Merge "Fix network usage stats on 464xlat tethered." into pi-dev 2018-04-02 23:09:50 +00:00
Pavel Maltsev
2f3f53ee19 Merge "Make addUnwantedCapability method public" into pi-dev
am: 95f4b59348

Change-Id: I6d1676b72f125baf5b72e8718bd331a30b3c3c30
2018-04-02 21:47:22 +00:00
Erik Kline
15ec55e65f Merge "Refactor isTetheringSupported() calls" am: 110d7bfcec
am: 828d955393

Change-Id: Iad6358dc2f1d10b322d22ec90543adc50882962d
2018-04-02 21:08:52 +00:00
Erik Kline
828d955393 Merge "Refactor isTetheringSupported() calls"
am: 110d7bfcec

Change-Id: Iecc4e563f151545facc23f4a24a8dbf2d6ab9822
2018-04-02 20:57:43 +00:00
Chalard Jean
fe455cfc35 Merge "Fix PermissionMonitorTest that has been failing." into pi-dev
am: 6e66280d35

Change-Id: Ifb04fdda2b54b0bde8b6eeead3e0240d5cc1ff79
2018-04-02 20:14:29 +00:00
Remi NGUYEN VAN
3c76aae4f2 [automerger skipped] Merge "Add method to NetworkStatsService for UID stats." into pi-dev
am: d197642ba8  -s ours

Change-Id: I4182b2dfad1f40dd29da8c3612cf0dbc4038aa7b
2018-04-02 19:43:54 +00:00
Treehugger Robot
110d7bfcec Merge "Refactor isTetheringSupported() calls" 2018-04-02 18:47:18 +00:00
Pavel Maltsev
a389a03bd5 Add hasUnwantedCapability method
If you put values into the Builder, you should be able to observe
those values on the built object.

Test: atest android.net.cts.NetworkRequestTest

Bug: 74945408
Bug: 72828388
Change-Id: Ib4026b8d7370d570f1b606f0d221d00fed6e787d
2018-04-02 11:10:13 -07:00
TreeHugger Robot
95f4b59348 Merge "Make addUnwantedCapability method public" into pi-dev 2018-04-02 15:07:25 +00:00
Remi NGUYEN VAN
1720e75aa2 Fix network usage stats on 464xlat tethered.
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage
Merged-In: Ieb25c41c651499fdd01225ae5ac21d95e3d823f5
Merged-In: I016722f3a0ae2ae0a1d48bfacc4fe07ee3578ef7
(cherry-pick of aosp I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda)

Change-Id: Id41cf22a0f9a63cb1832e9375bfb045861f08e52
2018-04-02 13:30:02 +00:00
Chalard Jean
94de1787a4 Fix PermissionMonitorTest that has been failing.
The fail is related to a recent fix to PermissionMonitor
that went into pi-dev only : ag/3799094, which fixed getting
the remote package name for the correct macro user instead of
the default. That fix had broken the test, this change fixes it.

Test: test now passes
Bug: 77315205
Change-Id: I26f8276eafe80478d5fefcff92e7dc2f12128bb4
2018-04-02 07:44:21 +00:00
Remi NGUYEN VAN
d197642ba8 Merge "Add method to NetworkStatsService for UID stats." into pi-dev 2018-04-02 05:40:04 +00:00
Erik Kline
d8840e4fd3 Refactor isTetheringSupported() calls
Tethering currently wants access to complex isTetheringSupported
logic that is only available in ConnectivityService. Instead of
trying to access that via ConnectivityManager, pass this capability
in to Tethering directly, in the TetheringDependencies object.

Also:
    - ConnectivityManager is only a source of static constants now,
      so "import static" all the constants that are actually used.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net works
    - manual USB towards WiFi tethering works
Bug: 68951715

Change-Id: Ia64faaadefb4a5d84a50da98bdebd544b6fda101
2018-03-30 17:24:43 -07:00
Benedict Wong
a8fa528628 [automerger skipped] Merge changes from topic "encap-api" into pi-dev
am: c37a5742a2  -s ours

Change-Id: I19ea85409c7b8653a734e74afc092959e91a0aad
2018-03-30 22:57:46 +00:00
Android Build Merger (Role)
7159712f28 Merge "[automerger skipped] Require explicitly supplied truncation length am: 2e1ebb60e6 -s ours" into pi-dev-plus-aosp 2018-03-30 22:28:59 +00:00
Benedict Wong
cf4230699c [automerger skipped] Require explicitly supplied truncation length
am: 2e1ebb60e6  -s ours

Change-Id: I873ba85ee623a445c2ade21f656bd56e8a0fdeed
2018-03-30 22:28:03 +00:00
Paul Jensen
e63cad65e3 [automerger skipped] Merge "Fix socket leaks in various android.net.Network methods." am: 34ce11f2bd
am: b581818a4b  -s ours

Change-Id: I6da127bed317ba1faf995ebb0236d91774782acb
2018-03-30 22:17:07 +00:00
Paul Jensen
b581818a4b Merge "Fix socket leaks in various android.net.Network methods."
am: 34ce11f2bd

Change-Id: I1a59fced1f3bcd19bd48150ca215093dff431619
2018-03-30 22:03:22 +00:00
Benedict Wong
c37a5742a2 Merge changes from topic "encap-api" into pi-dev
* changes:
  Require explicitly supplied truncation length
  Clarify UDP encapsulation socket API
2018-03-30 20:28:19 +00:00
Paul Jensen
6cdb34183b Fix socket leaks in various android.net.Network methods.
Bug: 72124526
Test: make CtsNetTestCases
Merged-In: I2a2254ce65c2176ae0be1d6276034b1bb0cad987
Merged-In: I23150482d6c2ab2eaa2b37732af68af69320792b
Change-Id: I3398b67272360f894e01a8cdfbc47b17d77c2330
(cherry picked from commit 55eaa09f96)
2018-03-30 12:20:35 -07:00
Pavel Maltsev
5e5bc33153 Merge "Add OEM_PAID capability to system api" into pi-dev
am: 07019bb20f

Change-Id: Ic164c4a29cd449a31b2f1c12c8c345bcc5dc77fa
2018-03-30 18:30:23 +00:00
Jeff Sharkey
c798269988 Merge "API council requested tweaks to NetworkRequest." into pi-dev
am: 93fc2b5049

Change-Id: I0d090ebb7d57689a061badcf593ae9a37d88f7ce
2018-03-30 18:22:13 +00:00
Pavel Maltsev
07019bb20f Merge "Add OEM_PAID capability to system api" into pi-dev 2018-03-30 16:32:52 +00:00
Jeff Sharkey
93fc2b5049 Merge "API council requested tweaks to NetworkRequest." into pi-dev 2018-03-30 16:30:24 +00:00
Paul Jensen
fffa078935 Merge "Fix socket leaks in various android.net.Network methods." into pi-dev
am: f26c5341a5

Change-Id: I2a2254ce65c2176ae0be1d6276034b1bb0cad987
2018-03-30 16:22:51 +00:00
Chalard Jean
ddf7a1446d Merge "Limit the number of routes for performance" into pi-dev
am: dd8a3c78c5

Change-Id: Ida402ad8f864400561bba0e07cfd5fe766ee08bd
2018-03-30 16:10:31 +00:00
Chalard Jean
35805c3f97 Merge "Clarify documentation for getActiveNetworkInfo and friends" into pi-dev
am: 039947df6a

Change-Id: Iab75c8d432ca68031bcf7cbf22baf8269169a908
2018-03-30 16:05:29 +00:00
Remi NGUYEN VAN
8343728e7d [automerger skipped] Merge "Allow null subscriberId in NetworkStatsManager." into pi-dev
am: 38468e9f2f  -s ours

Change-Id: I6e8983cc087a8a42e1404bb5f99bcd297b0ff313
2018-03-30 15:55:32 +00:00
Lorenzo Colitti
729b3b5f1f Merge "Add Network.fromNetworkHandle()" into pi-dev
am: c0b767a937

Change-Id: I22e68ab29982690dee5b2c0c6e1fbd47df0b0326
2018-03-30 14:55:48 +00:00
Remi NGUYEN VAN
ef7e3afa1e 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.
Bug: b/72107146
Merged-In: I31c5b9b4a7c6e72910152415894a137f000a5858
Merged-In: I2527d95000c7500c824ede70f87ecb38e21ed323
(cherry picked from aosp 088ff6824f13145ea52207bdead0d7e454a6f3ce)

Change-Id: Ie80f1bb21124241f3414f9be77aceac9a44ec6d1
2018-03-30 18:58:18 +09:00
TreeHugger Robot
f26c5341a5 Merge "Fix socket leaks in various android.net.Network methods." into pi-dev 2018-03-30 09:47:51 +00:00
Lorenzo Colitti
3754e152e7 Merge "Mark networks with OEM_PAID always restricted" am: dbc568ceaf
am: e019e0e240

Change-Id: I88500f6add4f1a6c8a77eb976a489c11c7dc5b6d
2018-03-30 09:05:09 +00:00
Chalard Jean
e2a49b5b4e Merge "Limit the number of routes for performance" am: 7f5163f453
am: 554f03dc04

Change-Id: I1fcf34b553b4a7cbadd0a2a7bf697140e948243e
2018-03-30 08:58:44 +00:00
Chalard Jean
24b861fa74 Merge "Clarify documentation for getActiveNetworkInfo and friends" am: b1016fbf14
am: bc4e495705

Change-Id: I339bb71182723907ed078e8be739c4d4ea2d1da5
2018-03-30 08:51:38 +00:00
TreeHugger Robot
dd8a3c78c5 Merge "Limit the number of routes for performance" into pi-dev 2018-03-30 08:48:25 +00:00
Lorenzo Colitti
e019e0e240 Merge "Mark networks with OEM_PAID always restricted"
am: dbc568ceaf

Change-Id: I4ffcf01e1f79c8a3570ea2b819688b55904939fe
2018-03-30 08:47:25 +00:00
Chalard Jean
554f03dc04 Merge "Limit the number of routes for performance"
am: 7f5163f453

Change-Id: If4de2779b24560f75a7bb977dbb0f996115a0648
2018-03-30 08:42:42 +00:00
Chalard Jean
bc4e495705 Merge "Clarify documentation for getActiveNetworkInfo and friends"
am: b1016fbf14

Change-Id: I167776fb6ec44aff4b35b58378b54e3b55907427
2018-03-30 08:36:58 +00:00
TreeHugger Robot
039947df6a Merge "Clarify documentation for getActiveNetworkInfo and friends" into pi-dev 2018-03-30 08:22:29 +00:00
Lorenzo Colitti
56d68c37ea Merge "Require explicitly supplied truncation length" am: 2db4d5fbda
am: d78344d704

Change-Id: I347bfd43be54d162dea831770ab08d792ea1443f
2018-03-30 07:45:04 +00:00