Commit Graph

487 Commits

Author SHA1 Message Date
Bill Yi
0e1e52b6cc Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I50e6222bfa764d5dcc340d76d6d21be0a4597bd6
2021-04-19 15:42:13 +00:00
Bill Yi
31eeaf7e42 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I0b9790048702286c2acfe080de5daeeb891a21dc
2021-03-31 02:16:32 -07:00
Bill Yi
0f4e6fa715 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I47b86a8159204d0de9c8c78faa2898b708730757
2021-01-02 23:57:36 -08:00
Bill Yi
90428a41b5 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I92d880b9e87eb792a8c32885e5dfc393a0479e48
2020-11-23 15:19:23 +00:00
Bill Yi
26c08ac758 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I24806a4feb85c4a9fe5db78c3a9adc1c05dab43d
2020-07-27 19:34:13 -07:00
Treehugger Robot
8f3067ebe4 Fix EthernetTetheringTest failure if tethering is not supported am: e6317e5caa am: 241609e5d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12137906

Change-Id: I599fc8b96ed9897d14b1fa3038a3f05557f04379
2020-07-13 13:43:16 +00:00
Treehugger Robot
e6317e5caa Fix EthernetTetheringTest failure if tethering is not supported
Do not run ethernet tethering tests if tethering is not supported
because Tethering APIs would fail. Also skip the test if
EthernetManager is not avaliable. EthernetManager would be null if
there are no FEATURE_ETHERNET and FEATURE_USB_HOST.

Bug: 159869957
Test: atest CtsTetheringTest
Merged-In: I2b9be6799c6edeefc8cd74897a8704dbe80dd061
Change-Id: I2b9be6799c6edeefc8cd74897a8704dbe80dd061
2020-07-13 10:01:25 +00:00
Mark Chien
5366502fa9 Merge "Skip testPhysicalEthernet if the test run adb over network" into rvc-dev am: a973bf1a56 am: 8143dc878d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12105761

Change-Id: I9e458082dd9c0125c9beb59a4c36f6601fa1edd8
2020-07-09 00:51:41 +00:00
Treehugger Robot
2a8e461cab Skip testPhysicalEthernet if the test run adb over network
If the test run adb over network and ethernet is available, it is likely
that adb may run over ethernet. Then the test would fail because adb
would break when ethernet is switching from client mode to server mode.

Bug: 160389275
Test: atest CtsTetheringTest

Merged-In: I57d365d33316881c50c3bf7fd1c98926d10842d3
Change-Id: I57d365d33316881c50c3bf7fd1c98926d10842d3
2020-07-08 05:40:52 +00:00
TreeHugger Robot
fa99bb4b35 Merge "Fix tethering jarjar rule for LocalLog" into rvc-dev am: 6127ca43d6 am: ac7a897a82
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12040945

Change-Id: Ie42e4eeca56b5d4c1b1d087343ab5cadbd8130e4
2020-07-01 08:14:30 +00:00
markchien
8b8e72a00d Fix tethering jarjar rule for LocalLog
LocalLog is in android.util* instead of android.net*.
No crash happened because the methods used by tethering are
@UnsupportedAppUsage.

Bug: 160113128
Test: atest TetheringTests
Change-Id: I5f070b96f96aaabf7ec8da52a3d3444ed940fb56
2020-07-01 03:40:50 +00:00
TreeHugger Robot
0034558936 Merge "tethering: offload: Netlink Req" into rvc-dev am: b7284f6015 am: a02b1f5764
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11970745

Change-Id: Ie57e713cb7ae6a0cd2f2a09397e805c0610194da
2020-06-24 06:56:51 +00:00
TreeHugger Robot
b7284f6015 Merge "tethering: offload: Netlink Req" into rvc-dev 2020-06-24 06:46:47 +00:00
Lorenzo Colitti
aa1630d0b7 Merge "Tethering: Add WiGig support" into rvc-dev am: 7852107b29 am: 67d68b3245
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11953638

