Commit graph

91 commits

Message SHA1
TetheringTests: Stop using @hide Wifi P2P APIs
Instead use Mockito to achieve the same thing.

Bug: 138801922
Test: atest TetheringTests
Change-Id: I41edd697017f4ce59e6707302bebc0da3d75831d

David Su   commited 2020-01-13 12:49:21 -08:00
5479a4e669
Merge "Platform shouldn't directly link to jars in APEXes"
Anton Hansson   authored and   Android (Google) Code Review   commited 2020-01-10 15:12:17 +00:00
c858f7cb0e
Merge "Fix hidden usage of networkCapabilitiesForType" am: 73661b9a3d am: 2d4fe8afc8 am: dd605f0c0d
Change-Id: I1182b6969487cea599a52d5b77630c55ffdc3842

Automerger Merge Worker   commited 2020-01-10 11:46:07 +00:00
11d33c2784
Merge "Give tethering TETHER_PRIVILEGED permission" am: b5d04cb6cd am: 3e8731d00e am: 2a1f6055db
Change-Id: Ide3a2e84c7511d79115e6f2065033a38db8d6447

Automerger Merge Worker   commited 2020-01-10 10:52:57 +00:00
8563e24a25
Fix hidden usage of networkCapabilitiesForType
After this change, tethering only support below legacy type:
  - TYPE_BLUETOOTH
  - TYPE_ETHERNET
  - TYPE_MOBILE
  - TYPE_MOBILE_DUN
  - TYPE_MOBILE_HIPRI
  - TYPE_WIFI

Bug: 144753389
Test: build
Change-Id: I394c8306d9f88a6648580b3b410069ad219f0074

markchien   commited 2020-01-10 14:55:54 +08:00
3470487207
Give tethering TETHER_PRIVILEGED permission
This fix the crash when perform "Reset Wi-Fi,mobile & Bluetooth"

Bug: 146900199
Test: -build, flash, boot
      -atest TetheringTests
      -atest CtsTetheringTest
      -manual perform "Reset Wi-Fi,mobile & Bluetooth"

Change-Id: I036409358ed15a797bdb751bb66513425350d066

markchien   commited 2020-01-10 14:49:24 +08:00
373e5639aa
Merge "Expose some tethering constants in Settings" am: 50bd8a4938 am: 2173a4d07e am: b8a97000e9
Change-Id: I0a6e91e6f33924ef181033faeb755c8cc123b94b

Automerger Merge Worker   commited 2020-01-09 12:27:08 +00:00
f944fd49d2
Merge "Expose some tethering constants in Settings"
Mark Chien   authored and   Gerrit Code Review   commited 2020-01-09 11:10:49 +00:00
50bd8a4938
Merge "Fix some @hide usage in Tethering(Cont.)" am: 4a12a12918 am: 389c46b7cb am: 777ca2c5d2
Change-Id: Ia889b93625bbe2ec24b634ac25ca72cb1b44a3de

Automerger Merge Worker   commited 2020-01-09 09:41:18 +00:00
05b8363d38
Merge "[SP01] Add NetworkStats to system API" am: 2073d24a99 am: b340068a3e am: e4601e0a58
Change-Id: I1bb272727cbaec0102669b3f3b8141994f8e1f9a

Automerger Merge Worker   commited 2020-01-09 09:37:50 +00:00
22791153e7
Platform shouldn't directly link to jars in APEXes
The non-updatable part of the platform shouldn't directly link to the
boot jars in APEXes. Ensure this by

1) setting the visibility property for the boot jars so that they are
not visible to non-APEX modules and
2) setting the apex_available property so that the boot jars are only
built for the corresponding APEXes, but not for others.

Bug: b/146167933
Bug: b/146218515
Bug: b/147200698
Test: m
Change-Id: I251fabd773bc31f46d572d143c72dd9162f3f0a6

Jiyong Park   commited 2020-01-09 17:52:55 +09:00
489e09abae
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

markchien   authored and   Mark Chien   commited 2020-01-09 08:48:55 +00:00
5ea11dbcdc
Merge "Fix some @hide usage in Tethering(Cont.)"
Mark Chien   authored and   Gerrit Code Review   commited 2020-01-09 08:47:07 +00:00
4a12a12918
Merge "[SP01] Add NetworkStats to system API"
Junyu Lai   authored and   Gerrit Code Review   commited 2020-01-09 08:33:24 +00:00
2073d24a99
Merge "Replace ConnectivityManager constants to TetheringManager" am: 0728d22b39 am: 13a0da47dc am: 66ba1fb6aa
Change-Id: I0180fe011062a11d7cc925bced8d8178fa3dcc63

