Commit Graph

626 Commits

Author SHA1 Message Date
Lorenzo Colitti
4ac7a525a5 [automerger skipped] Don't call maybeTrackInterface on the wrong thread. am: 6123533817 am: dc3c209dd1 am: 962ae21798 am: 8092779edc -s ours am: 9e725f4d0c -s ours
am skip reason: Change-Id Ia2cb265f8d4de96210f1462339c10ad2947eec65 with SHA-1 6123533817 is in history

Change-Id: I0ecfa3cd04d7fc734891da50e83f84ed07fd216e
2020-04-22 09:16:21 +00:00
Lorenzo Colitti
da5d526f00 [automerger skipped] Don't call maybeTrackInterface on the wrong thread. am: 6123533817 -s ours am: 30f9b1dbf8 -s ours am: a9e06c1b90 -s ours am: dfc9685265 -s ours
am skip reason: Change-Id Ia2cb265f8d4de96210f1462339c10ad2947eec65 with SHA-1 6123533817 is in history

Change-Id: Ib8ffe7948000ca68760c3245d06492bfc5bb2315
2020-04-22 09:15:51 +00:00
Lorenzo Colitti
9e725f4d0c [automerger skipped] Don't call maybeTrackInterface on the wrong thread. am: 6123533817 am: dc3c209dd1 am: 962ae21798 am: 8092779edc -s ours
am skip reason: Change-Id Ia2cb265f8d4de96210f1462339c10ad2947eec65 with SHA-1 6123533817 is in history

Change-Id: I1ac79063ae2122ae29358a4d313e4a0001427779
2020-04-22 09:15:39 +00:00
Lorenzo Colitti
b2e9a5d984 [automerger skipped] Don't call maybeTrackInterface on the wrong thread. am: 6123533817 am: dc3c209dd1 -s ours am: dd1f90eb69 -s ours am: ac3fdc37c1 -s ours
am skip reason: Change-Id Ia2cb265f8d4de96210f1462339c10ad2947eec65 with SHA-1 bd66333a24 is in history

Change-Id: Iee12b18b9c899b044c7359dfa7c742f111e0956b
2020-04-22 09:14:48 +00:00
Lorenzo Colitti
dfc9685265 [automerger skipped] Don't call maybeTrackInterface on the wrong thread. am: 6123533817 -s ours am: 30f9b1dbf8 -s ours am: a9e06c1b90 -s ours
am skip reason: Change-Id Ia2cb265f8d4de96210f1462339c10ad2947eec65 with SHA-1 6123533817 is in history

Change-Id: I8486b82a1d70b8cbcfca65cb6ba50326fa0ca837
2020-04-22 09:01:34 +00:00
Lorenzo Colitti
ac3fdc37c1 [automerger skipped] Don't call maybeTrackInterface on the wrong thread. am: 6123533817 am: dc3c209dd1 -s ours am: dd1f90eb69 -s ours
am skip reason: Change-Id Ia2cb265f8d4de96210f1462339c10ad2947eec65 with SHA-1 bd66333a24 is in history

Change-Id: I11225ff2bb5f98b2f4c3a06d09f3b5d931b40837
2020-04-22 09:01:11 +00:00
Lorenzo Colitti
8092779edc Don't call maybeTrackInterface on the wrong thread. am: 6123533817 am: dc3c209dd1 am: 962ae21798
Change-Id: I210dea104a8dd0eb4671b2da7b9ddeec103accc0
2020-04-22 09:00:49 +00:00
Lorenzo Colitti
962ae21798 Don't call maybeTrackInterface on the wrong thread. am: 6123533817 am: dc3c209dd1
Change-Id: I06903dcb962898cbc1bbd1a37ec939fc3ca18e4c
2020-04-22 08:43:44 +00:00
Lorenzo Colitti
a9e06c1b90 [automerger skipped] Don't call maybeTrackInterface on the wrong thread. am: 6123533817 -s ours am: 30f9b1dbf8 -s ours
am skip reason: Change-Id Ia2cb265f8d4de96210f1462339c10ad2947eec65 with SHA-1 6123533817 is in history

