Commit Graph

113 Commits

Author SHA1 Message Date
David Su
d124508c2d 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
2020-01-14 18:06:27 +00:00
David Su
5479a4e669 TetheringTests: Stop using @hide Wifi P2P APIs
Instead use Mockito to achieve the same thing.

Bug: 138801922
Test: atest TetheringTests
Change-Id: I41edd697017f4ce59e6707302bebc0da3d75831d
2020-01-13 12:49:21 -08:00
Automerger Merge Worker
2246030518 Merge "Migrate legacy dhcp server config to DeviceConfig" am: 63647c2d7a am: 08e7ddcbfb am: 803fd24c79
Change-Id: I43a2a55077bfd1da96c72e76b5289334ab22f2ea
2020-01-13 19:38:44 +00:00
Treehugger Robot
63647c2d7a Merge "Migrate legacy dhcp server config to DeviceConfig" 2020-01-13 19:12:25 +00:00
Automerger Merge Worker
2d5ac2c624 Merge "Replace setCapability usage in Tethering" am: d9768c7111 am: 751ff7535a am: 3bb9139941
Change-Id: I40ac5a58426e5c5141c9519ee4e009ce9de2704c
2020-01-13 18:31:43 +00:00
Treehugger Robot
d9768c7111 Merge "Replace setCapability usage in Tethering" 2020-01-13 17:56:25 +00:00
Automerger Merge Worker
29db00037c Merge "Add config_tether_* and entitlement resources" am: 2a27a6ade1 am: 18af5a920d am: e995e98d06
Change-Id: I1e89bd103c3886a48eeba4cb454845bb01f232f3
2020-01-13 17:36:12 +00:00
markchien
6df8068085 Replace setCapability usage in Tethering
Bug: 147413518
Test: build, flash, boot
Change-Id: I7abec2d7cf03d0675749e8379d624504ceb3d9af
2020-01-13 23:34:20 +08:00
markchien
9a0b95d294 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
2020-01-13 15:07:03 +00:00
markchien
6fbbdff5bc Add config_tether_* and entitlement resources
Copies config_tether_* and entitlement resources from
framework/base/core/res to tethering package. Will have
follow up changes to move overlay and switch tethering to
use this internal resource. duplicated resource in framework
will be removed after fixing all of users(e.g. test, TetherUtil,
Settings, ....).

Bug: 147399354
Test: build

Change-Id: I2a77e5070d53566d5ec3697358a6dbbebb4ff59f
2020-01-13 15:03:11 +00:00
Automerger Merge Worker
e44489cc72 [automerger skipped] Merge "Use new UnsupportedAppUsage annotation." am: 5e9d0685dc am: 1f8ff9d305 am: 1e7a3e8160 -s ours
am skip reason: Change-Id I288969b0c22fa3a63bc2e71bb5009fe4a927e154 with SHA-1 2e1ad6ef00 is in history

Change-Id: I3f9d26ac9c3ef27f3ad10a8bdf04c820ba8a470f
2020-01-13 13:33:20 +00:00
Treehugger Robot
5e9d0685dc Merge "Use new UnsupportedAppUsage annotation." 2020-01-13 13:05:17 +00:00
Automerger Merge Worker
01a77dc5e9 Merge changes I0c45635b,I2201d0e4 am: 5b55209300 am: fbec51123c am: 6f9a1f9f75
Change-Id: I5a43f1653959b7765727f2c2371709bb7ba2f65a
2020-01-13 12:36:23 +00:00
Lorenzo Colitti
5b55209300 Merge changes I0c45635b,I2201d0e4
* changes:
  Remove SystemMessageProto usage
  Replace PendingIntent/NotificationManager @hide APIs
2020-01-13 12:04:44 +00:00
Automerger Merge Worker
e6fb39b6ca Merge "Replace SystemNotificationChannels on Tethering" am: f5869fac5a am: 710e70e75c am: bbe891e66d
Change-Id: I5a3450a4f865e467327c0708efd3ff121b3f9a13
2020-01-13 09:41:57 +00:00
Treehugger Robot
f5869fac5a Merge "Replace SystemNotificationChannels on Tethering" 2020-01-13 09:10:36 +00:00
paulhu
7d1b8db6c0 Remove SystemMessageProto usage
Tethering can use SystemMessageProto which is @hide Class. Hence,
use drawable resource id to replace SystemMessageProto usage.

