Commit Graph

1530 Commits

Author SHA1 Message Date
Junyu Lai
800f070743 [automerger skipped] Merge changes I38628dad,I2467b647 into rvc-dev am: 027c80d2d6 am: 50815fdafe -s ours am: 97c8dc55c7 -s ours
am skip reason: Change-Id I38628daddcb7be7c74846e78d36dc88f065b97d9 with SHA-1 360c88f238 is in history

Change-Id: I96b48d4a78b706e21734628668ea039e618f6b9f
2020-04-30 07:01:50 +00:00
Junyu Lai
667fc5c7ae [automerger skipped] [SP18] Poll network stats in OffloadController to support data warning am: bf6fa99b2a am: f776651a4b -s ours am: ed3c82db75 -s ours
am skip reason: Change-Id I2467b64779b74cd5fec73b42fb303584f52cb1cb with SHA-1 607fa9efea is in history

Change-Id: I4bee7071fedcd9b9093bfe29ba0729c09f0b3ca9
2020-04-30 07:01:42 +00:00
Junyu Lai
b0c6b797ab Merge changes I38628dad,I2467b647 into rvc-dev am: 027c80d2d6 am: 50815fdafe am: ea959b046a
Change-Id: I58eab3c288915035323c5b285f2b2b3aa92c1014
2020-04-30 07:00:36 +00:00
Junyu Lai
eee4bdb603 [SP18] Poll network stats in OffloadController to support data warning am: bf6fa99b2a am: f776651a4b am: 8cf78dbfb8
Change-Id: Ie8cfd7b8663d4bde0936c1cef7ec4194c944abe3
2020-04-30 07:00:33 +00:00
Remi NGUYEN VAN
a505ce94d3 [automerger skipped] Merge "Address comments on NetworkStack AIDL v6" into rvc-dev am: 675ec9d30e -s ours am: b1bcc4e053 -s ours am: e4dac8419c -s ours
am skip reason: Change-Id Id9b71784e5f6294d203230e57737979e063ff0f8 with SHA-1 a530ebb62d is in history

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

Change-Id: I16e0647e1ed8418f2a5d5634c1cce8d4df84ceea
2020-04-30 06:59:28 +00:00
Remi NGUYEN VAN
8ae7444003 Merge "Address comments on NetworkStack AIDL v6" into rvc-dev am: 675ec9d30e am: d24ff42f00 am: da2ec9bddd
Change-Id: Ie40cb222fde066e4f9191fc2d098cabf48be8107
2020-04-30 06:59:25 +00:00
Junyu Lai
795f9abaab [automerger skipped] Merge changes I38628dad,I2467b647 into rvc-dev am: 027c80d2d6 -s ours am: 1a16968c3b -s ours
am skip reason: Change-Id I38628daddcb7be7c74846e78d36dc88f065b97d9 with SHA-1 360c88f238 is in history

Change-Id: I3dd2067abd65e21a48f6543c08e98a6eafc72ead
2020-04-30 06:42:07 +00:00
Junyu Lai
97c8dc55c7 [automerger skipped] Merge changes I38628dad,I2467b647 into rvc-dev am: 027c80d2d6 am: 50815fdafe -s ours
am skip reason: Change-Id I38628daddcb7be7c74846e78d36dc88f065b97d9 with SHA-1 360c88f238 is in history

Change-Id: I49fc2a3d725efe929e272dc9b6cf7eb84ec73d96
2020-04-30 06:41:59 +00:00
Junyu Lai
ed3c82db75 [automerger skipped] [SP18] Poll network stats in OffloadController to support data warning am: bf6fa99b2a am: f776651a4b -s ours
am skip reason: Change-Id I2467b64779b74cd5fec73b42fb303584f52cb1cb with SHA-1 607fa9efea is in history

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

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

Change-Id: I1b2900d70d1c326428f51f0c4ed28049aabd33ef
2020-04-30 06:41:05 +00: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
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
d24ff42f00 Merge "Address comments on NetworkStack AIDL v6" into rvc-dev am: 675ec9d30e
Change-Id: I58b6863e5f8417368c7cd83edc487404d5156e99
2020-04-30 06:19:07 +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
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
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
e66cec5be6 Merge "[SP18.1] add dependency object to OffloadController" am: c75f373448 am: 30af8e6201 am: 912b722290 am: b316d05e25
Change-Id: Id04508c8e61cc45644601086f868143d67589cf6
2020-04-29 13:16:30 +00:00
Treehugger Robot
b316d05e25 Merge "[SP18.1] add dependency object to OffloadController" am: c75f373448 am: 30af8e6201 am: 912b722290
Change-Id: Ie523b105fcc918b8d95fa732b284aeb6584a3dcb
2020-04-29 12:56:55 +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
Junyu Lai
838db0549b Merge "[SP18] Poll network stats in OffloadController to support data warning" am: d25d88199f am: 73cfbe504e am: a10b3a3a89 am: 72d37e7460
Change-Id: I91293aa698fe29da0b915db93336e4c18d363735
2020-04-29 12:09:18 +00:00
Treehugger Robot
c75f373448 Merge "[SP18.1] add dependency object to OffloadController" 2020-04-29 12:08:22 +00:00
Junyu Lai
72d37e7460 Merge "[SP18] Poll network stats in OffloadController to support data warning" am: d25d88199f am: 73cfbe504e am: a10b3a3a89
Change-Id: I9dc0ad525f5736b333ac42f2390477cba2420438
2020-04-29 11:53:52 +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
1a6fceee64 [automerger skipped] Merge "Remove Preconditions usage to stop dependecy with non-updatble class" into rvc-dev am: 9258a08525 am: ec45939bda am: 0b99b02f39 am: 9077eec102 -s ours
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 ed50636b60 is in history

