Commit Graph

459 Commits

Author SHA1 Message Date
Treehugger Robot
01ae289b3d Merge "Retry the call that fetches the tethering offload HAL." am: 094eafd471 am: 4664c0033e
Change-Id: I4e26a29bcddd04c3f7c93e754637f935746c30ff
2020-04-21 15:16:43 +00:00
Treehugger Robot
4664c0033e Merge "Retry the call that fetches the tethering offload HAL." am: 094eafd471
Change-Id: I55db0f2bf111558dff4ec3bdd6698dc97c849e1c
2020-04-21 15:04:29 +00:00
Treehugger Robot
094eafd471 Merge "Retry the call that fetches the tethering offload HAL." 2020-04-21 14:45:39 +00:00
Lorenzo Colitti
e87bf543fb 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
Change-Id: I093f127d90b2aa1b13eb0748378a24726d419472
2020-04-21 22:22:54 +09:00
Jiyong Park
1771ba5cae Merge "Mark some aidl_interface modules as unstable" am: 77a58cde80
Change-Id: I67e3ef3d698c8f36e04718f630d4d70a915fc0bb
2020-04-20 10:26:36 +00:00
Jiyong Park
803dc1c218 Mark some aidl_interface modules as unstable
With b/152655547, all aidl_interface modules are considered as stable
unless it is explicitly with "unstable: true". This change marks the
aidl_interface that are not used across updatable module bounraries
as unstable, so that the build system does not run the API
dumping/checking on them.

Exempt-From-Owner-Approval: cherry-pick from internal

