Commit Graph

301 Commits

Author SHA1 Message Date
Lorenzo Colitti
d0b200b5b0 [automerger skipped] Send tethered interface callbacks based on interface existence. am: 0c30d949df am: 32a1f9a35c am: 87c64dc6b3 am: c9fb72bbe0 -s ours
am skip reason: Change-Id I015219cbd03626c38fb5156d0cb2991ba7d7def7 with SHA-1 0c30d949df is in history

Change-Id: Ia636dce7ecaba574d55352391d99f88224221a49
2020-03-20 02:39:02 +00:00
Lorenzo Colitti
b284c51425 [automerger skipped] Support setting the default interface to null again. am: 876e5e16a9 am: 65c1bc7c5d am: ac350dddc6 am: 4d5310692c -s ours
am skip reason: Change-Id I5109d8da3aeb6c1f6523291d9e2ec92c64b5ad2d with SHA-1 876e5e16a9 is in history

Change-Id: I7f7417ccca7c9cfac332954a6f6dea5a58a54239
2020-03-20 02:38:56 +00:00
Lorenzo Colitti
6b6c525b6e [automerger skipped] Send tethered interface callbacks based on interface existence. am: 0c30d949df -s ours am: b6c727b208 -s ours am: 0f0c14b99b -s ours
am skip reason: Change-Id I015219cbd03626c38fb5156d0cb2991ba7d7def7 with SHA-1 0c30d949df is in history

Change-Id: I1b6127eb68cb3986726ea460c84352c8b23e1e2e
2020-03-20 02:16:28 +00:00
Lorenzo Colitti
41451e4503 [automerger skipped] Send tethered interface callbacks based on interface existence. am: 0c30d949df am: 32a1f9a35c -s ours am: 84fea4258b -s ours
am skip reason: Change-Id I015219cbd03626c38fb5156d0cb2991ba7d7def7 with SHA-1 165b456d92 is in history

Change-Id: I9760fbf2fb0612ed6403c12c7cba213a2f460c74
2020-03-20 02:16:18 +00:00
Lorenzo Colitti
7f312a0274 [automerger skipped] Support setting the default interface to null again. am: 876e5e16a9 am: 65c1bc7c5d -s ours am: 4c80e73bfa -s ours
am skip reason: Change-Id I5109d8da3aeb6c1f6523291d9e2ec92c64b5ad2d with SHA-1 876e5e16a9 is in history

Change-Id: I53d8a9896257920d4a3db462a7f3a1c8974361fa
2020-03-20 02:16:13 +00:00
Lorenzo Colitti
b7e2baaee0 [automerger skipped] Support setting the default interface to null again. am: 876e5e16a9 -s ours am: 6fb426f10a -s ours am: f7bc865d2c -s ours
am skip reason: Change-Id I5109d8da3aeb6c1f6523291d9e2ec92c64b5ad2d with SHA-1 e81f99d532 is in history

Change-Id: I9cea9b849fff6b292d81b6bd2a1c8338d3d271a1
2020-03-20 02:16:02 +00:00
Lorenzo Colitti
c9fb72bbe0 Send tethered interface callbacks based on interface existence. am: 0c30d949df am: 32a1f9a35c am: 87c64dc6b3
Change-Id: Ide34e6cff966a9cd01948a4cb030f4d256cf1782
2020-03-20 02:15:58 +00:00
Lorenzo Colitti
4d5310692c Support setting the default interface to null again. am: 876e5e16a9 am: 65c1bc7c5d am: ac350dddc6
Change-Id: Ifad7deba00f8e40a50014ec5922ecb9fae465188
2020-03-20 02:15:35 +00:00
Lorenzo Colitti
0f0c14b99b [automerger skipped] Send tethered interface callbacks based on interface existence. am: 0c30d949df -s ours am: b6c727b208 -s ours
am skip reason: Change-Id I015219cbd03626c38fb5156d0cb2991ba7d7def7 with SHA-1 0c30d949df is in history

Change-Id: I799d401c9dbb64031ee0601bfbb869588c2843dc
2020-03-20 01:17:22 +00:00
Lorenzo Colitti
84fea4258b [automerger skipped] Send tethered interface callbacks based on interface existence. am: 0c30d949df am: 32a1f9a35c -s ours
am skip reason: Change-Id I015219cbd03626c38fb5156d0cb2991ba7d7def7 with SHA-1 165b456d92 is in history

Change-Id: I36f91fca0d679a9673b743be953f191e16440330
2020-03-20 01:17:04 +00:00
Lorenzo Colitti
87c64dc6b3 Send tethered interface callbacks based on interface existence. am: 0c30d949df am: 32a1f9a35c
Change-Id: I4ff59ff4ff51b312ff66afa42fae660775dda987
2020-03-20 01:17:01 +00:00
Lorenzo Colitti
4c80e73bfa [automerger skipped] Support setting the default interface to null again. am: 876e5e16a9 am: 65c1bc7c5d -s ours
am skip reason: Change-Id I5109d8da3aeb6c1f6523291d9e2ec92c64b5ad2d with SHA-1 876e5e16a9 is in history

