Commit Graph

431 Commits

Author SHA1 Message Date
junyulai
8c23b65a4f [SP18.3] Adapt TestableNetworkStatsProviderCbBinder am: b7011d2265
Change-Id: I6dc3600a16dd1379e26e6fe2155f71e841c3c90c
2020-05-06 02:50:13 +00:00
junyulai
b7011d2265 [SP18.3] Adapt TestableNetworkStatsProviderCbBinder
This is a no-op refactoring to adapt new test provider callback.
Also this patch adapts TestLooper to allow better control on
delay messages that will be verified in subsequent tests.

Test: atest OffloadControllerTest
Bug: 149467454
Change-Id: Icfd6ff289d6689ae2d5753d3fe472516c808dc7a
Merged-In: Icfd6ff289d6689ae2d5753d3fe472516c808dc7a
(cherry-picked from aosp/1295346)
2020-05-05 18:45:12 +08:00
Bill Yi
9ab332af75 [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-dev am: 43708b4424 -s ours
am skip reason: subject contains skip directive

Change-Id: Ib1c6f5bfb858282b4e0392b7d42c0e311409b652
2020-05-02 04:01:53 +00:00
Bill Yi
43708b4424 Merge "Import translations. DO NOT MERGE" into rvc-dev 2020-05-02 03:52:08 +00:00
Anton Hansson
5dadd627be Merge "Rename module dist files" into rvc-dev am: 7e0949732f
Change-Id: I1b9fa1a580c7340df475cb150fe0373a7191869c
2020-05-01 08:38:34 +00:00
Bill Yi
b4c3fee27f Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: Ib973f0e381ec0c90f5983a266341444cf919bbea
2020-04-30 19:01:25 -07:00
Anton Hansson
03a93bff6d Merge "Fix tethering module lib stub default" into rvc-dev am: f4fe711313
Change-Id: I1d30f0a8603f6d8009e9fea146de5f9481532147
2020-04-30 19:53:34 +00:00
Anton Hansson
d7f1fabc94 Rename module dist files
This makes the filenames of the disted artifacts (api txts and stubs)
match the module name of the modules they're from. This matches the
naming scheme used by java_sdk_library, which should make the future
transition to this build rule easier.

Bug: 149293194
Test: lunch sdk_phone_armv7 && m sdk dist && find out/dist/apistubs
Change-Id: I076f30931bf2524d57703873cd7de25b3f23b457
2020-04-30 17:42:20 +01:00
Anton Hansson
dc8e0fc1a1 Fix tethering module lib stub default
It was using the systemapi stub defaults, but should be using the
module_lib default.

Bug: 144149403
Test: m
Change-Id: Iaab154d9d71900284d92d518a086fc1227c00d5c
2020-04-30 17:02:07 +01:00
Junyu Lai
50815fdafe Merge changes I38628dad,I2467b647 into rvc-dev am: 027c80d2d6
Change-Id: If79d8724b82021a7840a73b642d9f5fdb07943e2
2020-04-30 06:21:07 +00:00
Junyu Lai
f776651a4b [SP18] Poll network stats in OffloadController to support data warning am: bf6fa99b2a
Change-Id: Ib0549b36a1e5bf9a728c4187facd4caae6e6df2f
2020-04-30 06:21:05 +00:00
Remi NGUYEN VAN
d24ff42f00 Merge "Address comments on NetworkStack AIDL v6" into rvc-dev am: 675ec9d30e
Change-Id: I58b6863e5f8417368c7cd83edc487404d5156e99
2020-04-30 06:19:07 +00:00
Junyu Lai
027c80d2d6 Merge changes I38628dad,I2467b647 into rvc-dev
* changes:
  [SP18.1] add dependency object to OffloadController
  [SP18] Poll network stats in OffloadController to support data warning
2020-04-30 06:07:25 +00:00
Treehugger Robot
40092b1fa7 [SP18.1] add dependency object to OffloadController
In order to mock constant in unit test, a dependency object is
introduced with minimum code change to achieve this.

Test: atest TetheringTests
Bug: 149467454
Change-Id: I38628daddcb7be7c74846e78d36dc88f065b97d9
Merged-In: I38628daddcb7be7c74846e78d36dc88f065b97d9
(cherry picked from commit 29aee20bfa)
2020-04-30 05:03:07 +00:00
Junyu Lai
bf6fa99b2a [SP18] Poll network stats in OffloadController to support data warning
The OEM implemented tether offload does not support
data warning since the HAL only tells the hardware about data limit
but not warning. However, to add such interface in HAL needs OEM to
comply and implement in hardware.

Thus, as a short-term solution, polls network statistics from HAL
and notify upper layer when it reaches the alert quota set by
NetworkStatsService.

Note that when CPU is sleeping, the data warning of tethering offload
will not work since the polling is also suspended.

Test: manual
Test: atest OffloadControllerTest
Bug: 149467454
Change-Id: I2467b64779b74cd5fec73b42fb303584f52cb1cb
Merged-In: I2467b64779b74cd5fec73b42fb303584f52cb1cb
(cherry picked from commit 93660e382c)
2020-04-30 04:58:21 +00:00
Remi NGUYEN VAN
a530ebb62d Address comments on NetworkStack AIDL v6
Address issues found during AIDL review:
 - Rename clientAddr to singleClientAddr
 - Do not use a ParcelableBundle for notifyNetworkTested or
   notifyDataStallSuspected; instead use AIDL parcelables for stronger
   backwards compatibility guarantees.

Test: atest NetworkMonitorTest ConnectivityServiceTest
      ConnectivityServiceIntegrationTest, manual
Bug: 153500847
Merged-In: Id9b71784e5f6294d203230e57737979e063ff0f8
Change-Id: Id9b71784e5f6294d203230e57737979e063ff0f8
2020-04-28 08:09:17 +00:00
Mark Chien
ec45939bda Merge "Remove Preconditions usage to stop dependecy with non-updatble class" into rvc-dev am: 9258a08525
Change-Id: I7b13aa7a500d804d0e8ef96d9d72556f3c642124
2020-04-28 03:12:09 +00:00
Mark Chien
9258a08525 Merge "Remove Preconditions usage to stop dependecy with non-updatble class" into rvc-dev 2020-04-28 03:09:25 +00:00
TreeHugger Robot
c1d4bdd773 Merge "Import translations. DO NOT MERGE" into rvc-d1-dev 2020-04-27 15:27:39 +00:00
TreeHugger Robot
d5e76ce15a [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-dev am: 885d4eaf1f -s ours
am skip reason: subject contains skip directive

Change-Id: I5afe5954b98be5724974e939dc1ce0bf4e4716e2
2020-04-27 14:42:24 +00:00
TreeHugger Robot
885d4eaf1f Merge "Import translations. DO NOT MERGE" into rvc-dev 2020-04-27 14:24:33 +00:00
Mark Chien
ed50636b60 Remove Preconditions usage to stop dependecy with non-updatble class
Stop depending on Preconditions that is not released on the same cadence
as the module, and is maintained as part of the framework.

Bug: 148636687
Test: atest TetheringTests NetworkStackNextTests

Merged-In: Id0dcec44f362f79bc8c046d722635687a7388aa2
Change-Id: Id0dcec44f362f79bc8c046d722635687a7388aa2
2020-04-27 12:38:07 +00:00
Mark Chien
3613937137 Merge "Unbreak tethering for no offload supported devices" into rvc-dev am: 48a2ffac38
Change-Id: Ibb783aeacc0f15b865508f7e48ed43ef35a4933d
2020-04-27 12:33:26 +00:00
Mark Chien
27cdaf679a Unbreak tethering for no offload supported devices
Catch NoSuchElementException to unbreak no offload devices.

To consistent with fetching offload config service, retry fetcheing
offload control service.
b/152430668#comment4 assert that the fetch will be retried only
if the service is installed on the device.

Bug: 155026033
Test: run TetheringCoverageTests in virtual devices(do not support
offload)

Merged-In: Ie0a32a9062c722327a27c6de13e3bb8d9588bebb
Change-Id: Ie0a32a9062c722327a27c6de13e3bb8d9588bebb
2020-04-27 09:15:25 +00:00
Bill Yi
b85287f5d0 Import translations. DO NOT MERGE
Change-Id: I1cdee455c89183fa875ac4916105db6dffd5ee2b
Auto-generated-cl: translation import
2020-04-27 01:01:45 -07:00
Bill Yi
8a35765b6f Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I08496ebb9bad7c95a6e9df43ef57c55a9956c9d8
2020-04-27 00:04:34 -07:00
TreeHugger Robot
ac6fdb4eef Merge "Import translations. DO NOT MERGE" into rvc-d1-dev 2020-04-23 23:25:24 +00:00
Paul Hu
3183b5ff2e Merge "[TNU09] Adjust restricted notification" into rvc-dev am: 0b5d999a8c
Change-Id: Iaed5ec62fff05abed68b8eb7fcdfe727ade49952
2020-04-23 11:39:06 +00:00
Paul Hu
0439c2d204 [TNU09] Adjust restricted notification
1. Let restricted notification that can be dismissed.
2. Only put up restricted notification when any of tethering is
   activating.

Bug: 154214549
Test: atest TetheringTests
Change-Id: Ib980aca154036828abdab35e3bb11d42f85ff610
Merged-In: Ib980aca154036828abdab35e3bb11d42f85ff610
(cherry picked from commit 2eb66bdbe4, aosp/1290334)
2020-04-23 10:18:11 +00:00
Bill Yi
3fe17e291b Import translations. DO NOT MERGE
Change-Id: Ib2f7fbbb8ebd73b517aa44a4708a7040d2394823
Auto-generated-cl: translation import
2020-04-23 02:17:41 -07:00
Paul Hu
1716344e59 Merge "Add TetheredClient tests" into rvc-dev am: 34d6a00acb
Change-Id: Idda1273dc05a5acdbf4f3d8092259ebf825a293a
2020-04-23 05:54:55 +00:00
Paul Hu
6469fe0556 Merge "Add TetheringCommonTests" into rvc-dev am: 1277763ddd
Change-Id: Id3aa90e11df5c334679a590c2b6d36467dbb0769
2020-04-23 01:25:13 +00:00
Paul Hu
86152672a6 Add TetheredClient tests
Test APIs below:
getAddresses()
getMacAddress()
getTetheringType()
AddressInfo.getAddress()
AddressInfo.getHostname()
AddressInfo.writeToParcel(android.os.Parcel, int)

Bug: 153614365
Bug: 153613717
Test: atest TetheringTests
Change-Id: Ic7cbebe54a38af5b5c4639eb7641a20de6864a26
Merged-In: Ic7cbebe54a38af5b5c4639eb7641a20de6864a26
(cherry picked from commit fa882fdb96, aosp/1292438)
2020-04-23 01:10:19 +00:00
Paul Hu
1277763ddd Merge "Add TetheringCommonTests" into rvc-dev 2020-04-23 01:06:13 +00:00
Bill Yi
2fe57392e1 [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-dev am: f76d89b395 -s ours
am skip reason: subject contains skip directive

Change-Id: I9eafd111755182368e39266adf333b8d0f92fb96
2020-04-23 00:17:29 +00:00
Bill Yi
70521ef0e8 Import translations. DO NOT MERGE
Change-Id: I4b3a8cf8d738bf6f680258f1ebd77d894dc986cd
Auto-generated-cl: translation import
2020-04-22 15:24:12 -07:00
Paul Hu
1cae88f560 Add TetheringCommonTests
Bug: 153614365
Bug: 153613717
Test: atest TetheringTests TetheringCoverageTests
Change-Id: If7c933ec0c72943312cd37bfc66918f10a5504a9
Merged-In: If7c933ec0c72943312cd37bfc66918f10a5504a9
(cherry picked from commit f340f6fd46, aosp/1290553)
2020-04-22 15:24:13 +00:00
Mark Chien
32766d1a2b Merge "Include NetworkStaticLibTestsLib into tethering coverage test" into rvc-dev am: 70e43fb856
Change-Id: I5bbf860bb590a33bb54a411ca40a7b53463c96de
2020-04-22 14:11:11 +00:00
Mark Chien
70e43fb856 Merge "Include NetworkStaticLibTestsLib into tethering coverage test" into rvc-dev 2020-04-22 13:54:33 +00:00
Paul Hu
cf12c1fd9a Merge "[TNU08] Remove the "tethering is on" notification" into rvc-dev am: a529ce8bd7
Change-Id: I166bcdd29d78df1bca8c5507c5a55ecca320edb8
2020-04-22 10:18:57 +00:00
Paul Hu
a529ce8bd7 Merge "[TNU08] Remove the "tethering is on" notification" into rvc-dev 2020-04-22 09:56:32 +00:00
Mark Chien
d0ed7dd8f9 Include NetworkStaticLibTestsLib into tethering coverage test
Bug: 148636687
Test: atest NetworkStaticLibTests
Test: atest TetheringCoverageTests
Merged-In: I8cd9dbc9fe163583ff1d016c9262546949105b80
Change-Id: I8cd9dbc9fe163583ff1d016c9262546949105b80
2020-04-22 09:45:39 +00:00
Paul Hu
18b8719621 Merge "[TNU07] Remove unused resources" into rvc-dev am: a7c5d5707a
Change-Id: Ie8ee09bfcef93de9d834f5d81928bb1408398791
2020-04-22 08:34:41 +00:00
Mark Chien
ef5c55fa7a Merge "Retry the call that fetches the tethering offload HAL." into rvc-dev am: 1794d0559d
Change-Id: I6f290f13edb540aeda3a9a1f3395234a50ac78b3
2020-04-22 08:32:41 +00:00
Paul Hu
a7c5d5707a Merge "[TNU07] Remove unused resources" into rvc-dev 2020-04-22 08:31:41 +00:00
Paul Hu
127ee5920f [TNU08] Remove the "tethering is on" notification
All carriers discarded the requirement to put up a standing
notification when tethering is on. Thus, remove the "tethering
is on" notification.

Bug: 154438388
Test: atest TetheringTests
Change-Id: Ife3915837b6b7b83d3eaaa84b71b6409ff37b71c
Merged-In: Ife3915837b6b7b83d3eaaa84b71b6409ff37b71c
(cherry picked from commit 0171c07d05dd2625c6dcfd47977a701ddc2d5d36, aosp/1289107)
2020-04-22 07:00:16 +00:00
Treehugger Robot
83a814eb31 Retry the call that fetches the tethering offload HAL.
The CL that moved the initialization of the tethering offload
config HAL from C++ to Java caused the code not to retry
fetching the service if it is not ready when tethering is
started. This is because the C++ version of getService() retries,
but the Java version only retries if getService(true) is called.

Make the new code retry as well.

b/152430668#comment4 asserts that the fetch will be retried only
if the service is installed on the device, so the retries should
be attempted (and thus should not have any startup time impact)
on devices that do not support tethering offload.

Bug: 152430668
Test: builds, boots, tethering offload works
Merged-In: I093f127d90b2aa1b13eb0748378a24726d419472
Change-Id: I093f127d90b2aa1b13eb0748378a24726d419472
2020-04-22 06:59:12 +00:00
Paul Hu
ef34159909 [TNU07] Remove unused resources
Some strings are not used, so just remove them.

Bug: 154445061
Test: atest TetheringTests
Change-Id: Ie67f7f4d0863d58c4c5206e445c1dbdfe3f65f60
Merged-In: Ie67f7f4d0863d58c4c5206e445c1dbdfe3f65f60
(cherry picked from commit 59eeedc045aaaa0c7d5b97277d25f64cce254464, aosp/1289100)
2020-04-22 06:58:17 +00:00
Jiyong Park
960eb03b46 Merge "Mark some aidl_interface modules as unstable" into rvc-dev am: fc7d16b3c7
Change-Id: I1693261f829fe4b40dbe2d0e11b7e88916582476
2020-04-21 10:11:46 +00:00
TreeHugger Robot
846de3551c [automerger skipped] Merge "DO NOT MERGE Remove references of telephony-stubs." into rvc-dev am: 3baf9409d5 -s ours
am skip reason: Change-Id I1812818c3d49463c3840a98212bbab58a110359a with SHA-1 0f0e3a99f1 is in history

Change-Id: I0fe8def6b2a53241381001e4d1c17a573ed9c8e7
2020-04-21 09:57:23 +00:00