Commit Graph

818 Commits

Author SHA1 Message Date
Mark Chien
e37bb0c05a [automerger skipped] Merge "Address the comment of aosp/1288493" into rvc-dev am: 7c23183b5f -s ours
am skip reason: Change-Id I0cf337625cee31a47879c59e9b18657ea7624eb4 with SHA-1 147e5765ee is in history

Change-Id: I017e1107ddec8b7700eb0bf64c21436bd7813fc1
2020-05-08 13:16:43 +00:00
Mark Chien
fa0384ea72 Merge "Allow to exempt from entitlement check" am: 469314ecc8 am: ec7cf5e356
Change-Id: I34a405492bd2e80aa731e5ac5d56034f7a80cd45
2020-05-08 12:47:48 +00:00
Treehugger Robot
f21b93a7f2 [automerger skipped] Merge "Override tethering module APK-in-APEX for Go variant" am: bfd392c4c0 am: b8345314d8 -s ours
am skip reason: Change-Id I4147173b5f3668491ff9cb7f1f86715b036d6d4b with SHA-1 9548c8580c is in history

Change-Id: I115a3426c92c4c7bfe78e3318b6ecf6cfcbe2d5d
2020-05-08 12:47:29 +00:00
Mark Chien
ec7cf5e356 Merge "Allow to exempt from entitlement check" am: 469314ecc8
Change-Id: I1252b9670efa16118d428cda2ab94e2dca757090
2020-05-08 12:29:58 +00:00
Treehugger Robot
b8345314d8 Merge "Override tethering module APK-in-APEX for Go variant" am: bfd392c4c0
Change-Id: Iff6db0c1f58356a0e573654175c3780b8fa09a66
2020-05-08 12:29:38 +00:00
Mark Chien
469314ecc8 Merge "Allow to exempt from entitlement check" 2020-05-08 12:28:06 +00:00
Treehugger Robot
bfd392c4c0 Merge "Override tethering module APK-in-APEX for Go variant" 2020-05-08 12:11:47 +00: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
250a10eec4 Merge "Address the comment of aosp/1288493" am: 974d6f5978 am: b51ef98b86
Change-Id: Idfe4cbf12cbcc233c1061b26e962dcf21cd36de0
2020-05-08 11:00:42 +00:00
markchien
f5078f489d 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
2020-05-08 18:55:26 +08:00
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
669772eb76 Merge "Set min_sdk_version for updatable mainline modules" am: 50f4887299 am: e25536866e
Change-Id: I3152d9e94e0a1fce02ecb16b3ec0cea92c856ebe
2020-05-08 09:40:48 +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
c2de7d994d [automerger skipped] Merge "Refactor the EntitlementManager" into rvc-dev am: 1d02a79a32 -s ours
am skip reason: Change-Id Ic83f42ff4eec38adf039d55d80fcb9b0f16373cc with SHA-1 33d861e6a7 is in history

Change-Id: Iabc445c8067b64cf4c9c10e781e922b8f58d0227
2020-05-08 03:06:42 +00:00
Mark Chien
1d02a79a32 Merge "Refactor the EntitlementManager" into rvc-dev 2020-05-08 03:03:07 +00:00
Mark Chien
271110a1a4 Merge "Override tethering module APK-in-APEX for Go variant" into rvc-dev am: cca6aad882
Change-Id: Ib0d07f544a37d24f08355f3e3a2afa73fb43868d
2020-05-07 15:31:50 +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
1a682c6155 [automerger skipped] Merge "Use stable networkstack-aidl-interfaces" into rvc-dev am: aa785801da -s ours
am skip reason: Change-Id I507f40866d04db5ed3361831e01eaa4dfaf20bed with SHA-1 0630f383af is in history

Change-Id: Ib04a977100b02a93c59ec479e3d85ec13de82c06
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
0245317764 Merge "Refactor the EntitlementManager" am: 581afa0bfa am: 407c3afa4a
Change-Id: Ib409b85729972e23242551beb39638aaefad0584
2020-05-07 11:26:35 +00:00
Jeongik Cha
8841f71995 Merge "Use stable networkstack-aidl-interfaces" am: 3a22b81ccf am: d12236a66f
Change-Id: Ie5671f3b65a314a1b4f8be9917e02da408e00a53
2020-05-07 11:26:19 +00: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
a77b290247 [automerger skipped] Test tethering log dump am: c96fbe0abe -s ours
am skip reason: Change-Id I01fc6969041711f7a15880144ee5eac591086ecd with SHA-1 146f6055bd is in history

Change-Id: I208b2d702643e72dedb821c2517ef1f32b12e5ef
2020-05-07 08:19:22 +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
dbaff66f45 Override tethering module APK-in-APEX for Go variant
Bug: 155604224
Test: build
Change-Id: I4147173b5f3668491ff9cb7f1f86715b036d6d4b
Merged-In: I4147173b5f3668491ff9cb7f1f86715b036d6d4b
2020-05-07 06:35:05 +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
Mark Chien
80aa028b9c Merge "Test tethering log dump" am: 0e3371469e am: 3369043fca
Change-Id: I20e8808afefaf0d5964871db976e288191a75ad7
2020-05-07 03:49:42 +00: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
Anton Hansson
834ffa7f52 Merge "Enable api lint and check_last_api for modules" into rvc-dev am: 3f34b58cee
Change-Id: Iceaddc7ad960239c33f97d17616b0ba984e0a5ea
2020-05-06 09:30:20 +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
markchien
146f6055bd Test tethering log dump
Bug: 145490751
Test: atest TetheringTests
Change-Id: I01fc6969041711f7a15880144ee5eac591086ecd
2020-05-06 17:00:37 +08:00
Junyu Lai
404b1ce8c3 [automerger skipped] Merge changes from topic "am-99b870448c8c43b2815c42861ac6235c-rvc-dev" into rvc-dev am: df554bb5f8 -s ours
am skip reason: Change-Id I0b07a0b520dedb479bf863fbfe898ae85b84b0f3 with SHA-1 5475504266 is in history

Change-Id: If89659196af8b9ca8b74e5d9f6c4d9f08ea5b7ab
2020-05-06 02:49:00 +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
Anton Hansson
f8e6614007 [automerger skipped] Merge "Rename module dist files" am: b098442b7b am: 1af24fa462 -s ours
am skip reason: Change-Id I076f30931bf2524d57703873cd7de25b3f23b457 with SHA-1 d7f1fabc94 is in history

Change-Id: Ie67a1180c321df3033c93e1081a650a954582eee
2020-05-05 14:22:47 +00: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
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
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
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