Bug: 152655547
Test: m
Merged-In: I1257c66de6dd42b2d32d47ed74cb2878f79d14fb
(cherry picked from commit db589dded4)
Change-Id: I1257c66de6dd42b2d32d47ed74cb2878f79d14fb
2020-04-20 07:44:52 +00:00
Jiyong Park
28665792a2 Merge "Mark some aidl_interface modules as unstable" into rvc-dev 2020-04-20 03:23:06 +00:00
TreeHugger Robot
58232838fb Merge "DO NOT MERGE Remove references of telephony-stubs." into rvc-dev 2020-04-18 06:16:44 +00:00
Chalard Jean
c0fc2769be [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 1af69e5b8f, aosp/1237026)
2020-04-17 17:14:12 +00:00
Chalard Jean
cb8aaf7123 Merge "[TNU06] Add roaming notification" am: 565160c302
Change-Id: I8f66563665375bdde40b59c997b9aba197f04dbd
2020-04-17 16:17:50 +00:00
paulhu
f98918fc2c [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
2020-04-17 21:25:54 +08:00
Paul Hu
7986731f16 [TNU05.1] Address aosp/1237036 leftover comments
Bug: 147818698
Test: atest TetheringTests
Change-Id: Ife738339aeae00d2063fea6918b50204daef24fc
Merged-In: Ife738339aeae00d2063fea6918b50204daef24fc
(cherry picked from commit c638ae6436, aosp/1287133)
2020-04-16 16:51:00 +00:00
Mark Chien
4cc1d1a858 Merge "Remove sendMessage inside EntitlementManager" into rvc-dev 2020-04-16 09:57:22 +00:00
Paul Hu
130ce39732 Merge "[TNU05.1] Address aosp/1237036 leftover comments" am: 0ca532a78c
Change-Id: I9276b698b97d317ba465ab162d191c05841593e0
2020-04-16 08:39:20 +00:00
Paul Hu
0ca532a78c Merge "[TNU05.1] Address aosp/1237036 leftover comments" 2020-04-16 08:25:24 +00:00
Mark Chien
3075fbbc4a 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
77fa8d684c [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 ac1b098acc, aosp/1237036)
2020-04-16 06:43:19 +00:00
paulhu
dc5c86ddd9 [TNU05.1] Address aosp/1237036 leftover comments
Bug: 147818698
Test: atest TetheringTests
Change-Id: Ife738339aeae00d2063fea6918b50204daef24fc
2020-04-16 14:39:12 +08:00
Paul Hu
4a80e0e2f0 Merge "Add TetheringCoverageTests" am: 8e8224c97b
Change-Id: I5683724edc60b5c3de326f75488f3eb738aaef47
2020-04-16 06:27:43 +00:00
Paul Hu
8e8224c97b Merge "Add TetheringCoverageTests" 2020-04-16 06:00:07 +00:00
Mark Chien
920af5bc91 Merge "Remove sendMessage inside EntitlementManager" am: c826614862
Change-Id: Idf6401f994aa6f1dee01420eec8c951bc3893863
2020-04-16 02:24:18 +00:00
Mark Chien
19487bfd70 Do not stop IpServer when recieve wifi ap disabling state.
This is used to fix the race when quickly OFF/ON wifi tethering.
When IpServer is started/stopped, there is callback update tethering
interface status. Before this change, IpServer is stopped when wifi
ap is disabling. Then the next startTethering may fail in wifi because
wifi is in disabling state.
Error pattern: WifiService: Tethering is already active.
No unitest for this CL but it fixed the CtsTetheringTest flakty rate
than around 30% to 0 for more than 100 runs.

Bug: 153925821
Test: atest CtsTetheringTest --iteration 100
Merged-In: I8b65f621abe20799a3a0d410ba1f06368746ee49
Change-Id: I8b65f621abe20799a3a0d410ba1f06368746ee49
2020-04-16 02:09:48 +00:00
Mark Chien
c826614862 Merge "Remove sendMessage inside EntitlementManager" 2020-04-16 02:07:55 +00:00
Paul Hu
eabd2c388f Merge "[TNU05] Add no upstream notification" am: cef08983cf
Change-Id: Id93a2eef90804bcbd35398f9633600fc858be2b1
2020-04-16 01:47:34 +00:00
Paul Hu
cef08983cf Merge "[TNU05] Add no upstream notification" 2020-04-16 01:31:06 +00:00
Amit Mahajan
7973105d8b 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-15 17:55:52 -07:00
Mark Chien
46061cdb7a Merge "Do not stop IpServer when recieve wifi ap disabling state." am: 197e35198d
Change-Id: I83e9cfc0f7b71f36f447dd4c4b5fa7b66ae3d11c
2020-04-15 17:03:49 +00:00
markchien
f4b6ca7ac9 Remove sendMessage inside EntitlementManager
EntitlementManager and its callers(Tethering and UpstreamNetworkMonitor)
run in the same threads.

Bug: 141256482
Test: atest TetheringTests
Change-Id: I0a376d28b123eaab2e8d00a98a4719ce983d3bb2
2020-04-15 02:29:21 +00:00
paulhu
1b404e56ae Add TetheringCoverageTests
Bug: 148636687
Test: atest TetheringCoverageTests
      atest TetheringTests
      atest TetheringIntegrationTests
      atest NetworkStackTests
      atest CtsTetheringTest
Change-Id: I1f2a50f16894b05e988476520ba25baba0b60d88
Merged-In: I1f2a50f16894b05e988476520ba25baba0b60d88
2020-04-15 00:50:01 +00:00
paulhu
481512a6b0 [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
2020-04-15 01:25:37 +08:00
paulhu
4357b93dc0 Add TetheringCoverageTests
Bug: 148636687
Test: atest TetheringCoverageTests
      atest TetheringTests
      atest TetheringIntegrationTests
      atest NetworkStackTests
      atest CtsTetheringTest
Change-Id: I1f2a50f16894b05e988476520ba25baba0b60d88
2020-04-14 14:14:33 +00:00
Paul Hu
02c8566b97 Merge "Update tethering notification strings" into rvc-dev 2020-04-14 14:07:19 +00:00
Paul Hu
03bc7e7568 Update tethering notification strings
Update strings after converged with carrier.

Bug: 145629001
Bug: 147818698
Test: atests TetheringTests
Change-Id: I8ad34e8c93ba1547aa397a8e9c0ecc15286a2b0b
Merged-In: I8ad34e8c93ba1547aa397a8e9c0ecc15286a2b0b
(cherry picked from commit d4a1bd7b73, aosp/1284584)
2020-04-14 11:18:09 +00:00
markchien
714e647af3 Do not stop IpServer when recieve wifi ap disabling state.
This is used to fix the race when quickly OFF/ON wifi tethering.
When IpServer is started/stopped, there is callback update tethering
interface status. Before this change, IpServer is stopped when wifi
ap is disabling. Then the next startTethering may fail in wifi because
wifi is in disabling state.
Error pattern: WifiService: Tethering is already active.
No unitest for this CL but it fixed the CtsTetheringTest flakty rate
than around 30% to 0 for more than 100 runs.

Bug: 153925821
Test: atest CtsTetheringTest --iteration 100
Change-Id: I8b65f621abe20799a3a0d410ba1f06368746ee49
2020-04-14 10:42:32 +00:00
Lorenzo Colitti
8bc1e54d48 Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED.
These events don't have MAC addresses, so the code attempts to
create an Ipv6ForwardingRule with a null MAC address. This
crashes when attempting to get the raw MAC address bytes to send
to netd in the TetherOffloadRuleParcel.

This was not caught by unit tests because the test exercise this
code path in a way that is not correct (by sending RTM_DELNEIGH
and NUD_FAILED events with MAC addresses). Fix the unit tests to
properly pass in null MAC addresses for these events.

Bug: 153697068
Test: fixed existing tests to be more realistic
Merged-In: I26d89a81f1c448d9b4809652b079a5f5eace3924
Change-Id: I26d89a81f1c448d9b4809652b079a5f5eace3924
2020-04-14 09:55:17 +00:00
Lorenzo Colitti
54d650a492 Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." am: 17917f7bb0
Change-Id: I62dd1888231eb13c4c5bcc2c4c4d95e47c5b8aaa
2020-04-14 08:40:35 +00:00
Lorenzo Colitti
17917f7bb0 Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." 2020-04-14 08:22:30 +00:00
Paul Hu
4f5ef756ba Merge "Update tethering notification strings" am: 2d377066e6
Change-Id: I1af1b1a8664662ebdffba1b08725b4e505c222f4
2020-04-14 07:32:32 +00:00
Paul Hu
2d377066e6 Merge "Update tethering notification strings" 2020-04-14 07:15:16 +00:00
markchien
503be61a6e Change tethering file structure to respect its package name
Bug: 145099347
Test: atest TetheringTests
      atest CtsTetheringTest
Change-Id: I7401c550fbafd17a5ed2d925b5d0e17e358af467
Merged-In: I7401c550fbafd17a5ed2d925b5d0e17e358af467
2020-04-14 14:33:45 +08:00
Lorenzo Colitti
210ac1e145 Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED.
These events don't have MAC addresses, so the code attempts to
create an Ipv6ForwardingRule with a null MAC address. This
crashes when attempting to get the raw MAC address bytes to send
to netd in the TetherOffloadRuleParcel.

This was not caught by unit tests because the test exercise this
code path in a way that is not correct (by sending RTM_DELNEIGH
and NUD_FAILED events with MAC addresses). Fix the unit tests to
properly pass in null MAC addresses for these events.

Bug: 153697068
Test: fixed existing tests to be more realistic
Change-Id: I26d89a81f1c448d9b4809652b079a5f5eace3924
2020-04-14 15:02:17 +09:00
Mark Chien
e6c78e3e6f Merge "Change tethering file structure to respect its package name" am: c31e88ace6
Change-Id: Ib7db789690b64ca00905577ee9ed7ed993293967
2020-04-14 04:50:53 +00:00
markchien
711d8b4e4a Change tethering file structure to respect its package name
Bug: 145099347
Test: atest TetheringTests
      atest CtsTetheringTest
Change-Id: I7401c550fbafd17a5ed2d925b5d0e17e358af467
2020-04-14 02:09:51 +00:00
Mark Chien
e81da2d8c4 Merge "Tethering: Add an exported flag in manifest" am: ec6cf543f9
Change-Id: I10166943f9c84abc71e34807fd6960c4fa23fed5
2020-04-14 01:58:11 +00:00
Ashwini Oruganti
64fa4f8154 Tethering: Add an exported flag in manifest
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for S+. This change adds the value reflecting the previous
default to the manifest.

Bug: 150232615
Test: TH
Change-Id: I25b55378df393cd4fb8932b7ae64f97eb9f1aa8e
Merged-In: I25b55378df393cd4fb8932b7ae64f97eb9f1aa8e
(cherry picked from commit 9226d6c835)
2020-04-14 00:08:24 +08:00
Ashwini Oruganti
9befafe109 Tethering: Add an exported flag in manifest
With b/150232615, we will need an explicit value set for the exported
flag when intent filters are present, as the default behavior is
changing for S+. This change adds the value reflecting the previous
default to the manifest.

Bug: 150232615
Test: TH
Change-Id: I25b55378df393cd4fb8932b7ae64f97eb9f1aa8e
Merged-In: I25b55378df393cd4fb8932b7ae64f97eb9f1aa8e
(cherry picked from commit 9226d6c835)
2020-04-13 15:15:28 +00:00
paulhu
23f0417c48 Update tethering notification strings
Update strings after converged with carrier.

Bug: 145629001
Bug: 147818698
Test: atests TetheringTests
Change-Id: I8ad34e8c93ba1547aa397a8e9c0ecc15286a2b0b
2020-04-13 13:36:52 +00:00
Jiyong Park
db589dded4 Mark some aidl_interface modules as unstable
With b/152655547, all aidl_interface modules are considered as stable
unless it is explicitly with "unstable: true". This change marks the
aidl_interface that are not used across updatable module bounraries
as unstable, so that the build system does not run the API
dumping/checking on them.

Bug: 152655547
Test: m
Change-Id: I1257c66de6dd42b2d32d47ed74cb2878f79d14fb
2020-04-13 13:00:47 +09:00
Treehugger Robot
86d212b4c8 Assign specific client address to dhcp server
Bug: 141256482
Test: manual
      atest TetheringTests

Merged-In: Ief76c98c843ba5420224cbf0f34464f366c891b7
Change-Id: Ief76c98c843ba5420224cbf0f34464f366c891b7
2020-04-10 10:03:20 +00:00
Luke Huang
76fc58e1f1 Use the lastest frozen netd_aidl_interface in framework
Bug: 140541991
Test: build
Merged-In: I984969e09f8d5196945a7412c51bd8880223ad9e
Change-Id: I984969e09f8d5196945a7412c51bd8880223ad9e
2020-04-09 16:20:44 +00:00