Commit Graph

5384 Commits

Author SHA1 Message Date
Chalard Jean
ee5ea78d37 Merge "[PT12] Factor some code into ProxyTracker." am: 665502961c am: a0785d1a0e
am: 42912382fe

Change-Id: I8053a79146621f4e9f29fee42ebb7b6d247356ed
2018-10-11 23:26:37 -07:00
Chalard Jean
42912382fe Merge "[PT12] Factor some code into ProxyTracker." am: 665502961c
am: a0785d1a0e

Change-Id: Ib4509788887df4c5c2ef017eb808a38dea0ae00b
2018-10-11 23:10:48 -07:00
Chalard Jean
a0785d1a0e Merge "[PT12] Factor some code into ProxyTracker."
am: 665502961c

Change-Id: Ib92107f434576d8296ba74aab0d9abfe56cefa7c
2018-10-11 22:55:28 -07:00
Yuuki Habu
addf827426 To support skip464xlat per Network
To add skip464exlat in NetworkMisc.
NetworkAgent can skip to start 464xlat if need.
(e.g. IMS PDN for Cellular can be disabled)

Device will treat the network as IPv6-only if it is set

Bug: 69949375
Test: Nat464XlatTest, ConnectivityServiceTest

Change-Id: I676a02cb92530d64f29f34e89482a934f3ec4553
2018-10-12 14:35:30 +09:00
Chalard Jean
972b3542f2 Merge "Add log for debugging ConnectivityManager" am: 12f8847e40 am: 7a6ad8e2a9
am: a13fd2333b

Change-Id: I23a34c21d05db126d8d2aacdeb700b3d2b2ed018
2018-10-11 21:29:52 -07:00
Chalard Jean
665502961c Merge "[PT12] Factor some code into ProxyTracker." 2018-10-12 04:23:16 +00:00
Chalard Jean
a13fd2333b Merge "Add log for debugging ConnectivityManager" am: 12f8847e40
am: 7a6ad8e2a9

Change-Id: I2d8604c172b26e474050afd45fba74dc6c2c18bc
2018-10-11 21:21:45 -07:00
Chalard Jean
7a6ad8e2a9 Merge "Add log for debugging ConnectivityManager"
am: 12f8847e40

Change-Id: I666e534f42a930a2d0fee55032d7a9e4516349c0
2018-10-11 21:11:51 -07:00
Chalard Jean
12f8847e40 Merge "Add log for debugging ConnectivityManager" 2018-10-12 03:14:48 +00:00
Andreas Gampe
5e277981b1 Merge changes into stage-aosp-master am: c9fae266fb
am: a7045c2863

Change-Id: I33046e52ac1c59f755ef30cbf39203d914ed77c6
2018-10-11 09:32:42 -07:00
Andreas Gampe
3e55c07146 Merge changes into stage-aosp-master am: f4bd5dd297
am: 172249cd40

Change-Id: I30ae82f0c51c2c47474dcfc44de32fea1153a4cf
2018-10-11 09:26:17 -07:00
Andreas Gampe
a7045c2863 Merge changes into stage-aosp-master
am: c9fae266fb

Change-Id: Iee2f5645cbe6122eececc1f0517175daa5b414ed
2018-10-11 09:18:51 -07:00
Andreas Gampe
172249cd40 Merge changes into stage-aosp-master
am: f4bd5dd297

Change-Id: Ic989692175b2763d58d3cbc169919ee24d2ba2d0
2018-10-11 09:13:43 -07:00
Android Build Merger (Role)
c9fae266fb Merge changes into stage-aosp-master 2018-10-11 15:45:44 +00:00
Android Build Merger (Role)
f4bd5dd297 Merge changes into stage-aosp-master 2018-10-11 15:45:44 +00:00
Chalard Jean
bca532143c Merge "[PT11] Move handleDeprecatedGlobalHttpProxy to ProxyTracker" am: 782db99fa1 am: 1c4c870faf
am: b63c1baea4

Change-Id: Ic2f23e9690ada55bb666ca6e88517b68f2e9cb88
2018-10-11 07:06:43 -07:00
Chalard Jean
b63c1baea4 Merge "[PT11] Move handleDeprecatedGlobalHttpProxy to ProxyTracker" am: 782db99fa1
am: 1c4c870faf

