Commit graph android_packages_modules_Co.../Tethering/tests
Message SHA1
Merge "Add API for tethering clients change"
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2020-01-24 09:07:10 +00:00
ab7e30807e
Add API for tethering clients change
Add a onClientsChanged callback to OnTetheringEventCallback.

The callback will provide information on connected clients combining
at least DHCP leases and WiFi AP information (WiFi AP tethering used).

Test: atest TetheringTests
Bug: 135411507
Change-Id: I7065d081c11bc606d691f76ac8b499dd075d6504

Remi NGUYEN VAN   commited 2020-01-24 13:21:59 +09:00
2781c80d28
Merge "Allows the caller to specify configuration by TetheringRequest"
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2020-01-24 02:38:52 +00:00
ccef484ff1
Allows the caller to specify configuration by TetheringRequest
This is initial work to allow caller to pass their prefered
configuration to start tethering. Caller may able to specify the
downstream interface ipv4 address with dhcp server disabled for
static IP configuration, or able to exempt entitlement check if
they have permission in follow up CL.

Bug: 141256482
Test: -atest TetheringTest
      -ON/OFF wifi tethering

Change-Id: Ic7c3a33195bbd7e72f9b8e73fa148be476b87bf3

markchien   authored and   Remi NGUYEN VAN   commited 2020-01-23 23:19:23 +09:00
ecaba161bd
Merge "Make TetheringManager to system API"
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2020-01-23 00:11:49 +00:00
5a22b9a22f
Make TetheringManager to system API
Also deprecated tethering APIs in ConnectivityManager.
Will have follow up change to remove @hide tethering function in
ConnectivityManager.

Bug: 145093446
Bug: 148038547
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ia432057bf9056727c4a0ca97d160a49274d33581

markchien   authored and   Remi NGUYEN VAN   commited 2020-01-23 00:41:59 +09:00
5786b6dc9a
Merge "p2p: revise tethering handler for shared group interface support" am: 0bbf289b09 am: bbbe6f7ba5 am: c9bde4be72
Change-Id: I512a950fc395518bc46dd99590bfdcbe3b10bed3

Automerger Merge Worker   commited 2020-01-17 21:48:36 +00:00
b499ecedc6
p2p: revise tethering handler for shared group interface support
When leaving a group, all information are erased and no group interface
is passed to tethering service.
For separate group interface, tethering could be stopped
on p2p group interface removed. For shared group interface,
i.e. management interface and group interface share one
interface, ex. p2p0, tethering has no chance to be stopped since management
interface won't be removed after leaving a group.

Bug: 141382930
Test: atest FrameworksNetTests
Test: atest FrameworksWifiTests
Test: atest TetheringTests
Change-Id: Ib611018b67c76ff79c7e6658136721090feb145b

Jimmy Chen   commited 2020-01-16 14:33:32 +08:00
ea902f6f2a
Merge "TetheringTests: Stop using @hide Wifi P2P APIs"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-01-16 05:51:49 +00:00
81369f59d2
Merge "Tethering: remove redundant source code" am: 18401e3bb0 am: 69c72da2c7 am: 00356b8d79
Change-Id: Ifb9903a985090e85d85e642bd3e6d5a1d68b6bfb

Automerger Merge Worker   commited 2020-01-15 12:34:28 +00:00
6d22290067
Merge "Tethering: remove redundant source code"
Mark Chien   authored and   Gerrit Code Review   commited 2020-01-15 11:51:07 +00:00
18401e3bb0
Merge "Allow opening tethering when data saver ON" am: 99c7c0fe87 am: 80cc1ede37 am: dbefc5e6ac
Change-Id: I24a842de6918ccd0eb1dc60161854ea25528dff5

Automerger Merge Worker   commited 2020-01-15 07:29:40 +00:00
afae2bad30
Merge "Allow opening tethering when data saver ON"
Mark Chien   authored and   Gerrit Code Review   commited 2020-01-15 06:58:29 +00:00
99c7c0fe87
Merge "Tethering: switch to use tethering package resources" am: 4cefaf8bc8 am: 01224e019f am: f1e67d5b17
Change-Id: I3f3ba0792f2ac0c4137381cbb6e49d533a136845

Automerger Merge Worker   commited 2020-01-15 06:44:39 +00:00
96d7b00caf
Merge "Tethering: switch to use tethering package resources"
Mark Chien   authored and   Gerrit Code Review   commited 2020-01-15 06:17:06 +00:00
4cefaf8bc8
Merge changes from topic "sp06-offloadcontroller" am: 01d30a4ce0 am: b61116705a am: c6a841b77b
Change-Id: I4e7924ebb2d37ecffb8facce0ec51643afb12264

