Commit Graph

457 Commits

Author SHA1 Message Date
Jooyung Han
d261c58a4a Set min_sdk_version for updatable mainline modules am: 5f9f31c18b
Change-Id: Ib0579b81c28adfbf9ecb54bd33385692d546db7e
2020-05-13 08:55:49 +00:00
Jooyung Han
5f9f31c18b 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
Merged-In: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
Change-Id: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
(cherry picked from commit 33aa294e96f13906f596e427b96652fe80cf199b)
2020-05-13 16:18:51 +09:00
Mark Chien
440035ae43 Merge "Allow to exempt from entitlement check" into rvc-dev am: 1fe4d26b79
Change-Id: I5936d18a73dffd628075073aeebbf0369370ae1b
2020-05-12 19:40:10 +00:00
Mark Chien
a18a39f8b6 Merge "Address the comment of aosp/1288493" into rvc-dev am: 7c23183b5f
Change-Id: I97ae5e12a900f38e8271455e48e92bdcf0708b34
2020-05-12 18:57:33 +00:00
Mark Chien
662d1a7994 Merge "Refactor the EntitlementManager" into rvc-dev am: 1d02a79a32
Change-Id: I3b09d6077a343df3dbde5dd3b410ba1bd4267146
2020-05-12 18:53:20 +00:00
Bill Yi
c8005575bf Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I5d700a2f66a5a5e5419c46926034f48a690438ae
2020-05-10 00:00:53 +00:00
markchien
dc3b82db70 Allow to exempt from entitlement check
To exempt from entitlement check, caller need to hold TETHER_PRIVILEGED
permission.

Bug: 141256482
Test: atest TetheringTests

Change-Id: I2eb37f5e92f5f5150a7fb7c25b945e28704d27a0
Merged-In: I2eb37f5e92f5f5150a7fb7c25b945e28704d27a0
2020-05-08 23:13:30 +08:00
Mark Chien
0dafa92b93 Address the comment of aosp/1288493
Bug: 141256482
Test: atest TetheringTests
Merged-In: I0cf337625cee31a47879c59e9b18657ea7624eb4
Change-Id: I0cf337625cee31a47879c59e9b18657ea7624eb4
2020-05-08 11:57:57 +00:00
Mark Chien
1d02a79a32 Merge "Refactor the EntitlementManager" into rvc-dev 2020-05-08 03:03:07 +00:00
Mark Chien
b853a6e5db Merge "Override tethering module APK-in-APEX for Go variant" into rvc-dev am: cca6aad882
Change-Id: I4513b6ad6895b7d2ddeff5405742f578baec700f
2020-05-07 15:31:32 +00:00
Mark Chien
cca6aad882 Merge "Override tethering module APK-in-APEX for Go variant" into rvc-dev 2020-05-07 15:15:59 +00:00
TreeHugger Robot
cb50fc9690 Merge "Use stable networkstack-aidl-interfaces" into rvc-dev am: aa785801da
Change-Id: I621dcbf0c11a3220d996c952639383b4351d67fd
2020-05-07 15:03:01 +00:00
Mark Chien
92afd387fd 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