Change-Id: Ife486312b6535165935ef5a6eb45428508ca7a6a
2020-06-24 04:53:16 +00:00
Lorenzo Colitti
8c2e6b8a28 tethering: offload: Netlink Req
Send netlink request over fd for offload config before
completing init sequence. Provides existing conntrack
entries to IPA. Resolves issue where there are NAT
misses in IPA due to IPA only having the conntrack
entries added after tethering starts.

Bug: 149109043
Test: OffloadHardwareInterfaceTest
Original-Change: https://android-review.googlesource.com/1290954
Merged-In: Iaf3e847e92f205b55f10fa85c17b9f3995d52099
Change-Id: Iaf3e847e92f205b55f10fa85c17b9f3995d52099
2020-06-24 04:21:47 +00:00
Dedy Lansky
04bef3c435 Tethering: Add WiGig support
This change is a combination of following changes:

1) Tethering: add TETHERING_WIGIG type
   Currently both WIFI and WIGIG use the same tethering type,
   TETHERING_WIFI. This causes conflicts between the frameworks,
   when both WIFI and WIGIG SoftAPs are started, one or both will
   not work.
   Fix this by using a seperate tethering type for WIGIG.

2) Tethering: remove TETHERING_WIGIG state machine on interface down
   The wigig state machine relies on a TETHERING_STATE_CHANGED broadcast
   that is sent when the tethering state machine is first created, during
   interface up. Currently the tethering state machine is not removed
   on interface down except for TETHERING_BLUETOOTH, and as a result
   wigig tethering only works the first time SoftAP is started.
   In order to fix this, remove the tethering state machine on interface
   down for TETHERING_WIGIG as well.

Bug: 143356416
Test: TetheringCoverageTests

Change-Id: Ic4d3aca0ed69234093af7f0206dab3335938c52a
Merged-In: Ic4d3aca0ed69234093af7f0206dab3335938c52a
2020-06-22 23:23:25 +00:00
Wayne Ma
c90944895f Merge "Add framework-statsd dependency and make framework-statsd visible to Tethering package." into rvc-dev am: 7ce578a359 am: ec36861aca
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11926261

Change-Id: I5b8694ce4010bd1a6b9c5fc412b961be0a024095
2020-06-22 09:03:56 +00:00
waynema
41e5aac60f Add framework-statsd dependency and make framework-statsd visible to
Tethering package.

Tethering needs StatsEvent and StatsLog which are in
framework-statsd.stubs.module_lib to write metrics.

Bug: 153942334

Test: make
Change-Id: I8ba142a9b3678de36e6c4880a64e992e00680f38
2020-06-22 06:57:51 +00:00
TreeHugger Robot
1e2669e732 Merge "Let only Ethernet manage ethernet interface up and down" into rvc-dev am: 28c2d1dcca am: 0659449cc0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11908430

Change-Id: Ia503103518ac40046c3adaec4ad6f0d29bede74d
2020-06-19 08:40:52 +00:00
TreeHugger Robot
d861765f0e Merge changes I2292c1cb,I8f60c137 into rvc-dev am: 1115ecda57 am: f4e7d32a7a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11907887

Change-Id: I56b761cf4c35b0f7a84ad210735471ca3d30038d
2020-06-19 07:02:04 +00:00
Lorenzo Colitti
ebc04eff8c Memory leak due to no stop for IpNeighborMonitor. am: 8bcf198c67 am: 7d36cdb6dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11910263

Change-Id: I8f83396e5ccdf2bfd0cbdb376aa6a61656bf3039
2020-06-19 07:02:01 +00:00
Lorenzo Colitti
7d36cdb6dc Memory leak due to no stop for IpNeighborMonitor. am: 8bcf198c67
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11910263

Change-Id: I22a5b3526c32c989be5c0fc644e9f177b8fe2eac
2020-06-19 06:51:19 +00:00
Mark Chien
ce7403cdba Let only Ethernet manage ethernet interface up and down
When LAN link is changed for using ethernet interface from Ethernet tethering to Ethernet,
there is confiict as Ethernet Tethering is trying to make ethernet link down and Ethernet is trying to make ethernet link up.