Change-Id: I6010d72e7e7364142e8dc961dd2f4bea16a0eed5
2020-04-22 08:43:33 +00:00
Lorenzo Colitti
dd1f90eb69 [automerger skipped] Don't call maybeTrackInterface on the wrong thread. am: 6123533817 am: dc3c209dd1 -s ours
am skip reason: Change-Id Ia2cb265f8d4de96210f1462339c10ad2947eec65 with SHA-1 bd66333a24 is in history

Change-Id: Ie311603d95412f9dcd820c0a25b2e7f30476ed94
2020-04-22 08:42:48 +00:00
Lorenzo Colitti
dc3c209dd1 Don't call maybeTrackInterface on the wrong thread. am: 6123533817
Change-Id: Idc00a7e5520ccae2db848d729f0fe80aab724468
2020-04-22 08:32:54 +00:00
Lorenzo Colitti
30f9b1dbf8 [automerger skipped] Don't call maybeTrackInterface on the wrong thread. am: 6123533817 -s ours
am skip reason: Change-Id Ia2cb265f8d4de96210f1462339c10ad2947eec65 with SHA-1 bd66333a24 is in history

Change-Id: If41fd756ec2faa88a4fb2a5cbea5778c72cd48ab
2020-04-22 08:32:18 +00:00
Lorenzo Colitti
6123533817 Don't call maybeTrackInterface on the wrong thread.
Bug: 150644681
Test: atest TetheringIntegrationTests:EthernetTetheringTest --rerun-until-failure 100
Merged-In: Ia2cb265f8d4de96210f1462339c10ad2947eec65
Change-Id: Ia2cb265f8d4de96210f1462339c10ad2947eec65
2020-04-22 06:42:46 +00:00
Chalard Jean
0077fa39d1 [automerger skipped] Address further API council comments. am: 4b9a7dd13d am: 7608da3e3a -s ours am: 7f49fa7dad -s ours am: b3f4c82c61 -s ours am: 1f0fb907a8 -s ours
am skip reason: Change-Id I7c27f76c54a76abeae46dcdcddaeb3ca48afa358 with SHA-1 dff893b275 is in history

Change-Id: If715e6280254128351451a2b8a3249827b1cc5a0
2020-04-02 18:58:22 +00:00
Chalard Jean
1f0fb907a8 [automerger skipped] Address further API council comments. am: 4b9a7dd13d am: 7608da3e3a -s ours am: 7f49fa7dad -s ours am: b3f4c82c61 -s ours
am skip reason: Change-Id I7c27f76c54a76abeae46dcdcddaeb3ca48afa358 with SHA-1 dff893b275 is in history

Change-Id: I95d17a5fcbf4205c9efcbd0d22f045e2b08d33ce
2020-04-02 07:19:03 +00:00
Chalard Jean
b3f4c82c61 [automerger skipped] Address further API council comments. am: 4b9a7dd13d am: 7608da3e3a -s ours am: 7f49fa7dad -s ours
am skip reason: Change-Id I7c27f76c54a76abeae46dcdcddaeb3ca48afa358 with SHA-1 dff893b275 is in history

Change-Id: Icb83b93cb122f70861d2617ebf2ea7c46b13818d
2020-04-02 07:00:10 +00:00
Chalard Jean
7f49fa7dad [automerger skipped] Address further API council comments. am: 4b9a7dd13d am: 7608da3e3a -s ours
am skip reason: Change-Id I7c27f76c54a76abeae46dcdcddaeb3ca48afa358 with SHA-1 dff893b275 is in history

Change-Id: I73c243ccc7e14b895fdf0ab67493ba471b696f50
2020-04-02 06:37:15 +00:00
Chalard Jean
10be7a6488 [automerger skipped] Convert the Ethernet factory to the new network agent am: 86aac0daec am: 7f511738e0 -s ours am: 9abd9e2504 -s ours am: c86bfb7117 -s ours am: 618525c2e6 -s ours
am skip reason: Change-Id Ie7b70750ef0e17141080f4266dea6155c3601569 with SHA-1 79eb7ba87b is in history

