Commit Graph

766 Commits

Author SHA1 Message Date
Junyu Lai
941fc9ecab Merge "[SP18.6] Make offload controller poll interval configurable" am: 10c8c21777 am: 6848610485
Change-Id: Iab4a5f883a8357c23375633c16059b38d74b9e9b
2020-05-05 10:45:38 +00:00
Junyu Lai
6848610485 Merge "[SP18.6] Make offload controller poll interval configurable" am: 10c8c21777
Change-Id: I30ad758e9c36f39eea7851237ca5ba008d3d9d4d
2020-05-05 10:17:49 +00:00
Junyu Lai
f8cd65936d Merge changes from topic "sp18-TestableNetworkStatsProviderCbBinder" am: 80ab95927b am: c44a1ba581
Change-Id: Iceb250d8ba0d31a39538dd59e687ea2d80f4aaba
2020-05-05 03:50:52 +00:00
junyulai
5475504266 [SP18.6] Make offload controller poll interval configurable
Test: atest TetheringTests
Bug: 149467454

Change-Id: I0b07a0b520dedb479bf863fbfe898ae85b84b0f3
2020-05-05 11:45:36 +08:00
Junyu Lai
c44a1ba581 Merge changes from topic "sp18-TestableNetworkStatsProviderCbBinder" am: 80ab95927b
Change-Id: Ia0f5206e7adc6a8746e68b8ef16e747f11eea97b
2020-05-05 03:30:06 +00:00
Junyu Lai
80ab95927b Merge changes from topic "sp18-TestableNetworkStatsProviderCbBinder"
* changes:
  [SP18.5] Create offload controller poll interval to resource
  [SP18.4] Add unit test for polling network stats in OffloadController
  [SP18.3] Adapt TestableNetworkStatsProviderCbBinder
