Commit Graph

532 Commits

Author SHA1 Message Date
Bill Yi
97eb4abfed Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I8c6eed7de942d3b4d67ad1205ccabf5852ef928f
2020-03-12 16:41:15 -07:00
junyulai
5752baa6b6 [SP21] Address comments for API council review about aosp/1172143
Test: atest FrameworksNetTests ImsPhoneCallTrackerTest
Test: atest TetheringTests NetworkStackTests
Test: m doc-comment-check-docs
Fix: 148552904

Change-Id: I141393f229e772d2eb9f7c156849e379bd71b845
2020-03-12 21:34:17 +08:00
Automerger Merge Worker
9cb35621a6 [TNU01] Add Tethering notification updater
There are lots of Carrier/OEM requests for tethering
notification customization. So add a new tethering notification
updater class which can let OEM customize the behavior they
wanted.

Bug: 122085773
Test: atest TetheringTests
Change-Id: I7faacde7ac84e93ea0dfe03dd33d2cc41c589225
Merged-In: I7faacde7ac84e93ea0dfe03dd33d2cc41c589225
(cherry picked from aosp/1137358)
2020-03-12 01:42:35 +00:00
Anton Hansson
ab74d2b865 Merge "Create all variants of stubs for tethering" into rvc-dev 2020-03-11 10:16:02 +00:00
Anton Hansson
6a9c68b619 Create all variants of stubs for tethering
Add separate publicapi, systemapi and module_libs stubs for tethering.

Bug: 147768409
Test: m
Test: m framework-tethering-stubs-{public,system,module_libs_}api
Change-Id: I0ed44691b4e7080818442a9d0eb37d874f707195
2020-03-10 13:13:36 +00:00
Lorenzo Colitti
407e9eb150 Merge "[SP19] Reduce log when set limit and request stats update" into rvc-dev 2020-03-10 03:06:21 +00:00
Mark Chien
47f84e53b0 Merge "Send offload status changed callback" into rvc-dev 2020-03-09 09:50:20 +00:00
Mark Chien
137cb5acfe Merge "Tethering: add isTetheringSupported with callerPkg parameter" into rvc-dev 2020-03-09 09:49:56 +00:00
Paul Hu
ccf6239513 Merge "[TNU01] Add Tethering notification updater" 2020-03-09 08:10:55 +00:00
Automerger Merge Worker
74f27e6f63 Send offload status changed callback
The callback would be fired when offload started, stopped, or failed.
If offload is not supported, "failed" callback would be fired when user
enable tethering. Enabling multiple tethering would not have multiple
offload status callbacks because offload should already be started or
failed.

Bug: 130596697
Test: -build, flash, boot
      -atest TetheringTests
      -ON/OFF hotspotf

Change-Id: Ifb16dcedc8081833fa95a39596fe5cdc309ededd
Merged-In: Ifb16dcedc8081833fa95a39596fe5cdc309ededd
Merged-In: Ia0398601144b0e5f61dc0c5771eacf13e7cfbb59
(cherry picked from commit cd266076bed28459234c5d74ad373867944df116)
2020-03-09 07:59:29 +00:00
Automerger Merge Worker
cee6cd88ee [SP19] Reduce log when set limit and request stats update
setLimit can be ignored if the quota is unlimited and not
changed, and the log could be omitted since it will still be
logged in HAL. Request stats update will print error log in
service if it is not correctly responded in time.

Test: atest TetheringTests
Test: manual
Fix: 149735152
AOSP-Change: 1242601
Change-Id: I01c0191d5b89942fa69b167b8a6b40ed2821300b
Merged-In: I92d214f4648fec6be13e04147290ecdd156fab4e
(cherry picked from commit b9565c7db00e44b50f9983691b603ebd6918ee45)
2020-03-09 07:54:27 +00:00
Mark Chien
cf9a67a5db Merge "Fix crash and duplicated ethernet tethering request" into rvc-dev 2020-03-09 07:51:43 +00:00
Automerger Merge Worker
f1194880cb Merge the following changes to tethering:
======
Fix a logic error in IpServerTest#addRemoveipv6ForwardingRules

When checking that link-local and multicast neighbours are
ignored, make sure the test neighbours are added on the correct
interface. Otherwise, they might be ignored because events on the
wrong interface are ignored, and not necessarily because
link-local and multicast neighbours are ignored.

Test: atest TetheringTests
Change-Id: I4a624ea4ce9ee9a9352afccbc7bf866587d4cdfa
======
Clear IPv6 forwarding rules when losing upstream or stopping.

Test: new unit test
Change-Id: I8626932e43e0daa300dad5fe6a81f47a6d667030
======

