Commit Graph

329 Commits

Author SHA1 Message Date
Lorenzo Colitti
5d92c17700 Merge "Migrate to TetherOffloadRuleParcel in IpServer" into rvc-dev am: b99fc7b343
Change-Id: I288bd790c246de068c6143932fa312a7662a24f7
2020-04-07 02:15:42 +00:00
Lorenzo Colitti
e6107d2466 Migrate to TetherOffloadRuleParcel in IpServer
The netd tethering offload IPCs are changing from taking a list
of primitives to taking a TetherOffloadRuleParcel. Modify their
only caller.

Bug: 140541991
Test: atest IpServerTest
Merged-In: I83718c80ef9d31199c87021b4dd5821717fd5ba5
Change-Id: I83718c80ef9d31199c87021b4dd5821717fd5ba5
2020-04-06 15:45:58 +00:00
Jooyung Han
39d545982e Merge "Add min_sdk_version:R to updatable apexes" into rvc-dev am: 6a4a96c74c
Change-Id: I531247560c84d3cc49459d340f6c2d6cf6b31141
2020-04-05 00:32:14 +00:00
Jooyung Han
f1460fad52 Add min_sdk_version:R to updatable apexes
APEXes introduced in R need to set min_sdk_version to ensure that they
are built against correct version(30 or R) of stubs (libc/liblog/...).

Bug: 152655956
Test: /vendor/google/build/build_mainline_modules.sh
Change-Id: I4a893c34b09334eea124266287301e479b9e8a59
2020-04-02 13:54:06 +00:00
Lorenzo Colitti
b326d28ff9 Merge "Add an Ethernet tethering test." into rvc-dev am: 57827f67e0
Change-Id: I6be7379914fcaade0177d661d5e80ba5031b50d7
2020-04-01 04:08:00 +00:00
Lorenzo Colitti
57827f67e0 Merge "Add an Ethernet tethering test." into rvc-dev 2020-04-01 03:56:28 +00:00
Anton Hansson
e9fc36951a Merge "Feed framework-tethering-stubs the src filegroup" into rvc-dev am: ebb649bf5a
Change-Id: Ic124bdca285f0e952ed65214eaa3cc0778a142d4
2020-03-27 23:08:37 +00:00
Anton Hansson
ebb649bf5a Merge "Feed framework-tethering-stubs the src filegroup" into rvc-dev 2020-03-27 23:05:45 +00:00
Mark Chien
30f73bae19 Merge "Register callback and receiver after tethering is created" into rvc-dev am: 60388d2bfe
Change-Id: I311e5db2aacde60b4eb3cb893a9234e9501e5f36
2020-03-27 16:13:10 +00:00
Mark Chien
6d4001132d Register callback and receiver after tethering is created
Tethering service is created after boot complete which means most of
the services are ready before tethering. Once tethering register the
callback, callback event may come-in immediately. Make sure all of
tethering related object is created, then register the callback,
receiver, or listener.

Bug: 149965121
Test: atest TetheringTests
      manual on/off tethering

Change-Id: Ifdc427341db7d1313ad4b61207a96ab379d100aa
Merged-In: I3941a186770679e7b476073d774e2310e25e44c6
(cherry picked from commit 285be1ee938ddc9728ccc3e951ed0ed1b2fa7117)
2020-03-27 14:01:49 +00:00
Anton Hansson
90ae90b6e0 Feed framework-tethering-stubs the src filegroup
This filegroups strips the "src" prefix away from the src path
for the filter_packages check in droiddoc.

Bug: 149293194
Test: m update-api (no change)
Change-Id: I5b9ffa211be9c1a7dd8f63d5e7ba2a825d0d3190
2020-03-27 13:46:11 +00:00
Lorenzo Colitti
eb73310727 Add an Ethernet tethering test.
This test uses EthernetManager's ability to use test network
interfaces to test tethering. This provides a fairly realistic
integration test for Tethering and its callbacks, IpServer and
DhcpServer, and so on.

It is in a new integration/ directory under Tethering because I
didn't really know where to put it. It's fast enough to run in
presubmit, but it didn't seem to be appropriate to call it a
unit test, and in the future we could also use this test to do
some limited testing of real Ethernet tethering as well.