Automerger Merge Worker   commited 2020-01-09 07:25:42 +00:00
2a17fa5fae
[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

Automerger Merge Worker   commited 2020-01-09 05:53:34 +00:00
387673dea2
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

markchien   authored and   Mark Chien   commited 2020-01-09 05:40:42 +00:00
b799fa3e95
[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

junyulai   authored and   Junyu Lai   commited 2020-01-09 03:11:22 +00:00
c244d7a660
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

markchien   authored and   Mark Chien   commited 2020-01-08 15:06:09 +00:00
9b4d7577d8
[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

markchien   authored and   Mark Chien   commited 2020-01-08 12:33:58 +00:00
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

markchien   commited 2020-01-08 20:07:04 +08:00
dac2826929
Merge "Fix some @hide usage in Tethering" am: e13d884aa3 am: aff6974b16 am: b43f5315ca
Change-Id: I94fc3652055c3ddbeb807c88b70d7fc833d69c3b

Automerger Merge Worker   commited 2020-01-08 01:27:25 +00:00
0b4fd06744
Merge "Fix some @hide usage in Tethering"
Mark Chien   authored and   Gerrit Code Review   commited 2020-01-08 00:37:43 +00:00
e13d884aa3
Merge "Both build 32 and 64 architecture for TetheringTests" am: 10f50b79fd am: 6aca95071a am: a4ea319b72
Change-Id: I1b7c1a0ce9102af988b4ddb6ffd174d5800f7e5a

Automerger Merge Worker   commited 2020-01-07 21:28:37 +00:00
fe8928e7b7
Merge "Both build 32 and 64 architecture for TetheringTests"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-07 20:30:15 +00:00
10f50b79fd
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

markchien   commited 2020-01-07 21:29:52 +08:00
6cf0e550c7
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

Artur Satayev   commited 2020-01-07 13:29:50 +00:00
2e1ad6ef00
Merge "Change tetheroffloadjni to tetheringutilsjni" am: b2bb37098f am: 75b0369615 am: ef581020d3
Change-Id: I2069561edb05b53e565563c8419c689531ff9571

Automerger Merge Worker   commited 2020-01-07 09:38:44 +00:00
facb4766b1
Merge "Change tetheroffloadjni to tetheringutilsjni"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-07 09:05:43 +00:00
b2bb37098f
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

markchien   authored and   Mark Chien   commited 2020-01-07 07:42:13 +00:00
f87ebdcbb4
Merge "Remove FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT in tethering" am: 2bc689c178 am: cb3d93d558 am: 0105d9666f
Change-Id: I5343382f412251aebd0c56670918a96bf871aff0

Automerger Merge Worker   commited 2020-01-07 03:42:56 +00:00
c784683a0f
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

markchien   authored and   Mark Chien   commited 2020-01-06 14:42:52 +00:00
d67c55642e
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

markchien   authored and   Mark Chien   commited 2019-12-24 10:21:15 +00:00
2d4cd2d8bd
Merge "Add UpstreamNetworkState for tethering" am: 9b141cc23c am: 5c351eb894 am: ad929e93e2
Change-Id: I530e4c189bf238cf9f4bc6b430c4cee724634840

Automerger Merge Worker   commited 2019-12-24 06:05:38 +00:00
9605040e31
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

markchien   commited 2019-12-23 17:38:40 +08:00
c6485f8368
[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

Automerger Merge Worker   commited 2019-12-20 17:40:48 +00:00
52295aaaff
Merge "Fix clean InProcessTethering fail problem"
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-12-20 16:34:23 +00:00
62fa7a179d
Merge "Fix clean InProcessTethering fail problem"
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2019-12-20 15:42:05 +00:00
935835dace
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

markchien   commited 2019-12-20 22:18:01 +08:00
2000bfe8a7
[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

Automerger Merge Worker   commited 2019-12-20 14:13:17 +00:00
e4ff7a3612
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

markchien   commited 2019-12-20 21:58:00 +08:00
64134b6f22
[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

markchien   commited 2019-12-20 10:31:31 +08:00
e7ccfca9da
[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

Automerger Merge Worker   commited 2019-12-19 13:04:36 +00:00
e33cebeae3
[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

markchien   commited 2019-12-19 20:53:06 +08:00
9d3538260b
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

markchien   commited 2019-12-19 13:06:50 +08:00
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

markchien   commited 2019-12-19 12:57:39 +08:00
eda5d30035
Merge "tether: Use new API: startTetheredHotspot to enable hotspot"
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2019-12-16 13:49:34 +00:00
81bebe8280
Merge "Protect early access before tethering ready" am: 4cd05d9fdc am: ede35e955d am: 0bec442453
Change-Id: I7837cdd4cd18d3925f9198a5864a601df745039c

Automerger Merge Worker   commited 2019-12-13 04:00:47 +00:00
21f8effe61
Merge "Protect early access before tethering ready"
Treehugger Robot   authored and   Gerrit Code Review   commited 2019-12-13 03:25:41 +00:00
4cd05d9fdc
tether: Use new API: startTetheredHotspot to enable hotspot
Bug: 146180860
Test: atest TetheringTests
Change-Id: I14be9c446319fad0706bf8c20faaba7801d638a2

lesl   commited 2019-12-13 11:00:24 +08:00
44d5357a67