Change-Id: I38d0e31eee7d5c93a6443e82d55b8fbe73fefdbe
2020-04-28 04:06:32 +00:00
Mark Chien
1f3f065dee [automerger skipped] Merge "Remove Preconditions usage to stop dependecy with non-updatble class" into rvc-dev am: 9258a08525 -s ours am: 392bb66d1d -s ours am: 0b2141dff9 -s ours
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 ed50636b60 is in history

Change-Id: Ibd1931045fe83ae897fbfb92a866e3ae849022b6
2020-04-28 03:51:03 +00:00
Automerger Merge Worker
1449ae2886 Merge "[automerger skipped] Merge "Remove Preconditions usage to stop dependecy with non-updatble class" into rvc-dev am: 9258a08525 am: ec45939bda -s ours" into rvc-d1-dev-plus-aosp am: fe7cd34d39 -s ours
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 b9c19778f4 is in history

Change-Id: I6fd4cc02b9923e2c65660b1e6f34cd866b3fc6e7
2020-04-28 03:50:45 +00:00
Mark Chien
9077eec102 Merge "Remove Preconditions usage to stop dependecy with non-updatble class" into rvc-dev am: 9258a08525 am: ec45939bda am: 0b99b02f39
Change-Id: Ib8c2133d64cd0346732194d8cfba88e60abdef04
2020-04-28 03:50:44 +00:00
Mark Chien
0b2141dff9 [automerger skipped] Merge "Remove Preconditions usage to stop dependecy with non-updatble class" into rvc-dev am: 9258a08525 -s ours am: 392bb66d1d -s ours
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 ed50636b60 is in history

Change-Id: I4d4e2f03acefe51495a6c5d2cc28ea81cf47392f
2020-04-28 03:20:22 +00:00
Mark Chien
ba42f65378 [automerger skipped] Merge "Remove Preconditions usage to stop dependecy with non-updatble class" into rvc-dev am: 9258a08525 am: ec45939bda -s ours
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 b9c19778f4 is in history

Change-Id: Ibf3c85517a30c2202235fee7ccd16c8f2cd7ce9f
2020-04-28 03:20:04 +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
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
27fb7c6b6f [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-d1-dev am: c1d4bdd773 -s ours am: 9006f991e0 -s ours am: 2d11027e46 -s ours
am skip reason: subject contains skip directive

Change-Id: I378b41dc49cf17b23afdd63029caef54c88cad41
2020-04-27 15:49:48 +00:00
TreeHugger Robot
03cccf8564 [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-dev am: 885d4eaf1f -s ours am: d5e76ce15a -s ours am: 8f1e123d77 -s ours am: 79f0711324 -s ours
am skip reason: subject contains skip directive

Change-Id: I0907065b9423db40b0c7c72b6a7c02af410eb982
2020-04-27 15:48:25 +00:00
TreeHugger Robot
59b0b6b382 [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-d1-dev am: c1d4bdd773 -s ours am: 93a98a8179 -s ours
am skip reason: subject contains skip directive

Change-Id: I0e6713135002e09fb5bc26360a2bdc704cb78629
2020-04-27 15:39:58 +00:00
TreeHugger Robot
93a98a8179 [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-d1-dev am: c1d4bdd773 -s ours
am skip reason: subject contains skip directive

Change-Id: I054bbfacc6e84c078f4f9eed18808be13e3755e0
2020-04-27 15:33:13 +00:00
TreeHugger Robot
2d11027e46 [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-d1-dev am: c1d4bdd773 -s ours am: 9006f991e0 -s ours
am skip reason: subject contains skip directive

Change-Id: I21afcd1f329c52211c68aa473914876ce679b772
2020-04-27 15:32:27 +00:00
TreeHugger Robot
79f0711324 [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-dev am: 885d4eaf1f -s ours am: d5e76ce15a -s ours am: 8f1e123d77 -s ours
am skip reason: subject contains skip directive

Change-Id: Ic60fd2c2e84e1ee634181732a85a201648fec841
2020-04-27 15:30:52 +00:00
TreeHugger Robot
c1d4bdd773 Merge "Import translations. DO NOT MERGE" into rvc-d1-dev 2020-04-27 15:27:39 +00:00