Commit Graph

1530 Commits

Author SHA1 Message Date
markchien
a1a0be93f0 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
Paul Hu
4dcf6ae7e5 Merge "Add TetheringCoverageTests" into rvc-dev am: 82a29a3308 am: da200e3cb7
Change-Id: Ic10b3e7e7310a95322218f10396b11283ec9d176
2020-04-15 01:33:28 +00:00
Paul Hu
e82b0547f6 Merge "Add TetheringCoverageTests" into rvc-dev am: 82a29a3308 am: 1c1c17c09d am: d884248f30
Change-Id: I26e5e28dd4d55247e3d51eca39c8c6a1f0dfe5b8
2020-04-15 01:24:42 +00:00
Paul Hu
da200e3cb7 Merge "Add TetheringCoverageTests" into rvc-dev am: 82a29a3308
Change-Id: Ibbd2b36e426853cb2117996d76f88f6a8ef55695
2020-04-15 01:12:25 +00:00
Paul Hu
d884248f30 Merge "Add TetheringCoverageTests" into rvc-dev am: 82a29a3308 am: 1c1c17c09d
Change-Id: Ia6442a2f8edd5fc77739ef1f3f3ec93f50a45202
2020-04-15 01:05:07 +00:00
Paul Hu
1c1c17c09d Merge "Add TetheringCoverageTests" into rvc-dev am: 82a29a3308
Change-Id: If5e84d9fad417a12fe1493eff12fce6aaead9050
2020-04-15 00:51:51 +00:00
paulhu
64632657a2 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
648fc2c8ea [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
Paul Hu
348bb08065 [automerger skipped] Merge "Update tethering notification strings" into rvc-dev am: 13113c4502 am: 5b8535ea41 am: 1d035cf71c am: 103375cfb7 -s ours
am skip reason: Change-Id I8ad34e8c93ba1547aa397a8e9c0ecc15286a2b0b with SHA-1 8fae1ba057 is in history

Change-Id: I3c8b751cfedbafba40a70c0c6ad899ecec75c2e4
2020-04-14 15:12:16 +00:00
Mark Chien
987a082559 Merge "Change tethering file structure to respect its package name" into rvc-dev-plus-aosp am: 48b8904ac4 am: 484347b58b
Change-Id: Ia259c371123c53c4778673d04360b7c1bf6f7210
2020-04-14 14:53:12 +00:00
Paul Hu
ef2ce27370 [automerger skipped] Merge "Update tethering notification strings" into rvc-dev am: 13113c4502 -s ours am: 087b32037a -s ours am: 7766a75e95 -s ours
am skip reason: Change-Id I8ad34e8c93ba1547aa397a8e9c0ecc15286a2b0b with SHA-1 8fae1ba057 is in history

Change-Id: I724688acc9f7ccc7f13c2ac1c41ebf6b772cfbff
2020-04-14 14:53:06 +00:00
Mark Chien
484347b58b Merge "Change tethering file structure to respect its package name" into rvc-dev-plus-aosp am: 48b8904ac4
Change-Id: Id0a5e49f9a25d573a9bde75b4cfd33ad21a92862
2020-04-14 14:52:16 +00:00
Paul Hu
7766a75e95 [automerger skipped] Merge "Update tethering notification strings" into rvc-dev am: 13113c4502 -s ours am: 087b32037a -s ours
am skip reason: Change-Id I8ad34e8c93ba1547aa397a8e9c0ecc15286a2b0b with SHA-1 8fae1ba057 is in history

Change-Id: Ib46850c4ffe0669708b9f1e1c663682317585122
2020-04-14 14:52:09 +00:00
Paul Hu
103375cfb7 Merge "Update tethering notification strings" into rvc-dev am: 13113c4502 am: 5b8535ea41 am: 1d035cf71c
Change-Id: I93feeecf06a6f366aa59df3aa68a31c45fa86856
2020-04-14 14:52:00 +00:00
Paul Hu
3caf51b299 [automerger skipped] Merge "Update tethering notification strings" into rvc-dev am: 13113c4502 am: 5b8535ea41 -s ours am: 4b2a536198 -s ours
am skip reason: Change-Id I8ad34e8c93ba1547aa397a8e9c0ecc15286a2b0b with SHA-1 735047bf6e is in history

Change-Id: Ic84ed1baa018fe9fa19b3ce2b830895204eba84d
2020-04-14 14:51:53 +00:00
Mark Chien
48b8904ac4 Merge "Change tethering file structure to respect its package name" into rvc-dev-plus-aosp 2020-04-14 14:45:48 +00:00
Paul Hu
087b32037a [automerger skipped] Merge "Update tethering notification strings" into rvc-dev am: 13113c4502 -s ours
am skip reason: Change-Id I8ad34e8c93ba1547aa397a8e9c0ecc15286a2b0b with SHA-1 735047bf6e is in history

Change-Id: I34f2e3864056ac908da4c312b982eee102db0342
2020-04-14 14:32:11 +00:00
Paul Hu
4b2a536198 [automerger skipped] Merge "Update tethering notification strings" into rvc-dev am: 13113c4502 am: 5b8535ea41 -s ours
am skip reason: Change-Id I8ad34e8c93ba1547aa397a8e9c0ecc15286a2b0b with SHA-1 735047bf6e is in history

Change-Id: I54d9e7461177d7a2a193301863625e92d5084be3
2020-04-14 14:30:51 +00:00
Paul Hu
5b8535ea41 Merge "Update tethering notification strings" into rvc-dev am: 13113c4502
Change-Id: I1704b40b5648595e3633a4f07265ed32db8f4c98
2020-04-14 14:19:52 +00:00
paulhu
d1ebb1e348 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
13113c4502 Merge "Update tethering notification strings" into rvc-dev 2020-04-14 14:07:19 +00:00
TreeHugger Robot
a6dace9766 [automerger skipped] Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." into rvc-dev am: 3edb9babf2 am: dd670c6e58 am: a6c8f44d2f am: 71bd48c275 -s ours
am skip reason: Change-Id I26d89a81f1c448d9b4809652b079a5f5eace3924 with SHA-1 6f532ba30f is in history

Change-Id: I55deb49534e28a9cb460eac292a2476a43d28d70
2020-04-14 13:47:20 +00:00
TreeHugger Robot
71bd48c275 Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." into rvc-dev am: 3edb9babf2 am: dd670c6e58 am: a6c8f44d2f
Change-Id: I1d0d975fec59e91e7ec9b876b6bc4bcc18af5ecb
2020-04-14 13:23:40 +00:00
TreeHugger Robot
2658e12848 [automerger skipped] Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." into rvc-dev am: 3edb9babf2 am: dd670c6e58 -s ours am: de9be63d40 -s ours
am skip reason: Change-Id I26d89a81f1c448d9b4809652b079a5f5eace3924 with SHA-1 6f532ba30f is in history

Change-Id: I5c3e0db9193f3448cd5241a13f027a3219157515
2020-04-14 13:01:53 +00:00
TreeHugger Robot
de9be63d40 [automerger skipped] Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." into rvc-dev am: 3edb9babf2 am: dd670c6e58 -s ours
am skip reason: Change-Id I26d89a81f1c448d9b4809652b079a5f5eace3924 with SHA-1 6f532ba30f is in history

Change-Id: Ie49d45a5bf7bd1c8acf5eca0edb8ea6a82c6d09b
2020-04-14 13:00:58 +00:00
TreeHugger Robot
bf1039d5bc [automerger skipped] Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." into rvc-dev am: 3edb9babf2 -s ours am: 47b038a734 -s ours am: cf69919cb4 -s ours
am skip reason: Change-Id I26d89a81f1c448d9b4809652b079a5f5eace3924 with SHA-1 330a9b9fa7 is in history

Change-Id: I58b2bdeceb7922e368d0dc377c06785387f5534d
2020-04-14 13:00:41 +00:00
TreeHugger Robot
cf69919cb4 [automerger skipped] Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." into rvc-dev am: 3edb9babf2 -s ours am: 47b038a734 -s ours
am skip reason: Change-Id I26d89a81f1c448d9b4809652b079a5f5eace3924 with SHA-1 330a9b9fa7 is in history

Change-Id: I4e914003fe6aa804fb20befe8aa14632aa51c186
2020-04-14 12:53:10 +00:00
TreeHugger Robot
47b038a734 [automerger skipped] Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." into rvc-dev am: 3edb9babf2 -s ours
am skip reason: Change-Id I26d89a81f1c448d9b4809652b079a5f5eace3924 with SHA-1 330a9b9fa7 is in history

Change-Id: If5985ff96dcaf48e6cbc61d88464c4ab9cc5be56
2020-04-14 12:43:46 +00:00
TreeHugger Robot
dd670c6e58 Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." into rvc-dev am: 3edb9babf2
Change-Id: I3e9253bb1b1a66dadb6623d69f03d9cea21fc740
2020-04-14 12:42:41 +00:00
markchien
1acfb0125c Change tethering file structure to respect its package name
Bug: 145099347
Test: atest TetheringTests
      atest CtsTetheringTest
Change-Id: I544ab9480bbaa5e18e030d21a28ab4c4a7265795
2020-04-14 12:25:03 +00:00
Paul Hu
8fae1ba057 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 d4a1bd7b73991c4197b49a3ff36e7683273ae736, aosp/1284584)
2020-04-14 11:18:09 +00:00
Mark Chien
29a90f0113 [automerger skipped] Merge "Change tethering file structure to respect its package name" into rvc-dev am: ee6107e51c am: 59caa047c9 am: dc77385937 am: 5c460cc714 -s ours
am skip reason: Change-Id I7401c550fbafd17a5ed2d925b5d0e17e358af467 with SHA-1 7dc2dcc37a is in history

