Commit Graph

1227 Commits

Author SHA1 Message Date
Treehugger Robot
ee3f33ac41 Merge "Also update connected clients for local only tethering" am: 561f38a799 am: 1b1c4adab5 am: 8e1e05ec1e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1531561

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1bb18875a8c458c0ac112c13a277d4e563e3d8ac
2020-12-23 12:49:59 +00:00
Treehugger Robot
8e1e05ec1e Merge "Also update connected clients for local only tethering" am: 561f38a799 am: 1b1c4adab5
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1531561

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I04ef025ed537623511a3d346d4c59d6efb6bef3f
2020-12-23 12:31:53 +00:00
Treehugger Robot
561f38a799 Merge "Also update connected clients for local only tethering" 2020-12-23 11:36:34 +00:00
markchien
f50f05ebcb Also update connected clients for local only tethering
mForwardedDownstreams is the set of downstreams who wanted upstream.
In other word, it don't contains localOnly tethering(e.g. local only
hotspot, wifi p2p tethering). Changing the list from mForwardedDownstreams
to mNotifyList make both tethered and localOnly tethering have connected
clients callback.

Bug: 172290164
Test: atest TetheringTests
Change-Id: I58fdb28efc616b00d63a1c237ea93aee4d8f2dcd
2020-12-22 23:23:09 +08:00
Chalard Jean
f0c1648742 Merge "Move module utils to the module package." am: fab11bb263 am: e3db31f347
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1531558

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0d9c29e041caba754e4cb72167678234707484d3
2020-12-21 06:33:30 +00:00
Chalard Jean
d2df5729f6 Move module utils to the module package.
Test: FrameworksWifiTest FrameworksNetTest
Merged-In: Ib04bebb061dc64d6d685116b596fb3179d5b959a
Change-Id: I9118da3898d864c7bf0ed7bc9d94b94343c4a084
2020-12-16 11:44:34 +09:00
Orion Hodson
d4763bc919 Merge "Use libnetjniutils for JNI File Descriptor info" am: b5e3c63b72 am: 25bb834e23 am: 136538db89
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1519500

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ied073b067a19ea20f6a2206b43d37446145371d0
2020-12-15 08:11:23 +00:00
Orion Hodson
136538db89 Merge "Use libnetjniutils for JNI File Descriptor info" am: b5e3c63b72 am: 25bb834e23
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1519500

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I39de6d056c4ab4d2e44171069a5c2575f2b71376
2020-12-15 07:24:46 +00:00
Orion Hodson
e5bd0dba21 Use libnetjniutils for JNI File Descriptor info
Drops use of deprecated API in libnativehelper and uses a common
helper that will be stable across releases.

Bug: 158749603
Test: m
Change-Id: Ic1a1811ffb9a1c207f562a180417e99df31e3502
2020-12-11 22:48:10 +00:00
paulhu
b2c0185da4 Fix tethering doesn't turn off issue am: 862c8a1ea0 am: cd34630e6b am: 1b62a26c1a am: c7884164c6
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1484019

Change-Id: I896b23cf0e7d622d6814940656cd72a17f591a22
2020-11-10 16:40:27 +00:00
paulhu
1b62a26c1a Fix tethering doesn't turn off issue am: 862c8a1ea0 am: cd34630e6b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1484019

Change-Id: I8f1417a1317acf18fe0d8a133fb83c095e14f8c1
2020-11-10 15:35:23 +00:00
paulhu
862c8a1ea0 Fix tethering doesn't turn off issue
When user restriction turns on, all tethering functions should
be disabled. But tethering functions still work after
restrication is on. Because tethering request would be removed
from mActiveTetheringRequests after starting tethering that
will result in Tethering#isTetheringActive() always returns
false. Thus, update the design to check tethered interface to
ensure that any of tethering function is working.

Bug: 169596583
Test: atest TetheringTests
Test: Manually test that tethering function would be disabled
      and notification would show to user after restriction
      was on.
