Commit Graph

419 Commits

Author SHA1 Message Date
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
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
Bill Yi
b85287f5d0 Import translations. DO NOT MERGE
Change-Id: I1cdee455c89183fa875ac4916105db6dffd5ee2b
Auto-generated-cl: translation import
2020-04-27 01:01:45 -07:00
Bill Yi
8a35765b6f Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I08496ebb9bad7c95a6e9df43ef57c55a9956c9d8
2020-04-27 00:04:34 -07:00
TreeHugger Robot
ac6fdb4eef Merge "Import translations. DO NOT MERGE" into rvc-d1-dev 2020-04-23 23:25:24 +00:00
Paul Hu
3183b5ff2e Merge "[TNU09] Adjust restricted notification" into rvc-dev am: 0b5d999a8c
Change-Id: Iaed5ec62fff05abed68b8eb7fcdfe727ade49952
2020-04-23 11:39:06 +00:00
Paul Hu
0439c2d204 [TNU09] Adjust restricted notification
1. Let restricted notification that can be dismissed.
2. Only put up restricted notification when any of tethering is
   activating.

Bug: 154214549
Test: atest TetheringTests
Change-Id: Ib980aca154036828abdab35e3bb11d42f85ff610
Merged-In: Ib980aca154036828abdab35e3bb11d42f85ff610
(cherry picked from commit 2eb66bdbe4, aosp/1290334)
2020-04-23 10:18:11 +00:00
Bill Yi
3fe17e291b Import translations. DO NOT MERGE
Change-Id: Ib2f7fbbb8ebd73b517aa44a4708a7040d2394823
Auto-generated-cl: translation import
2020-04-23 02:17:41 -07:00
Paul Hu
1716344e59 Merge "Add TetheredClient tests" into rvc-dev am: 34d6a00acb
Change-Id: Idda1273dc05a5acdbf4f3d8092259ebf825a293a
2020-04-23 05:54:55 +00:00
Paul Hu
6469fe0556 Merge "Add TetheringCommonTests" into rvc-dev am: 1277763ddd
Change-Id: Id3aa90e11df5c334679a590c2b6d36467dbb0769
2020-04-23 01:25:13 +00:00
Paul Hu
86152672a6 Add TetheredClient tests
Test APIs below:
getAddresses()
getMacAddress()
getTetheringType()
AddressInfo.getAddress()
AddressInfo.getHostname()
AddressInfo.writeToParcel(android.os.Parcel, int)

Bug: 153614365
Bug: 153613717
Test: atest TetheringTests
Change-Id: Ic7cbebe54a38af5b5c4639eb7641a20de6864a26
Merged-In: Ic7cbebe54a38af5b5c4639eb7641a20de6864a26
(cherry picked from commit fa882fdb96, aosp/1292438)
2020-04-23 01:10:19 +00:00
Paul Hu
1277763ddd Merge "Add TetheringCommonTests" into rvc-dev 2020-04-23 01:06:13 +00:00
Bill Yi
2fe57392e1 [automerger skipped] Merge "Import translations. DO NOT MERGE" into rvc-dev am: f76d89b395 -s ours
am skip reason: subject contains skip directive