Change-Id: Iadc107fbc28354ad2cf5f210df3de426bee20649
2020-04-01 12:05:31 +00:00
Chalard Jean
618525c2e6 [automerger skipped] Convert the Ethernet factory to the new network agent am: 86aac0daec am: 7f511738e0 -s ours am: 9abd9e2504 -s ours am: c86bfb7117 -s ours
am skip reason: Change-Id Ie7b70750ef0e17141080f4266dea6155c3601569 with SHA-1 79eb7ba87b is in history

Change-Id: I44fcf8f2fc9ffcf5b21ce0e3462019d6478584e3
2020-04-01 11:50:39 +00:00
Chalard Jean
c86bfb7117 [automerger skipped] Convert the Ethernet factory to the new network agent am: 86aac0daec am: 7f511738e0 -s ours am: 9abd9e2504 -s ours
am skip reason: Change-Id Ie7b70750ef0e17141080f4266dea6155c3601569 with SHA-1 79eb7ba87b is in history

Change-Id: Iba771d95f044ae505cdedf6c2a94ac057c0d05a2
2020-04-01 11:39:41 +00:00
Chalard Jean
9abd9e2504 [automerger skipped] Convert the Ethernet factory to the new network agent am: 86aac0daec am: 7f511738e0 -s ours
am skip reason: Change-Id Ie7b70750ef0e17141080f4266dea6155c3601569 with SHA-1 79eb7ba87b is in history

Change-Id: Id73857a02ed1e4b3b30d5166451af59e7583cd72
2020-04-01 11:19:44 +00:00
Chalard Jean
4b9a7dd13d Address further API council comments.
Test: FrameworksNetTests NetworkStackTests
Bug: 152238712
Copy from ag/10857997
Change-Id: I7c27f76c54a76abeae46dcdcddaeb3ca48afa358
Merged-In: I7c27f76c54a76abeae46dcdcddaeb3ca48afa358
2020-04-01 11:04:18 +00:00
Chalard Jean
86aac0daec Convert the Ethernet factory to the new network agent
This is a combination of ag/10147368 and ag/10438581.
ag/10147368 implemented this conversion together with
using the planned NetworkScore API, while ag/10438581
reverted the parts that had to do with NetworkScore.
This is just a squash of these two patches and it
brings the factory in line with the code in rvc-dev.