Bug: 149963652
Change-Id: I691053b22cb0b20e49419212f378cc473b1f35dc
(cherry picked from commit 3384bb9a4d7bd85370fe64e59f2872a5cab644d7)
2020-03-09 03:25:23 +00:00
Automerger Merge Worker
230178c6af Support losing the upstream in IpServerTest.
Allow dispatchTetherConnectionChanged to pass in a null
upstream interface and/or null LinkProperties. This will allow
future tests to check what happens when the upstream interface
goes away.

Bug: 149963652
Test: test-only change
Change-Id: I7cfc32d072f23644159d33700d6cd830c426ea19
Merged-In: I7cfc32d072f23644159d33700d6cd830c426ea19
(cherry picked from commit 62457f17e72c7ef0bee5c5bb1a04935a549b9fe6)
2020-03-09 03:02:22 +00:00
Mark Chien
a24b188455 Merge "Send offload status changed callback" 2020-03-09 02:52:07 +00:00
Automerger Merge Worker
1adfc1cbf1 Tethering: add isTetheringSupported with callerPkg parameter
BT tethering need to know whether tethering is supported for its caller
that call isTetheringSupported in binder thread under BT's process.
Current isTetheringSupported API is getting callerPkg inside
TetheringManager that would be BT's package name for bt tethering case.
Provide isTetheringSupported(String callerPkg) for caller to pass its
caller's package name if the use case is under binder IPC.

Bug: 146915889
Test: -boot, flash, boot

Change-Id: I01646fe045772c57b4e39a5e129531f8a2cea89f
Merged-In: I01646fe045772c57b4e39a5e129531f8a2cea89f
Merged-In: I2a35e1b6851e7a799c343be0dd60da23514768ba
(cherry picked from commit e09a92fabe7956692f34e94c198d9763bf76e53d)
2020-03-09 02:42:28 +00:00
Automerger Merge Worker
0a368b10bc Fix crash and duplicated ethernet tethering request
This change fix two things:
1. Handle ethernet callback in internal thread to avoid crash. IpServer
should be created from tethering thread, otherwise mIpNeighborMonitor of
IpServer would throw
   IllegalStateException("start() called from off-thread")
2. Ethernet tethering request may be duplicated if multiple
startTethering is called but no stopTethering

Bug: 130840861
Bug: 148824036
Test: ON/OFF ethernet tehtering manually
      atest TetheringTests

Change-Id: Ibd3ea6bc6751bd65647ff381f9b0124bc3395c09
Merged-In: I7c5127e96d80d077735010d2e62c7227805ccb10
Merged-In: Ibd3ea6bc6751bd65647ff381f9b0124bc3395c09
(cherry picked from commit 72702b979654234c18045f04270040056a74cf90)
2020-03-09 02:02:23 +00:00
markchien
05bee8027d Send offload status changed callback
The callback would be fired when offload started, stopped, or failed.
If offload is not supported, "failed" callback would be fired when user
enable tethering. Enabling multiple tethering would not have multiple
offload status callbacks because offload should already be started or
failed.

Bug: 130596697
Test: -build, flash, boot
      -atest TetheringTests
      -ON/OFF hotspot
Change-Id: Ia0398601144b0e5f61dc0c5771eacf13e7cfbb59
2020-03-09 01:51:20 +00:00
paulhu
08294f9c09 [TNU01] Add Tethering notification updater
There are lots of Carrier/OEM requests for tethering
notification customization. So add a new tethering notification
updater class which can let OEM customize the behavior they
wanted.

Bug: 122085773
Test: atest TetheringTests
Change-Id: I7faacde7ac84e93ea0dfe03dd33d2cc41c589225
2020-03-09 09:20:19 +08:00
markchien
06ea03a6c4 Tethering: add isTetheringSupported with callerPkg parameter
BT tethering need to know whether tethering is supported for its caller
that call isTetheringSupported in binder thread under BT's process.
Current isTetheringSupported API is getting callerPkg inside
TetheringManager that would be BT's package name for bt tethering case.
Provide isTetheringSupported(String callerPkg) for caller to pass its
caller's package name if the use case is under binder IPC.

Bug: 146915889
Test: -boot, flash, boot
Change-Id: I2a35e1b6851e7a799c343be0dd60da23514768ba
2020-03-03 14:27:04 +08:00
Jiyong Park
5c72ad41f0 Mark updatable APEXes
Mark updatable APEXes as updatable: true so that they are opted-out from
optimizations that make sense only for non-updatable modules; such as
symlinking to the libs in the system partition.