Change-Id: I9eafd111755182368e39266adf333b8d0f92fb96
2020-04-23 00:17:29 +00:00
Bill Yi
70521ef0e8 Import translations. DO NOT MERGE
Change-Id: I4b3a8cf8d738bf6f680258f1ebd77d894dc986cd
Auto-generated-cl: translation import
2020-04-22 15:24:12 -07:00
Paul Hu
1cae88f560 Add TetheringCommonTests
Bug: 153614365
Bug: 153613717
Test: atest TetheringTests TetheringCoverageTests
Change-Id: If7c933ec0c72943312cd37bfc66918f10a5504a9
Merged-In: If7c933ec0c72943312cd37bfc66918f10a5504a9
(cherry picked from commit f340f6fd46, aosp/1290553)
2020-04-22 15:24:13 +00:00
Mark Chien
32766d1a2b Merge "Include NetworkStaticLibTestsLib into tethering coverage test" into rvc-dev am: 70e43fb856
Change-Id: I5bbf860bb590a33bb54a411ca40a7b53463c96de
2020-04-22 14:11:11 +00:00
Mark Chien
70e43fb856 Merge "Include NetworkStaticLibTestsLib into tethering coverage test" into rvc-dev 2020-04-22 13:54:33 +00:00
Paul Hu
cf12c1fd9a Merge "[TNU08] Remove the "tethering is on" notification" into rvc-dev am: a529ce8bd7
Change-Id: I166bcdd29d78df1bca8c5507c5a55ecca320edb8
2020-04-22 10:18:57 +00:00
Paul Hu
a529ce8bd7 Merge "[TNU08] Remove the "tethering is on" notification" into rvc-dev 2020-04-22 09:56:32 +00:00
Mark Chien
d0ed7dd8f9 Include NetworkStaticLibTestsLib into tethering coverage test
Bug: 148636687
Test: atest NetworkStaticLibTests
Test: atest TetheringCoverageTests
Merged-In: I8cd9dbc9fe163583ff1d016c9262546949105b80
Change-Id: I8cd9dbc9fe163583ff1d016c9262546949105b80
2020-04-22 09:45:39 +00:00
Paul Hu
18b8719621 Merge "[TNU07] Remove unused resources" into rvc-dev am: a7c5d5707a
Change-Id: Ie8ee09bfcef93de9d834f5d81928bb1408398791
2020-04-22 08:34:41 +00:00
Mark Chien
ef5c55fa7a Merge "Retry the call that fetches the tethering offload HAL." into rvc-dev am: 1794d0559d
Change-Id: I6f290f13edb540aeda3a9a1f3395234a50ac78b3
2020-04-22 08:32:41 +00:00
Paul Hu
a7c5d5707a Merge "[TNU07] Remove unused resources" into rvc-dev 2020-04-22 08:31:41 +00:00
Paul Hu
127ee5920f [TNU08] Remove the "tethering is on" notification
All carriers discarded the requirement to put up a standing
notification when tethering is on. Thus, remove the "tethering
is on" notification.

Bug: 154438388
Test: atest TetheringTests
Change-Id: Ife3915837b6b7b83d3eaaa84b71b6409ff37b71c
Merged-In: Ife3915837b6b7b83d3eaaa84b71b6409ff37b71c
(cherry picked from commit 0171c07d05dd2625c6dcfd47977a701ddc2d5d36, aosp/1289107)
2020-04-22 07:00:16 +00:00
Treehugger Robot
83a814eb31 Retry the call that fetches the tethering offload HAL.
The CL that moved the initialization of the tethering offload
config HAL from C++ to Java caused the code not to retry
fetching the service if it is not ready when tethering is
started. This is because the C++ version of getService() retries,
but the Java version only retries if getService(true) is called.

Make the new code retry as well.

b/152430668#comment4 asserts that the fetch will be retried only
if the service is installed on the device, so the retries should
be attempted (and thus should not have any startup time impact)
on devices that do not support tethering offload.

Bug: 152430668
Test: builds, boots, tethering offload works
Merged-In: I093f127d90b2aa1b13eb0748378a24726d419472
Change-Id: I093f127d90b2aa1b13eb0748378a24726d419472
2020-04-22 06:59:12 +00:00
Paul Hu
ef34159909 [TNU07] Remove unused resources
Some strings are not used, so just remove them.

Bug: 154445061
Test: atest TetheringTests
Change-Id: Ie67f7f4d0863d58c4c5206e445c1dbdfe3f65f60
Merged-In: Ie67f7f4d0863d58c4c5206e445c1dbdfe3f65f60
(cherry picked from commit 59eeedc045aaaa0c7d5b97277d25f64cce254464, aosp/1289100)
2020-04-22 06:58:17 +00:00
Jiyong Park
960eb03b46 Merge "Mark some aidl_interface modules as unstable" into rvc-dev am: fc7d16b3c7
Change-Id: I1693261f829fe4b40dbe2d0e11b7e88916582476
2020-04-21 10:11:46 +00:00
TreeHugger Robot
846de3551c [automerger skipped] Merge "DO NOT MERGE Remove references of telephony-stubs." into rvc-dev am: 3baf9409d5 -s ours
am skip reason: Change-Id I1812818c3d49463c3840a98212bbab58a110359a with SHA-1 0f0e3a99f1 is in history