Automerger Merge Worker   commited 2020-01-15 05:33:32 +00:00
4d4aaaf243
Tethering: remove redundant source code
Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I92cbb51a0d4fb048aa75ba9932e3b106d181bad9

markchien   authored and   Mark Chien   commited 2020-01-15 04:33:10 +00:00
4ddf692e11
Merge changes from topics "frameworkswifiapitests-jacoco", "settingsunittests-wifi-systemapi", "sl4a-access-wifi-hidden-apis"
* changes:
  Remove FrameworksWifiApiTests jacoco exclude_filter
  FrameworksWifiApiTests: build against framework-wifi (Attempt 2)
  Convert FrameworksWifiApiTests mk to bp (Attempt 2)
  Give SL4A access to @hide Wifi APIs
  Expose WifiInfo & NetworkSelectionStatus Builders for SettingsUnitTests
  Expose WifiEnterpriseConfig.getClientPrivateKey() for WifiConfigurationProviderTest
  Expose ScanResult constructor for SettingsLibRoboTests
  SettingsLibTests: grant access to Wifi @hide APIs
  TetheringTests: Stop using @hide Wifi P2P APIs

David Su   authored and   Android (Google) Code Review   commited 2020-01-14 18:06:27 +00:00
d124508c2d
Allow opening tethering when data saver ON
When data saver enabled, tethering would be OFF.
Currently settings would not allow user to turning tethering back.
After aosp/1181583 is merged, user can turn tethering back without
turning data saver OFF.

Bug: 145711175
Bug: 142374233
Test: atest TetheringTests
      OFF/ON tethering when data saver ON

Change-Id: I59e662ba771a563f5f1766ba29e05246b8280220

markchien   commited 2020-01-14 20:15:31 +08:00
eaaebd1f0f
[SP09] Remove NetworkStatsService @hide usage in Tethering
Test: atest TetheringTest
Bug: 130855321
Change-Id: I0260524c57f7c0aa738eaff07f9b0ae8e785ed63

junyulai   authored and   markchien   commited 2020-01-14 20:15:19 +08:00
f858a57887
[SP07] Remove reference of NetworkStatsService in IpServer
Currently NetworkStatsService is notified when downstream is
updated. However, it seems unnecessary given that tether stats
is persist since boot, and there is no any upstream change when
downstream is changed.

Test: atest NetworkStatsServiceTest IpServerTest
Bug: 130855321
Change-Id: Ie300bfeb0a04678fcfcf300843b6f859af9df91d

junyulai   authored and   markchien   commited 2020-01-14 20:14:59 +08:00
5864a3f0aa
[SP06] Use system API to communicate with NSS in OffloadController
Test: atest FrameworksNetTests OffloadControllerTest TetheringTest
Bug: 130855321

Change-Id: I294be3a2874f8c8120857e308e629199af014fcd

junyulai   authored and   markchien   commited 2020-01-14 20:14:33 +08:00
b7da74af88
Tethering: switch to use tethering package resources
Bug: 147399354
Test: build
Change-Id: I482788cdc8be3d34c9a922bfa7eb053f0aa87c96

markchien   authored and   Mark Chien   commited 2020-01-14 09:48:02 +00:00
873c64ab8f
TetheringTests: Stop using @hide Wifi P2P APIs
Instead use Mockito to achieve the same thing.

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

David Su   commited 2020-01-13 13:15:14 -08:00
dd66bcd894
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 "Migrate legacy dhcp server config to DeviceConfig" am: 63647c2d7a am: 08e7ddcbfb am: 803fd24c79
Change-Id: I43a2a55077bfd1da96c72e76b5289334ab22f2ea

Automerger Merge Worker   commited 2020-01-13 19:38:44 +00:00
2246030518
Migrate legacy dhcp server config to DeviceConfig
Legacy dhcp server can also be enabled by resource config.

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

Change-Id: I8ae5fa3d5bbd88129bd0890f71be6f8a1bfec0eb

markchien   authored and   Mark Chien   commited 2020-01-13 15:07:03 +00:00
9a0b95d294
Merge changes I0c45635b,I2201d0e4 am: 5b55209300 am: fbec51123c am: 6f9a1f9f75
Change-Id: I5a43f1653959b7765727f2c2371709bb7ba2f65a

Automerger Merge Worker   commited 2020-01-13 12:36:23 +00:00
01a77dc5e9
Replace PendingIntent/NotificationManager @hide APIs
Tethering used some PendingIntent/NotificationManager @hide APIs
but they are not able to call now. Replace them with similar
System APIs.

Bug: 122085773
Test: atest TetheringTests
Change-Id: I2201d0e44a6356b8b1974ce0ed80d9913a7aeff5

paulhu   commited 2020-01-13 15:29:12 +08:00
ffa6e34395
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
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
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 "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
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
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
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
[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
[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
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