Change-Id: Ifc268f83d1d398c155a3184799dcce67605e94fa
2020-04-14 10:57:51 +00:00
markchien
bdf1003c3b 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
Mark Chien
af7e2e46f1 [automerger skipped] Merge "Change tethering file structure to respect its package name" into rvc-dev am: ee6107e51c -s ours am: de4fb9898c -s ours am: 9565042fd6 -s ours
am skip reason: Change-Id I7401c550fbafd17a5ed2d925b5d0e17e358af467 with SHA-1 7dc2dcc37a is in history

Change-Id: I3db909fa775940b94e2529470039a49d7edda67b
2020-04-14 10:33:39 +00:00
Mark Chien
5c460cc714 Merge "Change tethering file structure to respect its package name" into rvc-dev am: ee6107e51c am: 59caa047c9 am: dc77385937
Change-Id: I4c15da068575e60b836fccf064883a07b3a63cba
2020-04-14 10:33:35 +00:00
Mark Chien
452e87b2b1 [automerger skipped] Merge "Change tethering file structure to respect its package name" into rvc-dev am: ee6107e51c am: 59caa047c9 -s ours am: 8648c2bd67 -s ours
am skip reason: Change-Id I7401c550fbafd17a5ed2d925b5d0e17e358af467 with SHA-1 d995566700 is in history

