Commit Graph

295 Commits

Author SHA1 Message Date
Mark Chien
b51ef98b86 Merge "Address the comment of aosp/1288493" am: 974d6f5978
Change-Id: I706462c5dc4a0dbd4b921f2c446a13b1b408948a
2020-05-08 10:45:12 +00:00
Mark Chien
974d6f5978 Merge "Address the comment of aosp/1288493" 2020-05-08 10:30:49 +00:00
Jooyung Han
e25536866e Merge "Set min_sdk_version for updatable mainline modules" am: 50f4887299
Change-Id: I30b90b19967d2a4cd8e283420f856816c3e4bbb4
2020-05-08 09:04:30 +00:00
Jooyung Han
50f4887299 Merge "Set min_sdk_version for updatable mainline modules" 2020-05-08 08:45:49 +00:00
markchien
147e5765ee Address the comment of aosp/1288493
Bug: 141256482
Test: atest TetheringTests
Change-Id: I0cf337625cee31a47879c59e9b18657ea7624eb4
2020-05-08 15:51:52 +08:00
Mark Chien
407c3afa4a Merge "Refactor the EntitlementManager" am: 581afa0bfa
Change-Id: I20f7b03356592cd184b695e4ceb491d4b04cde14
2020-05-07 11:19:16 +00:00
Mark Chien
581afa0bfa Merge "Refactor the EntitlementManager" 2020-05-07 11:14:40 +00:00
Jeongik Cha
d12236a66f Merge "Use stable networkstack-aidl-interfaces" am: 3a22b81ccf
Change-Id: I278f01d4c8e31913bbc1151bd4733ff8158111d0
2020-05-07 11:12:50 +00:00
Jeongik Cha
3a22b81ccf Merge "Use stable networkstack-aidl-interfaces" 2020-05-07 10:59:05 +00:00
Jooyung Han
8182d8bd56 Set min_sdk_version for updatable mainline modules
Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.

For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.

Bug: 145796956
Bug: 150999716
Test: m
Change-Id: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
2020-05-07 17:30:00 +09:00
Mark Chien
3369043fca Merge "Test tethering log dump" am: 0e3371469e
Change-Id: I3218a3c600ffc4be33a660362cbb5dd001437171
2020-05-07 03:26:47 +00:00
Mark Chien
0e3371469e Merge "Test tethering log dump" 2020-05-07 03:09:11 +00:00
markchien
146f6055bd Test tethering log dump
Bug: 145490751
Test: atest TetheringTests
Change-Id: I01fc6969041711f7a15880144ee5eac591086ecd
2020-05-06 17:00:37 +08:00
Anton Hansson
1af24fa462 Merge "Rename module dist files" am: b098442b7b
Change-Id: Ibe316eef17d3efb90d68182b0f92f8b18aaecde5
2020-05-05 14:07:08 +00:00
Anton Hansson
b098442b7b Merge "Rename module dist files" 2020-05-05 13:45:03 +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
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
Jeongik Cha
0630f383af Use stable networkstack-aidl-interfaces
Test: m nothing
Bug: 133526962
Change-Id: I507f40866d04db5ed3361831e01eaa4dfaf20bed
2020-05-04 08:11:26 +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
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
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
bb5231decc 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
Merged-In: I076f30931bf2524d57703873cd7de25b3f23b457
(cherry picked from commit d7f1fabc94)
2020-04-30 20:56:11 +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
markchien
33d861e6a7 Refactor the EntitlementManager
1. Change ArraySet usage to BitSet
2. Change mCellularUpstreamPermitted to mLastCellularUpstreamPermitted.

Before this change:
a member variable(mCellularUpstreamPermitted) is
used to check whether cellular upstream is permitted, the code must
ensure to update this variable once entitlement result is changed or the
entitlement check is triggered but does not have a result yet.

In this change:
Instead of storing the information about whether cellular is permitted in
a member variable. The information is recalculated every time when user
call isCellularUpstreamPermitted(). Now isCellularUpstreamPermitted() is
always be used to check whether cellular upstream is permitted no matter
inside or outside EntitlementManager.
This make the code be easier to maintain that we do not need to care
when mCellularUpstreamPermitted need to be updated because the
information would be recalculated every time. And the recalculation is
lock free because this is only used inside tethering while running in
the same thread.

Bug: 141256482
Test: atest TetheringTests

Change-Id: Ic83f42ff4eec38adf039d55d80fcb9b0f16373cc
2020-04-30 14:00:20 +08: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
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
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
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
markchien
6b3afbe447 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)

Change-Id: Ie0a32a9062c722327a27c6de13e3bb8d9588bebb
2020-04-27 14:47:56 +08:00
Jooyung Han
6478508103 Merge "Add min_sdk_version:R to updatable apexes" am: c280c85504
Change-Id: I0c63ce2b2146e31d2165bbaa0d5761950dfc0db7
2020-04-25 04:53:35 +00:00
Jooyung Han
c280c85504 Merge "Add min_sdk_version:R to updatable apexes" 2020-04-25 04:41:44 +00:00
Remi NGUYEN VAN
fb8a431cc5 Merge "Address comments on NetworkStack AIDL v6" am: 9b687b94a4
Change-Id: I755d14877a65b359c0837cab1488875d7238440e
2020-04-24 12:04:38 +00:00
Remi NGUYEN VAN
9b687b94a4 Merge "Address comments on NetworkStack AIDL v6" 2020-04-24 11:56:32 +00:00
Remi NGUYEN VAN
aba3d2ebeb 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
Change-Id: Id9b71784e5f6294d203230e57737979e063ff0f8
2020-04-24 18:52:02 +09:00
markchien
b9c19778f4 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

Change-Id: Id0dcec44f362f79bc8c046d722635687a7388aa2
2020-04-24 00:47:56 +08:00
Paul Hu
19575361f2 Merge "[TNU09] Adjust restricted notification" am: 3db6cae8d4
Change-Id: I6f89d5569f7f07317d7c55f81d3d7b55b4779819
2020-04-23 08:11:24 +00:00
Paul Hu
3db6cae8d4 Merge "[TNU09] Adjust restricted notification" 2020-04-23 07:50:34 +00:00
Bill Yi
7d04cce017 Merge "Import translations. DO NOT MERGE" 2020-04-22 23:05:49 +00:00
Bill Yi
2b48e19418 Import translations. DO NOT MERGE
Change-Id: I44c343149dc88a88c94327cdd6d5ac26ce7a6816
Auto-generated-cl: translation import
2020-04-22 12:03:48 -07:00