Commit Graph

4109 Commits

Author SHA1 Message Date
Hugo Benichi
9ec24e7825 Merge "Nat464Xlat: interface notification handler on ConnectivityService" am: 91817b3129 am: 6d5fd71e52 am: f55c1ae9b6
am: 40bb1b693a

Change-Id: I12918d208364eef55067ae9d59fbc38477e1f1c6
2017-08-29 05:53:09 +00:00
Hugo Benichi
40bb1b693a Merge "Nat464Xlat: interface notification handler on ConnectivityService" am: 91817b3129 am: 6d5fd71e52
am: f55c1ae9b6

Change-Id: I9116a493ca1cbdf6a25664a1b0017aa6c9b38eb4
2017-08-29 05:42:07 +00:00
Hugo Benichi
6d5fd71e52 Merge "Nat464Xlat: interface notification handler on ConnectivityService"
am: 91817b3129

Change-Id: I2f002cd197e2eeaaadadd747a6b33d264cd34433
2017-08-29 05:20:32 +00:00
Hugo Benichi
b2d70b403f Nat464Xlat: interface notification handler on ConnectivityService
This patch adds a layer of asynchonicity to the NetworkBaseObserver
callbacks implemented by Nat464Xlat in order to allow these callbacks
to run on the main ConnectivityService handler.

This allows to run interfaceLinkStateChanged and interfaceRemoved
callbacks in the same thread context as other Nat464Xlat methods and
solves the following issues:
  - NPE risk due to race between fixupLinkProperties called on the
    ConnectivityService thread and interfaceRemoved called as a
    callback by NetworkManagementService.
  - stale LinkProperties reads in both callbacks not called on
    ConnectivityService handler.
  - removes the race between stop() and interfaceRemoved().

This patch also:
  - removes/simplifies comments related to the threading
    model which are no obsolete.
  - extract clatd management logic from ConnectivityService into
    NetworkAgentInfo

Bug: 62997041
Bug: 64571917
Test:  runtest frameworks-net
       manually connected to ipv6 network and went to test-ipv6.com
Change-Id: I889d98e47423ff3d4746d6ed8015b265286e7c52
2017-08-29 08:55:18 +09:00
Hugo Benichi
2f7f3a3196 Merge "Nat464Xlat: internal state guards cleanup + state enum" am: aee703e7e4 am: 6d7e12ed6e am: 68c8b4ad5d
am: b6646ba075

Change-Id: Icc1558a0f0e7c299270f550897347458e2bd3188
2017-08-28 23:21:39 +00:00
Hugo Benichi
b6646ba075 Merge "Nat464Xlat: internal state guards cleanup + state enum" am: aee703e7e4 am: 6d7e12ed6e
am: 68c8b4ad5d

Change-Id: Ib04b9a3d56e9daf61b299a30e24a3c8839819a00
2017-08-28 23:12:13 +00:00
Hugo Benichi
6d7e12ed6e Merge "Nat464Xlat: internal state guards cleanup + state enum"
am: aee703e7e4

Change-Id: I188ac4c367db11cb33b67fe92df3a120e3c6fbce
2017-08-28 22:49:50 +00:00
Hugo Benichi
8c23345c6e Merge "Nat464Xlat: clat management cleanup" am: 81b179cfdd am: bd5610af79 am: da71487a59
am: 7f0c130788

Change-Id: Ifccff9f3cfccdb2cdddf2f07561f0787a48bc0f8
2017-08-28 12:35:38 +00:00
Hugo Benichi
7f0c130788 Merge "Nat464Xlat: clat management cleanup" am: 81b179cfdd am: bd5610af79
am: da71487a59

Change-Id: I06661bd6bd1456ba34a3bbdb52c120ac01da9d61
2017-08-28 12:21:10 +00:00
Hugo Benichi
bd5610af79 Merge "Nat464Xlat: clat management cleanup"
am: 81b179cfdd

Change-Id: Ic3808a1afe48efac745b1b378fb12cc5678918ec
2017-08-28 12:01:25 +00:00
Hugo Benichi
adbbac97c5 Nat464Xlat: internal state guards cleanup + state enum
This patch does some cleanup of Nat464Xlat internal state guards
against the Nat464Xlat state Idle | Started | Running, which reduces
code nesting.