Change-Id: I8abe1810c55db650330f91919d2b862b1fa620a9
2020-04-14 10:32:46 +00:00
Mark Chien
9565042fd6 [automerger skipped] Merge "Change tethering file structure to respect its package name" into rvc-dev am: ee6107e51c -s ours am: de4fb9898c -s ours
am skip reason: Change-Id I7401c550fbafd17a5ed2d925b5d0e17e358af467 with SHA-1 7dc2dcc37a is in history

Change-Id: Ib6dcd4f4682c18062b8fd964ad390580fa8df5fc
2020-04-14 10:06:13 +00:00
Mark Chien
8648c2bd67 [automerger skipped] Merge "Change tethering file structure to respect its package name" into rvc-dev am: ee6107e51c am: 59caa047c9 -s ours
am skip reason: Change-Id I7401c550fbafd17a5ed2d925b5d0e17e358af467 with SHA-1 d995566700 is in history

Change-Id: If621a7a931ddbb417e85a6a2a28bc9c2811ad2e0
2020-04-14 10:04:54 +00:00
Lorenzo Colitti
6f532ba30f 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
c9f555589d Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." am: 941a53ce91 am: 81dd21611d am: dd43e05b6e am: 9910abce5f
Change-Id: Ifa511743d965b5c5c2fc6dbd9edb117bdc7492d4
2020-04-14 09:46:12 +00:00
Paul Hu
ac1ddcf34a Merge "Update tethering notification strings" am: 6f6527e2d7 am: 26b3b4e0de am: caf808e0eb am: 3793a8eece
Change-Id: I85bba02377351bdf19562b27a645a142356371ca
2020-04-14 09:45:57 +00:00
Mark Chien
c78a72d80c [automerger skipped] Merge "Change tethering file structure to respect its package name" am: c31e88ace6 am: 9fce5bc8b9 -s ours am: 1cfb5e6365 am: db0698b0a0
Change-Id: I573b350831f620a4a570c402f99e0943c735d35a
2020-04-14 09:45:42 +00:00
Mark Chien
de4fb9898c [automerger skipped] Merge "Change tethering file structure to respect its package name" into rvc-dev am: ee6107e51c -s ours
am skip reason: Change-Id I7401c550fbafd17a5ed2d925b5d0e17e358af467 with SHA-1 d995566700 is in history

