am skip reason: Change-Id I38628daddcb7be7c74846e78d36dc88f065b97d9 with SHA-1 360c88f238 is in history
Change-Id: I96b48d4a78b706e21734628668ea039e618f6b9f
am skip reason: Change-Id I2467b64779b74cd5fec73b42fb303584f52cb1cb with SHA-1 607fa9efea is in history
Change-Id: I4bee7071fedcd9b9093bfe29ba0729c09f0b3ca9
am skip reason: Change-Id Id9b71784e5f6294d203230e57737979e063ff0f8 with SHA-1 a530ebb62d is in history
Change-Id: Ic12643bc9442df4f42ee4de96f42a15992f15828
am skip reason: Change-Id Id9b71784e5f6294d203230e57737979e063ff0f8 with SHA-1 aba3d2ebeb is in history
Change-Id: I16e0647e1ed8418f2a5d5634c1cce8d4df84ceea
am skip reason: Change-Id I38628daddcb7be7c74846e78d36dc88f065b97d9 with SHA-1 360c88f238 is in history
Change-Id: I3dd2067abd65e21a48f6543c08e98a6eafc72ead
am skip reason: Change-Id I38628daddcb7be7c74846e78d36dc88f065b97d9 with SHA-1 360c88f238 is in history
Change-Id: I49fc2a3d725efe929e272dc9b6cf7eb84ec73d96
am skip reason: Change-Id I2467b64779b74cd5fec73b42fb303584f52cb1cb with SHA-1 607fa9efea is in history
Change-Id: I1520d6a0db58eac622b91718ae6663fcd30e2b9f
am skip reason: Change-Id Id9b71784e5f6294d203230e57737979e063ff0f8 with SHA-1 a530ebb62d is in history
Change-Id: Ic713dcd96b22fb286f916ebe8bdb8b513ff5d551
am skip reason: Change-Id Id9b71784e5f6294d203230e57737979e063ff0f8 with SHA-1 aba3d2ebeb is in history
Change-Id: I1b2900d70d1c326428f51f0c4ed28049aabd33ef
am skip reason: Change-Id I38628daddcb7be7c74846e78d36dc88f065b97d9 with SHA-1 360c88f238 is in history
Change-Id: I94377af5bf67a7a9c15ad228a1a6f9a70df749bf
am skip reason: Change-Id Id9b71784e5f6294d203230e57737979e063ff0f8 with SHA-1 aba3d2ebeb is in history
Change-Id: I34895c81e5abfe3baf155582cf557ce909af5965
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
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)
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)
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
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
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
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 ed50636b60 is in history
Change-Id: I38d0e31eee7d5c93a6443e82d55b8fbe73fefdbe
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 ed50636b60 is in history
Change-Id: Ibd1931045fe83ae897fbfb92a866e3ae849022b6
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 b9c19778f4 is in history
Change-Id: I6fd4cc02b9923e2c65660b1e6f34cd866b3fc6e7
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 ed50636b60 is in history
Change-Id: I4d4e2f03acefe51495a6c5d2cc28ea81cf47392f
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 b9c19778f4 is in history
Change-Id: Ibf3c85517a30c2202235fee7ccd16c8f2cd7ce9f
am skip reason: Change-Id Id0dcec44f362f79bc8c046d722635687a7388aa2 with SHA-1 b9c19778f4 is in history
Change-Id: Ie3bbe36a336d52d240e0d6f41654009d98b6be55