Commit Graph

990 Commits

Author SHA1 Message Date
Lorenzo Colitti
925f8f07b3 Merge "tethering: offload: Netlink Req" am: b90c974174 am: d45fd82ad0 am: 4d2944cda4 am: ee131d4c64 am: 52116b6880
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1290954

Change-Id: I414456f814a807a0a38cceb50164b6468adc2d10
2020-06-24 04:24:45 +00:00
Lorenzo Colitti
4d2944cda4 Merge "tethering: offload: Netlink Req" am: b90c974174 am: d45fd82ad0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1290954

Change-Id: I5f976d70d87ef25ebb8e1483532781ac3d42425b
2020-06-24 03:44:31 +00:00
Lorenzo Colitti
b90c974174 Merge "tethering: offload: Netlink Req" 2020-06-24 03:11:26 +00:00
Mark Chien
93743bb990 Merge "Tethering: Add WiGig support" am: 65fadfc134 am: 6c5b5b0803 am: fdf89ee7fb am: 45fa4f9c88 am: 5131fee94b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1177323

Change-Id: I2d3971390e897be6669d2f2d4b261eb73875c267
2020-06-23 00:09:17 +00:00
Mark Chien
fdf89ee7fb Merge "Tethering: Add WiGig support" am: 65fadfc134 am: 6c5b5b0803
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1177323

Change-Id: Ib48182d51cc6e4586cb43f8ca51ea673ee14d1d7
2020-06-22 23:43:43 +00:00
Dedy Lansky
6896f6193f 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
2020-06-22 21:17:46 +08:00
Wayne Ma
3b775c82bd Merge "Add framework-statsd dependency and make framework-statsd visible to Tethering package." into rvc-dev am: 7ce578a359 am: 4b0912d248 am: a896f25304 am: 827aab1906
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11926261

Change-Id: If7ceba040765291a499d8d2f04075acceeff2401
2020-06-22 09:30:54 +00:00
Wayne Ma
a896f25304 Merge "Add framework-statsd dependency and make framework-statsd visible to Tethering package." into rvc-dev am: 7ce578a359 am: 4b0912d248
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11926261

Change-Id: I39dec2d8f085dc8aeb93387bc3cdd36fd25d7000
2020-06-22 09:03:59 +00:00
Wayne Ma
31b6461408 Merge "Add framework-statsd dependency and make framework-statsd visible to Tethering package." into rvc-dev am: 7ce578a359
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11926261

Change-Id: I81e0304f0560cbd070c5bb49967a8b6bf3e5d58a
2020-06-22 08:51:46 +00:00
waynema
b7048af0a9 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
Remi NGUYEN VAN
419b298d6f Merge "Use unstable networkstack AIDLs in development branches" into rvc-dev-plus-aosp am: 6534f90a6c am: fa4f5aa996 am: 8a0acb5335
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11863640

Change-Id: I03e05b0c7200ce0daa5e11ba4caa00d19a89f6cc
2020-06-22 05:06:33 +00:00
Remi NGUYEN VAN
6534f90a6c Merge "Use unstable networkstack AIDLs in development branches" into rvc-dev-plus-aosp 2020-06-22 04:32:42 +00:00
markchien
4c9428a135 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
Merged-In: I9a5ff5dbc1db3f3be7fcd7146862a16b373507e6
2020-06-20 10:19:25 +08:00
markchien
902043f5c3 Pass entitlement configuration to Settings for entitlement check
Tethering resource configuration is move from framwork to tethering
module. Since tethering resource would not be accessible from outside
of tethering module, EntitlementManager would tell Settings the
entitlement configuration via intent extra when run entitlement check.

Bug: 146918263
Test: atest TetheringTests
Change-Id: I6f23553bb1da5f0b767f920b32a86fafb9e00b9e
Merged-In: I6f23553bb1da5f0b767f920b32a86fafb9e00b9e
2020-06-20 10:19:21 +08:00
Mark Chien
d949606715 Merge "Let only Ethernet manage ethernet interface up and down" am: ac8445ca3b am: eb4a072814 am: 0d3aeb6139 am: 74698ef2a0 am: 6910372402
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1317394