Change-Id: I0994b834ff0af2ebee3cd7e5bc9c73c4b08a4c99
2020-04-14 09:45:14 +00:00
Mark Chien
59caa047c9 Merge "Change tethering file structure to respect its package name" into rvc-dev am: ee6107e51c
Change-Id: Ia593900f8ec91326b52b7630a9c4f922bd743fe0
2020-04-14 09:44:40 +00:00
Lorenzo Colitti
9910abce5f Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." am: 941a53ce91 am: 81dd21611d am: dd43e05b6e
Change-Id: I0302aa499478fa8430c14becb5db76d10656324f
2020-04-14 09:25:01 +00:00
Paul Hu
3793a8eece Merge "Update tethering notification strings" am: 6f6527e2d7 am: 26b3b4e0de am: caf808e0eb
Change-Id: I0a4801884b455aa1e6186afcc41f73f34caa9474
2020-04-14 09:22:46 +00:00
Mark Chien
db0698b0a0 [automerger skipped] Merge "Change tethering file structure to respect its package name" am: c31e88ace6 am: 9fce5bc8b9 -s ours am: 1cfb5e6365
Change-Id: I9f5ea3568621f7350bb8d3314a4b8dc0ee5bdc67
2020-04-14 09:22:07 +00:00
Lorenzo Colitti
dd43e05b6e Merge "Don't crash when receiving an RTM_DELNEIGH or NUD_FAILED." am: 941a53ce91 am: 81dd21611d
Change-Id: Ie7060e6408acd73f1a5d2456d030a1958df32847
2020-04-14 09:21:19 +00:00
Paul Hu
caf808e0eb Merge "Update tethering notification strings" am: 6f6527e2d7 am: 26b3b4e0de
Change-Id: If9d8e5945160b6def527e7f3ee372dfe533140e9
2020-04-14 09:20:54 +00:00
Mark Chien
1cfb5e6365 [automerger skipped] Merge "Change tethering file structure to respect its package name" am: c31e88ace6 am: 9fce5bc8b9 -s ours
am skip reason: skipped by user markchien

Change-Id: I23b0ffb1f366f980bc7c9c3b4c061214b8199307
2020-04-14 09:19:38 +00:00