It also replaces introspection of internal state for distinguishing
between different stages in 464xlat lifecycle with an enum explicitly
introducing these three Idle | Started | Running states.

Bug: 62997041
Bug: 64571917
Test:  runtest frameworks-net
       manually connected to ipv6 network and went to test-ipv6.com
Change-Id: I6efc9fed2420ca488731a2b9b9c3c025b16eca10
2017-08-28 15:29:27 +09:00
Hugo Benichi
55d8ae3377 Nat464Xlat: clat management cleanup
This patch does some minor refactoring of clat starting/stopping code:
 - remove unused LinkProperties arguments in updateClat
 - remove unused Context argument in Nat464Xlat ctor
 - introduce ensureClatIsStarted and ensureClatIsStopped methods and
   simplify updateClat
 - add clatd to NetworkAgentInfo toString() method
 - clarify some comments

This changes prepare for moving BaseNetworkObserver callbacks to
ConnectivityService.

Bug: 62997041
Bug: 64571917
Test: runtest frameworks-net
      manually connected to IPv6 only network and went to test-ipv6.com
Change-Id: Idb204784614cfe700f73255a7a7b78c5e9ee6eca
2017-08-28 15:29:23 +09:00
Hugo Benichi
60aafd4f98 Merge "Make NetworkManagementServiceTest pass again." am: 29b1826ff2 am: bfe44f641d am: c933ef6c54
am: 2b89a6f05d

Change-Id: I5ec6a8cc3422c1baf107c814f7a60b28fcc71cd5
2017-08-24 04:21:14 +00:00
Hugo Benichi
2b89a6f05d Merge "Make NetworkManagementServiceTest pass again." am: 29b1826ff2 am: bfe44f641d
am: c933ef6c54

Change-Id: Ic39262b1f650695cc6903c3a9e2ddb592d47b365
2017-08-24 04:09:14 +00:00
Hugo Benichi
bfe44f641d Merge "Make NetworkManagementServiceTest pass again."
am: 29b1826ff2

Change-Id: If7fafa0922fdbc499c0c911a3f88ede9c8a26c1d
2017-08-24 03:46:07 +00:00
Lorenzo Colitti
3b43a4a047 Make NetworkManagementServiceTest pass again.
1. Mock the service manager so that NMS can fetch mock versions
   of INetd and IBatteryStats.
2. Call LocalServices.removeServiceForTest to avoid a duplicate
   service registration error. // check this
3. Change the timeout from 100ms to 200ms, as otherwise the tests
   that check for IfaceClass fail.
4. Convert NetworkManagementServiceTest to JUnit 4.
5. Move NetworkManagementServiceTest to tests/net

Bug: 29337859
Bug: 32163131
Bug: 32561414
Bug: 62918393
Test: runtest frameworks-net
Change-Id: Ic7371b427b35809ccd446addf35c9d8ae99ccfd3
2017-08-23 09:49:05 +09:00
Tobias Thierer
928b838edb Merge "Network: Use HttpURLConnectionFactory rather than OkHttp APIs" am: 811e215e2c am: 41ff948711 am: e7776bd372 am: 8f55753777
am: f65e355e1d

Change-Id: I94d4593ff8234c9ee4340b3b2e733ae936177e48
2017-08-22 15:51:15 +00:00
Tobias Thierer
f65e355e1d Merge "Network: Use HttpURLConnectionFactory rather than OkHttp APIs" am: 811e215e2c am: 41ff948711 am: e7776bd372
am: 8f55753777

Change-Id: I1ed6962088be8a0999b81a19d84f5c1c7203dddb
2017-08-22 15:40:30 +00:00
Tobias Thierer
8f55753777 Merge "Network: Use HttpURLConnectionFactory rather than OkHttp APIs" am: 811e215e2c am: 41ff948711
am: e7776bd372

Change-Id: I048a7695ec98711163494e3dedab785e1400d1da
2017-08-22 15:28:07 +00:00
Tobias Thierer
e7776bd372 Merge "Network: Use HttpURLConnectionFactory rather than OkHttp APIs" am: 811e215e2c
am: 41ff948711

