Commit Graph

394 Commits

Author SHA1 Message Date
Junyu Lai
6bf64c655b Merge "Expose netId by adding getter API" into rvc-dev am: cf99dc2717
Change-Id: I826f8a561b2bd0f456302247f90d26ffc42c42df
2020-03-20 11:23:27 +00:00
Chalard Jean
1f83e37fa1 Create a builder for NetworkCapabilities. am: db3d568139
Change-Id: I3d7a595d25b65ff4f5762c83a3dfc82c0f5ddc2d
2020-03-20 11:08:52 +00:00
Junyu Lai
cf99dc2717 Merge "Expose netId by adding getter API" into rvc-dev 2020-03-20 11:03:05 +00:00
Paul Hu
42cfc3f5aa Merge "[TNU1.1] Update tethering notification strings" am: 7f69e09d79 am: cb2d2f984c
Change-Id: Ia0584cab00f0ca5e76f6cde337630153c86524c7
2020-03-20 09:04:40 +00:00
Paul Hu
cb2d2f984c Merge "[TNU1.1] Update tethering notification strings" am: 7f69e09d79
Change-Id: I2b47fc153faeaf63a29b19d9773fb29b305fe2c8
2020-03-20 08:46:24 +00:00
TreeHugger Robot
3a26ae0f66 [automerger skipped] Merge "[TNU1.2] Add string for client number notification" into rvc-dev am: 07bb07217a -s ours
am skip reason: Change-Id Icc4e59ce3b2d8d4c1c7883c2f9d040d3ce563f09 with SHA-1 1957e6a0fb is in history

Change-Id: I6c0eb4be6df9061dad68ecc20813ec379cb5b828
2020-03-20 00:17:17 +00:00
TreeHugger Robot
07bb07217a Merge "[TNU1.2] Add string for client number notification" into rvc-dev 2020-03-20 00:11:33 +00:00
Kumar Anand
74165f0b29 [TNU1.1] Update tethering notification strings
Update string for no upstream and cellular roaming notification.

Bug: 145629001
Bug: 147818698
Test: atest TetheringTests
Change-Id: I7302cf351b0a9a42ad5a543f61ab084de189f282
2020-03-19 15:57:33 -07:00
TreeHugger Robot
0917986560 [automerger skipped] Merge "Release the interface request when Ethernet tethering is stopped." into rvc-dev am: e8d1d95abd -s ours
am skip reason: Change-Id Iaf85e800569f2e08c39f7ebb96f8aa34f6e53133 with SHA-1 d44de5a624 is in history

Change-Id: I92ddb40ed68a9aae85e5d402640fbade987e1369
2020-03-19 19:27:13 +00:00
Mark Chien
f282bd31ff [automerger skipped] Merge "TetheringManager API clean up" am: 9bfe7f7b3e am: 62be3f6a96 -s ours
am skip reason: Change-Id Idd041f0fbeca411ea23e49786a50dd7feb77ef45 with SHA-1 f1332573bb is in history

Change-Id: I3b914d7ea26dacf4e7cbebd0494d4c4c0b520c8c
2020-03-19 16:28:38 +00:00
Treehugger Robot
705fc8ae95 [automerger skipped] Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" am: 2dd2453ae0 am: cc2fb141f3 -s ours
am skip reason: Change-Id I87ef1d451eefa6998b9793c4eacabae978376d24 with SHA-1 ac580f9826 is in history

Change-Id: Ie5db8cb976a15fa9f16a8cc76a43f7d9a0ba9761
2020-03-19 16:28:12 +00:00
Mark Chien
62be3f6a96 Merge "TetheringManager API clean up" am: 9bfe7f7b3e
Change-Id: I93e9bb5f596fff27de236b56cf21f9edb3c0204a
2020-03-19 16:17:27 +00:00
Treehugger Robot
cc2fb141f3 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" am: 2dd2453ae0
Change-Id: If0000228b44b9f379c6e1499d7d86d7738889ee2
2020-03-19 16:16:58 +00:00
Mark Chien
9bfe7f7b3e Merge "TetheringManager API clean up" 2020-03-19 16:09:21 +00:00
Treehugger Robot
2dd2453ae0 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" 2020-03-19 15:51:32 +00:00
Treehugger Robot
4f0eb16c41 Release the interface request when Ethernet tethering is stopped.
When the Ethernet interface becomes unavailable (e.g., because
the cable was unplugged or the interface was removed), or when
setEthernetTethering(false) is called, release the Ethernet
interface request.