Bug: 122085773
Test: atest TetheringTests
Change-Id: I0c45635b52f86a261e1ac7aaaa9b2cc3a256c222
2020-01-13 15:48:08 +08:00
paulhu
ffa6e34395 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
2020-01-13 15:29:12 +08:00
paulhu
8ee55d43de Replace SystemNotificationChannels on Tethering
Tethering used SystemNotificationChannels for showing
notification before. But SystemNotificationChannels is used for
system package only, tethering package is not able to use it now.
Thus, replace it with tethering own notification channel.

Bug: 122085773
Test: atest TetheringTests
Change-Id: I854a102795c19351a4137360414926c461cc604c
2020-01-13 15:28:18 +08:00
Automerger Merge Worker
59b8f09638 [automerger skipped] Merge "Platform shouldn't directly link to jars in APEXes" am: c1b762b97d am: 0902172e9f am: 918344d411 -s ours
am skip reason: Change-Id I251fabd773bc31f46d572d143c72dd9162f3f0a6 with SHA-1 489e09abae is in history

Change-Id: I144222402d5c4c49fc8cbd581211b45335a28781
2020-01-13 02:39:37 +00:00
Jiyong Park
c1b762b97d Merge "Platform shouldn't directly link to jars in APEXes" 2020-01-13 01:16:16 +00:00
Jiyong Park
1eb8933d3e 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
Merged-In: I251fabd773bc31f46d572d143c72dd9162f3f0a6
2020-01-10 15:15:24 +00:00
Anton Hansson
c858f7cb0e Merge "Platform shouldn't directly link to jars in APEXes" 2020-01-10 15:12:17 +00:00
Automerger Merge Worker
11d33c2784 Merge "Fix hidden usage of networkCapabilitiesForType" am: 73661b9a3d am: 2d4fe8afc8 am: dd605f0c0d
Change-Id: I1182b6969487cea599a52d5b77630c55ffdc3842
2020-01-10 11:46:07 +00:00
Automerger Merge Worker
8563e24a25 Merge "Give tethering TETHER_PRIVILEGED permission" am: b5d04cb6cd am: 3e8731d00e am: 2a1f6055db
Change-Id: Ide3a2e84c7511d79115e6f2065033a38db8d6447
2020-01-10 10:52:57 +00:00
markchien
3470487207 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
2020-01-10 14:55:54 +08:00
markchien
373e5639aa 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
2020-01-10 14:49:24 +08:00
Artur Satayev
4784fb0f7d 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
Merged-In: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
2020-01-09 15:08:18 +00:00
Automerger Merge Worker
f944fd49d2 Merge "Expose some tethering constants in Settings" am: 50bd8a4938 am: 2173a4d07e am: b8a97000e9
Change-Id: I0a6e91e6f33924ef181033faeb755c8cc123b94b
2020-01-09 12:27:08 +00:00
Mark Chien
50bd8a4938 Merge "Expose some tethering constants in Settings" 2020-01-09 11:10:49 +00:00
Automerger Merge Worker
05b8363d38 Merge "Fix some @hide usage in Tethering(Cont.)" am: 4a12a12918 am: 389c46b7cb am: 777ca2c5d2
Change-Id: Ia889b93625bbe2ec24b634ac25ca72cb1b44a3de
2020-01-09 09:41:18 +00:00
Automerger Merge Worker
22791153e7 Merge "[SP01] Add NetworkStats to system API" am: 2073d24a99 am: b340068a3e am: e4601e0a58
Change-Id: I1bb272727cbaec0102669b3f3b8141994f8e1f9a
2020-01-09 09:37:50 +00:00
Jiyong Park
489e09abae 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
2020-01-09 17:52:55 +09:00
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