So, this would make Ethernet only manage ethernet interface link state.

Test: manual
Bug: 130840861
Merged-In: I1cd40ae764bdeecbb59e3889e9399b7f4b05f9cc
Change-Id: I1cd40ae764bdeecbb59e3889e9399b7f4b05f9cc
2020-06-19 06:49:46 +00:00
TreeHugger Robot
1115ecda57 Merge changes I2292c1cb,I8f60c137 into rvc-dev
* changes:
  Test that IpNeighborMonitor is stopped when IpServer stops.
  Memory leak due to no stop for IpNeighborMonitor.
2020-06-19 06:36:50 +00:00
Mark Chien
7092210efe Merge "Add owneship of tethering module" into rvc-dev am: fb8fc4a0f1 am: a2c7d51858
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11910264

Change-Id: I325c036767a6be5a469688fe6828b7e3e83252f7
2020-06-19 05:00:16 +00:00
Treehugger Robot
94a794f01b Add owneship of tethering module
Bug: 158961959
Test: build/make/tools/checkowners.py packages/NetworkStack/OWNERS
Test: ./build/make/tools/checkowners.py \
frameworks/base/packages/Tethering/OWNERS

Merged-In: I13b291e5db6a8a8c9f2bfa477acabaea250aa48c
Change-Id: I13b291e5db6a8a8c9f2bfa477acabaea250aa48c
2020-06-19 03:37:43 +00:00
Treehugger Robot
83f6a384cb Test that IpNeighborMonitor is stopped when IpServer stops.
Bug: 159097215
Test: test-only change
Original-Change: https://android-review.googlesource.com/1343441
Merged-In: I2292c1cbff06a304f70191b88d833b19af2b8b92
Change-Id: I2292c1cbff06a304f70191b88d833b19af2b8b92
2020-06-19 03:06:05 +00:00
Lorenzo Colitti
8bcf198c67 Memory leak due to no stop for IpNeighborMonitor.
1. When Wi-Fi enabled, ap0 interface is added and IpNeighborMonitor's
   start() is invoked in IpServer's constructor.
2. There's no stop for IpNeighborMonitor when IpServer stop.
3. During overnight test for Wi-Fi, networkstack is too slow to
   process request due to memory leak in IpNeighborMonitor and
   binder buffer is blocked causing exception.
Solution: Invoke IpNeighborMonitor.stop() in UnavailableState.enter().

Bug: 159097215
Test: automatic, turn on and off Wi-Fi every 6 seconds overnight
Original-Change: https://android-review.googlesource.com/1343440
Merged-In: I8f60c13706f05306e8f25a15f7861d7ecabbc10e
Change-Id: I8f60c13706f05306e8f25a15f7861d7ecabbc10e
2020-06-19 02:43:57 +00:00
Remi NGUYEN VAN
448560b25b Merge "Move Inet[4]AddressUtils to libs/net" into rvc-dev am: 6555756e90 am: 091cee7eda
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11846903

Change-Id: I50db8012a9facd35176c8a5511b8245623ea315e
2020-06-19 01:22:33 +00:00
Remi NGUYEN VAN
6555756e90 Merge "Move Inet[4]AddressUtils to libs/net" into rvc-dev 2020-06-19 00:49:29 +00:00
Lorenzo Colitti
c0cd967d5d Merge "Move DnsPacket to libs net" into rvc-dev am: db056d4043 am: 297d567d22
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11862407

Change-Id: I10bc0250e9c6b2557f2df7806f92701fef6c3c26
2020-06-18 15:02:44 +00:00
TreeHugger Robot
045040e402 Merge "[BOT.13] Make offload coordinator poll interval configurable" into rvc-dev am: 6fddfb71e4 am: a5cf6f10ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882405