Change-Id: Icb9649a5ecdec2d029ac763b5b9b80042ad50eb9
2020-11-10 16:47:52 +08:00
Mark Chien
38d781ae57 Merge "Fix null DadProxy failure in R Tethering unit test" am: 220e7854bd am: 668adf955c am: 8b3c07d951 am: a6bb7e3340
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1485808

Change-Id: I351e5dc3afaf61e5cf82913872ec0bec1e99a094
2020-11-09 06:53:04 +00:00
Nikita Ioffe
b6313e4e2c Merge "com.android.tethering: set min_sdk_version 30" am: 06bf173b20 am: b2bfb81567
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1489717

Change-Id: I8ff9ecaa92dbbf39659211b05ef9469c25909e12
2020-11-09 06:06:37 +00:00
Mark Chien
8b3c07d951 Merge "Fix null DadProxy failure in R Tethering unit test" am: 220e7854bd am: 668adf955c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1485808

Change-Id: I3f1d7019f1a12647b78630a412df3adf03e9e95a
2020-11-09 06:06:24 +00:00
Nikita Ioffe
06bf173b20 Merge "com.android.tethering: set min_sdk_version 30" 2020-11-06 12:46:39 +00:00
Mark Chien
220e7854bd Merge "Fix null DadProxy failure in R Tethering unit test" 2020-11-06 11:00:19 +00:00
Nikita Ioffe
583e35a12e com.android.tethering: set min_sdk_version 30
Tethering is updatable apex module that was launched in R, hence it and
all it dependencies should specify min_sdk_version <= 30.

Test: m
Bug: 171668006
Bug: 171330443
Change-Id: Ic91cf96dda6419d1038b0329b920f9cd24482aef
Merged-In: Ic91cf96dda6419d1038b0329b920f9cd24482aef
(cherry picked from commit bee20e84f8)
(cherry picked from commit 1fe1e539e1)
2020-11-05 20:30:40 +00:00
markchien
290e7c452b Fix null DadProxy failure in R Tethering unit test
Tethering unit test would verify the interfaction between DadProxy and
IpServer. Since DadProxy only available in S+, the test would fail if it
build with R sdk.

Bug: 171936270
Test: atest TetheringTests in both R and S
Change-Id: Ia73d4aa59d01400d1ccfd3fdc1b721e269cae952
2020-11-05 15:28:56 +08:00
Chalard Jean
7f65953491 Move module utils to the module package.
Test: FrameworksWifiTest FrameworksNetTest
Change-Id: Ib04bebb061dc64d6d685116b596fb3179d5b959a
2020-11-05 06:39:05 +00:00
Baligh Uddin
2cceb27a4c Revert "Add OWNERS block to prevent the tree from mooving during migration." am: 6554b75697 am: 7cb46422b1 am: b94226a63c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/12991879

Change-Id: I77f4b9f2b6f71b3be982639369bf292d614e1e1f
2020-11-05 05:04:14 +00:00
Baligh Uddin
7cb46422b1 Revert "Add OWNERS block to prevent the tree from mooving during migration." am: 6554b75697
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/12991879

Change-Id: I8bffe476b7aa462e43238d9df182280976b79712
2020-11-05 04:08:28 +00:00
Baligh Uddin
6554b75697 Revert "Add OWNERS block to prevent the tree from mooving during migration."
Migration of frameworks/base/packages/Tethering is complete, removing
the OWNERS block.
This reverts commit 1623eb61d5.
BUG: 167962976
Test: TH

Change-Id: Ic89c084604788b4d41cf854e5015c8ce7791c64d
2020-11-05 03:16:29 +00:00
Baligh Uddin
5329d7ef43 Add visibility rules for cts migration am: 661ae3923d am: c2ca22b5a9 am: 4a74a0788b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/12984519

Change-Id: Ifeda005dab54b3f5ec2ee1466e3b5ffc26407e1a
2020-11-04 10:30:39 +00:00
Baligh Uddin
c2ca22b5a9 Add visibility rules for cts migration am: 661ae3923d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/12984519