Merged-In: Ic83f42ff4eec38adf039d55d80fcb9b0f16373cc
Change-Id: Ic83f42ff4eec38adf039d55d80fcb9b0f16373cc
2020-05-07 14:46:09 +00:00
Jeongik Cha
1aba7987de Use stable networkstack-aidl-interfaces
Test: m nothing
Bug: 133526962
Original-Change: https://android-review.googlesource.com/1301313
Merged-In: I507f40866d04db5ed3361831e01eaa4dfaf20bed
Change-Id: I507f40866d04db5ed3361831e01eaa4dfaf20bed
2020-05-07 11:48:44 +00:00
Mark Chien
044a749f37 Test tethering log dump am: c96fbe0abe
Change-Id: If48c35a4dde54b4bdd44703f3df6338267b1b542
2020-05-07 08:19:10 +00:00
Mark Chien
c96fbe0abe Test tethering log dump
Bug: 145490751
Test: atest TetheringTests
Merged-In: I01fc6969041711f7a15880144ee5eac591086ecd
Change-Id: I01fc6969041711f7a15880144ee5eac591086ecd
2020-05-07 06:44:43 +00:00
markchien
9548c8580c Override tethering module APK-in-APEX for Go variant
Bug: 155604224
Test: build
Change-Id: I4147173b5f3668491ff9cb7f1f86715b036d6d4b
2020-05-07 14:21:49 +08:00
Anton Hansson
b79d07bb0e Merge "Enable api lint and check_last_api for modules" into rvc-dev am: 3f34b58cee
Change-Id: Iae3492e765d2f1c88b8c587e93b268a4c8aa9907
2020-05-06 09:30:31 +00:00
Anton Hansson
3f34b58cee Merge "Enable api lint and check_last_api for modules" into rvc-dev 2020-05-06 09:28:03 +00:00
Junyu Lai
47285473fe Merge changes from topic "am-99b870448c8c43b2815c42861ac6235c-rvc-dev" into rvc-dev am: df554bb5f8
Change-Id: I80823cfcdd22ece5d59d916addcac74333f22d22
2020-05-06 02:50:23 +00:00
junyulai
f887f54a5c [SP18.5] Create offload controller poll interval to resource am: 2a5f21425a
Change-Id: I7e676c4501b2b4510dfb6566bcd5c30bee6fb154
2020-05-06 02:50:20 +00:00
junyulai
b6ab822c32 [SP18.4] Add unit test for polling network stats in OffloadController am: 14722baf0d
Change-Id: I03775f4efff78e5afc365493408611a863322027
2020-05-06 02:50:15 +00:00
junyulai
8c23b65a4f [SP18.3] Adapt TestableNetworkStatsProviderCbBinder am: b7011d2265
Change-Id: I6dc3600a16dd1379e26e6fe2155f71e841c3c90c
2020-05-06 02:50:13 +00:00
Anton Hansson
5b0be161ad Enable api lint and check_last_api for modules
This adds checking of module api compatibility to the individual module
api rules. Until now, this checking has been done via the monolithic
metalava runs which we are aiming to get rid of.

Now is a good time to do this because we can compare them to the just
finalized version 30 API, which we have no diffs with. Baseline the
existing wifi failures that metalava fails to find in the previous API.

Bug: 144149403
Test: m checkapi
Change-Id: Id222895daa3a769c265965b052a17d5a1ca18462
2020-05-05 19:17:08 +01:00
Junyu Lai
e1a04c04d7 [SP18.6] Make offload controller poll interval configurable
Test: atest TetheringTests
Bug: 149467454

Change-Id: I0b07a0b520dedb479bf863fbfe898ae85b84b0f3
Merged-In: I0b07a0b520dedb479bf863fbfe898ae85b84b0f3
(cherry picked from commit 8371fa281839d5b1a1027936f2f83e59bf5301a3)
2020-05-05 10:50:35 +00:00
junyulai
2a5f21425a [SP18.5] Create offload controller poll interval to resource
Test: atest TetheringConfigurationTest
Bug: 149467454
Change-Id: I8b4ad920a4945504914d3741a9fba5c096fbf452
Merged-In: I8b4ad920a4945504914d3741a9fba5c096fbf452
(cherry-picked from aosp/1299413)
2020-05-05 18:45:53 +08:00
junyulai
14722baf0d [SP18.4] Add unit test for polling network stats in OffloadController
Test: atest OffloadControllerTest
Bug: 149467454
Change-Id: I9b9c9c096a2366aaf383d5c2d567db6682f02dad
Merged-In: I9b9c9c096a2366aaf383d5c2d567db6682f02dad
(cherry-picked from aosp/1295347)
2020-05-05 18:45:42 +08: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