Bug: 149805758
Test: m and check that there is no symlink from the APEX to the system
partition.

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: Idb55300a60a261c7bb6359439ed220ff51fcf06c
(cherry picked from commit 8201bdfab070fb2b93a997947095fad003060da9)
Change-Id: Idb55300a60a261c7bb6359439ed220ff51fcf06c
2020-02-29 09:18:24 +00:00
Lorenzo Colitti
048c96276b Merge "Fix crash and duplicated ethernet tethering request" 2020-02-28 02:37:45 +00:00
TreeHugger Robot
1131b744f0 Merge "Mark updatable APEXes" into rvc-dev 2020-02-28 02:05:04 +00:00
markchien
3849d89111 Fix crash and duplicated ethernet tethering request
This change fix two things:
1. Handle ethernet callback in internal thread to avoid crash. IpServer
should be created from tethering thread, otherwise mIpNeighborMonitor of
IpServer would throw
   IllegalStateException("start() called from off-thread")
2. Ethernet tethering request may be duplicated if multiple
startTethering is called but no stopTethering

Bug: 130840861
Bug: 148824036
Test: ON/OFF ethernet tehtering manually
      atest TetheringTests

Change-Id: I7c5127e96d80d077735010d2e62c7227805ccb10
2020-02-27 14:50:16 +08:00
Jooyung Han
81675e2d94 tethering: transitive deps from jni_libs
The build system collects transtive deps from jni_libs for APKs.
No need to list them explicitly in android_app definition.

Bug: 146992436
Test: m com.android.tethering
      deapexer extract com.android.tethering.apex apex
      unzip apex/priv-app/Tethering/Tethering.apk -u apk
      ls apk/lib/arm64-v8a

Merged-In: Icba6ea3611c443cbf22ad6363d0239377d16ac9e
Change-Id: Icba6ea3611c443cbf22ad6363d0239377d16ac9e
(cherry picked from commit 9618b66f285ad5baa50b004b788d60272958a04d)
2020-02-26 14:14:17 +09:00
Treehugger Robot
02dd6fdfd3 Merge "tethering: transitive deps from jni_libs" 2020-02-25 22:13:19 +00:00
Automerger Merge Worker
5650a2bcce Build framework-tethering against module_current
Bug: 146757305
Test: build

Change-Id: Id6051296a02060179666b67fc6ea9092273c1780
Merged-In: Id6051296a02060179666b67fc6ea9092273c1780
Merged-In: Iad504f0e709daadfb4d86205c07f0faf429f5a8f
(cherry picked from commit bb09ceaf09c8aea00a5001ba7079c13a2575e809)
2020-02-25 09:47:25 +00:00
Treehugger Robot
9821f7e940 Merge "[SP19] Reduce log when set limit and request stats update" 2020-02-25 09:14:24 +00:00
Jooyung Han
cfea439ba4 tethering: transitive deps from jni_libs
The build system collects transtive deps from jni_libs for APKs.
No need to list them explicitly in android_app definition.

Bug: 146992436
Test: m com.android.tethering
      deapexer extract com.android.tethering.apex apex
      unzip apex/priv-app/Tethering/Tethering.apk -u apk
      ls apk/lib/arm64-v8a

Change-Id: Icba6ea3611c443cbf22ad6363d0239377d16ac9e
2020-02-25 17:35:18 +09:00
junyulai
fd4a2f0528 [SP19] Reduce log when set limit and request stats update
setLimit can be ignored if the quota is unlimited and not
changed, and the log could be omitted since it will still be
logged in HAL. Request stats update will print error log in
service if it is not correctly responded in time.

Test: atest TetheringTests
Test: manual
Fix: 149735152

Change-Id: I01c0191d5b89942fa69b167b8a6b40ed2821300b
2020-02-25 15:02:10 +08:00
Lorenzo Colitti
0f0bff0594 Merge changes I4a624ea4,I8626932e
* changes:
  Fix a logic error in IpServerTest#addRemoveipv6ForwardingRules
  Clear IPv6 forwarding rules when losing upstream or stopping.
2020-02-25 03:54:59 +00:00
Lorenzo Colitti
6c8147ea56 Fix a logic error in IpServerTest#addRemoveipv6ForwardingRules
When checking that link-local and multicast neighbours are
ignored, make sure the test neighbours are added on the correct
interface. Otherwise, they might be ignored because events on the
wrong interface are ignored, and not necessarily because
link-local and multicast neighbours are ignored.

Test: atest TetheringTests
Change-Id: I4a624ea4ce9ee9a9352afccbc7bf866587d4cdfa
2020-02-25 09:26:36 +09:00
Lorenzo Colitti
c61fc087b2 Clear IPv6 forwarding rules when losing upstream or stopping.
Test: new unit test
Change-Id: I8626932e43e0daa300dad5fe6a81f47a6d667030
2020-02-25 09:26:36 +09:00
markchien
9e0792f8dc Build framework-tethering against module_current
Test: build
Change-Id: Iad504f0e709daadfb4d86205c07f0faf429f5a8f
2020-02-25 00:22:44 +08:00
Jiyong Park
477b4734f5 Mark updatable APEXes
Mark updatable APEXes as updatable: true so that they are opted-out from
optimizations that make sense only for non-updatable modules; such as
symlinking to the libs in the system partition.