Change-Id: Ia8a1b074496bd7c5b4c127fe8dc476d54f63d414
2020-11-04 10:06:12 +00:00
Baligh Uddin
661ae3923d Add visibility rules for cts migration
BUG: 167962976
Test: TH
Change-Id: I96b34517e164789c9fa3b8fd7fb33fdd7a2a9166
2020-11-04 05:59:46 +00:00
Baligh Uddin
ebff93159e Adjust visibility for tests
BUG: 167962976
Test: TH
Merged-In: Ic89c084604788b4d41cf854e5015c8ce7791c64d
Change-Id: I12e326167c6fb61a59a919cdd0198ac8f8c84772
2020-11-04 05:06:58 +00:00
Nikita Ioffe
bee20e84f8 com.android.tethering: set min_sdk_version 30
Tethering is updatable apex module that was launched in R, hence it and
all it dependencies should specify min_sdk_version <= 30.

Test: m
Bug: 171668006
Bug: 171330443
Change-Id: Ic91cf96dda6419d1038b0329b920f9cd24482aef
Exempt-From-Owner-Approval: Mark is owner and gave +2
2020-11-02 21:50:47 +00:00
Baligh Uddin
1711a1222c Revert "Add OWNERS block to prevent the tree from mooving during migration."
Migration of frameworks/base/packages/Tethering is complete, removing
the OWNERS block.
This reverts commit 1623eb61d5.
BUG: 167962976
Test: TH

Change-Id: Ic89c084604788b4d41cf854e5015c8ce7791c64d
2020-10-31 04:50:11 +00:00
Treehugger Robot
334cc909c5 Merge changes from topic "bug_167962976_visibility" am: 39c6068cbc am: 5942721506 am: 617dffdbdc am: 3a8e238aa8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1478840

Change-Id: I476629002e075d01c83f77be8343157dbd66ce9b
2020-10-29 08:48:24 +00:00
Treehugger Robot
617dffdbdc Merge changes from topic "bug_167962976_visibility" am: 39c6068cbc am: 5942721506
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1478840

Change-Id: I39d4edd4511d1677af0415d57123f88e5705c3dc
2020-10-29 07:47:45 +00:00
Baligh Uddin
1623eb61d5 Add OWNERS block to prevent the tree from mooving during migration.
BUG: 167962976
TEST: None.
Change-Id: I49db5a11ee89645dac158ec3757180b2387e2d70
2020-10-29 03:24:01 +00:00
Baligh Uddin
f814b9b1ce Add visibility rules for packages/modules/Connectivity/Tethering
BUG: 167962976
Test: TH
Change-Id: Id28881b35cf24fc9517fa11af6d8e539ab244fa6
2020-10-29 02:11:55 +00:00
Amit Mahajan
454660e05a Get rid of telephony-stubs.
It was added for telephony mainline and is currently not needed.

Test: basic telephony validity, TH
Bug: 170906882
Change-Id: Idbd05aeef055291fc50008129c30c4ae272c1ac0
2020-10-28 02:36:43 +00:00
Treehugger Robot
acb4e9fc59 Merge "Add shared jarjar rule for tethering tests" am: d75774dfe0 am: 2dc283eeca am: bdca380803 am: 6e654cd7cd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473223

Change-Id: I24795bc612d7956ea8f2776c90810ea5c5eca39e
2020-10-26 13:22:26 +00:00
Treehugger Robot
bdca380803 Merge "Add shared jarjar rule for tethering tests" am: d75774dfe0 am: 2dc283eeca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473223

Change-Id: I34c41fbbe5f034a2ed332c784ab0decb2c6b2add
2020-10-26 12:40:34 +00:00
markchien
e3126480ba Add shared jarjar rule for tethering tests
Also jarjar com.android.net.module.util* to
com.android.networkstack.tethering.util*.

Bug: 171670016
Test: atest TetheringCoverageTests
Change-Id: I3bde9ad3c41adf36da99bd944303d88ce992201c
2020-10-26 18:20:25 +08:00
Mark Chien
ae83d10c32 Merge "Bump Tethering apex version code" into rvc-d1-dev-plus-aosp am: 491463a35f am: b68c8bf414
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12890938