This ensures that:
- The Ethernet interface immediately becomes available for use in
  client mode.
- If an interface later becomes available, tethering is not
  automatically started. This is consistent with what happens for
  other downstream types such as wifi and USB. Evey time one of
  those downstreams goes down, tethering is stopped and will not
  be restarted.

Test: manual
Bug: 148824036
Change-Id: Iaf85e800569f2e08c39f7ebb96f8aa34f6e53133
Merged-In: Iaf85e800569f2e08c39f7ebb96f8aa34f6e53133
(cherry picked from commit e54c92e5657abe2ce5da9dcba76b89c5e540cc44)
2020-03-19 15:40:40 +00:00
Treehugger Robot
a85874d67a Merge "Release the interface request when Ethernet tethering is stopped." am: 0cc7c00396 am: beac7a732f
Change-Id: I448662a926fe797f30fe45a9de5072023fb769a6
2020-03-19 15:23:45 +00:00
Treehugger Robot
beac7a732f Merge "Release the interface request when Ethernet tethering is stopped." am: 0cc7c00396
Change-Id: Ia0491c302528ce0a727c1ffa77a1fc3a7508f601
2020-03-19 15:08:46 +00:00
Mark Chien
e3979608db Merge "Hide startTethering with type function to module-lib only" into rvc-dev am: 69a60ca655
Change-Id: If4fc10359b84121dae7f6c8041f2ea8fc5d6f760
2020-03-19 15:00:53 +00:00
Treehugger Robot
0cc7c00396 Merge "Release the interface request when Ethernet tethering is stopped." 2020-03-19 14:59:12 +00:00
Mark Chien
69a60ca655 Merge "Hide startTethering with type function to module-lib only" into rvc-dev 2020-03-19 14:55:09 +00:00
TreeHugger Robot
8cbb1680bb Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" into rvc-dev am: f80f541d16
Change-Id: I03fd96ffe141f5cf5c2448390aba5be9c28fc96a
2020-03-19 13:52:20 +00:00
TreeHugger Robot
f80f541d16 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" into rvc-dev 2020-03-19 13:40:51 +00:00
Lorenzo Colitti
d44de5a624 Release the interface request when Ethernet tethering is stopped.
When the Ethernet interface becomes unavailable (e.g., because
the cable was unplugged or the interface was removed), or when
setEthernetTethering(false) is called, release the Ethernet
interface request.

This ensures that:
- The Ethernet interface immediately becomes available for use in
  client mode.
- If an interface later becomes available, tethering is not
  automatically started. This is consistent with what happens for
  other downstream types such as wifi and USB. Evey time one of
  those downstreams goes down, tethering is stopped and will not
  be restarted.

Test: manual
Bug: 148824036
Change-Id: Iaf85e800569f2e08c39f7ebb96f8aa34f6e53133
2020-03-19 22:35:28 +09:00
markchien
b1bfea5367 Hide startTethering with type function to module-lib only
Bug: 151918384
Test: m
Change-Id: Icef8b363aae97dd020d618bcb397f661aa6c4750
2020-03-19 21:04:04 +08:00
Chalard Jean
db3d568139 Create a builder for NetworkCapabilities.
Bug: 151322799
Test: FrameworksWifiTests
Change-Id: I06eb97e50d5583579b3c26d1365d2dbaec8bfc99
2020-03-19 21:55:57 +09:00
Mark Chien
8975e298b7 Merge "TetheringManager API clean up" into rvc-dev am: 8a0af9515d
Change-Id: Id093ec8add4777f1d4a2c3d0890378acdc7ceaed
2020-03-19 12:07:18 +00:00
Paul Hu
9c9aeba98f [TNU1.2] Add string for client number notification
Add string for client number notification

Bug: 122085773
Test: atest TetheringTests
Change-Id: Icc4e59ce3b2d8d4c1c7883c2f9d040d3ce563f09
Merged-In: Icc4e59ce3b2d8d4c1c7883c2f9d040d3ce563f09
(cherry picked from aosp/1259995)
2020-03-19 12:04:51 +00:00
Mark Chien
8a0af9515d Merge "TetheringManager API clean up" into rvc-dev 2020-03-19 12:04:05 +00:00
markchien
ec0b68d491 Move NetworkCallback to last parameter for new exposed requestNetwork
Bug: 151243698
Test: atest TetheringTests
Change-Id: I87ef1d451eefa6998b9793c4eacabae978376d24
Merged-In: I87ef1d451eefa6998b9793c4eacabae978376d24
2020-03-19 11:36:07 +00:00
markchien
8146b56d01 TetheringManager API clean up
Per API review:
- @IntDef defined on the type integer parameter
- have getters on each parameter that is set in the
  TetheringRequest.Builder