Change-Id: I0fe8def6b2a53241381001e4d1c17a573ed9c8e7
2020-04-21 09:57:23 +00:00
Amit Mahajan
0f0e3a99f1 DO NOT MERGE Remove references of telephony-stubs.
Since it's not used for now.

Test: TH
Bug: 153304048
Merged-in: I1812818c3d49463c3840a98212bbab58a110359a
Change-Id: I1812818c3d49463c3840a98212bbab58a110359a
2020-04-20 16:48:33 +00:00
Jiyong Park
fc7d16b3c7 Merge "Mark some aidl_interface modules as unstable" into rvc-dev 2020-04-20 03:23:06 +00:00
TreeHugger Robot
3baf9409d5 Merge "DO NOT MERGE Remove references of telephony-stubs." into rvc-dev 2020-04-18 06:16:44 +00:00
TreeHugger Robot
e61564b21e Merge "[TNU06] Add roaming notification" into rvc-dev am: 56ef0ea4b6
Change-Id: I542b34a34278715d976be0baf92a554b5163a850
2020-04-17 18:45:21 +00:00
Chalard Jean
4580c83253 [TNU06] Add roaming notification
Warn user of potential data charges if the backhaul is
cellular and user is roaming.

Bug: 145629001
Test: atest TetheringTests
Change-Id: I74b4f87c2f6aad09e05d3f2a779f880396885953
Merged-In: I74b4f87c2f6aad09e05d3f2a779f880396885953
(cherry picked from commit 1af69e5b8f339bde5b70886d80960ce22c847245, aosp/1237026)
2020-04-17 17:14:12 +00:00
Paul Hu
95c0a85b0b Merge "[TNU05.1] Address aosp/1237036 leftover comments" into rvc-dev am: 5da521b457
Change-Id: Iea664b4d0ee648153ceb4524e80331edf42590cf
2020-04-17 01:16:32 +00:00
Paul Hu
5e9c40c012 [TNU05.1] Address aosp/1237036 leftover comments
Bug: 147818698
Test: atest TetheringTests
Change-Id: Ife738339aeae00d2063fea6918b50204daef24fc
Merged-In: Ife738339aeae00d2063fea6918b50204daef24fc
(cherry picked from commit c638ae6436509df092ab8814bb5b64591878229d, aosp/1287133)
2020-04-16 16:51:00 +00:00
Mark Chien
ab126a97d3 Merge "Remove sendMessage inside EntitlementManager" into rvc-dev am: f9a1c42408
Change-Id: I1fb9b0fa22efc35088221f47e50cfa37194fb167
2020-04-16 10:26:29 +00:00
Mark Chien
f9a1c42408 Merge "Remove sendMessage inside EntitlementManager" into rvc-dev 2020-04-16 09:57:22 +00:00
Paul Hu
42c7c94cd1 Merge "[TNU05] Add no upstream notification" into rvc-dev am: b06fc85269
Change-Id: Icf8c52d52b0494b10c92dfbd74287b35e0fa0834
2020-04-16 08:36:25 +00:00
Mark Chien
30c0da71b0 Remove sendMessage inside EntitlementManager
EntitlementManager and its callers(Tethering and UpstreamNetworkMonitor)
run in the same threads.

Bug: 141256482
Test: atest TetheringTests
Merged-In: I0a376d28b123eaab2e8d00a98a4719ce983d3bb2
Change-Id: I0a376d28b123eaab2e8d00a98a4719ce983d3bb2
2020-04-16 08:08:04 +00:00
Paul Hu
af6a2a33f5 [TNU05] Add no upstream notification
Reminder user of unavailable tethering status if there is no
internet access.

Bug: 147818698
Test: atest TetheringTests
Change-Id: Ic6557f9f7703337596100cd6a477fd7239217166
Merged-In: Ic6557f9f7703337596100cd6a477fd7239217166
(cherry picked from commit ac1b098acc504b60e85b3dcd22941f4e293865ae, aosp/1237036)
2020-04-16 06:43:19 +00:00