Bug: 150644681
Test: atest TetheringIntegrationTests:EthernetTetheringTest --rerun-until-failure 100
Merged-In: Ifcda70b73848b1fd4c26b031e53f0a6500cc93d4
Change-Id: Ifcda70b73848b1fd4c26b031e53f0a6500cc93d4
2020-03-27 11:39:50 +00:00
Anton Hansson
23c26c7a77 Merge "Make framework-tethering stubs use the new defaults" into rvc-dev am: 49c50fb36b
Change-Id: I2e135e5df483b3a7583dcf0e73cfe085e9953314
2020-03-26 08:53:51 +00:00
Anton Hansson
49c50fb36b Merge "Make framework-tethering stubs use the new defaults" into rvc-dev 2020-03-26 08:39:02 +00:00
TreeHugger Robot
06cc01c907 Merge "Update connected clients when a downstream disappears." into rvc-dev am: 13ff35faab
Change-Id: I39fb85e83dcbc82f421b3bd35af78bf8afc12603
2020-03-26 07:15:56 +00:00
TreeHugger Robot
28e7899139 Merge "Add a log message if enabling Ethernet tethering if it is already enabled." into rvc-dev am: 6f3e64a56e
Change-Id: If94b2b9a8e816e20ca6c45b2a4e4c4cdf3b2448a
2020-03-26 07:15:13 +00:00
Treehugger Robot
a4e2383d84 Update connected clients when a downstream disappears.
Otherwise, if another downstream of the same type reappears, the
code would fire a callback with the previous list of clients.

Bug: 150644681
Test: atest TetheringIntegrationTests:EthernetTetheringTest --rerun-until-failure 100
Change-Id: I6b34ea747ae1831001077f44879bb6828dcecc96
Merged-In: I6b34ea747ae1831001077f44879bb6828dcecc96
(cherry picked from commit 3984360f642ddd5820ced5a6935e37a8ae0d9d76)
2020-03-26 05:07:06 +00:00
Treehugger Robot
595266e4a8 Add a log message if enabling Ethernet tethering if it is already enabled.
Test: builds
Bug: 150644681
Change-Id: I68123e6dd04ccae5da2ecd7526c11d9f835d1d57
Merged-In: I68123e6dd04ccae5da2ecd7526c11d9f835d1d57
(cherry picked from commit e6b8ded8121c137a7e434e1c2a9e04cc144f2f28)
2020-03-26 05:05:35 +00:00
Paul Hu
7f416f2841 Merge "[TNU04] Add tethering restricted notification" into rvc-dev am: 3d9c05e402
Change-Id: Ie258a04699021a2b0891628f172e838faca3d4bc
2020-03-26 04:59:26 +00:00
Paul Hu
477873b6a3 Merge "[TNU03] Add TetheringNotificationUpdaterTest" into rvc-dev am: 4472b04bd2
Change-Id: If2751e193906169f3b5cbbedefeef91072bd61b7
2020-03-26 04:58:33 +00:00
Paul Hu
3d9c05e402 Merge "[TNU04] Add tethering restricted notification" into rvc-dev 2020-03-26 04:40:55 +00:00
Paul Hu
4472b04bd2 Merge "[TNU03] Add TetheringNotificationUpdaterTest" into rvc-dev 2020-03-26 04:40:36 +00:00
Paul Hu
4f4044ad2e Merge "[TNU02] Update tethering notification by active data subid" into rvc-dev am: cf2a026a65
Change-Id: I0d8631a29c89802acbdbeeb7b603512735bd55c7
2020-03-26 02:31:45 +00:00
Paul Hu
cf2a026a65 Merge "[TNU02] Update tethering notification by active data subid" into rvc-dev 2020-03-26 02:28:48 +00:00
Paul Hu
fe6c41c815 [TNU04] Add tethering restricted notification
If tethering is restricted to the user, show restricted
notification to notify the user.

Bug: 122085773
Test: atest TetheringTests
Change-Id: Ic5baca2d6102886f4c3530ce1e321b5dab6ea9d7
Merged-In: Ic5baca2d6102886f4c3530ce1e321b5dab6ea9d7
(cherry picked from aosp/1188867)
2020-03-26 02:01:37 +00:00
Paul Hu
71007d31b5 [TNU03] Add TetheringNotificationUpdaterTest
Add new test for TetheringNotificationUpdater