Change-Id: Idbb16f8ae3b35f22cbef254c5f20aaf989acaab9
2018-10-11 06:48:47 -07:00
Chalard Jean
1c4c870faf Merge "[PT11] Move handleDeprecatedGlobalHttpProxy to ProxyTracker"
am: 782db99fa1

Change-Id: I91e1a230864f0d5d826c01f91918a35461e2a433
2018-10-11 06:36:29 -07:00
Treehugger Robot
782db99fa1 Merge "[PT11] Move handleDeprecatedGlobalHttpProxy to ProxyTracker" 2018-10-11 12:50:17 +00:00
junyulai
f2c67e4521 Add new callback to inform blocking of network on specific uid.
Currently, apps rely on querying NetworkInfo object to know
whether their network is blocked or not. There is no proactive
way to tell app when it is being blocked/unblocked. The only
event that app would receive is SocketException with
ECONNABORTED when their ongoing socket connection has been
blocked, which is not an elegant way to notify app.

Thus, this commit is trying to address this problem. Therefore,
with the uses of other callbacks, the need of
getState/getDetailedState in NetworkInfo could be completely
eliminated.

Test: runtest frameworks-net
      runtest -x NetworkPolicyManagerServiceTest.java
      cts-tradefed run cts -m CtsHostsideNetworkTests
      cts-tradefed run cts -m CtsNetTestCases -t \
              android.net.cts.ConnectivityManagerTest
Bug: 74575553

Change-Id: Iec96a3103d0aa9a505020eb89d69b89c0b694486
2018-10-11 16:31:10 +08:00
Lorenzo Colitti
5ea1a81e4b Merge "Make setAirplaneMode @SystemApi for SetupWizard." am: 772b75c26d am: c37dffde10
am: ff944740c3

Change-Id: I994f0ff3ad9a3833eb56da7614e3632452d5c476
2018-10-10 23:32:45 -07:00
Lorenzo Colitti
ff944740c3 Merge "Make setAirplaneMode @SystemApi for SetupWizard." am: 772b75c26d
am: c37dffde10

Change-Id: I8049e2484526104eba7fad92d2819eb94319fa84
2018-10-10 20:26:35 -07:00
Lorenzo Colitti
c37dffde10 Merge "Make setAirplaneMode @SystemApi for SetupWizard."
am: 772b75c26d

Change-Id: Ib418ca0a9f8d9be9c4bdc419c9d2ed05aa47a49d
2018-10-10 20:14:03 -07:00
Lorenzo Colitti
0bfef02a24 Make setAirplaneMode @SystemApi for SetupWizard.
Expose ConnectivityManager#setAirplaneMode and the
NETWORK_SETUP_WIZARD permission so that SetupWizard can call
setAirplaneMode.

Delete setAirplaneMode from the greylist because the permissions
checks on it, since at least 2013, have been for a privileged
permission (CONNECTIVITY_INTERNAL) that normal apps don't have.

Test: m
Bug: 115302596
Change-Id: I28f24d32c4b4b386407e9e0e3514ea9f8854f4a8
2018-10-10 17:50:05 +09:00
Soi, Yoshinari
b8102ef4d7 Add log for debugging ConnectivityManager
Add log to ConnectivityManager for better investigations of issue.
This patch adds StackTrace to the following APIs.

reportInetCondition()
reportBadNetwork()
reportNetworkConnectivity()
sendRequestForNetwork()
requestNetwork()
releaseNetworkRequest()
registerNetworkCallback()
unregisterNetworkCallback()

Bug: 116751720
Change-Id: I992292cd9d6f3d69c91ddbde5577591f9ec0f39b
2018-10-10 11:56:04 +09:00
Luke Huang
b913c8165e Network-related commands porting
Test: runtest frameworks-net passes
Test: manual testing of network related function works
Change-Id: Id197d20c80b04378731b113ad74676672bd8b67e
2018-10-09 11:29:02 +08:00
Yan Yan
5c3f5e7484 Merge changes I10c01f2b,Ie05bc535 am: 90a0bdb98a am: e09f9d1a93
am: 51d3eded50

Change-Id: I074056f861332835adaed32ad7d43ed36667ffa3
2018-10-05 12:35:56 -07:00
Igor Murashkin
c25f790c44 Merge changes into stage-aosp-master am: b8480d5bda
am: 10cd239a14