2020-05-05 03:09:58 +00:00
junyulai
9606a22037 [SP18.5] Create offload controller poll interval to resource
Test: atest TetheringConfigurationTest
Bug: 149467454
Change-Id: I8b4ad920a4945504914d3741a9fba5c096fbf452
2020-05-04 14:56:37 +08:00
junyulai
9c50628e95 [SP18.4] Add unit test for polling network stats in OffloadController
Test: atest OffloadControllerTest
Bug: 149467454
Change-Id: I9b9c9c096a2366aaf383d5c2d567db6682f02dad
2020-05-04 14:56:37 +08:00
junyulai
da5dfd9f0d [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
2020-05-04 14:56:36 +08:00
Bill Yi
561da8587e [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-dev am: 43708b4424 -s ours
am skip reason: subject contains skip directive

Change-Id: Idb4fe0283803adcfc785a75e4a683cae3c7ed863
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
371f477475 [automerger skipped] Merge "Fix tethering module lib stub default" am: d2ec5841fb am: 6439512cc7 -s ours
am skip reason: Change-Id Iaab154d9d71900284d92d518a086fc1227c00d5c with SHA-1 dc8e0fc1a1 is in history

Change-Id: Ib0fd3dcf5573a3297ddf50bf3b741c486e6f8600
2020-05-01 09:28:43 +00:00
Anton Hansson
6439512cc7 Merge "Fix tethering module lib stub default" am: d2ec5841fb
Change-Id: I11beafef884cb097ac85fab0b8e175d47a76813c
2020-05-01 09:13:22 +00:00
Anton Hansson
d2ec5841fb Merge "Fix tethering module lib stub default" 2020-05-01 08:58:26 +00:00
Anton Hansson
b84b93b629 Merge "Rename module dist files" into rvc-dev am: 7e0949732f
Change-Id: If24bfcc6dbe243d61863a5561b01f44bdadb439e
2020-05-01 08:38:54 +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
Treehugger Robot
463f6ab492 [automerger skipped] Merge "Import translations. DO NOT MERGE" am: 5f2cebc10a -s ours am: b518fd475c -s ours
am skip reason: subject contains skip directive

Change-Id: I46c4106b8158aecf93b9a1a36b170409f510d534
2020-05-01 00:24:19 +00:00
Treehugger Robot
b518fd475c [automerger skipped] Merge "Import translations. DO NOT MERGE" am: 5f2cebc10a -s ours
am skip reason: subject contains skip directive

Change-Id: Iec96a2a81d4ad75c01c22bf1ff7b73991816155e
2020-05-01 00:10:04 +00:00
Bill Yi
3b1e3d04f6 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I3b69996ab87b3c9ddeeb5c6166a1256b77f30c12
2020-04-30 15:32:29 -07:00
Anton Hansson
261d6735ce Merge "Fix tethering module lib stub default" into rvc-dev am: f4fe711313
Change-Id: I9366346c2e9735b3dcbe0e54fa886e65d86106c0
2020-04-30 19:53:17 +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
a8f2e3ead5 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
Merged-In: Iaab154d9d71900284d92d518a086fc1227c00d5c
(cherry picked from commit dc8e0fc1a1)
2020-04-30 17:05:01 +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
1a16968c3b [automerger skipped] Merge changes I38628dad,I2467b647 into rvc-dev am: 027c80d2d6 -s ours
am skip reason: Change-Id I38628daddcb7be7c74846e78d36dc88f065b97d9 with SHA-1 360c88f238 is in history

Change-Id: I94377af5bf67a7a9c15ad228a1a6f9a70df749bf
2020-04-30 06:20:20 +00:00
Remi NGUYEN VAN
b1bcc4e053 [automerger skipped] Merge "Address comments on NetworkStack AIDL v6" into rvc-dev am: 675ec9d30e -s ours
am skip reason: Change-Id Id9b71784e5f6294d203230e57737979e063ff0f8 with SHA-1 aba3d2ebeb is in history

Change-Id: I34895c81e5abfe3baf155582cf557ce909af5965
2020-04-30 06:18:35 +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
Treehugger Robot
912b722290 Merge "[SP18.1] add dependency object to OffloadController" am: c75f373448 am: 30af8e6201
Change-Id: Ic1586dee9e62a3a1484feec91cc66883a12bb90b
2020-04-29 12:45:13 +00:00
Treehugger Robot
30af8e6201 Merge "[SP18.1] add dependency object to OffloadController" am: c75f373448
Change-Id: I02c648e4ec802e738d311f5996cb3cd053f58478
2020-04-29 12:25:36 +00:00
Treehugger Robot
c75f373448 Merge "[SP18.1] add dependency object to OffloadController" 2020-04-29 12:08:22 +00:00
Junyu Lai
a10b3a3a89 Merge "[SP18] Poll network stats in OffloadController to support data warning" am: d25d88199f am: 73cfbe504e
Change-Id: Ifcdeaaba790ddf9adecd3afb06911c63f1a17ac1
2020-04-29 11:40:26 +00:00
Junyu Lai
73cfbe504e Merge "[SP18] Poll network stats in OffloadController to support data warning" am: d25d88199f
Change-Id: I16e45c86f4f7c5654dd0061c6fdb3fbf66986124
2020-04-29 11:19:40 +00:00
Junyu Lai
d25d88199f Merge "[SP18] Poll network stats in OffloadController to support data warning" 2020-04-29 11:01:56 +00:00
junyulai
360c88f238 [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
2020-04-28 18:27:57 +08:00
junyulai
607fa9efea [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
2020-04-28 18:27:57 +08: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
392bb66d1d [automerger skipped] Merge "Remove Preconditions usage to stop dependecy with non-updatble class" into rvc-dev am: 9258a08525 -s ours
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 b9c19778f4 is in history

Change-Id: Ie3bbe36a336d52d240e0d6f41654009d98b6be55
2020-04-28 03:12:33 +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
8f089260ba [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-dev am: 885d4eaf1f -s ours
am skip reason: subject contains skip directive

Change-Id: Ic105dddee57c204b2264686c22ce41e7b3f911b7
2020-04-27 14:42:43 +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
a4ca5ac207 [automerger skipped] Merge "Unbreak tethering for no offload supported devices" into rvc-dev am: 48a2ffac38 -s ours
am skip reason: Change-Id Ie0a32a9062c722327a27c6de13e3bb8d9588bebb with SHA-1 6b3afbe447 is in history

Change-Id: I19b79aa44a2acf95270e526e384862906f8c26c0
2020-04-27 12:33:07 +00:00
Mark Chien
db6cf82c14 Merge "Remove Preconditions usage to stop dependecy with non-updatble class" am: 821089e106 am: cdee1cfe24
Change-Id: I856a936b295426bb2ba219eb4e510f6a2a3ac12b
2020-04-27 11:17:28 +00:00
Mark Chien
cdee1cfe24 Merge "Remove Preconditions usage to stop dependecy with non-updatble class" am: 821089e106
Change-Id: Ib101caf06704f74d7721c44ed4f51d396bc0a4e8
2020-04-27 11:02:19 +00:00
Mark Chien
821089e106 Merge "Remove Preconditions usage to stop dependecy with non-updatble class" 2020-04-27 10:54:19 +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
Mark Chien
a35751fb3e Merge "Unbreak tethering for no offload supported devices" am: cb22e06783 am: 98c0b261f8
Change-Id: I857cf7c9542f2c0f595c3afdbd4db032c0a96392
2020-04-27 09:12:37 +00:00
Mark Chien
98c0b261f8 Merge "Unbreak tethering for no offload supported devices" am: cb22e06783
Change-Id: I1bfe9cbe836694e929e9aef43ad22eeceae28f77
2020-04-27 08:57:12 +00:00
Mark Chien
cb22e06783 Merge "Unbreak tethering for no offload supported devices" 2020-04-27 08:42:36 +00:00