Bug: 149805758
Test: m and check that there is no symlink from the APEX to the system
partition.

Change-Id: Idb55300a60a261c7bb6359439ed220ff51fcf06c
2020-02-24 21:10:56 +09:00
Lorenzo Colitti
a429d3b551 Merge "Support losing the upstream in IpServerTest." 2020-02-23 10:18:02 +00:00
Anton Hansson
050ccee922 Re-submit "Create all variants of stubs for wifi"
Use sdk_version: module_current instead.

This reverts commit d20f03011f95bd04bace0977d246cdc737ce5627.

Bug: 147768409
Test: m
Test: build/soong/soong_ui.bash --make-mode dist ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Exempt-From-Owner-Approval: clean cp
Change-Id: I36cf007a4813027721dfb6389e10cf95085f85e4
Merged-In: I36cf007a4813027721dfb6389e10cf95085f85e4
(cherry picked from commit 21f0ed2a0aceddd4ce3dfcf792cb1ae9a144547b)
2020-02-22 11:05:37 +00:00
Colin Cross
131380ff26 Remove liblog from Tethering jni_libs
Tethering's JNI libraries use the NDK version of liblog, it should
not package the platform version of liblog into the APK.

Bug: 149591340
Test: m checkbuild
Change-Id: If208c1078d2755907f57d7853a5c545bf12458c2
2020-02-21 14:49:40 -08:00
Automerger Merge Worker
3bd7306154 Merge "Use exposed permission defintion in Tethering" am: f1a0c3abea am: e8f538b03a am: d53db580d7
Change-Id: Ieba1160f9f333ac9b112941a8fdcc15e9b563d5b
2020-02-21 12:21:04 +00:00
Lorenzo Colitti
03a734f352 Support losing the upstream in IpServerTest.
Allow dispatchTetherConnectionChanged to pass in a null
upstream interface and/or null LinkProperties. This will allow
future tests to check what happens when the upstream interface
goes away.

Test: test-only change
Change-Id: I7cfc32d072f23644159d33700d6cd830c426ea19
2020-02-21 20:23:59 +09:00
Chiachang Wang
1784f25df5 Use exposed permission defintion in Tethering
The permissions are checked by Tethering; mainline modules should be
able to do permission checks based on these permissions.

Bug: 135411507
Test: m
Change-Id: Ib7f2aedfaaa909bbc356196114c62af9345f2593
2020-02-21 17:50:18 +08:00
Automerger Merge Worker
8a6e5c57b1 Merge "Stop exposing constructor of TetheringConstants" am: e19cd8f3ab am: f2472fa7aa am: 051bd7f721
Change-Id: If4cf11820b0d712584e7ee393c26c7c359d7952f
2020-02-20 13:27:19 +00:00
Mark Chien
e19cd8f3ab Merge "Stop exposing constructor of TetheringConstants" 2020-02-20 12:46:19 +00:00
Anton Hansson
703048d08b Merge "Stop exposing generated AIDL from Tethering" 2020-02-20 12:18:34 +00:00
Anton Hansson
62d3e5c218 Merge "Stop exposing generated AIDL from Tethering" 2020-02-20 10:41:29 +00:00
markchien
1bec13e963 Stop exposing constructor of TetheringConstants
Fully-static utility classes must not have constructor.

Bug: 149430003
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I18e1129ef8717211d667ccd3b4110169dd7905b4
2020-02-20 16:11:35 +08:00
Automerger Merge Worker
cce2909d0f Merge "Tethering: Don't crash if wifi unavailable." am: 084e8536d1 am: b1b7db8c76 am: 911b4cf5cd
Change-Id: I62927826271d36eb89f39ac076f0bf9522a61423
2020-02-20 04:29:18 +00:00
Automerger Merge Worker
6bc4e1f98c Merge "Tethering offload: add/remove IPv6 forwarding rules on ND events." am: 9a1f9d4669 am: 8d78f124e7 am: 2353495350
Change-Id: If7947436f2a26786f69377712ad0ff1234ac93fe
2020-02-19 23:12:04 +00:00
Automerger Merge Worker
696580b598 Merge "Minimal support for IPv6 upstreams in IpServer tests." am: ffd4bf34be am: 21d63cba5b am: 954d0c274f
Change-Id: Iba46592442663cdc9b69aa2c5cb1ea0893f8f087
2020-02-19 23:11:42 +00:00
Automerger Merge Worker
75f615e14c Merge "Reduce advertised ipv6 mtu by 16 to fit ethernet header" am: b23d20fea7 am: 376e086fef am: f0fff78d9d
Change-Id: I2ce8d87603b1628735b376efe21da43d3ea53225
2020-02-19 23:11:06 +00:00