Commit Graph

58 Commits

Author SHA1 Message Date
Automerger Merge Worker
9605040e31 Merge "Add UpstreamNetworkState for tethering" am: 9b141cc23c am: 5c351eb894 am: ad929e93e2
Change-Id: I530e4c189bf238cf9f4bc6b430c4cee724634840
2019-12-24 06:05:38 +00:00
markchien
c6485f8368 Add UpstreamNetworkState for tethering
Previous tethering use NetworkState to encapsulate network states.
But NetworkState is hide API and Tethering just use NetworkState
locally that it don't interact with other module by NetworkState.
To avoid hide API accessing and reduce dependency, replace
NetworkState as UpstreamNetworkState in tethering.

Bug: 144758082
Test: atest TetheringTests
     OFF/ON hotspot

Change-Id: Ia1837b6ed983a64c3ed72ecf0e6f46d91b3af7da
2019-12-23 17:38:40 +08:00
Automerger Merge Worker
52295aaaff [automerger skipped] Merge "Fix clean InProcessTethering fail problem" am: 62fa7a179d am: 5faa2ebe67 am: 32c27d52e9 -s ours
am skip reason: Change-Id I58750e4a1fe11018d83da1ebf828d1b3134ec765 with SHA-1 64134b6f22 is in history

Change-Id: I667b12c919dacea00100dc87994a4841f5a2c966
2019-12-20 17:40:48 +00:00
Treehugger Robot
62fa7a179d Merge "Fix clean InProcessTethering fail problem" 2019-12-20 16:34:23 +00:00
TreeHugger Robot
935835dace Merge "Fix clean InProcessTethering fail problem" 2019-12-20 15:42:05 +00:00
markchien
2000bfe8a7 Fix clean InProcessTethering fail problem
CleanSpec only respect root of a git project.
Remove packages/Tethering/CldanSpec.mk because it never
be read.

Bug: 144320246
Test: manual build InProcessTethering and observed it is removed
      after adding new clean step.

Change-Id: I58750e4a1fe11018d83da1ebf828d1b3134ec765
Merged-In: I58750e4a1fe11018d83da1ebf828d1b3134ec765
2019-12-20 22:18:01 +08:00
Automerger Merge Worker
e4ff7a3612 [automerger skipped] Merge "[Tether13] Move TetheringManager into framework" am: 2410d67357 am: 25cc1f47c5 am: 08074c62b0 -s ours
am skip reason: Change-Id Ib051bea724a256f9c4572b566e46ae7b9c4abe6e with SHA-1 e7ccfca9da is in history

Change-Id: Id5b74e1af8e1a4276137b4f3eb3d8ffc1a2c903c
2019-12-20 14:13:17 +00:00
markchien
64134b6f22 Fix clean InProcessTethering fail problem
CleanSpec only respect root of a git project.
Remove packages/Tethering/CldanSpec.mk because it never
be read.

Bug: 144320246
Test: manual build InProcessTethering and observed it is removed
      after adding new clean step.