Change-Id: Ie8adbc5239fdf8343a9b0e4cd30eddc28e96caaa
2020-03-20 01:16:55 +00:00
Lorenzo Colitti
ac350dddc6 Support setting the default interface to null again. am: 876e5e16a9 am: 65c1bc7c5d
Change-Id: I957babd740b0cef5f437467af7ebcac5fb373350
2020-03-20 01:16:54 +00:00
Lorenzo Colitti
f7bc865d2c [automerger skipped] Support setting the default interface to null again. am: 876e5e16a9 -s ours am: 6fb426f10a -s ours
am skip reason: Change-Id I5109d8da3aeb6c1f6523291d9e2ec92c64b5ad2d with SHA-1 e81f99d532 is in history

Change-Id: I53102631b3030ba3307c2ffe04d340c9421fc50b
2020-03-20 01:09:43 +00:00
Lorenzo Colitti
b6c727b208 [automerger skipped] Send tethered interface callbacks based on interface existence. am: 0c30d949df -s ours
am skip reason: Change-Id I015219cbd03626c38fb5156d0cb2991ba7d7def7 with SHA-1 165b456d92 is in history

Change-Id: I798052af6ff6704c9088c3e0f2952b1ccc41d94b
2020-03-20 00:45:05 +00:00
Lorenzo Colitti
32a1f9a35c Send tethered interface callbacks based on interface existence. am: 0c30d949df
Change-Id: I34e7e1ee8e1cbceb8f3941543dac9299e96a7e27
2020-03-20 00:44:59 +00:00
Lorenzo Colitti
6fb426f10a [automerger skipped] Support setting the default interface to null again. am: 876e5e16a9 -s ours
am skip reason: Change-Id I5109d8da3aeb6c1f6523291d9e2ec92c64b5ad2d with SHA-1 e81f99d532 is in history

Change-Id: I3adadae13ef96c50e4083b8d826730e0fb4990fd
2020-03-20 00:44:57 +00:00
Lorenzo Colitti
65c1bc7c5d Support setting the default interface to null again. am: 876e5e16a9
Change-Id: I88a98acb57b48fb9eedf104ed783a7d27b12e47f
2020-03-20 00:44:42 +00:00
Lorenzo Colitti
fc26b8e236 Send tethered interface callbacks based on interface existence. am: 165b456d92 am: cad2e49acb am: 3449a34474 am: 4615bbe667
Change-Id: I3303d8506a0d715a60843f9073cfd104b286372a
2020-03-19 16:27:47 +00:00
Lorenzo Colitti
32db6f52cb Support setting the default interface to null again. am: e81f99d532 am: e19d6a8764 am: 4b10eea44f am: a79245c7f0
Change-Id: Ie4bd5ae4c939a19dd95e3a51ebb67b4833d0a8ba
2020-03-19 16:27:43 +00:00
Lorenzo Colitti
4615bbe667 Send tethered interface callbacks based on interface existence. am: 165b456d92 am: cad2e49acb am: 3449a34474
Change-Id: Iac66c95f07fe81d5c9e1b5dfcd42fe676ea2bc70
2020-03-19 16:16:22 +00:00
Lorenzo Colitti
a79245c7f0 Support setting the default interface to null again. am: e81f99d532 am: e19d6a8764 am: 4b10eea44f
Change-Id: I0633a83170f9e9cda8113fe1ccf7b6225f16e794
2020-03-19 16:16:14 +00:00
Lorenzo Colitti
0c30d949df Send tethered interface callbacks based on interface existence.
Currently, callbacks for tethered interface availability are sent
based on interface link state. This is incorrect:

- It is acceptable and expected to be able to enable tethering on
  an interface that does not yet have link up.
- It doesn't seem useful to disable Ethernet tethering if link
  temporarily goes down.

Instead, only base the callbacks on whether an interface exists
or not.

