Commit Graph

1530 Commits

Author SHA1 Message Date
markchien
5ea11dbcdc Expose some tethering constants in Settings
Make some tethering constants @systemApi because tethering
cannot use hide Api.

Bug: 144814607
Test: build, flash, boot
Change-Id: I8b46e2483eec575cddaad392d055551b75ca71ef
2020-01-09 08:48:55 +00:00
Mark Chien
4a12a12918 Merge "Fix some @hide usage in Tethering(Cont.)" 2020-01-09 08:47:07 +00:00
Junyu Lai
2073d24a99 Merge "[SP01] Add NetworkStats to system API" 2020-01-09 08:33:24 +00:00
Automerger Merge Worker
2a17fa5fae Merge "Replace ConnectivityManager constants to TetheringManager" am: 0728d22b39 am: 13a0da47dc am: 66ba1fb6aa
Change-Id: I0180fe011062a11d7cc925bced8d8178fa3dcc63
2020-01-09 07:25:42 +00:00
Automerger Merge Worker
387673dea2 [automerger skipped] Merge "[Tether09] Use INetd to call netd directly" am: a3e62b2c3b am: 083cbd73b9 am: c038aff5e9 -s ours
am skip reason: Change-Id I4ab0ad387d4bd1773ff94d3b380c1720df07f8d5 with SHA-1 dac2826929 is in history

Change-Id: If07124dcaf25a927ad4f7b844814cc29cc8f03b0
2020-01-09 05:53:34 +00:00
markchien
b799fa3e95 Fix some @hide usage in Tethering(Cont.)
Using alternative way to fix @hide usage. Do not have API change.

Bug: 144814072
Test: buid
Change-Id: Ia23e319ad3779318471d01cbfa17b8c6df4960d3
2020-01-09 05:40:42 +00:00
junyulai
c244d7a660 [SP01] Add NetworkStats to system API
In order to let external module report their network stats,
expose necessary APIs to construct NetworkStats object.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Id3ec8aaff3df67948c25eac2319a74cf33a27979
2020-01-09 03:11:22 +00:00
markchien
9b4d7577d8 Replace ConnectivityManager constants to TetheringManager
Replace some ConnectivityManager constants as TetheringManager inside
tethering module. No API change, will have follow up CL to delete
@hide tethering constants in ConnectivityManager and replace caller
to using TetheringManager.

Bug: 144753389
Test: build
Change-Id: Ia1b963669722c32d147375763205ed2f3af52fed
2020-01-08 15:06:09 +00:00
markchien
12c5bb8103 [Tether09] Use INetd to call netd directly
- Using INetd to communicate with netd directly instead of using
NetworkManagementService which is a wrapper of INetd and don't have plan
to be updatable.
- Also replace InterfaceConfiguration by InterfaceController.
- Remove redundant interface flags. Only set interface up/down flag to
netd because netd only use these two flags for INetd#interfaceSetCfg.
- Note that tethering still use NetworkManagementService
to register tethering stats provider and it would also be replaced with
other way in follow up change.

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

Change-Id: I4ab0ad387d4bd1773ff94d3b380c1720df07f8d5
Merged-In: I4ab0ad387d4bd1773ff94d3b380c1720df07f8d5
2020-01-08 12:33:58 +00:00
markchien
dac2826929 [Tether09] Use INetd to call netd directly
- Using INetd to communicate with netd directly instead of using
NetworkManagementService which is a wrapper of INetd and don't have plan
to be updatable.
- Also replace InterfaceConfiguration by InterfaceController.
- Remove redundant interface flags. Only set interface up/down flag to
netd because netd only use these two flags for INetd#interfaceSetCfg.
- Note that tethering still use NetworkManagementService
to register tethering stats provider and it would also be replaced with
other way in follow up change.

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

Change-Id: I4ab0ad387d4bd1773ff94d3b380c1720df07f8d5
2020-01-08 20:07:04 +08:00
Automerger Merge Worker
0b4fd06744 Merge "Fix some @hide usage in Tethering" am: e13d884aa3 am: aff6974b16 am: b43f5315ca
Change-Id: I94fc3652055c3ddbeb807c88b70d7fc833d69c3b
2020-01-08 01:27:25 +00:00
Mark Chien
e13d884aa3 Merge "Fix some @hide usage in Tethering" 2020-01-08 00:37:43 +00:00
Automerger Merge Worker
fe8928e7b7 Merge "Both build 32 and 64 architecture for TetheringTests" am: 10f50b79fd am: 6aca95071a am: a4ea319b72
Change-Id: I1b7c1a0ce9102af988b4ddb6ffd174d5800f7e5a
2020-01-07 21:28:37 +00:00
Treehugger Robot
10f50b79fd Merge "Both build 32 and 64 architecture for TetheringTests" 2020-01-07 20:30:15 +00:00
markchien
6cf0e550c7 Fix some @hide usage in Tethering
Using alternative way to replace some @hide API.

Bug: 144814072
Test: build, flash, boot
      atest TetheringTests

Change-Id: I1e12d69db1ad91dff553e142e17c6a70808e1639
2020-01-07 21:29:52 +08:00
Artur Satayev
2e1ad6ef00 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
2020-01-07 13:29:50 +00:00
Automerger Merge Worker
facb4766b1 Merge "Change tetheroffloadjni to tetheringutilsjni" am: b2bb37098f am: 75b0369615 am: ef581020d3
Change-Id: I2069561edb05b53e565563c8419c689531ff9571
2020-01-07 09:38:44 +00:00
Treehugger Robot
b2bb37098f Merge "Change tetheroffloadjni to tetheringutilsjni" 2020-01-07 09:05:43 +00:00
markchien
f87ebdcbb4 Change tetheroffloadjni to tetheringutilsjni
Rename tetheroffloadjni to tetheringutilsjni and move setupRaSocket
jni method from NetUtils into tetheringutilsjni.

Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests
      -Off/On hotspot with ipv6 upstream

Change-Id: Ib68eb6999bbe2d3ca97e68712f22b105311ef800
2020-01-07 07:42:13 +00:00
Automerger Merge Worker
c784683a0f Merge "Remove FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT in tethering" am: 2bc689c178 am: cb3d93d558 am: 0105d9666f
Change-Id: I5343382f412251aebd0c56670918a96bf871aff0
2020-01-07 03:42:56 +00:00
markchien
d67c55642e Remove FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT in tethering
Tethering is started after system ready that AMS is ready to deal with
intent broadcast, mProcessesReady is true.

Bug: 143195885
Test: build, flash, boot
Change-Id: Ib9a6008654267b6d0fca78923247c336e90b5534
2020-01-06 14:42:52 +00:00
markchien
2d4cd2d8bd Both build 32 and 64 architecture for TetheringTests
Compile as multilib is neccessary, otherwise mts-tethering-coverage
test plan will fail on armeabi-v7a because of failing to extract
native libraries. This change also add mts tag to TetheringTests.

Bug: 145490751
Test: -atest TetheringTests
      -m mts && mts-tradefed run mts-tethering-coverage

Change-Id: I6425c135ca17213bcdd5198177993daf8280504e
2019-12-24 10:21:15 +00:00
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