Commit Graph

1530 Commits

Author SHA1 Message Date
Mark Chien
18401e3bb0 Merge "Tethering: remove redundant source code" 2020-01-15 11:51:07 +00:00
Mark Chien
c3bd773863 Merge "Tethering: add p2p regex for tethering modes" 2020-01-15 10:12:28 +00:00
Automerger Merge Worker
afae2bad30 Merge "Allow opening tethering when data saver ON" am: 99c7c0fe87 am: 80cc1ede37 am: dbefc5e6ac
Change-Id: I24a842de6918ccd0eb1dc60161854ea25528dff5
2020-01-15 07:29:40 +00:00
Mark Chien
99c7c0fe87 Merge "Allow opening tethering when data saver ON" 2020-01-15 06:58:29 +00:00
markchien
1a4b23585a Tethering: add p2p regex for tethering modes
Bug: 147399354
Test: build
Change-Id: Iec666cc302ee749ddb57379f42f1e540ed813e48
2020-01-15 14:50:59 +08:00
Automerger Merge Worker
96d7b00caf Merge "Tethering: switch to use tethering package resources" am: 4cefaf8bc8 am: 01224e019f am: f1e67d5b17
Change-Id: I3f3ba0792f2ac0c4137381cbb6e49d533a136845
2020-01-15 06:44:39 +00:00
Mark Chien
4cefaf8bc8 Merge "Tethering: switch to use tethering package resources" 2020-01-15 06:17:06 +00:00
Automerger Merge Worker
4d4aaaf243 Merge changes from topic "sp06-offloadcontroller" am: 01d30a4ce0 am: b61116705a am: c6a841b77b
Change-Id: I4e7924ebb2d37ecffb8facce0ec51643afb12264
2020-01-15 05:33:32 +00:00
markchien
4ddf692e11 Tethering: remove redundant source code
Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: I92cbb51a0d4fb048aa75ba9932e3b106d181bad9
2020-01-15 04:33:10 +00:00
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
markchien
eaaebd1f0f 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
2020-01-14 20:15:31 +08:00
junyulai
f858a57887 [SP09] Remove NetworkStatsService @hide usage in Tethering
Test: atest TetheringTest
Bug: 130855321
Change-Id: I0260524c57f7c0aa738eaff07f9b0ae8e785ed63
2020-01-14 20:15:19 +08:00
junyulai
5864a3f0aa [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
2020-01-14 20:14:59 +08:00
junyulai
15d8bb03fe [SP06.1] Add UPDATE_DEVICE_STATS permission to Tethering
Add corresponding permission to allow tether offload to update
network usage through new API that requires UPDATE_DEVICE_STATS
permission.

This is the minimum permission that required to update network
usage with the new system api.

Test: atest FrameworksNetTests OffloadControllerTest TetheringTest
Bug: 130855321
Change-Id: I9c0c86e20d4797ea3570feed741be3a07f839c7d
2020-01-14 20:14:47 +08:00
junyulai
b7da74af88 [SP06] Use system API to communicate with NSS in OffloadController
Test: atest FrameworksNetTests OffloadControllerTest TetheringTest
Bug: 130855321

Change-Id: I294be3a2874f8c8120857e308e629199af014fcd
2020-01-14 20:14:33 +08:00
markchien
2fbb412b28 Use Context#getSystemService to get network stack binder
Bug: 143195885
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ic5fabeae27677344d691449c31ad9337c0e6d92c
2020-01-14 20:13:53 +08:00
markchien
873c64ab8f Tethering: switch to use tethering package resources
Bug: 147399354
Test: build
Change-Id: I482788cdc8be3d34c9a922bfa7eb053f0aa87c96
2020-01-14 09:48:02 +00:00
David Su
dd66bcd894 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
2020-01-13 13:15:14 -08: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