Bug: 122085773
Bug: 130596698
Test: atest TetheringTests
Change-Id: I0db3df3e85dd6a8c3989c8bc66a06c50f45a0c15
Merged-In: I0db3df3e85dd6a8c3989c8bc66a06c50f45a0c15
(cherry picked from aosp/1209985)
2020-03-26 01:59:15 +00:00
Vladimir Marko
a9be265783 Merge "Add permitted_packages to framework-tethering." into rvc-dev am: b9492b7be0
Change-Id: I75d151de8d3c0e35ef27958b6fabf7903d0dcc69
2020-03-25 13:52:51 +00:00
Vladimir Marko
b9492b7be0 Merge "Add permitted_packages to framework-tethering." into rvc-dev 2020-03-25 13:50:51 +00:00
Paul Hu
e4beb93149 [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
Merged-In: I799d713326cfbf4dc96c712c6b15ed5a4ac18dd2
(cherry picked from aosp/1209984)
2020-03-25 13:47:48 +00:00
Vladimir Marko
577707e09b Add permitted_packages to framework-tethering.
Test: m out/soong/.intermediates/frameworks/base/packages/Tethering/common/TetheringLib/framework-tethering/android_common/package-check.stamp
Bug: 151314205
Change-Id: I248c36b2cf2f5776978c4fd2322d3b73ade309ff
2020-03-25 11:19:36 +00:00
Anton Hansson
7939cb0a4a Make framework-tethering stubs use the new defaults
Makes it convenient to change all stubs from a central place.

Bug: 149293194
Test: m framework-tethering-stubs{public,system,module_libs_}api
Change-Id: I330133824e78b3a8927e3d3ffbbd729bcdcb8822
2020-03-24 19:52:44 +00:00
TreeHugger Robot
7185ae81ad Merge "Give tethering bluetooth privilege permission" into rvc-dev am: 0c7a4edf14
Change-Id: Ia2db745524b207aed94b64e9fd4369e4b9cce71c
2020-03-24 03:59:18 +00:00
TreeHugger Robot
0c7a4edf14 Merge "Give tethering bluetooth privilege permission" into rvc-dev 2020-03-24 03:54:00 +00:00
markchien
5a76a7114d Give tethering bluetooth privilege permission
Permisssion of PanService#setBluetoothTethering is change from
BLUETOOTH_ADMIN to BLUETOOTH_PRIVILEGED.
Tethering service need bluetooth privilege permission to enable
bluetooth tethering.

Bug: 146045934
Test: on/off bluetooth tethering
Merged-In: Ib87a5d5a5bb49390aa55e52713bb3539d4a52348
Change-Id: Ib87a5d5a5bb49390aa55e52713bb3539d4a52348
2020-03-23 11:42:39 -07:00
Anton Hansson
dadf9ffc65 Merge "Build tethering against the module SDK" into rvc-dev am: bcd7f7fc94
Change-Id: I2a085785f41edf5ad290ecee487c7b9ee0901524
2020-03-23 10:53:51 +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
8618c15679 Merge "Address API council review comment about TetheringRequest" into rvc-dev am: 9c02d0360e
Change-Id: I6de9c11d0fac94ab8b5b1be6bb41b4ce0325adce
2020-03-23 06:18:42 +00: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
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
b4ce301da9 Merge "[TNU1.1] Update tethering notification strings" into rvc-dev am: 02538d0ad1
Change-Id: Ic109e890fea24851d97930d977a87274ccbdd0e7
2020-03-20 14:55:31 +00:00
Paul Hu
02538d0ad1 Merge "[TNU1.1] Update tethering notification strings" into rvc-dev 2020-03-20 14:49:27 +00:00
Junyu Lai
94960b6034 Merge "Create a builder for NetworkCapabilities." into rvc-dev am: 0fb2814388
Change-Id: Ia89d44bcc81b16198d2d653572c451143d208a94
2020-03-20 11:23:41 +00:00
Junyu Lai
586c2a68e8 Merge "Expose netId by adding getter API" into rvc-dev am: cf99dc2717
Change-Id: I169aabae9037f8d16fdd9e70166794173ae3c995
2020-03-20 11:23:03 +00:00
Chalard Jean
93a644a555 Create a builder for NetworkCapabilities. am: db3d568139
Change-Id: Ifbc4fae6c55abfb5aa233cf9bc57f5e14f9b583c
2020-03-20 11:08:59 +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
TreeHugger Robot
07bb07217a Merge "[TNU1.2] Add string for client number notification" into rvc-dev 2020-03-20 00:11:33 +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
Mark Chien
69a60ca655 Merge "Hide startTethering with type function to module-lib only" into rvc-dev 2020-03-19 14:55:09 +00:00