Commit graph

327 commits

Message SHA1
Change tethering file structure to respect its package name
Bug: 145099347
Test: atest TetheringTests
      atest CtsTetheringTest
Change-Id: I7401c550fbafd17a5ed2d925b5d0e17e358af467
Merged-In: I7401c550fbafd17a5ed2d925b5d0e17e358af467

markchien   commited 2020-04-14 14:33:45 +08:00
7dc2dcc37a
Tethering: Add an exported flag in manifest
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for S+. This change adds the value reflecting the previous
default to the manifest.

Bug: 150232615
Test: TH
Change-Id: I25b55378df393cd4fb8932b7ae64f97eb9f1aa8e
Merged-In: I25b55378df393cd4fb8932b7ae64f97eb9f1aa8e
(cherry picked from commit 9226d6c835cd57d10a7562f18143dbaae8601b43)

Ashwini Oruganti   authored and   Mark Chien   commited 2020-04-13 15:15:28 +00:00
af37b0a723
Assign specific client address to dhcp server
Bug: 141256482
Test: manual
      atest TetheringTests

Merged-In: Ief76c98c843ba5420224cbf0f34464f366c891b7
Change-Id: Ief76c98c843ba5420224cbf0f34464f366c891b7

Treehugger Robot   authored and   Mark Chien   commited 2020-04-10 10:03:20 +00:00
5da1070d8f
Use the lastest frozen netd_aidl_interface in framework
Bug: 140541991
Test: build
Merged-In: I984969e09f8d5196945a7412c51bd8880223ad9e
Change-Id: I984969e09f8d5196945a7412c51bd8880223ad9e

Luke Huang   commited 2020-04-09 16:20:44 +00:00
d20078112b
Address aosp/1274403 leftover comment
Bug: 152828142
Test: atest EntitlementManagerTest

Change-Id: I81f2d268c9f26bc4488b06032477a73d071f73f8
Merged-In: I81f2d268c9f26bc4488b06032477a73d071f73f8
(cherry picked from commit 9fe0a868e909a4cd1c1c63bf981441f1b9128890)

Paul Hu   commited 2020-04-09 02:13:32 +00:00
fab349c0a9
Fix TetheringIntegrationTests failure
Bug: 150644681
Test: atest TetheringIntegrationTests
Change-Id: I5a537eca9b1aab3694a11a2dab147a31f289314c
Merged-In: I5a537eca9b1aab3694a11a2dab147a31f289314c
(cherry picked from commit f626b8a5388746d163600a5eccb60e22cb1071bf)

Automerger Merge Worker   authored and   Paul Hu   commited 2020-04-08 08:17:20 +00:00
b33911c19c
Add TetheringServiceTest unitest
Bug: 145490751
Test: atest TetheringTests

Change-Id: Ia9e3232467c7db0e566cced84f3c72bbcd6512d6
Merged-In: I68cd403302848c041444e6d47652435d67f59273
(cherry picked from commit 790a4dd7d3aa813f15fe95c5bf3cef6dd734ce32)

Mark Chien   commited 2020-04-08 01:02:39 +00:00
47c8b0f87e
Merge "Add IPv6TetheringCoordinator unit test" into rvc-dev
Mark Chien   authored and   Android (Google) Code Review   commited 2020-04-07 07:50:40 +00:00
8caf921dc8
Merge "Fix EntitlementManager issues" into rvc-dev
Paul Hu   authored and   Android (Google) Code Review   commited 2020-04-07 04:37:30 +00:00
aaf92e5165
Add IPv6TetheringCoordinator unit test
Bug: 148636687
Test: atest IPv6TetheringCoordinatorTest

Change-Id: I1ba30bb524cbc0cc2782ce1702f9889c0d8a7576
Merged-In: I939323ce09adb9c66b1e2b83d58b0f892aa8f011
(cherry picked from commit 368c56dd7133d292c5f3ab5942016bb4dd1fbc88)

Mark Chien   commited 2020-04-07 04:33:24 +00:00
5e9e0337c5
Merge "Add a test for static IPv4 address tethering configuration." into rvc-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2020-04-07 04:30:58 +00:00
6343b0c968
Merge "Use CompletableFuture instead of a latch." into rvc-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2020-04-07 04:30:33 +00:00
303e9bdddf
Merge "Rename IDhcpLeaseCallbacks to IDhcpEventCallbacks for more generic." into rvc-dev
Xiao Ma   authored and   Android (Google) Code Review   commited 2020-04-07 02:50:41 +00:00
210adac5fa
Add a test for static IPv4 address tethering configuration.
Bug: 150644681
Test: test-only change
Merged-In: I8f4a99da2351fdb5467f561a9732b14a8ebf674b
Change-Id: I8f4a99da2351fdb5467f561a9732b14a8ebf674b

Lorenzo Colitti   commited 2020-04-07 02:21:00 +00:00
7f6ab40294
Use CompletableFuture instead of a latch.
Addresses review comments on aosp/1260100.

Bug: 150644681
Test: test-only change
Merged-In: Ia73ba8a121a3744a5e36795d2d2bff2f099c1394
Change-Id: Ia73ba8a121a3744a5e36795d2d2bff2f099c1394

Lorenzo Colitti   commited 2020-04-07 02:20:35 +00:00
46b44053da
Rename IDhcpLeaseCallbacks to IDhcpEventCallbacks for more generic.
Bug: 130741856
Test: atest TetheringTests
Merged-In: I66614fbf67fba1e7dab0b8a2d41bc30a726e4f38
Change-Id: I66614fbf67fba1e7dab0b8a2d41bc30a726e4f38