Change-Id: I89aab101881f2b1d835c8c8814336e714fa9ab17
2018-10-05 12:17:40 -07:00
Yan Yan
51d3eded50 Merge changes I10c01f2b,Ie05bc535 am: 90a0bdb98a
am: e09f9d1a93

Change-Id: I5501ba7eb04493b5de84feaeadb53b57de89e8d2
2018-10-05 12:13:20 -07:00
Igor Murashkin
5ef32c9748 Merge changes into stage-aosp-master am: 8b2dc0adc6
am: e0065199ea

Change-Id: Ib857b990a0938889b134228d78a32398a72be102
2018-10-05 12:12:17 -07:00
Igor Murashkin
10cd239a14 Merge changes into stage-aosp-master
am: b8480d5bda

Change-Id: I2aac3fb3b6fa638e9c0cc871a02216ed498df98d
2018-10-05 11:57:18 -07:00
Igor Murashkin
e0065199ea Merge changes into stage-aosp-master
am: 8b2dc0adc6

Change-Id: I63acb13055109fc08fbe77d4dd6ebd68daeaabcd
2018-10-05 11:50:43 -07:00
Yan Yan
e09f9d1a93 Merge changes I10c01f2b,Ie05bc535
am: 90a0bdb98a

Change-Id: I2e55a266f65268ca734c028d4da7add14a281d75
2018-10-05 11:47:12 -07:00
Yan Yan
90a0bdb98a Merge changes I10c01f2b,Ie05bc535
* changes:
  Check to ensure UDP-encap is used only for IPv4
  Add UDP encapsulation tests for IpSecService.
2018-10-05 17:38:41 +00:00
Android Build Merger (Role)
b8480d5bda Merge changes into stage-aosp-master 2018-10-05 17:35:26 +00:00
Android Build Merger (Role)
8b2dc0adc6 Merge changes into stage-aosp-master 2018-10-05 17:35:26 +00:00
Chalard Jean
b3834652f8 Merge "[PT10] Move loadGlobalProxy into ProxyTracker." am: 79822ffb6f am: fa17d29fa9
am: b3ba9ff8ab

Change-Id: I593f1987170b279d57e8d18c380c1f16855f9206
2018-10-05 02:45:09 -07:00
Chalard Jean
b3ba9ff8ab Merge "[PT10] Move loadGlobalProxy into ProxyTracker." am: 79822ffb6f
am: fa17d29fa9

Change-Id: I4220b1964040affa39d8d748095a161b2512eccf
2018-10-05 02:33:45 -07:00
Chalard Jean
fa17d29fa9 Merge "[PT10] Move loadGlobalProxy into ProxyTracker."
am: 79822ffb6f

Change-Id: If5d2eb35f1c990fc6af5747fb2f8e3d55afb7eb9
2018-10-05 02:22:44 -07:00
Chalard Jean
f9d8e07ea0 [PT13] Simple cleanup of ProxyTracker.
ProxyInfo#getPacFileUrl() is guaranteed to return non-null.

Test: runtest
Change-Id: Id206829441f01c6ed4066028de3e1f7fcbe8930b
2018-10-05 16:40:06 +09:00
Chalard Jean
bf650912c6 [PT12] Factor some code into ProxyTracker.
Test: runtest
Change-Id: Ic61ef1e735dcc988cf8fc698b853f3b3be331d8b
2018-10-05 16:40:02 +09:00
Chalard Jean
0933537df9 [PT11] Move handleDeprecatedGlobalHttpProxy to ProxyTracker
This contains a significant logic change : it will load the
deprecated proxy settings synchronously instead of on the next
run loop. I think this is okay because it would happen almost
immediately anyway, and there is nothing in ConnectivityService
that might be changing this setting in the mean time. As for
the possibility that this was executed in the handler because
of possible disk access, I want to point out that the
loadGlobalProxy method that now calls this was already doing
those same similar accesses.

Test: runtest
Change-Id: Idc6f260e2a337689dc274eb758eb00f6a31089bb
2018-10-05 16:39:53 +09:00
Chalard Jean
e4f9bd95ec [PT10] Move loadGlobalProxy into ProxyTracker.
Test: runtest
Change-Id: Id1c57ebb575c8742310be4822ec6e3fa03f487c3
2018-10-05 16:37:38 +09:00
Andrew Solovay
c5decf2a29 [automerger skipped] resolve merge conflicts of a3e34fe9fe4e2a8d0932e574721e5a8b94396c5e to pi-dev-plus-aosp
am: 1ea270c94d  -s ours