Bug: 150644681
Test: WIP tests in aosp/1260100 pass
Change-Id: I015219cbd03626c38fb5156d0cb2991ba7d7def7
Merged-In: I015219cbd03626c38fb5156d0cb2991ba7d7def7
(cherry picked from commit 64d12ea20ce3cd822518e0f15ed7483a2fb91a50)
2020-03-19 15:54:05 +00:00
Lorenzo Colitti
876e5e16a9 Support setting the default interface to null again.
Currently, the default interface can only ever go from null to
non-null. This is correct for fixed interfaces (because they
don't get unplugged) and it's generally correct for USB
interfaces that use ethX as their device name (because when
they are unplugged and plugged in again, the device name won't
change). But it is not correct if, for example, the default
interface is a test interface. So, allow mDefaultInterface to go
back to null.

This CL also fixes a crash if a tethered interface request is
added and removed when there is no default interface.

Also, make dump() report tethered interface requests.

Also remove an unused variable that I missed in the previous CL.

Bug: 150644681
Test: tested by EthernetTetheringTest in same topic
Change-Id: I5109d8da3aeb6c1f6523291d9e2ec92c64b5ad2d
Merged-In: I5109d8da3aeb6c1f6523291d9e2ec92c64b5ad2d
(cherry picked from commit cc156c2f7793731b2699e194d4b164138ee4cf62)
2020-03-19 15:53:13 +00:00
Lorenzo Colitti
3449a34474 Send tethered interface callbacks based on interface existence. am: 165b456d92 am: cad2e49acb
Change-Id: I4b24ea24ede2856d8c33df3e2331efe9d5825ca6
2020-03-19 15:52:09 +00:00
Lorenzo Colitti
4b10eea44f Support setting the default interface to null again. am: e81f99d532 am: e19d6a8764
Change-Id: I373f51835b48bdb9c7a678c4779f1a9079c7a181
2020-03-19 15:52:03 +00:00
Lorenzo Colitti
ee758e6ae1 [automerger skipped] Make Ethernet interfaces more testable. am: fb336e9296 am: 5cc44b3cdd am: ab6fe7445b am: 2af1f3b8b0 -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 fb336e9296 is in history

Change-Id: I4562315db7b0d4e933d22aa0872a989fa243e5fb
2020-03-19 15:37:44 +00:00
Lorenzo Colitti
fcd828fe68 [automerger skipped] Make Ethernet interfaces more testable. am: fb336e9296 -s ours am: 523093a1ff -s ours am: 8f07511302 -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 fb336e9296 is in history

Change-Id: Iecf35ecae75b28c4bb529b9baf17121ef7e9dea2
2020-03-19 15:17:12 +00:00
Lorenzo Colitti
2af1f3b8b0 Make Ethernet interfaces more testable. am: fb336e9296 am: 5cc44b3cdd am: ab6fe7445b
Change-Id: I17fc6f115accd82ca6c8eed18a495cab28972751
2020-03-19 15:16:54 +00:00
Lorenzo Colitti
d4a0c5833c [automerger skipped] Make Ethernet interfaces more testable. am: fb336e9296 am: 5cc44b3cdd -s ours am: 6910d448e5 -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 841195a103 is in history

Change-Id: Icff2a8f5a0ef5d3598cc7deb6e465b97a2c92f4e
2020-03-19 15:16:44 +00:00
Lorenzo Colitti
ab6fe7445b Make Ethernet interfaces more testable. am: fb336e9296 am: 5cc44b3cdd
Change-Id: I437fe3a5462d64a20675642264fc0742469bebd2
2020-03-19 15:00:14 +00:00
Lorenzo Colitti
8f07511302 [automerger skipped] Make Ethernet interfaces more testable. am: fb336e9296 -s ours am: 523093a1ff -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 841195a103 is in history

Change-Id: Iec8edbba782a10b8d5c2b8c740d265dc2c11e2a1
2020-03-19 15:00:06 +00:00
Lorenzo Colitti
6910d448e5 [automerger skipped] Make Ethernet interfaces more testable. am: fb336e9296 am: 5cc44b3cdd -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 841195a103 is in history

Change-Id: Ia96d3fa55a985e8a37c0e8b2b5893dce986b7898
2020-03-19 14:59:45 +00:00
Lorenzo Colitti
523093a1ff [automerger skipped] Make Ethernet interfaces more testable. am: fb336e9296 -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 841195a103 is in history

Change-Id: I31d44b8c1a538f7c4573cf6fa476529326a9c0bf
2020-03-19 14:44:23 +00:00
Lorenzo Colitti
5cc44b3cdd Make Ethernet interfaces more testable. am: fb336e9296
Change-Id: I99a104ce76bbf3ceaca5497ab22b468d716769e0
2020-03-19 14:44:04 +00:00
Lorenzo Colitti
165b456d92 Send tethered interface callbacks based on interface existence.
Currently, callbacks for tethered interface availability are sent
based on interface link state. This is incorrect:

- It is acceptable and expected to be able to enable tethering on
  an interface that does not yet have link up.
- It doesn't seem useful to disable Ethernet tethering if link
  temporarily goes down.

Instead, only base the callbacks on whether an interface exists
or not.

Bug: 150644681
Test: WIP tests in aosp/1260100 pass
Change-Id: I015219cbd03626c38fb5156d0cb2991ba7d7def7
2020-03-19 22:12:32 +09:00
Lorenzo Colitti
e81f99d532 Support setting the default interface to null again.
Currently, the default interface can only ever go from null to
non-null. This is correct for fixed interfaces (because they
don't get unplugged) and it's generally correct for USB
interfaces that use ethX as their device name (because when
they are unplugged and plugged in again, the device name won't
change). But it is not correct if, for example, the default
interface is a test interface. So, allow mDefaultInterface to go
back to null.

This CL also fixes a crash if a tethered interface request is
added and removed when there is no default interface.

Also, make dump() report tethered interface requests.

Also remove an unused variable that I missed in the previous CL.

Bug: 150644681
Test: tested by EthernetTetheringTest in same topic
Change-Id: I5109d8da3aeb6c1f6523291d9e2ec92c64b5ad2d
2020-03-19 22:04:23 +09:00
Lorenzo Colitti
fb336e9296 Make Ethernet interfaces more testable.
This CL adds a setIncludeTestInterfaces method to EthernetManager
that, when called, causes the Ethernet service to recognize and
manage test interfaces created by TestNetworkManager.

Bug: 150644681
Test: Tested by EthernetTetheringTest in same topic
Change-Id: I86eef7a93267f800dbfc8eafd307effa76a344ca
Merged-In: I86eef7a93267f800dbfc8eafd307effa76a344ca
(cherry picked from commit 4978dbd5fb6592fc4e7be08d02783752245da634)
2020-03-19 12:29:35 +00:00
Lorenzo Colitti
0876b70058 Make Ethernet interfaces more testable. am: 841195a103 am: 6d590906f5 am: ee43f745bd am: 7988bb7cdf
Change-Id: If18607492e98def1deb2d35c68d3fd991e67be2b
2020-03-19 12:09:24 +00:00
Lorenzo Colitti
7988bb7cdf Make Ethernet interfaces more testable. am: 841195a103 am: 6d590906f5 am: ee43f745bd
Change-Id: I680a4f7ab3d3b02eb35bfd2477136f87ef514c9f
2020-03-19 11:49:13 +00:00
Lorenzo Colitti
ee43f745bd Make Ethernet interfaces more testable. am: 841195a103 am: 6d590906f5
Change-Id: Icd319cc53f17fc76d1a93bdb9741fc6db77c1ce9
2020-03-19 11:46:55 +00:00
Lorenzo Colitti
841195a103 Make Ethernet interfaces more testable.
This CL adds a setIncludeTestInterfaces method to EthernetManager
that, when called, causes the Ethernet service to recognize and
manage test interfaces created by TestNetworkManager.

Bug: 150644681
Test: Tested by EthernetTetheringTest in same topic
Change-Id: I86eef7a93267f800dbfc8eafd307effa76a344ca
2020-03-19 18:06:59 +09:00
Automerger Merge Worker
8ccee513c1 Revert part of 79eb7ba87b am: fd99009c52 am: 3379686f41 am: 8af676004d
Change-Id: I3dfda5288fef9b04b065cdc946ea7cd3d8b5235a
2020-03-03 00:16:11 +00:00
Automerger Merge Worker
9ca435e31a Revert part of 79eb7ba87b am: fd99009c52 am: 3379686f41 am: 0aa2a61c43
Change-Id: Icf8a4c051a1462b1745f08acfd17204e7472e809
2020-03-03 00:10:38 +00:00
Automerger Merge Worker
37d12a6844 Revert part of 79eb7ba87b am: fd99009c52 am: bab750adfe am: e5bab5554f
Change-Id: If9e3cf11a57f2570c0282a91b4fa256f6effd03e
2020-03-03 00:06:58 +00:00
Automerger Merge Worker
0aa2a61c43 Revert part of 79eb7ba87b am: fd99009c52 am: 3379686f41
Change-Id: Ia7ac2bd617a4185c70eeea6ef1def59d503c8d04
2020-03-03 00:04:43 +00:00
Automerger Merge Worker
8af676004d Revert part of 79eb7ba87b am: fd99009c52 am: 3379686f41
Change-Id: I8fe2ef8f60e07a0ef5eea665c5fb350984781595
2020-03-03 00:04:07 +00:00
Automerger Merge Worker
e5bab5554f Revert part of 79eb7ba87b am: fd99009c52 am: bab750adfe
Change-Id: Ib050674547f74e47fc08092cdf9a1c53d4853b8d
2020-03-02 23:47:45 +00:00
Automerger Merge Worker
3379686f41 Revert part of 79eb7ba87b am: fd99009c52
Change-Id: I764110dd3cacb3c2953afd38983b6f43b83811a2
2020-03-02 23:46:05 +00:00
Automerger Merge Worker
bab750adfe Revert part of 79eb7ba87b am: fd99009c52
Change-Id: Idcdfbe614f49183d38801ce4d1dd4b16de1d73b8
2020-03-02 23:33:04 +00:00