Commit Graph

5255 Commits

Author SHA1 Message Date
TreeHugger Robot
f79d25bd41 Merge "Call clearSettingsProvider before and after test" 2018-09-28 18:29:14 +00:00
Remi NGUYEN VAN
991678c453 Merge "Call clearSettingsProvider before and after test" am: 3868fc30ee am: a1a00cbbd1
am: 7233437b07

Change-Id: I42487bdadc12fad135ac65dce0dfd6f77a9b9365
2018-09-28 07:53:08 -07:00
Remi NGUYEN VAN
7233437b07 Merge "Call clearSettingsProvider before and after test" am: 3868fc30ee
am: a1a00cbbd1

Change-Id: I21123baaa211d19af181c970b7ad85051c7d08b7
2018-09-28 07:40:45 -07:00
Remi NGUYEN VAN
a1a00cbbd1 Merge "Call clearSettingsProvider before and after test"
am: 3868fc30ee

Change-Id: I38cae25353df48851280490d4593e70b49f0e6c0
2018-09-28 07:28:31 -07:00
Remi NGUYEN VAN
3300b0bda8 Call clearSettingsProvider before and after test
FakeSettingsProvider requires this method to be called before and after
use. Without this, the settings value or content provider may be cached
statically, so the test will be affected by code accessing settings
before it is run.

Bug: b/116668105
Test: atest FrameworksNetTests
Change-Id: I1480f3f3bbb17791752582a70327bb5c7c348d7c
(cherry picked from commit b7c67f8e24)
2018-09-28 08:24:12 -06:00
Remi NGUYEN VAN
b7c67f8e24 Call clearSettingsProvider before and after test
FakeSettingsProvider requires this method to be called before and after
use. Without this, the settings value or content provider may be cached
statically, so the test will be affected by code accessing settings
before it is run.

Bug: b/116668105
Test: atest FrameworksNetTests
Change-Id: I1480f3f3bbb17791752582a70327bb5c7c348d7c
2018-09-28 14:46:34 +09:00
Jeffrey Vander Stoep
9d2725c515 Merge "Add ConnectivityManager.getConnectionOwnerUid()" am: f8529dc891 am: 937c009070
am: c5dd800f8c

Change-Id: I8b8f6e74abc47f94231f3b9a1ab0db1ad0903a10
2018-09-21 15:36:28 -07:00
Jeffrey Vander Stoep
c5dd800f8c Merge "Add ConnectivityManager.getConnectionOwnerUid()" am: f8529dc891
am: 937c009070

Change-Id: I4ec4b9a8954deec001841566e0722caa1a3fa248
2018-09-21 14:48:32 -07:00
Jeffrey Vander Stoep
937c009070 Merge "Add ConnectivityManager.getConnectionOwnerUid()"
am: f8529dc891

Change-Id: Ib575a2a03c332d0143ed15652cc9c08c9cff694f
2018-09-21 14:26:19 -07:00
Jeff Vander Stoep
39a51e0191 Add ConnectivityManager.getConnectionOwnerUid()
Allow VPN apps to lookup the UID owner of a network connection.

Requires specifying the:
 - IP address and port for both the source and destination of a TCP
   connection.
 - IP address and port for either source and destination or just
   source for a UDP connection.
Only TCP and UDP protocols are supported. Only connections for UIDs
that apply to the calling VPN app will be resolved. This is intended
to replace direct app access to /proc/net/{tcp,tcp6,udp,udp6}.

The implementation uses netlink inet_diag sockets[1] to perform
the lookup on TCP sockets as well as UDP sockets when supported
(kernel has CONFIG_INET_UDP_DIAG=y).

[1] http://man7.org/linux/man-pages/man7/sock_diag.7.html

Bug: 9496886
Bug: 109758967
Test: atest HostsideVpnTests
Test: atest InetDiagSocketTest on Taimen with CONFIG_INET_UDP_DIAG
    and on Sailfish without CONFIG_INET_UDP_DIAG.
Change-Id: I2bbc7072dd091e2e653dadf6dc05024c04180f34
2018-09-21 06:16:09 +00:00
Mathew Inwood
2622bdf569 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
2018-09-14 13:18:34 +01:00
Shaotang Li
539a053d47 Merge changes into stage-aosp-master am: 0ae414753a
am: fcc936b90d

Change-Id: I2f147946ac2ea928137a23b96dacc7c44d6bf40a
2018-09-13 01:16:00 -07:00
Shaotang Li
314adf84da Merge changes into stage-aosp-master am: 56090a7d99
am: aa799aaadf

Change-Id: Ib1cab07ba9e0d0c52680f7e2f81b117fd0e231d1
2018-09-13 01:10:22 -07:00
Shaotang Li
fcc936b90d Merge changes into stage-aosp-master
am: 0ae414753a

Change-Id: I46d9e80464652ac98c7b745686aaa490d57a8ab0
2018-09-13 00:56:38 -07:00
Shaotang Li
aa799aaadf Merge changes into stage-aosp-master
am: 56090a7d99