Change-Id: Ic1b5a996c60665ecbc1a5a3e29435eb65bfec475
2020-06-19 06:52:12 +00:00
Mark Chien
675697222a 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
aee09af636 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
0d3aeb6139 Merge "Let only Ethernet manage ethernet interface up and down" am: ac8445ca3b am: eb4a072814
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1317394

Change-Id: Ifc233eff24c893ca542e75b683be0628eafba37f
2020-06-19 06:25:12 +00:00
Mark Chien
ac8445ca3b Merge "Let only Ethernet manage ethernet interface up and down" 2020-06-19 05:55:35 +00:00
Treehugger Robot
48e22cdaf9 Merge "Test that IpNeighborMonitor is stopped when IpServer stops." am: 3fd7eb2154 am: a5edc98546 am: 57c16390af am: 9508d5fc69 am: 60761234fa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1343441

Change-Id: Iaf97a700159eace571369defd5561c46b83f2e72
2020-06-19 03:49:04 +00:00
Milim Lee
9807816e09 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
Change-Id: I1cd40ae764bdeecbb59e3889e9399b7f4b05f9cc
2020-06-19 12:44:22 +09:00
Treehugger Robot
a4a8a315fe 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
9644bc01dd 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
Treehugger Robot
57c16390af Merge "Test that IpNeighborMonitor is stopped when IpServer stops." am: 3fd7eb2154 am: a5edc98546
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1343441

Change-Id: Iddcf13599efd093b2cf2d2228a3f7be69178e5fc
2020-06-19 03:04:46 +00:00
Lorenzo Colitti
93e59ee726 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
ffcec4326b Merge "Move Inet[4]AddressUtils to libs/net" into rvc-dev am: e7afe55beb am: 2e342b8676 am: f991e518b7 am: c7e93bbdcf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11846903

Change-Id: I9791fe78ecbe5c91f00225c13db7f9ed9f5823d4
2020-06-19 01:57:56 +00:00
Remi NGUYEN VAN
2e342b8676 Merge "Move Inet[4]AddressUtils to libs/net" into rvc-dev am: e7afe55beb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11846903

Change-Id: Icd141a992c46290c74929785e261a1cd57bc001b
2020-06-19 01:08:48 +00:00
Remi NGUYEN VAN
e7afe55beb Merge "Move Inet[4]AddressUtils to libs/net" into rvc-dev 2020-06-19 00:49:29 +00:00
Automerger Merge Worker
b2693aadc9 Merge "Merge "Memory leak due to no stop for IpNeighborMonitor." am: 4cc7532355 am: 1e488831bd" into rvc-dev-plus-aosp am: 6a952e4f88 am: 174565a6e4 am: 5fe774d267
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1343440

Change-Id: I9c094ae365e5f0e5aa1cae332faed7956e897d82
2020-06-18 18:06:50 +00:00
Lorenzo Colitti
51229ef8f0 Merge "Memory leak due to no stop for IpNeighborMonitor." am: 4cc7532355 am: 1e488831bd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1343440

Change-Id: Idef540bd66d193eb9b7071374736633c7d0323d7
2020-06-18 16:36:32 +00:00
Lorenzo Colitti
00ea6cecd8 Test that IpNeighborMonitor is stopped when IpServer stops.
Bug: 159097215
Test: test-only change
Change-Id: I2292c1cbff06a304f70191b88d833b19af2b8b92
2020-06-18 23:51:56 +09:00
h.zhang
d244bd097c 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
Change-Id: I8f60c13706f05306e8f25a15f7861d7ecabbc10e
2020-06-18 23:51:16 +09:00
Lorenzo Colitti
06e8fb1d0e Merge "Move DnsPacket to libs net" into rvc-dev am: 52032fa586 am: b957bd7af2 am: b2c6c0f0a8 am: 7295cb165c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11862407

Change-Id: Ida1e72cf4d56b175ba2121fd8ed06b3701aad770
2020-06-18 11:23:50 +00:00
Lorenzo Colitti
b957bd7af2 Merge "Move DnsPacket to libs net" into rvc-dev am: 52032fa586
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11862407