Change-Id: I0e15e22f4e1561102012b012cdea74db63ac2163
2017-08-22 15:16:31 +00:00
Baligh Uddin
0dd189632f DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev" am: e811770999 -s ours am: 92363c4e9f -s ours am: c8a6298b3f -s ours
am: 2899590223  -s ours

Change-Id: I061d8aa9e3aa519cd97394bb5e1ad231a6b30762
2017-08-22 15:08:23 +00:00
Tyler Freeman
f15ef5d899 Merge "Merge "DO NOT MERGE ANYWHERE: Manually merge commit 'fd35d7c0a284' into oc-dev-plus-aosp am: 732df7fec9 -s ours" into oc-dr1-dev-plus-aosp am: 6c182d2c61 -s ours" into oc-mr1-dev-plus-aosp
am: d2e9f1df97  -s ours

Change-Id: I89f50ec1f15fc6c78fa033b8de5be48ab286cb72
2017-08-22 15:02:40 +00:00
Tobias Thierer
41ff948711 Merge "Network: Use HttpURLConnectionFactory rather than OkHttp APIs"
am: 811e215e2c

Change-Id: I79db2f0dc0870f71ec21397545e2e6abb5c7142b
2017-08-22 15:00:24 +00:00
Baligh Uddin
756a5719f0 Merge "DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev" am: e811770999 -s ours am: 0a92e1584e -s ours am: a174dd26d3 -s ours" into oc-mr1-dev-plus-aosp
am: edb499aa82  -s ours

Change-Id: I59072d11b99d74f318f46dfb8e46891830424c58
2017-08-22 14:47:58 +00:00
Baligh Uddin
3451cfca77 DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev" am: e811770999 -s ours am: 0a92e1584e -s ours am: 4a46108d0f -s ours
am: 925023b605  -s ours

Change-Id: Ia543610cd2f3a376d24ca6e1df07180f09bd0acf
2017-08-22 14:27:14 +00:00
Tyler Freeman
d793fea361 Merge "DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev am: 27b9dd89db -s ours am: 20eaf1b908 -s ours" into oc-mr1-dev-plus-aosp
am: 1d9e16f218  -s ours

Change-Id: Icb4a80f7b80b56eef5afe130fb7a9b030dfd45e7
2017-08-22 14:21:18 +00:00
Tyler Freeman
144cf4eb40 DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev am: 27b9dd89db -s ours am: 9e41f13ae6 -s ours
am: 5930bf3296  -s ours

Change-Id: Ie6afcc2231fbe22d6b6c944f2c520d0cb36b3fbb
2017-08-22 14:15:48 +00:00
Tobias Thierer
811e215e2c Merge "Network: Use HttpURLConnectionFactory rather than OkHttp APIs" 2017-08-22 14:07:16 +00:00
Baligh Uddin
2899590223 DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev" am: e811770999 -s ours am: 92363c4e9f -s ours
am: c8a6298b3f  -s ours

Change-Id: I829fae0c18276ef1da54fe537682e0480a02141a
2017-08-21 23:48:39 +00:00
Baligh Uddin
c8a6298b3f DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev" am: e811770999 -s ours
am: 92363c4e9f  -s ours

Change-Id: I1a912ffd002f35c31fe5a2cd47cb43cc7a66d2aa
2017-08-21 23:33:54 +00:00
Baligh Uddin
92363c4e9f DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev"
am: e811770999  -s ours

Change-Id: I9493ada35e2b660ffdf73793e621f4b295778d63
2017-08-21 22:57:31 +00:00
Tyler Freeman
f39d498050 Merge "DO NOT MERGE ANYWHERE: Manually merge commit 'fd35d7c0a284' into oc-dev-plus-aosp am: 732df7fec9 -s ours" into oc-dr1-dev-plus-aosp
am: 6c182d2c61  -s ours

Change-Id: Ia10b79b49d7e95bb8f2aa821d3678c067b469d1b
2017-08-21 22:16:03 +00:00
Android Build Merger (Role)
edb499aa82 Merge "DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev" am: e811770999 -s ours am: 0a92e1584e -s ours am: a174dd26d3 -s ours" into oc-mr1-dev-plus-aosp 2017-08-21 22:11:17 +00:00
Baligh Uddin
925023b605 DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev" am: e811770999 -s ours am: 0a92e1584e -s ours
am: 4a46108d0f  -s ours