Change-Id: I6fa8268060713303c3d999fec0fd91aa78849872
2018-09-13 00:52:20 -07:00
Android Build Merger (Role)
0ae414753a Merge changes into stage-aosp-master 2018-09-13 07:27:15 +00:00
Android Build Merger (Role)
56090a7d99 Merge changes into stage-aosp-master 2018-09-13 07:27:15 +00:00
Benedict Wong
9c41563bf8 Merge "Use UID as requestID" am: a2f1eb6cf3 am: 4742afd3a3
am: 2f62a66f45

Change-Id: I36f1f6ab5e43abfadcba972bc89bbb4caa902074
2018-09-12 16:23:43 -07:00
Benedict Wong
2f62a66f45 Merge "Use UID as requestID" am: a2f1eb6cf3
am: 4742afd3a3

Change-Id: I0d9fb770482e72f3b017702ffb7ec144a64462e0
2018-09-12 15:22:39 -07:00
Benedict Wong
4742afd3a3 Merge "Use UID as requestID"
am: a2f1eb6cf3

Change-Id: Icef3693f5911c8f69076e0990392e28c693cbc22
2018-09-12 14:35:27 -07:00
Benedict Wong
a2f1eb6cf3 Merge "Use UID as requestID" 2018-09-12 18:51:33 +00:00
Andreas Gampe
634ef0c74b Merge changes into stage-aosp-master am: 741a4c94ac
am: 09fdf8375e

Change-Id: Ib5bf516476d00ebdf985066480ceaa7499992b42
2018-09-10 16:22:34 -07:00
Andreas Gampe
51ac636877 Merge changes into stage-aosp-master am: 2c825c0278
am: aa15c5aa07

Change-Id: Ifdd9d438255ab122410c8529bbe6e94654d33e64
2018-09-10 16:17:18 -07:00
Andreas Gampe
09fdf8375e Merge changes into stage-aosp-master
am: 741a4c94ac

Change-Id: If60b6361f323c651510900344d75ce5fa7db17c3
2018-09-10 16:01:58 -07:00
Andreas Gampe
aa15c5aa07 Merge changes into stage-aosp-master
am: 2c825c0278

Change-Id: I4e707c0172a858db97d903ad79dadb37c7a910a7
2018-09-10 15:58:08 -07:00
Android Build Merger (Role)
741a4c94ac Merge changes into stage-aosp-master 2018-09-10 22:43:03 +00:00
Android Build Merger (Role)
2c825c0278 Merge changes into stage-aosp-master 2018-09-10 22:43:03 +00:00
Hugo Benichi
e279b7a719 Merge changes Ie28e6c80,I3cb9b2ce am: 078f0ce714 am: 6946b28c1d
am: 22a8d12365

Change-Id: Icc4434b3e2662c7f576eaee141db2fe04c78f786
2018-09-04 23:46:38 -07:00
Hugo Benichi
22a8d12365 Merge changes Ie28e6c80,I3cb9b2ce am: 078f0ce714
am: 6946b28c1d

Change-Id: I550b2dd325dba38513eabb3ae8c94c2787fbbf70
2018-09-04 23:24:07 -07:00
Hugo Benichi
6946b28c1d Merge changes Ie28e6c80,I3cb9b2ce
am: 078f0ce714

Change-Id: I7e910aaed571c3c37fd4a5ba4d5a0eeb5f52c8bd
2018-09-04 23:15:54 -07:00
Hugo Benichi
078f0ce714 Merge changes Ie28e6c80,I3cb9b2ce
* changes:
  ConnectivityService: dumpsys args for dumping networks or requests only.
  ConnectivityService: Sort requests and networks in dumpsys.
2018-09-05 05:54:24 +00:00
Hugo Benichi
5df91ce8be ConnectivityService: dumpsys args for dumping networks or requests only.
This patch adds two arguments to ConnectivityService dumpsys handler so
that only current networks or only current requests are dumped:

- "adb shell dumpsys connectivity networks" will dump current networks.
- "adb shell dumpsys connectivity requests" will dump current requests.

Bug: none
Test: Compiled, flashed, booted, checked that both new dumpsys args work
      as expected.

Change-Id: Ie28e6c800795eb49f386b609e8222a25e73dfc84
2018-09-05 13:04:12 +09:00
Hugo Benichi
a480ba57f5 ConnectivityService: Sort requests and networks in dumpsys.
This patch adds two utility functions for sorting requests and networks
tracked by ConnectivityService by request id and network id
respectively.

These utility functions are then used to improve the output of
adb shell dumpsys connectivity so that networks and requests are
printed in a more stable fashion.

Bug: none
Test: Compiled, flashed, booted, checked output of adb shell
      dumpsys connectivity.

Change-Id: I3cb9b2ceab64145611a416dcb8c5d512838a2626
2018-09-05 13:03:55 +09:00
Benedict Wong
c268c30491 Use UID as requestID
This change makes all requestIDs use the UID of the creator, ensuring
that rekeys always use the same requestID. This also has the nice
property of separating app's resources from each other, and allowing for
identification of which app/UID allocated the resources from
command-line dumps (eg ip xfrm state show)