Change-Id: I9bf34252d723acb513935596e93ab8d748187041
2020-10-23 04:13:50 +00:00
markchien
0582605da7 Bump Tethering apex version code
The version code in the manifest is only used for development
builds, as release builds dynamically replace it.

Bug: 170183552
Test: m
Change-Id: I51916756f41672d372e3a4adce3a8edf5d472c0d
2020-10-22 06:49:24 +00:00
Mark Chien
d1c31a2c11 Merge "Add the flag and default enable selectAllPrefixRange" am: 02fe8ac161 am: d11a25eb56 am: a1468b6591 am: c43f48d6cb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1461742

Change-Id: I232a3a52daeed69230215f3be135881415dbdb5c
2020-10-19 13:33:30 +00:00
Mark Chien
a1468b6591 Merge "Add the flag and default enable selectAllPrefixRange" am: 02fe8ac161 am: d11a25eb56
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1461742

Change-Id: Ic540b8b0c562a730d4da307aa6890226099e9b46
2020-10-19 13:04:37 +00:00
Mark Chien
d11a25eb56 Merge "Add the flag and default enable selectAllPrefixRange" am: 02fe8ac161
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1461742

Change-Id: I6055ea6ac737bb94bd9bc8c8642e86222f1e1d1a
2020-10-19 12:46:44 +00:00
markchien
4607c5535b Add the flag and default enable selectAllPrefixRange
Also add MtsTetheringTest which only run if tethering mainline
module is installed.

Bug: 166057846
Bug: 170265597
Test: atest TetheringTests
Change-Id: I434dda81eb5fab700d873a8ff3429b4222f0c7e6
2020-10-19 16:50:29 +08:00
Mark Chien
3910988c18 Merge "Fix miss tracking downstream problem in PrivateAddressCoordinator" am: 8565b0244a am: a5b9e4a1b4 am: 7c1badf9b0 am: 0854becd64
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459887

Change-Id: I9262e13e3f3919c2b36bb8765a09c4abf2e31aa4
2020-10-15 14:20:00 +00:00
Mark Chien
7c1badf9b0 Merge "Fix miss tracking downstream problem in PrivateAddressCoordinator" am: 8565b0244a am: a5b9e4a1b4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459887

Change-Id: I33842982a1a94a37d2e8b7aa78f5bc9b6e86326e
2020-10-15 13:16:01 +00:00
Mark Chien
a5b9e4a1b4 Merge "Fix miss tracking downstream problem in PrivateAddressCoordinator" am: 8565b0244a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459887

Change-Id: I2874508c560cc31f99e88c02fd63995f62f86a2f
2020-10-15 12:46:39 +00:00
Mark Chien
8565b0244a Merge "Fix miss tracking downstream problem in PrivateAddressCoordinator" 2020-10-15 12:07:19 +00:00
Anton Hansson
96a954a8d6 Merge "Remove Tethering @TestApi" am: bd175573a5 am: 67f88535d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460522

Change-Id: I6d44cc10ae75426e715c95540f64e788b506f83b
2020-10-15 11:29:19 +00:00
Anton Hansson
67f88535d1 Merge "Remove Tethering @TestApi" am: bd175573a5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460522

Change-Id: I3dcf776384d6c53876acaeb344820a88c19027da
2020-10-15 11:11:02 +00:00
markchien
634f0a8ec1 Fix miss tracking downstream problem in PrivateAddressCoordinator
The downstream do not be tracked if PrivateAddressCoordinator just
return cached address. Then, PrivateAddressCoordinator would not notify
that downstream if conflict happen.

Also remove the null check in getDownstreamPrefix because:
- An IpServer is only added to mDownstreams by requestDownstreamAddress.
- That method will only add the IpServer to mDownstreams if it has an
IPv4 address.
- As soon as that method returns, the IpServer sets mIpv4Address to the
address that was returned.
- When an IpServer is torn down, mIpv4Address is set to null after
releaseDownstream is called.

So it should never be possible for this to return null.

Bug: 168169687
Test: atest CtsTetheringTest
      atest TetheringTests
Change-Id: Ide5206b013acdc499344e1c839a830c5b245af41
2020-10-15 16:21:12 +08:00