Change-Id: I931d622cb2c92d071ba198697a56f9413d9c5dec
2018-10-04 16:48:24 -07:00
Andrew Solovay
1ea270c94d resolve merge conflicts of a3e34fe9fe4e2a8d0932e574721e5a8b94396c5e to pi-dev-plus-aosp
Bug: None
Test: Eyeballed (comment-only change).
Change-Id: Ia644cde66376b2bddeb27bb2a147b3266037aa2c
Exempt-From-Owner-Approval: Docs-only change
Merged-In: Ia06e1fffd814671289a1caebd5962aedc18a28d7
2018-10-04 22:50:39 +00:00
evitayan
e54eee0130 Check to ensure UDP-encap is used only for IPv4
This commit checks if UDP-encapsulation is used
for unsupported address family and throws
IllegalArgumentException when it happens.

Bug: 74213459
Test: Tests added in testCreateTransportModeTransformWithEncap
      and testCreateTunnelModeTransformWithEncap.
      Command: runtest frameworks-net
      Verified on taimen.
Change-Id: I10c01f2bad6aca23430849ea9ef6c1eb157ae131
2018-10-04 11:44:00 -07:00
Andrew Solovay
be99bca44d docs: Replacing {#link with {@link
Several java files had the typo {#link (for cross-references to other
Javadocs) instead of the proper {@link format. This was confusing the
new doc publish tool (Mivi) since that's the format used for {# Django
comments #}.

Fixed a couple of links that had other errors (which prevented building
once the {# -> {@ was done) and other typos.

Replaced throughout the frameworks/base project; I'll need a separate CL
for the AndroidX fixes.

Staged to:

go/dac-stage/reference/android/app/Instrumentation.html
go/dac-stage/reference/android/bluetooth/BluetoothAdapter.html
go/dac-stage/reference/android/bluetooth/BluetoothDevice.html
go/dac-stage/reference/android/bluetooth/BluetoothServerSocket.html
go/dac-stage/reference/android/inputmethodservice/InputMethodService.html
go/dac-stage/reference/android/view/KeyCharacterMap.html
go/dac-stage/reference/android/view/KeyEvent.html
go/dac-stage/reference/android/media/AudioManager.html
go/dac-stage/reference/android/net/wifi/WifiConfiguration.html

(Other files were not in the public Javadocs.)

Bug: 111925950
Test: make ds-docs
Exempt-From-Owner-Approval: Docs-only change
Change-Id: Ia06e1fffd814671289a1caebd5962aedc18a28d7
Merged-In: Ia06e1fffd814671289a1caebd5962aedc18a28d7
2018-10-04 18:20:51 +00:00
Andrew Solovay
f0254b7326 cherry-pick from pi-dev docs: Replacing {#link with {@link
Several java files had the typo {#link (for cross-references to other
Javadocs) instead of the proper {@link format. This was confusing the
new doc publish tool (Mivi) since that's the format used for {# Django
comments #}.

Fixed a couple of links that had other errors (which prevented building
once the {# -> {@ was done) and other typos.

Replaced throughout the frameworks/base project; I'll need a separate CL
for the AndroidX fixes.

(Other files were not in the public Javadocs.)

Bug: 111925950
Test: make ds-docs
Change-Id: Ia06e1fffd814671289a1caebd5962aedc18a28d7
Original Change-Id: Ia06e1fffd814671289a1caebd5962aedc18a28d7
Exempt-From-Owner-Approval: Docs-only change
2018-10-04 18:17:05 +00:00
evitayan
1ab508d361 Add UDP encapsulation tests for IpSecService.
This commit adds tests to ensure that IpSecService properly
handles UDP-encapsulation transforms correctly.

Bug: 76110065
Test: Added: testCreateTransportModeTransformWithEncap,
             testCreateTunnelModeTransformWithEncap.
      Command: runtest frameworks-net
      Verified on taimen.
Change-Id: Ie05bc5354266806c2d03b0b3d73a4696a89eccf2
2018-10-04 10:37:47 -07:00
Leif Hendrik Wilden
36516877fc Merge "Allow wifi and ethenet connected at same time." am: 75e74f759d am: 5b63ccb84f
am: 29238b30fd

Change-Id: I36b924ac20ebe58dc2a522509b83a341994ff480
2018-10-02 11:25:36 -07:00