- new added API should not be deprecated
Below APIs is moved from system-current to module-lib-current that only
plafrom code(e.g. ConnectivityManager and Settings) can use them.
TetheringRequest.
onTetherableInterfaceRegexpsChanged, TetheringInterfaceRegexps:
Only platform code can use them because interfaces by regular
expressions are a mechanism which is planning to be deprecated.

Also rename some constants for easier to understand.

Bug: 149858697
Bug: 151243337
Test: m doc-comment-check-docs
      atest TetheringTests
Change-Id: I45cb21d5bc919f6d32c42650326597d5173ea028
Merged-In: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
2020-03-19 19:32:50 +08:00
markchien
ac580f9826 Move NetworkCallback to last parameter for new exposed requestNetwork
Bug: 151243698
Test: atest TetheringTests
Change-Id: I87ef1d451eefa6998b9793c4eacabae978376d24
2020-03-19 19:10:23 +08:00
Paul Hu
6450a662da Merge "[TNU1.2] Add string for client number notification" am: 2435a6539d am: fea464b4ef
Change-Id: Ia03a708c7f23d5b41be2b165fc48f20f92090c37
2020-03-19 10:59:21 +00:00
Paul Hu
fea464b4ef Merge "[TNU1.2] Add string for client number notification" am: 2435a6539d
Change-Id: Ibbead3667ec87cae0f2cd8735dabf77d3d6dd07a
2020-03-19 10:45:24 +00:00
Mark Chien
97e28bd342 [automerger skipped] Merge "Support static address configuration" into rvc-dev am: 6223b8f4e8 -s ours
am skip reason: Change-Id I0399917e7cefa1547d617e688225544c4fc1a231 with SHA-1 f053e4b6f5 is in history

Change-Id: I8a441c075d7a67f9bb5528c66cbf67df7fbacc60
2020-03-19 10:19:58 +00:00
Mark Chien
6223b8f4e8 Merge "Support static address configuration" into rvc-dev 2020-03-19 10:03:56 +00:00
markchien
f1332573bb TetheringManager API clean up
Per API review:
- @IntDef defined on the type integer parameter
- have getters on each parameter that is set in the
  TetheringRequest.Builder
- new added API should not be deprecated
Below APIs is moved from system-current to module-lib-current that only
plafrom code(e.g. ConnectivityManager and Settings) can use them.
TetheringRequest.
onTetherableInterfaceRegexpsChanged, TetheringInterfaceRegexps:
Only platform code can use them because interfaces by regular
expressions are a mechanism which is planning to be deprecated.

Also rename some constants for easier to understand.

Bug: 149858697
Bug: 151243337
Test: m doc-comment-check-docs
      atest TetheringTests
Change-Id: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
2020-03-19 16:32:37 +08:00
paulhu
1957e6a0fb [TNU1.2] Add string for client number notification
Add string for client number notification

Bug: 122085773
Test: atest TetheringTests
Change-Id: Icc4e59ce3b2d8d4c1c7883c2f9d040d3ce563f09
2020-03-19 15:48:23 +08:00
markchien
dc651f03da Expose netId by adding getter API
Bug: 151156820
Test: m
      atest TetetheringTests
Change-Id: Ieb1483c146aa2f7d8f251157e6e81d71c44ae899
(cherry picked from commit 8831c4b54178753013d568c0b76bbf7487db8122)
2020-03-19 15:57:31 +09:00
Paul Hu
4d02c9369a [automerger skipped] Merge "[TNU1.1]Add tethering notification strings" into rvc-dev am: d116aacdad -s ours
am skip reason: Change-Id I30f68d83344f66fb3ef77abf3f8748c3eb1276f0 with SHA-1 3355cc4f06 is in history