Change-Id: I1b97453948c89854c0bea0c4f18fba3e400e506c
2017-08-21 22:06:46 +00:00
Baligh Uddin
1135272742 DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev" am: e811770999 -s ours am: 0a92e1584e -s ours
am: a174dd26d3  -s ours

Change-Id: I3d887f884e45a2c947972317fecd44c763d72ca2
2017-08-21 22:06:44 +00:00
Android Build Merger (Role)
1d9e16f218 Merge "DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev am: 27b9dd89db -s ours am: 20eaf1b908 -s ours" into oc-mr1-dev-plus-aosp 2017-08-21 22:02:54 +00:00
Android Build Merger (Role)
6c182d2c61 Merge "DO NOT MERGE ANYWHERE: Manually merge commit 'fd35d7c0a284' into oc-dev-plus-aosp am: 732df7fec9 -s ours" into oc-dr1-dev-plus-aosp 2017-08-21 22:02:00 +00:00
Tyler Freeman
2b1ce8b6ef DO NOT MERGE ANYWHERE: Manually merge commit 'fd35d7c0a284' into oc-dev-plus-aosp
am: 732df7fec9  -s ours

Change-Id: I8d58d5898771aaee6729225efff0389dd8c6c1ca
2017-08-21 21:57:57 +00:00
Tyler Freeman
2436bba07d DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev am: 27b9dd89db -s ours
am: 20eaf1b908  -s ours

Change-Id: I53cac7860d8a3da2ced232b7c429034ec6d0b746
2017-08-21 21:57:56 +00:00
Tyler Freeman
5930bf3296 DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev am: 27b9dd89db -s ours
am: 9e41f13ae6  -s ours

Change-Id: Idc2508e760020c4933d69c307cc27747c8c4e06d
2017-08-21 21:52:56 +00:00
Baligh Uddin
4a46108d0f DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev" am: e811770999 -s ours
am: 0a92e1584e  -s ours

Change-Id: I3bc8768f4790abe57ed64bb516db5dadd9a7dd9c
2017-08-21 21:52:56 +00:00
Baligh Uddin
a174dd26d3 DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev" am: e811770999 -s ours
am: 0a92e1584e  -s ours

Change-Id: Ie8381ac10bdab3e6ac56a37bd98583e03ea15451
2017-08-21 21:52:52 +00:00
Tyler Freeman
20eaf1b908 DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev
am: 27b9dd89db  -s ours

Change-Id: I6ac35f90d62b08cb6cae66b9ed001265a7496aea
2017-08-21 21:41:25 +00:00
Tyler Freeman
9e41f13ae6 DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev
am: 27b9dd89db  -s ours

Change-Id: I055554715c9ea2095926a01fa539c20bb6dd67f3
2017-08-21 21:41:22 +00:00
Baligh Uddin
0a92e1584e DO NOT MERGE ANYWHERE Revert "Merge "Remove gender-specific pronouns from documentation" into oc-dev"
am: e811770999  -s ours

Change-Id: Ida80fe80780bf4f811aa54e0163f5c936f4d16a6
2017-08-21 21:40:53 +00:00
The Android Automerger
732df7fec9 DO NOT MERGE ANYWHERE: Manually merge commit 'fd35d7c0a284' into oc-dev-plus-aosp
BUG:64864568
2017-08-21 21:34:43 +00:00
The Android Automerger
27b9dd89db DO NOT MERGE ANYWHERE Manually merge commit 'fd35d7c0a284' into oc-dr1-dev
BUG:64864568
2017-08-21 21:28:42 +00:00
Hugo Benichi
072b80a6f7 Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities" into oc-mr1-dev am: 39b6912019 -s ours
am: d283e9c344  -s ours

Change-Id: I3bbeb7e326b3b009634e862248d961a07116796f
2017-08-21 03:54:02 +00:00
Hugo Benichi
d283e9c344 Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities" into oc-mr1-dev
am: 39b6912019  -s ours

Change-Id: If31043a227aa3cdb751f1e14c3bf8de811133b57
2017-08-21 03:38:20 +00:00
Hugo Benichi
39b6912019 Merge "Really allow NetworkAgent immutable updates to NetworkCapabilities" into oc-mr1-dev 2017-08-21 03:24:06 +00:00