Commit Graph

333 Commits

Author SHA1 Message Date
Paul Hu
ff89f2fd43 Merge "[TNU03] Add TetheringNotificationUpdaterTest" am: 18c34694f9 am: 493d3a833c
Change-Id: I1085dceb190b32122416d0240275d7ecb81aa627
2020-03-25 07:15:31 +00:00
Paul Hu
18c34694f9 Merge "[TNU03] Add TetheringNotificationUpdaterTest" 2020-03-25 06:45:14 +00:00
Paul Hu
357c0fcf14 Merge "[TNU02] Update tethering notification by active data subid" am: 8a47935fca am: 7135a19540
Change-Id: I2e1555972d9217fa689b10b23525fa5ba12c373b
2020-03-25 05:37:05 +00:00
Paul Hu
8a47935fca Merge "[TNU02] Update tethering notification by active data subid" 2020-03-25 04:53:32 +00:00
Chalard Jean
dd9c1f56fc Merge "Expose netId by adding getter API" 2020-03-25 02:23:03 +00:00
Treehugger Robot
46e3a9caf6 Merge "Add a log message if enabling Ethernet tethering if it is already enabled." am: 93a404041d am: 232904e22b
Change-Id: Ibe0d3567185b4dfbfd73d085080ca90594120c1f
2020-03-24 15:23:51 +00:00
Lorenzo Colitti
6976fae02e Add a log message if enabling Ethernet tethering if it is already enabled.
Test: builds
Bug: 150644681
Change-Id: I68123e6dd04ccae5da2ecd7526c11d9f835d1d57
2020-03-24 13:28:53 +00:00
markchien
58e3896aa8 Expose netId by adding getter API
Bug: 151156820
Test: m
      atest TetetheringTests

Clean CP from ag/10747732

Change-Id: Ieb1483c146aa2f7d8f251157e6e81d71c44ae899
Merged-In: Ieb1483c146aa2f7d8f251157e6e81d71c44ae899
2020-03-24 09:19:26 +00:00
paulhu
769e00cad2 [TNU03] Add TetheringNotificationUpdaterTest
Add new test for TetheringNotificationUpdater

Bug: 122085773
Bug: 130596698
Test: atest TetheringTests
Change-Id: I0db3df3e85dd6a8c3989c8bc66a06c50f45a0c15
2020-03-24 15:35:05 +08:00
paulhu
7bfbe253d7 [TNU02] Update tethering notification by active data subid
Tethering notification can be customized by different subid. Thus
update notification when active data subid changed.

Bug: 122085773
Bug: 130596698
Test: atest TetheringTests
Change-Id: I799d713326cfbf4dc96c712c6b15ed5a4ac18dd2
2020-03-24 14:31:03 +08:00
Anton Hansson
d1dcdd544f Merge "Build tethering against the module SDK" into rvc-dev am: bcd7f7fc94
Change-Id: I4871c7527b859e8da5090002a0f031cf0315aed9
2020-03-23 10:53:54 +00:00
Anton Hansson
bcd7f7fc94 Merge "Build tethering against the module SDK" into rvc-dev 2020-03-23 10:27:31 +00:00
TreeHugger Robot
9d17078f1a Merge "Address API council review comment about TetheringRequest" into rvc-dev am: 9c02d0360e
Change-Id: I2a4e50e12193421464a25d9ca0705d879b5ddfa8
2020-03-23 06:19:27 +00:00
junyulai
a8b377747b Address API council review comment about TetheringRequest
Test: atest TetheringTests FrameworksNetTests NetworkStackTests
Bug: 152055812
Change-Id: I0158d88e364772f9ac258bd18955edcdad266ad8
Merged-In: I0158d88e364772f9ac258bd18955edcdad266ad8
(this is a clean cherry-pick from ag/10796412)

Change-Id: I64f1527d79085cc5dfd78c01a6c49c4df87c82e7
2020-03-23 14:14:22 +08:00
junyulai
e3b9708c3a Address API council review comment about TetheringRequest
Test: atest TetheringTests FrameworksNetTests NetworkStackTests
Bug: 152055812
Change-Id: I0158d88e364772f9ac258bd18955edcdad266ad8
2020-03-23 12:13:57 +08:00
Remi NGUYEN VAN
1cd0dcc4a9 Merge changes from topic "netstack_constant_cherrypick"
* changes:
  Remove usage of Context.NETWORK_STACK_SERVICE
  Remove NETWORK_STACK_SERVICE constant
2020-03-23 03:33:58 +00:00
Remi NGUYEN VAN
fd50cff7c6 Remove usage of Context.NETWORK_STACK_SERVICE
The NetworkStack.getService() API should be used instead.

Bug: 151243982
Test: atest FrameworksNetTests TetheringTests
      Manual tethering test
Merged-In: I7855090bffbe895c8349ad4903b8f2eb55515f0b
(clean cherry-pick from internal branch)

Change-Id: If4af2846a82605e828287a9a4680d5547b76b802
2020-03-23 11:29:06 +09:00
Anton Hansson
aaeaa195b8 Build tethering against the module SDK
Link against the stubs of other modules and the implementation
of the tethering module jar.

Bug: 146757305
Test: m Tethering
Change-Id: I7c93b60654e21a4a27d21cbf0c2a6cb21f813529
2020-03-20 15:31:02 +00:00
Paul Hu
02538d0ad1 Merge "[TNU1.1] Update tethering notification strings" into rvc-dev 2020-03-20 14:49:27 +00:00
Anton Hansson
4168cea5e1 Update tethering module api files
Bug: 147768409
Test: m checkapi
Merged-In: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
Change-Id: I3da71661048b1f66522696e9333c2c14a224fe9f
2020-03-20 13:49:34 +00:00
Anton Hansson
4dd8a42cff Merge "Add individual API tracking files for modules" 2020-03-20 12:47:52 +00:00
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
0fb2814388 Merge "Create a builder for NetworkCapabilities." into rvc-dev 2020-03-20 11:03:47 +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
d685312245 [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
Merged-In: I7302cf351b0a9a42ad5a543f61ab084de189f282
(cherry picked from aosp/1261866)
2020-03-20 10:05:57 +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
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
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
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
Mark Chien
6223b8f4e8 Merge "Support static address configuration" into rvc-dev 2020-03-19 10:03:56 +00:00
Anton Hansson
65d1e30c0f 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 check-api
Exempt-From-Owner-Approval: approved internally
Change-Id: Iaf2ef5b5751eb208d119ddbc74481239366fe581
Merged-In: Iaf2ef5b5751eb208d119ddbc74481239366fe581
(cherry picked from commit e7c52c7e3f)
2020-03-19 08:51:11 +00:00