Test: FrameworksNetTests NetworkStackTests EthernetTetheringTest
Change-Id: Ib214fbbd042f2c0ebd01cf5b0ec33d922629677e
Merged-In: Ie7b70750ef0e17141080f4266dea6155c3601569
2020-04-01 09:09:32 +00:00
Chalard Jean
8bcad4f67b Merge "Address further API council comments." into rvc-dev am: d3a0721fb5 am: bad3318c8e am: a147521523 am: 332c9feacc am: b988a56e81
Change-Id: I7990efec889c951c4a82ca4f9c74df7c0c043731
2020-03-27 23:46:38 +00:00
Chalard Jean
a280fa7a75 Merge "Address further API council comments." into rvc-dev am: d3a0721fb5 am: cc9cab6311 am: 7fc8220a53 am: ae03d47c65
Change-Id: Iea6058b1e18328cb0c80d50d3e87f1d15eef5bb7
2020-03-27 23:41:00 +00:00
Chalard Jean
12ccaa891f Merge "Address further API council comments." into rvc-dev am: d3a0721fb5 am: bad3318c8e am: d02358a6cc am: 01c6bbac04
Change-Id: I92324165a42ea919c710743a7d36c17d7e47cf37
2020-03-27 23:39:24 +00:00
Chalard Jean
b988a56e81 Merge "Address further API council comments." into rvc-dev am: d3a0721fb5 am: bad3318c8e am: a147521523 am: 332c9feacc
Change-Id: I216e7ee932f3cce92569a8cd57e76a60a4d67c87
2020-03-27 23:30:14 +00:00
Chalard Jean
ae03d47c65 Merge "Address further API council comments." into rvc-dev am: d3a0721fb5 am: cc9cab6311 am: 7fc8220a53
Change-Id: Iab38821df1fc17922e36d9538709403799c066ec
2020-03-27 23:26:40 +00:00
Chalard Jean
01c6bbac04 Merge "Address further API council comments." into rvc-dev am: d3a0721fb5 am: bad3318c8e am: d02358a6cc
Change-Id: Ia30dd603d0dfd5af75a3d8a5d287504725aa8c3c
2020-03-27 23:23:05 +00:00
Chalard Jean
332c9feacc Merge "Address further API council comments." into rvc-dev am: d3a0721fb5 am: bad3318c8e am: a147521523
Change-Id: I3d188c4d061783ef7007226ebeb0e3de7e1c76c9
2020-03-27 23:15:08 +00:00
Chalard Jean
7fc8220a53 Merge "Address further API council comments." into rvc-dev am: d3a0721fb5 am: cc9cab6311
Change-Id: Ib995f82ee38a7105b28b5cdccb04d73dc6f43b81
2020-03-27 23:07:02 +00:00
Chalard Jean
a147521523 Merge "Address further API council comments." into rvc-dev am: d3a0721fb5 am: bad3318c8e
Change-Id: Ia564f3ff70468be198c23b47669c274cd144aaae
2020-03-27 23:04:46 +00:00
Chalard Jean
d02358a6cc Merge "Address further API council comments." into rvc-dev am: d3a0721fb5 am: bad3318c8e
Change-Id: I8cc1054a4f9c3bde0d3e47f8e1099aaec0609529
2020-03-27 23:02:26 +00:00
Chalard Jean
bad3318c8e Merge "Address further API council comments." into rvc-dev am: d3a0721fb5
Change-Id: I30c12bd1f44911306ba543cd1ad1e78cef35e0c6
2020-03-27 22:58:34 +00:00
Chalard Jean
cc9cab6311 Merge "Address further API council comments." into rvc-dev am: d3a0721fb5
Change-Id: I3baeb9a62722dfc35063dda3c1480cf627ecf237
2020-03-27 22:56:26 +00:00
Chalard Jean
d3a0721fb5 Merge "Address further API council comments." into rvc-dev 2020-03-27 22:50:42 +00:00
Lorenzo Colitti
a24a57e702 [automerger skipped] Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f am: 6b4862dfc8 am: 4815281295 am: b7e4058b07 -s ours am: 5986bbdc93 -s ours
am skip reason: Change-Id Idff3b05a193a80c581d80d0e4fe9c2d3fc0d8a25 with SHA-1 bc7ff5d89f is in history

Change-Id: I067edb9a6b9621ee56711380c055993a51594634
2020-03-27 15:04:54 +00:00
Lorenzo Colitti
c6e953bbbe [automerger skipped] Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f am: 6b4862dfc8 -s ours am: a33bf42216 -s ours am: 83eb974bed -s ours
am skip reason: Change-Id Idff3b05a193a80c581d80d0e4fe9c2d3fc0d8a25 with SHA-1 bc7ff5d89f is in history

Change-Id: Ieba7b5f26d5d260a771aa68adc6d836f72f36416
2020-03-27 15:04:20 +00:00
Lorenzo Colitti
5986bbdc93 [automerger skipped] Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f am: 6b4862dfc8 am: 4815281295 am: b7e4058b07 -s ours
am skip reason: Change-Id Idff3b05a193a80c581d80d0e4fe9c2d3fc0d8a25 with SHA-1 bc7ff5d89f is in history

Change-Id: Ied9274f2513e7c49a267d0a9884784570eadd8fb
2020-03-27 15:03:37 +00:00
Lorenzo Colitti
ac2d52bf46 [automerger skipped] Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f -s ours am: 54e8d7400a -s ours am: 2ed1da60c0 -s ours am: 74d5e47013 -s ours
am skip reason: Change-Id Idff3b05a193a80c581d80d0e4fe9c2d3fc0d8a25 with SHA-1 dd397f58c7 is in history

Change-Id: I2635edf03e157c0c139e7539c72fd80d41292767
2020-03-27 15:03:18 +00:00
Lorenzo Colitti
83eb974bed [automerger skipped] Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f am: 6b4862dfc8 -s ours am: a33bf42216 -s ours
am skip reason: Change-Id Idff3b05a193a80c581d80d0e4fe9c2d3fc0d8a25 with SHA-1 bc7ff5d89f is in history