Change-Id: I58750e4a1fe11018d83da1ebf828d1b3134ec765
2019-12-20 21:58:00 +08:00
markchien
e7ccfca9da [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

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

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-20 10:31:31 +08:00
Automerger Merge Worker
e33cebeae3 [automerger skipped] Merge "Change Tethering package name" am: 7b2a29361c am: f44a25f10d am: 4f45f0d642 -s ours
am skip reason: Change-Id I2c7647abb996539a3af6cfe0e0214a5e8927c0d6 with SHA-1 eda5d30035 is in history

Change-Id: I9e2d1a340289e461bc072f1684cb11b06679d514
2019-12-19 13:04:36 +00:00
markchien
9d3538260b [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

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

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-19 20:53:06 +08:00
markchien
8f831c09e5 Change Tethering package name
".apex" is easy to confuse.
Rename as below:
apex: com.android.tethering.apex -> com.android.tethering
apk: com.android.tethering -> com.android.networkstack.tethering

Bug: 146471733
Test: build

Change-Id: I2c7647abb996539a3af6cfe0e0214a5e8927c0d6
Merged-In: I2c7647abb996539a3af6cfe0e0214a5e8927c0d6
2019-12-19 13:06:50 +08:00
markchien
eda5d30035 Change Tethering package name
".apex" is easy to confuse.
Rename as below:
apex: com.android.tethering.apex -> com.android.tethering
apk: com.android.tethering -> com.android.networkstack.tethering

Bug: 146471733
Test: build

Change-Id: I2c7647abb996539a3af6cfe0e0214a5e8927c0d6
2019-12-19 12:57:39 +08:00
TreeHugger Robot
81bebe8280 Merge "tether: Use new API: startTetheredHotspot to enable hotspot" 2019-12-16 13:49:34 +00:00
Automerger Merge Worker
21f8effe61 Merge "Protect early access before tethering ready" am: 4cd05d9fdc am: ede35e955d am: 0bec442453
Change-Id: I7837cdd4cd18d3925f9198a5864a601df745039c
2019-12-13 04:00:47 +00:00
Treehugger Robot
4cd05d9fdc Merge "Protect early access before tethering ready" 2019-12-13 03:25:41 +00:00
lesl
44d5357a67 tether: Use new API: startTetheredHotspot to enable hotspot
Bug: 146180860
Test: atest TetheringTests
Change-Id: I14be9c446319fad0706bf8c20faaba7801d638a2
2019-12-13 11:00:24 +08:00
markchien
59aa54a9b0 Protect early access before tethering ready
Bug: 145876447
Test: build, flash, boot
Change-Id: Ic40b6080a662e312e4efd7246d964710d9f07bef
2019-12-13 10:12:59 +08:00
Automerger Merge Worker
63d25720c7 [automerger skipped] Merge "Add new UnsupportedAppUsage annotation as lib dependency." am: 938bc05883 am: 05057bd860 am: a80641662a -s ours
am skip reason: Change-Id Ibb7f8424186149365354a96249c06c9fccde66bd with SHA-1 d24aeefdbc is in history

Change-Id: I823ade8fdf61a924b07d48312005057780fd2cb7
2019-12-12 14:36:39 +00:00
Artur Satayev
2b6d27a838 Add new UnsupportedAppUsage annotation as lib dependency.
Bug: 145132366
Test: m
Change-Id: Ibb7f8424186149365354a96249c06c9fccde66bd
Merged-In: Ibb7f8424186149365354a96249c06c9fccde66bd
2019-12-11 19:44:16 +00:00
Artur Satayev
d24aeefdbc Add new UnsupportedAppUsage annotation as lib dependency.
Bug: 145132366
Test: m
Change-Id: Ibb7f8424186149365354a96249c06c9fccde66bd
2019-12-11 18:18:18 +00:00
Baligh Uddin
281d40c8d8 Fix tethering apex version to be 30xxxx series, not 29xxxx
BUG: 143747402
Change-Id: Ic1c10100837879a3b4337c7df6cfb36aea8c33c9
2019-12-08 09:55:13 -08:00
Automerger Merge Worker
a463ade423 [automerger skipped] Merge "Migrate tethering notification resources" am: b385c965db am: 2548410cf6 -s ours
am skip reason: Change-Id I832103090d500fd8e2e2efb9dc7151426da3f88d with SHA-1 0988213c60 is in history

Change-Id: I8b73500a3a1d029c97658ac3299ba9194600029d
2019-12-04 22:39:33 +00:00
Paul Hu
b385c965db Merge "Migrate tethering notification resources" 2019-12-04 09:00:03 +00:00
paulhu
8224d9f2af Migrate tethering notification resources
Migrate the resources which are only used by tethering notification
from framework/base/core/res to tethering package resource
folder.

Bug: 122085773
Bug: 139763854
Test: build pass
Change-Id: I832103090d500fd8e2e2efb9dc7151426da3f88d
Merged-In: I832103090d500fd8e2e2efb9dc7151426da3f88d
2019-12-04 14:29:38 +08:00
paulhu
0988213c60 Migrate tethering notification resources
Migrate the resources which are only used by tethering notification
from framework/base/core/res to tethering package resource
folder.

Bug: 122085773
Bug: 139763854
Test: build pass
Change-Id: I832103090d500fd8e2e2efb9dc7151426da3f88d
2019-12-03 02:32:06 +00:00
Mark Chien
7caddec5f0 Merge "[Tether17] create com.android.tethering.apex package" am: 89deaefdfb am: f1960474b1
am: 192ac8892c

Change-Id: I2b22c01ad2ef1fde4c6bbf73b0a8d9c1f711d0c1
2019-12-01 20:32:19 -08:00
markchien
0abdd119f2 [Tether17] create com.android.tethering.apex package
Add APEX com.android.tethering.apex for tethering module.
It have tethering apk now and would have jar and library
in follow up CL.

Bug:144320626
Test: build
Change-Id: Ie6158639886e90180dd90347e802a5fe062031b2
2019-12-02 01:54:31 +00:00
Mark Chien
c1ed633ed5 [automerger skipped] Merge changes from topic "tether_migrate" am: e8401aff92 am: 4bb02709c5
am: d2958bb368 -s ours
am skip reason: change_id I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1 with SHA1 499c4a8c75 is in history

Change-Id: I630b00c69238730fe5aa267a658f93edb236acc6
2019-11-30 04:36:38 -08:00
markchien
99abe0a273 [automerger skipped] [Tether07] Migrate Tethering into module am: ee6ad37837 am: 6b828d2915
am: 146e4976bf -s ours
am skip reason: change_id I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3 with SHA1 2c4cc6f514 is in history

Change-Id: Ie6a28a142e2cf75adfc3d1a45d87e9daa67423e4
2019-11-30 04:36:30 -08:00
markchien
d4166df0cc [automerger skipped] [Tether07] Clean up build rule for libtetheroffloadjni am: 810aa68d27 am: 510a354082
am: 463265c034 -s ours
am skip reason: change_id Ic082045bc04d3989f7f095c7a499bc0d943e4031 with SHA1 42aa1754e2 is in history

Change-Id: I7903a9514ceecfc61e6d66e2e3ba55ed0bafb4bf
2019-11-30 04:36:22 -08:00
markchien
147186daff [Tether10]Remove UserManagerInternal usage in Tethering
To be the unbundled application, tethering can not use UserManagerInternal
method anymore. Replace it by listening user restriction change intent.

Also fix some cleanup from
https://android-review.googlesource.com/c/platform/frameworks/base/+/1131002

Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests
      -manual test. Add a trigger point to call
       UserManager.setUserRestriction(DISALLOW_CONFIG_TETHERING) from
       Settings. Open hotspot -> restrict tethering from new adding trigger
       point -> hotspot is OFF and Tethering settings are not available.

Change-Id: I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1
Merged-In: I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1
2019-11-30 10:06:23 +00:00
markchien
ee6ad37837 [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-30 10:03:08 +00:00
markchien
810aa68d27 [Tether07] Clean up build rule for libtetheroffloadjni
- Statically include android.hardware.tetheroffload.config@1.0,
  libcutils and their dependency library.
- Use shared-lib if there is NDK or NDK-compliant version
- Remove android.hardware.tetheroffload.control-V1.0-java from
  service.core because it is already statically built in tethering apk

Bug: 143195885
Test: -build, flash, boot
Change-Id: Ic082045bc04d3989f7f095c7a499bc0d943e4031
Merged-In: Ic082045bc04d3989f7f095c7a499bc0d943e4031
2019-11-30 09:57:36 +00:00
markchien
499c4a8c75 [Tether10]Remove UserManagerInternal usage in Tethering
To be the unbundled application, tethering can not use UserManagerInternal
method anymore. Replace it by listening user restriction change intent.

Also fix some cleanup from
https://android-review.googlesource.com/c/platform/frameworks/base/+/1131002

Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests
      -manual test. Add a trigger point to call
       UserManager.setUserRestriction(DISALLOW_CONFIG_TETHERING) from
       Settings. Open hotspot -> restrict tethering from new adding trigger
       point -> hotspot is OFF and Tethering settings are not available.

Change-Id: I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1
2019-11-29 07:07:11 +00:00
markchien
2c4cc6f514 [Tether07] Migrate Tethering into module
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.

Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
2019-11-29 07:05:21 +00:00
markchien
42aa1754e2 [Tether07] Clean up build rule for libtetheroffloadjni
- Statically include android.hardware.tetheroffload.config@1.0,
  libcutils and their dependency library.
- Use shared-lib if there is NDK or NDK-compliant version
- Remove android.hardware.tetheroffload.control-V1.0-java from
  service.core because it is already statically built in tethering apk

Bug: 143195885
Test: -build, flash, boot
Change-Id: Ic082045bc04d3989f7f095c7a499bc0d943e4031
2019-11-28 11:26:16 +08:00
Anton Hansson
e8029a1127 Merge 37ccd4 into goog/master
Conflicted with Ifd6cfc77acf2284804a2f64011c2733b5c222369

Test: m
Change-Id: I2cb428a8cf6f194f2c33106df4610e0956bc994c
2019-11-25 14:48:04 +00:00
Remi NGUYEN VAN
226aed20f7 Merge "Move shared packages to NetworkStack project" 2019-11-22 06:50:22 +00:00
SongFerng Wang
bc858b7f29 Merge "isTetherApnRequired api rename as isTetheringApnRequired" am: 25ea00d059 am: c4bb6df605
am: 1877b8226d

Change-Id: Ie5aa119857b940abb838f5cb0baf6ba294eb896a
2019-11-20 02:24:15 -08:00
Remi NGUYEN VAN
88998f4fb4 Move shared packages to NetworkStack project
Both were already statically linked both in the NetworkStack module and
the framework, so this change only reorganizes the file locations.

It makes more sense to have the library files in the NetworkStack module
folder, as changes to these files will be released with the same cadence
as the module, not the framework.

Bug: 139106271
Test: built, flashed, WiFi working
Change-Id: Ifaa882b53d1084ef32db6b27d35b56eb226c468f
2019-11-20 17:01:25 +09:00
SongFerngWang
e544517ee7 isTetherApnRequired api rename as isTetheringApnRequired
Bug: 144455789
Test: Build pass.
      atest TetheringConfigurationTest (PASS)

Change-Id: I9ab4c7b3aef0619046d7e3d711683dbe1f31bb50
2019-11-15 14:50:52 +08:00
SongFerng Wang
f433efcab5 [automerger skipped] Merge "[mainline] Expose getTetherApnRequired API as system API" am: 3887ca1f22 am: fa3008c39d
am: 3e5b9ac2b6 -s ours
am skip reason: change_id Iafb2e4fbddb0251e23673742d990ad098a8ae375 with SHA1 87b8bf85c6 is in history

Change-Id: Ia1d35dcc9bb33144e24da9f5e5e27ebde8d9c6fc
2019-11-11 14:51:26 -08:00
SongFerngWang
7757ed3e3d [mainline] Expose getTetherApnRequired API as system API
1. getTetherApnRequired API rename to isTetherApnRequired.
2. Expose isTetherApnRequired API as system API.

Bug: 142365448
Test: Build pass.
      atest TetheringConfigurationTest (PASS)

Change-Id: Iafb2e4fbddb0251e23673742d990ad098a8ae375
Merged-In: Iafb2e4fbddb0251e23673742d990ad098a8ae375
2019-11-08 19:28:33 +08:00
SongFerng Wang
1912b08d5d Merge "[mainline] Expose getTetherApnRequired API as system API" 2019-11-08 11:17:49 +00:00
SongFerngWang
87b8bf85c6 [mainline] Expose getTetherApnRequired API as system API
1. getTetherApnRequired API rename to isTetherApnRequired.
2. Expose isTetherApnRequired API as system API.

Bug: 142365448
Test: Build pass.
      atest TetheringConfigurationTest (PASS)

Change-Id: Iafb2e4fbddb0251e23673742d990ad098a8ae375
2019-11-08 14:22:38 +08:00
Mark Chien
0f411cba8f Merge "[Tether06] Migrate tether offload controller into module" am: 85acbddfe9 am: 3bb2eae1b8
am: 8582437269

Change-Id: I067c803982ce0dbd3d7af22fe1682440c4074752
2019-11-05 11:01:39 -08:00
Mark Chien
85acbddfe9 Merge "[Tether06] Migrate tether offload controller into module" 2019-11-05 12:48:46 +00:00
markchien
6aa388904e [Tether06] Migrate tether offload controller into module
The tether offload JNI library in this patch still have many dependencies
with internal libraries. Will have follow up changes to cut the
dependencies to let it be a unbundled library.

Bug: 136040414
Test: -build, flash, boot
      -atest TetheringTests
      -atest FrameworksNetTests

Change-Id: Iacf8e0b94135e35672de3ee77c474ee39a00c591
2019-11-05 12:49:50 +09:00
Mark Chien
c08ea88e7a Merge "[Tether05] Migrate UpstreamNetworkMonitor into module" am: 259fdbb0b3 am: 58c84a752d
am: 8ed3176808

Change-Id: Ifc9f7626848727161f938f44b26e756dbf664588
2019-10-31 06:40:55 -07:00