Bug: 111841561
Test: Updated tests & passing taimen
Change-Id: I4f1eadcdb795766ae4682b15e41727359c52fa38
2018-09-04 14:25:13 -07:00
Paul Hu
401ec5fade Merge "PermissionMonitor: Limit preinstalled apps network permissions" am: cb0e6f589a am: 41b3dd929f
am: 0877d8650c

Change-Id: I631d1a561d23e4adf6d0aa3a4532c621798cdbe6
2018-09-03 02:59:35 -07:00
Paul Hu
0877d8650c Merge "PermissionMonitor: Limit preinstalled apps network permissions" am: cb0e6f589a
am: 41b3dd929f

Change-Id: I1478c932bf612fd4546c4178fc8f4a0bededf127
2018-09-03 02:41:26 -07:00
Paul Hu
41b3dd929f Merge "PermissionMonitor: Limit preinstalled apps network permissions"
am: cb0e6f589a

Change-Id: I173026e41ed11fa5f4c679a5759b55213e21b596
2018-09-03 02:30:12 -07:00
Paul Hu
cb0e6f589a Merge "PermissionMonitor: Limit preinstalled apps network permissions" 2018-09-03 09:16:52 +00:00
paulhu
c7a3a56e57 PermissionMonitor: Limit preinstalled apps network permissions
Not all preinstalled apps should have access to background
networks or restricted networks. But we give them all network
access permissions currently, it's not a good design. So we
shall limit preinstalled apps permissions, they should just
request the appropriate permission for their use case from
the network permissions.

Bug:19610688
Test: runtest frameworks-net
Change-Id: I184ae3197208c979847ca134c8f01b32528badf1
2018-08-29 13:49:33 +08:00
Erik Kline
94ba181e4e Merge "Remove ResolveUtil from frameworks/base callers" am: 0e1621296f am: 89e36d45f7
am: 50160c2f49

Change-Id: Iddadeb5dc0b97180deac407f3196185edd3e0340
2018-08-28 20:31:13 -07:00
Erik Kline
50160c2f49 Merge "Remove ResolveUtil from frameworks/base callers" am: 0e1621296f
am: 89e36d45f7

Change-Id: I3199337fd168f58f13a547d4eaff2be069a22f3d
2018-08-28 20:21:50 -07:00
Erik Kline
89e36d45f7 Merge "Remove ResolveUtil from frameworks/base callers"
am: 0e1621296f

Change-Id: Ibc885ccd9531706df029154f7ec4fde71bf600d1
2018-08-28 20:12:49 -07:00
Erik Kline
767b7f2021 Remove ResolveUtil from frameworks/base callers
Use the Private DNS bypass logic that was moved into Network.

Once all callers of ResolvUtil are updated to use this interface
ResolvUtil can be deleted.

Test: as follows
    - built, flashed, booted
    - runtest frameworks-net passes
    - connection to captive portal network detects portal correctly
      and the login activity functions as expected

Bug: 64133961
Bug: 72345192
Bug: 73872000
Bug: 78548486

Change-Id: If11ef2b5ffdc729f8449cf18dccd5f1eccbc51e6
2018-08-28 12:59:21 +09:00
Blake Lawson
5c0c76e74b Merge "Fix typo in IpConfiguration comment" am: 43afefcd97 am: c03904e096
am: 22bdadc546

Change-Id: I58b8e7c793d73ea53f11d66bc6f709d0c4f0c5aa
2018-08-23 21:27:11 -07:00
Blake Lawson
22bdadc546 Merge "Fix typo in IpConfiguration comment" am: 43afefcd97
am: c03904e096

Change-Id: I0871973d37267215fc31455015a37e6a8a60d821
2018-08-23 21:17:32 -07:00
Blake Lawson
c03904e096 Merge "Fix typo in IpConfiguration comment"
am: 43afefcd97

Change-Id: Ife540b3bda671dcb8016dae86f221a62063bd464
2018-08-23 21:08:12 -07:00
Remi NGUYEN VAN
69fa140faa Merge changes I2cea553a,Id8d3dcf6,I19e68e88,I35598935,Idd7dc369, ... am: e01b4ce6c7 am: 1f3417b720
am: 8e31d1ab6a

Change-Id: Idc8915a99710a1e2bfd456519fb2931639cd5142
2018-08-23 20:51:03 -07:00
Treehugger Robot
43afefcd97 Merge "Fix typo in IpConfiguration comment" 2018-08-24 03:43:38 +00:00
Remi NGUYEN VAN
8e31d1ab6a Merge changes I2cea553a,Id8d3dcf6,I19e68e88,I35598935,Idd7dc369, ... am: e01b4ce6c7
am: 1f3417b720

Change-Id: If4f9e1b498855af05011cbd0f529e346bebd4cbd
2018-08-23 20:42:23 -07:00
Remi NGUYEN VAN
1f3417b720 Merge changes I2cea553a,Id8d3dcf6,I19e68e88,I35598935,Idd7dc369, ...
am: e01b4ce6c7

Change-Id: I1800eb214d501e76b8705a27ca817000d009736e
2018-08-23 20:33:45 -07:00