Change-Id: Ia5bd44f2cd6688e39545a25e9ec243d618c9b5f8
2020-03-27 14:46:08 +00:00
Lorenzo Colitti
74d5e47013 [automerger skipped] Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f -s ours am: 54e8d7400a -s ours am: 2ed1da60c0 -s ours
am skip reason: Change-Id Idff3b05a193a80c581d80d0e4fe9c2d3fc0d8a25 with SHA-1 dd397f58c7 is in history

Change-Id: Ibf33a1079bab67b51f51d68584e5236b7164361b
2020-03-27 14:45:45 +00:00
Lorenzo Colitti
b7e4058b07 Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f am: 6b4862dfc8 am: 4815281295
Change-Id: Iafb673e949d06a327327d2ff043d8929a35974fa
2020-03-27 14:45:43 +00:00
Lorenzo Colitti
a33bf42216 [automerger skipped] Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f am: 6b4862dfc8 -s ours
am skip reason: Change-Id Idff3b05a193a80c581d80d0e4fe9c2d3fc0d8a25 with SHA-1 bc7ff5d89f is in history

Change-Id: Ib0e588434a8dd04280ef0df1f8f2d3abdfeff7a3
2020-03-27 14:35:52 +00:00
Lorenzo Colitti
4815281295 Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f am: 6b4862dfc8
Change-Id: I3004ec6456f68f9423d11009bdc7df51132cc155
2020-03-27 14:35:14 +00:00
Lorenzo Colitti
2ed1da60c0 [automerger skipped] Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f -s ours am: 54e8d7400a -s ours
am skip reason: Change-Id Idff3b05a193a80c581d80d0e4fe9c2d3fc0d8a25 with SHA-1 dd397f58c7 is in history

Change-Id: I535ef517fd18b84e1b4f1823c656ac14bc798f00
2020-03-27 14:35:09 +00:00
Lorenzo Colitti
54e8d7400a [automerger skipped] Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f -s ours
am skip reason: Change-Id Idff3b05a193a80c581d80d0e4fe9c2d3fc0d8a25 with SHA-1 dd397f58c7 is in history

Change-Id: I551191401ef145f60ce43992dc1130cda0d62838
2020-03-27 14:17:55 +00:00
Lorenzo Colitti
6b4862dfc8 Fix querying Ethernet availability for unprivileged callers. am: bc7ff5d89f
Change-Id: I7b670de0724e00ee48fe234b2bd193501c7c783c
2020-03-27 14:17:36 +00:00
Lorenzo Colitti
bc7ff5d89f Fix querying Ethernet availability for unprivileged callers.
Both EthernetManager#getAvailableInterfaces() and the no-arg
version of EthernetManager#isAvailable() end up calling
EthernetServiceImpl#getAvailableInterfaces. This method attempts
to filter out restricted interfaces if the caller does not have
the CONNECTIVITY_USE_RESTRICTED_NETWORKS permission.

Unfortunately EthernetNetworkFactory's notion of a restricted
interface is the opposite of what it should be. This means that
while privileged callers can see all interfaces, unprivileged
callers can only see restricted interfaces which they cannot use.

Fix this by correcting NetworkInterfaceState#isRestricted(), so
that unprivileged callers can see only unrestricted interfaces.
Privileged callers are unaffected.

This bug probably went unnoticed because restricted Ethernet
interfaces are rare (likely used only on auto devices) and
because the callers that care about those restricted interfaces
are generally privileged.

Bug: 148824036
Test: atest android.net.EthernetTetheringTest#testPhysicalEthernet
Merged-In: Idff3b05a193a80c581d80d0e4fe9c2d3fc0d8a25
Change-Id: Idff3b05a193a80c581d80d0e4fe9c2d3fc0d8a25
2020-03-27 11:38:33 +00:00
Lorenzo Colitti
d9057192f9 Fix querying Ethernet availability for unprivileged callers. am: dd397f58c7 am: 4ff97e70da am: 6b41e255c6 am: 1ba2a5d379 am: 8114585265
Change-Id: I6482151348ef71c63babbcb42fac4c70e37df457
2020-03-27 09:54:58 +00:00