Change-Id: Ia19cb44ad56e4358c63564261d481459d1386542
2020-06-18 10:34:11 +00:00
Lorenzo Colitti
52032fa586 Merge "Move DnsPacket to libs net" into rvc-dev 2020-06-18 10:14:47 +00:00
Luke Huang
8dd7e0a936 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
Treehugger Robot
506381245b Merge "Add owneship of tethering module" am: 51a573cd07 am: ee9b027fce am: 2fd07fd83c am: d1168d23f2 am: daef140cf2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1340034

Change-Id: I773f0fe638f1bc62930085c333b48af9ce68b7f9
2020-06-18 07:17:04 +00:00
Treehugger Robot
2fd07fd83c Merge "Add owneship of tethering module" am: 51a573cd07 am: ee9b027fce
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1340034

Change-Id: Ic2f337be5cf8ed7f89fb88a2395df902cbdac441
2020-06-18 06:45:55 +00:00
Treehugger Robot
51a573cd07 Merge "Add owneship of tethering module" 2020-06-18 06:14:44 +00:00
markchien
c907a99efd 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

Change-Id: I13b291e5db6a8a8c9f2bfa477acabaea250aa48c
2020-06-18 11:34:29 +08:00
Nucca Chen
1c0d8487b4 [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 bb61893406)
2020-06-17 07:45:57 +00:00
Nucca Chen
0a0d4e156d [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 3aba923ce2)
2020-06-17 07:43:41 +00:00
Nucca Chen
d105961e58 [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 fe737bc2b2)
2020-06-17 07:40:40 +00:00
Nucca Chen
a340f25d3e [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
bb61893406 Merge "[BOT.13] Make offload coordinator poll interval configurable" am: 8b7c9a2f87 am: 558d3e3ad2 am: c2be69eff8 am: ce40743de1 am: 9f6da6a9e7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1315576

Change-Id: I70a6e5c8e765daf40cb738feb7fd70cf3c8f052d
2020-06-17 07:04:26 +00:00
Nucca Chen
3aba923ce2 Merge "[BOT.12] Add unit test for disabling BpfCoordinator by config" am: 6241525504 am: d36e818816 am: 4a87f05849 am: 0bfb34ebf0 am: d0e50377a4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1313802

Change-Id: I298ae39a1fa61b2cf97752aa908aa2d7d0f9783d
2020-06-17 07:03:57 +00:00
Nucca Chen
fe737bc2b2 Merge "[BOT.11] BpfCoordinator could be disabled by device config" am: e8c985be78 am: 36e37ff125 am: d7f13cb23b am: 2ccef37a68 am: e6f8681f33
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1313955

Change-Id: I48a8de478c9200b8c9f88e785340fc7973e4a13f
2020-06-17 07:03:39 +00:00
Nucca Chen
cb183c30cf Merge "[BOT.8] Dump BPF offload information in dumpsys" am: e765ab3d36 am: 52d3db170e am: be3598c113 am: 7f90b4033b am: 4dab032009
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1302438

Change-Id: Id4f11bacd0e3fd3c1b9426465e38d1f01fb4ecd6
2020-06-17 07:03:18 +00:00
Nucca Chen
3af4ef9ce5 Merge "[BOT.10] Add unit test for data limit and rule change in BpfCoordinator" am: 8392e11329 am: 0d295a8642 am: b079e02a39 am: 5b878baac3 am: e424cd0a18
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1311659

Change-Id: I9e5ca6c6d61e35f0b65add90b19d59c05a77bf0f
2020-06-17 07:02:46 +00:00
Mark Chien
37867cc26b Merge "Revert "Revert "Pass entitlement configuration to Settings for entitlement check""" into rvc-dev am: 404c3adad7 am: 7e501e2967 am: bccb89a187 am: 36a6c56989
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11836350

Change-Id: Ic89fe046e75a76aebf05e47c8754010f52a45536
2020-06-17 07:02:13 +00:00