Change-Id: I7e8a9876908bf76e4b0c76cc53169a5012cc79b0
2020-06-18 14:55:44 +00:00
TreeHugger Robot
020ba59998 Merge "[BOT.12] Add unit test for disabling BpfCoordinator by config" into rvc-dev am: 3358560be8 am: c2cb5067bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11883504

Change-Id: I62f44adbed23d553931dc454658602c4601d3d68
2020-06-18 14:55:21 +00:00
TreeHugger Robot
950e9a1f2a Merge changes I48a8de47,I95ea3050,I5a98c4cd into rvc-dev am: ec5a703838 am: 30030529eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11892958

Change-Id: I1fd6b9da18bd86a331781eaae27c9885666ba071
2020-06-18 14:55:08 +00:00
Nucca Chen
9802c1aeab [BOT.8] Dump BPF offload information in dumpsys am: 1f9efaff8d am: 288269fea2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882881

Change-Id: I896fbd7a99c9bea96157837bb89328aa956d15d6
2020-06-18 14:55:05 +00:00
Nucca Chen
923178555c [BOT.10] Add unit test for data limit and rule change in BpfCoordinator am: 796ee2f306 am: 1cc5f033b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882403

Change-Id: Ie8fc9fbe6e4fc9211939b01381b1b9eb3f433292
2020-06-18 14:55:02 +00:00
Mark Chien
18e59cdc1d Merge "Revert "Revert "Pass entitlement configuration to Settings for entitlement check""" into rvc-dev am: 36806fa822 am: b64f7fd66d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11836350

Change-Id: I40b9c2a8b439fe191ae77264ef46823d128a4470
2020-06-18 14:32:29 +00:00
Mark Chien
2c93987411 Merge "Protect invalid entitlement app configuration" into rvc-dev am: 06b2e1cb17 am: 4e8de47ed1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11699076

Change-Id: I27177074a5822cc5767e9a952d9e772957a54e1c
2020-06-18 14:30:41 +00:00
Lorenzo Colitti
db056d4043 Merge "Move DnsPacket to libs net" into rvc-dev 2020-06-18 10:14:47 +00:00
Luke Huang
c1a52b82c9 Move DnsPacket to libs net
This class might be used by some mainline modules.

Bug: 151052811
Test: atest DnsPacketTest
Test: atest DnsResolverTest
Change-Id: I8841d91456952ded5efbf8ea221289aecc7746ad
2020-06-18 16:17:04 +08:00
Nucca Chen
b9ad0b1833 [BOT.13] Make offload coordinator poll interval configurable
Bug: 150736748
Test: BpfCoordinatorTest

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1315576
Merged-In: I7f8dde3b57ee14eb33edbe2fd383df33cccc231c
Change-Id: I70a6e5c8e765daf40cb738feb7fd70cf3c8f052d
(cherry picked from commit bea90943cd)
2020-06-17 07:45:57 +00:00
Nucca Chen
1c63ba39fa [BOT.12] Add unit test for disabling BpfCoordinator by config
Bug: 150736748
Test: BpfCoordinatorTest
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1313802
Merged-In: Iedb936b7592b6be773d1b84a2498bfc5a440a198
Change-Id: I298ae39a1fa61b2cf97752aa908aa2d7d0f9783d
(cherry picked from commit abd6c03d22)
2020-06-17 07:43:41 +00:00
Nucca Chen
3f856b48f9 [BOT.11] BpfCoordinator could be disabled by device config
Bug: 150736748
Test: BpfCoordinatorTest
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1313955
Merged-In: Id413b7f2f7edb2e5c3e02d5677fe536ed52fbbcb
Change-Id: I48a8de478c9200b8c9f88e785340fc7973e4a13f
(cherry picked from commit 41d61b6702)
2020-06-17 07:40:40 +00:00
Nucca Chen
1f9efaff8d [BOT.8] Dump BPF offload information in dumpsys
$ adb shell dumpsys tethering
BPF offload:
  Polling started
  Stats provider registered
  Upstream quota: {rmnet_data2=9223372036854775807}
  Forwarding stats:
    12(rmnet_data2) - ForwardedStats(rxb: 1065, rxp: 5, txb: 0, txp: 0)
  Forwarding rules:
    [wlan1]: iif(iface) oif(iface) v6addr srcmac dstmac
      12(rmnet_data2) 31(wlan1) /2401:e180:8831:77ae:a900:a03b:41fb..