Change-Id: I705409f05587f01fa3e2ebfd1e3f5e7e58002d97
2020-03-19 06:01:14 +00:00
Automerger Merge Worker
9462a3c9f0 Support static address configuration
Application can specify static ipv4 server and client address to setup
tethering and this is one shot configuration. Tethering service would
not save the configuration and the configuration would be reset when
tethering stop or start failure.

When startTethering callback fired, it just mean tethering is requested
successful. Therefore, callers may call startTethering again if
startTethering successful but do not receive following tethering active
notification for a while. Tethering service never actually does anything
synchronously when startTethering is called:
  -startProvisioningIfNeeded just posts a message to the handler thread.
  -enableTetheringInternal doesn't do anything synchronously, it just
  asks the downstreams to get their interfaces ready and waits for
  callbacks.
If tethering is already enabled with a different request,
tethering would be disabled and re-enabled.

Bug: 141256482
Test: -build, flash, boot
      -atest TetheringTests
      -atest CtsTetheringTest

Change-Id: I2b2dd965a673e6f1626738d41b5d443f0f9fbd0e
Merged-In: I0399917e7cefa1547d617e688225544c4fc1a231
(cherry picked from commit 5d6723e24e21154bef3967585a8adc069e007f49)
2020-03-19 12:39:46 +08:00
Paul Hu
57e22c5ab9 [TNU1.1]Add tethering notification strings
Add string for no upstream and cellular roaming notification.

Bug: 145629001
Bug: 147818698
Test: atest TetheringTests
Change-Id: I30f68d83344f66fb3ef77abf3f8748c3eb1276f0
Merged-In: I30f68d83344f66fb3ef77abf3f8748c3eb1276f0
(cherry picked from aosp/1260112)
2020-03-19 02:55:03 +00:00
Paul Hu
9cff3fb9f3 Merge "[TNU1.1]Add tethering notification strings" am: 09bc9bf0b9 am: 7afa946477
Change-Id: I8f2e406c8abb7c2cf0443198b78fb739018993ab
2020-03-19 01:45:42 +00:00
Paul Hu
7afa946477 Merge "[TNU1.1]Add tethering notification strings" am: 09bc9bf0b9
Change-Id: If2d4ec6631a903659889089e287dc489cd9cb163
2020-03-19 01:36:36 +00:00
Paul Hu
09bc9bf0b9 Merge "[TNU1.1]Add tethering notification strings" 2020-03-19 01:33:01 +00:00
Remi NGUYEN VAN
59c179fe57 Merge changes from topic "netstack_api_review" into rvc-dev am: 06b45ca764
Change-Id: Iddd40677121e331eb50b74aa379dabaf4632219d
2020-03-19 01:30:57 +00:00
Remi NGUYEN VAN
06b45ca764 Merge changes from topic "netstack_api_review" into rvc-dev
* changes:
  Remove usage of Context.NETWORK_STACK_SERVICE
  Remove NETWORK_STACK_SERVICE constant
2020-03-19 01:21:29 +00:00
Anton Hansson
424426ad20 [automerger skipped] Merge "Add individual API tracking files for modules" into rvc-dev am: 4693140499 -s ours
am skip reason: Change-Id Iaf2ef5b5751eb208d119ddbc74481239366fe581 with SHA-1 a5428687e4 is in history

Change-Id: I7d747bc98bb8e6114956ea503d894f8b30fda46b
2020-03-18 16:15:49 +00:00
Anton Hansson
a5428687e4 Add individual API tracking files for modules
This adds metalava api tracking generation to the module
stub rules, to make sure we know exactly what API a
particular module stub exports.

Bug: 147768409
Test: m update-api
Exempt-From-Owner-Approval: Approved in master
Change-Id: Iaf2ef5b5751eb208d119ddbc74481239366fe581
Merged-In: Iaf2ef5b5751eb208d119ddbc74481239366fe581
(cherry picked from commit b602b0b2f18d96866a5d7e5d27958af774d1f802)
2020-03-18 13:14:20 +00:00
Anton Hansson
49bdf5615f Add individual API tracking files for modules
This adds metalava api tracking generation to the module
stub rules, to make sure we know exactly what API a
particular module stub exports.

Bug: 147768409
Test: m update-api
Exempt-From-Owner-Approval: Approved in master
Change-Id: Iaf2ef5b5751eb208d119ddbc74481239366fe581
Merged-In: Iaf2ef5b5751eb208d119ddbc74481239366fe581
2020-03-18 11:03:12 +00:00