Xiao Ma   commited 2020-04-07 01:26:50 +00:00
06c8ba0cd7
Fix EntitlementManager issues
1. Add TETHERING_ETHERNET to vaild downstream type. So starting
   ethernet tethering will do entitlement check as well.
2. Ignore request with invalid downstream type on
   handleRequestLatestTetheringEntitlementValue()

Bug: 152828758
Bug: 152828142
Test: atests TetheringTests CtsTetheringTest

Change-Id: Id0cb59cc4681f5ffbde7be54de05a05e46f0ffb8
Merged-In: Id0cb59cc4681f5ffbde7be54de05a05e46f0ffb8
(cherry picked from commit c502e050fd9543e8bde45014dd66ea1be91c90ef)

Paul Hu   commited 2020-04-07 01:23:49 +00:00
bd8d7a8208
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

Lorenzo Colitti   commited 2020-04-06 15:45:58 +00:00
e6107d2466
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

Jooyung Han   commited 2020-04-02 13:54:06 +00:00
f1460fad52
Merge "Add an Ethernet tethering test." into rvc-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2020-04-01 03:56:28 +00:00
57827f67e0
Merge "Feed framework-tethering-stubs the src filegroup" into rvc-dev
Anton Hansson   authored and   Android (Google) Code Review   commited 2020-03-27 23:05:45 +00:00
ebb649bf5a
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)

Mark Chien   commited 2020-03-27 14:01:49 +00:00
6d4001132d
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

Anton Hansson   commited 2020-03-27 13:46:11 +00:00
90ae90b6e0
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

Lorenzo Colitti   commited 2020-03-27 11:39:50 +00:00
eb73310727
Merge "Make framework-tethering stubs use the new defaults" into rvc-dev
Anton Hansson   authored and   Android (Google) Code Review   commited 2020-03-26 08:39:02 +00:00
49c50fb36b
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)

Treehugger Robot   authored and   Lorenzo Colitti   commited 2020-03-26 05:07:06 +00:00
a4e2383d84
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)

Treehugger Robot   authored and   Lorenzo Colitti   commited 2020-03-26 05:05:35 +00:00
595266e4a8
Merge "[TNU04] Add tethering restricted notification" into rvc-dev
Paul Hu   authored and   Android (Google) Code Review   commited 2020-03-26 04:40:55 +00:00
3d9c05e402
Merge "[TNU03] Add TetheringNotificationUpdaterTest" into rvc-dev
Paul Hu   authored and   Android (Google) Code Review   commited 2020-03-26 04:40:36 +00:00
4472b04bd2
Merge "[TNU02] Update tethering notification by active data subid" into rvc-dev
Paul Hu   authored and   Android (Google) Code Review   commited 2020-03-26 02:28:48 +00:00
cf2a026a65
[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)

Paul Hu   commited 2020-03-26 02:01:37 +00:00
fe6c41c815
[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)

Paul Hu   commited 2020-03-26 01:59:15 +00:00
71007d31b5
Merge "Add permitted_packages to framework-tethering." into rvc-dev
Vladimir Marko   authored and   Android (Google) Code Review   commited 2020-03-25 13:50:51 +00:00
b9492b7be0
[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)

Paul Hu   commited 2020-03-25 13:47:48 +00:00
e4beb93149
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

Vladimir Marko   commited 2020-03-25 11:19:36 +00:00
577707e09b
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

Anton Hansson   commited 2020-03-24 19:52:44 +00:00
7939cb0a4a
Merge "Give tethering bluetooth privilege permission" into rvc-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-03-24 03:54:00 +00:00
0c7a4edf14
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

markchien   authored and   Rahul Sabnis   commited 2020-03-23 11:42:39 -07:00
5a76a7114d
Merge "Build tethering against the module SDK" into rvc-dev
Anton Hansson   authored and   Android (Google) Code Review   commited 2020-03-23 10:27:31 +00:00
bcd7f7fc94
Address API council review comment about TetheringRequest
Test: atest TetheringTests FrameworksNetTests NetworkStackTests
Bug: 152055812
Change-Id: I0158d88e364772f9ac258bd18955edcdad266ad8

junyulai   commited 2020-03-23 12:13:57 +08:00
e3b9708c3a
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

Anton Hansson   commited 2020-03-20 15:31:02 +00:00
aaeaa195b8
Merge "[TNU1.1] Update tethering notification strings" into rvc-dev
Paul Hu   authored and   Android (Google) Code Review   commited 2020-03-20 14:49:27 +00:00
02538d0ad1
Merge "Create a builder for NetworkCapabilities." into rvc-dev
Junyu Lai   authored and   Android (Google) Code Review   commited 2020-03-20 11:03:47 +00:00
0fb2814388
Merge "Expose netId by adding getter API" into rvc-dev
Junyu Lai   authored and   Android (Google) Code Review   commited 2020-03-20 11:03:05 +00:00
cf99dc2717
[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)

Paul Hu   commited 2020-03-20 10:05:57 +00:00
d685312245
Merge "[TNU1.2] Add string for client number notification" into rvc-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-03-20 00:11:33 +00:00
07bb07217a
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)

Treehugger Robot   authored and   Lorenzo Colitti   commited 2020-03-19 15:40:40 +00:00
4f0eb16c41
Merge "Hide startTethering with type function to module-lib only" into rvc-dev
Mark Chien   authored and   Android (Google) Code Review   commited 2020-03-19 14:55:09 +00:00
69a60ca655
Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" into rvc-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-03-19 13:40:51 +00:00
f80f541d16
Hide startTethering with type function to module-lib only
Bug: 151918384
Test: m
Change-Id: Icef8b363aae97dd020d618bcb397f661aa6c4750

markchien   commited 2020-03-19 21:04:04 +08:00
b1bfea5367