Bug: 150736748
Test: Enable tethering on mobile data and check dumpsys tethering
Original-Change: https://android-review.googlesource.com/1302438
Merged-In: I95ea3050d92f3ba8136a63cd399d3450d183c8dc
Change-Id: I95ea3050d92f3ba8136a63cd399d3450d183c8dc
2020-06-17 07:29:10 +00:00
Nucca Chen
796ee2f306 [BOT.10] Add unit test for data limit and rule change in BpfCoordinator
The applying data limit is based on the forwarding rule changes.
Add the tests for verifying their interactions with netd.

Bug: 150736748
Test: BpfCoordinatorTest
Original-Change: https://android-review.googlesource.com/1311659
Merged-In: I5a98c4cd74e2de6005ee05defa761f6af3fd4e75
Change-Id: I5a98c4cd74e2de6005ee05defa761f6af3fd4e75
2020-06-17 06:35:43 +00:00
Mark Chien
36806fa822 Merge "Revert "Revert "Pass entitlement configuration to Settings for entitlement check""" into rvc-dev 2020-06-17 06:07:52 +00:00
markchien
0ed433e4cd Protect invalid entitlement app configuration
There is a protection in Settings that Settings would gray out if
tethering requires entitlement check but the entitlement app is
invalid. Tethering resource is moved from framework to tethering
module, so Settings can not fetch entitlement app name anymore.

In this change, tethering module would check whether entitltement app
package name is exsited if entitlement check is needed. Tethering would
be not supported (Settings tethering option would be hidded) if
entitlement app is not installed.

After moving the protection into tethering module,
TetherUtil#isProvisioningNeeded is no longer needed. Because The
only use case is Settings wants to gray out tethering setting
when entitltement check is needed but entitlement app is invalid.

Bug: 146918263
Test: atest TetheringCoverageTests
Change-Id: I9a5ff5dbc1db3f3be7fcd7146862a16b373507e6
2020-06-16 19:06:34 +08:00
Mark Chien
5b0fdf6bed Revert "Revert "Pass entitlement configuration to Settings for entitlement check""
Add commit message here for reference:
Tethering resource configuration is move from framework to tethering
module. The resource would not be accessible from outside of tethering
module.
List the replacements of framework resources usage and intent extra:
1. R.string.config_mobile_hotspot_provision_response
    --> android.net.extra.TETHER_PROVISIONING_RESPONSE.
2. R.string.config_mobile_hotspot_provision_app_no_ui
    --> android.net.extra.TETHER_UI_PROVISIONING_APP_NAME
3. R.array.config_mobile_hotspot_provision_app
    --> android.net.extra.TETHER_SILENT_PROVISIONING_ACTION
Besides, the current active subId would put in
android.net.extra.TETHER_SUBID

Note: They are not APIs because of API freeze. Now both tethering module
and Settings define these strings independently.

Bug: 146918263
Test: atest TetherServiceTest
      atest TetherProvisioningActivityTest

This reverts commit 88f2b816aa.

Reason for revert: Resume the CL and put this CL with settings part in the same topic to avoid break.

Change-Id: I114b4c258743661df51e5a969e150047a292e035
2020-06-15 16:38:53 +00:00
Mark Chien
3d8780d1df Merge "Revert "Pass entitlement configuration to Settings for entitlement check"" into rvc-dev am: 322c525e6b am: dfae0aad30
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11836348

Change-Id: I4d52ea1abc8adbda85643e13fd2597f33c0a00ef
2020-06-12 18:03:38 +00:00
Mark Chien
322c525e6b Merge "Revert "Pass entitlement configuration to Settings for entitlement check"" into rvc-dev 2020-06-12 17:33:24 +00:00