Commit Graph

5125 Commits

Author SHA1 Message Date
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
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
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
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
Blake Lawson
4253b45cbb Fix typo in IpConfiguration comment
Bug: NONE
Test: NONE
Change-Id: Ib2ce166532292266da17ec85c16e400afe4f9111
2018-08-23 08:43:07 -07:00
Remi NGUYEN VAN
aa3d9ac73b Add DhcpServingParams
Those parameters will be used to start DhcpServer or update its
configuration.

Test: runtest DhcpServingParamsTest.java
Bug: b/109584964
Change-Id: Id8d3dcf62d66dcb02accffa8d8500e30f07af452
2018-08-23 17:29:48 +09:00
Remi NGUYEN VAN
029434e9ac Add util to add an ARP table entry
This is to be used by the new DhcpServer to add ARP entries with new
addresses before sending unicast responses.

Test: manual: cat /proc/net/arp with implementation based on this
Bug: b/109584964
Change-Id: I3559893583aa3c49b188ad689a41ee2f3e9d9bf3
2018-08-23 16:01:44 +09:00
Remi NGUYEN VAN
615721f947 Merge "Fix testRegisterUsageCallback failure in setUp" am: e358e840ab
am: 2f0a74a612

Change-Id: I5723e356d1b6aa1a71ba693598a5796900fd9ddc
2018-08-17 02:02:08 -07:00
Remi NGUYEN VAN
2f0a74a612 Merge "Fix testRegisterUsageCallback failure in setUp"
am: e358e840ab

Change-Id: I516bab9b9b6c5f48845f18d0e2ab8b47f0f809de
2018-08-17 01:48:48 -07:00
Remi NGUYEN VAN
e358e840ab Merge "Fix testRegisterUsageCallback failure in setUp" 2018-08-17 01:51:10 +00:00
Mathew Inwood
e7b927a3d5 Merge "Add @UnsupportedAppUsage annotations" am: d717c04b12
am: 2d2b826f60

Change-Id: I99215dd5430968df2e2dd514d21b396b00c1403e
2018-08-16 03:29:58 -07:00
Mathew Inwood
2d2b826f60 Merge "Add @UnsupportedAppUsage annotations"
am: d717c04b12

Change-Id: I8f8c9106b494caa6dc5ad405111f2a285a01e49f
2018-08-15 10:12:01 -07:00
Mathew Inwood
c5b9bec94e Add @UnsupportedAppUsage annotations
For packages:
  android.net.wimax
  android.net.wifi.p2p.nsd
  android.net.wifi.p2p
  android.net.wifi.hotspot2.pps
  android.net.wifi.hotspot2.omadm
  android.net.wifi.hotspot2
  android.net.wifi.aware
  android.net.wifi
  android.net.util
  android.net.sip
  android.net.rtp
  android.net.nsd
  android.net.metrics
  android.net.lowpan
  android.net.http
  android.net.captiveportal
  android.net

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: Ie25423113ee1a8071cd5039382c00de6ce0af7fd
Merged-In: I520be7a4c79e68310c12e4f55bf66acaa94145a1
2018-08-14 14:44:29 +01:00
Remi NGUYEN VAN
5dd7f07260 Fix testRegisterUsageCallback failure in setUp
LocalServices.addService in NetworkStatsService is currently failing
with IllegalStateException "Overriding service registration". Setting up
LocalServices in the test to avoid this issue might be possible, but
moving the registration to the only non-test caller of that constructor
as done here solves the issue and avoids side-effects from a constructor.

Test: atest FrameworksNetTests does not choke on this test
Bug: b/78487385
Bug: b/80082746
Change-Id: I5dba98fc79aec0800c8b71e6c7e23d1cfbcae852
Merged-In: I884a7a8bd7db3fcd220b785ba9914ac8c77720f0
(Clean cherry-pick of go/ag/4061255)
2018-08-14 18:14:09 +09:00
Xin Li
b618945a5c Merge stage-dr1-aosp-master into stage-aosp-master
am: cb7358d2a5

Change-Id: I435e644305d986d3d359f7e97086637d00c50b6c
2018-08-13 17:21:33 -07:00
Roshan Pius
e9c6857122 Merge "NetworkAgent: Send primitive integer in explicitlySelected" am: bc63072e52
am: 50a9fc9189

Change-Id: I5c00ed2031433b1176e41a1c01fd80b90fe0d27c
2018-08-13 15:37:07 -07:00
Xin Li
cb7358d2a5 Merge stage-dr1-aosp-master into stage-aosp-master
Bug: 112535855
Change-Id: I1ba00379ca307f44a6430e516b474983e4c1dd32
2018-08-13 13:01:08 -07:00
Treehugger Robot
bc63072e52 Merge "NetworkAgent: Send primitive integer in explicitlySelected" 2018-08-13 17:09:51 +00:00
Roshan Pius
856ff38b52 Merge "NetworkAgent: Send primitive integer in score" am: 45190f8e7f am: c039ad203e
am: d1900ecd7d

Change-Id: I8ca588bfcee7488c05ff33a2f85beb6aa2299776
2018-08-10 09:17:51 -07:00
Roshan Pius
d1900ecd7d Merge "NetworkAgent: Send primitive integer in score" am: 45190f8e7f
am: c039ad203e

Change-Id: I7f6ac7a5fd6ecae4ac077b7f54fe91879a63fa13
2018-08-10 08:54:21 -07:00
Roshan Pius
00ef96bc0e NetworkAgent: Send primitive integer in explicitlySelected
|Boolean| object is not parcelable and hences crashes when the binder call
crosses a process boundary. Using a primitive integer instead to
represent the boolean value.

Bug: 112358948
Test: Device boots up and able to make wifi connection.
Change-Id: Iac69fd302e1f1338ed0da1446105ffc5855451cc
2018-08-10 07:44:33 -07:00
Roshan Pius
45190f8e7f Merge "NetworkAgent: Send primitive integer in score" 2018-08-10 14:33:07 +00:00
Roshan Pius
d594290fd9 NetworkAgent: Send primitive integer in score
|Integer| is not parcelable and hences crashes when the binder call
crosses a process boundary. Using a primitive integer should suffice
for sending the value to the server. There are no other usage of
|EVENT_NETWORK_SCORE_CHANGED| in the codebase.

Bug: 112358948
Test: Device boots up and able to make wifi connection.
Change-Id: I4c8fc17f4b803f69a4d882c71a8ce014a194d1ba
2018-08-09 07:10:27 -07:00
Remi NGUYEN VAN
842a58215d Merge "Add tests for NetworkMonitor isCaptivePortal" am: 6ee63e03dc am: aebb44fd8e
am: 0af00d4866

Change-Id: I0f93d8a475a949e61e9f2b8e8116c241ae68faaf
2018-08-08 12:07:03 -07:00
Remi NGUYEN VAN
0af00d4866 Merge "Add tests for NetworkMonitor isCaptivePortal" am: 6ee63e03dc
am: aebb44fd8e

Change-Id: Ieba6ed270bce8ef5051ee34dc39695d56bda903f
2018-08-08 11:42:53 -07:00
Remi NGUYEN VAN
6ee63e03dc Merge "Add tests for NetworkMonitor isCaptivePortal" 2018-08-08 04:59:12 +00:00
Remi NGUYEN VAN
de25687203 Add tests for NetworkMonitor isCaptivePortal
Bug: b/79499239
Test: added tests, ConnectivityService tests pass

Change-Id: I98d503b8f92d7f35e59dd1621a90f2eca8c7a63c
2018-08-07 08:57:35 +00:00
Remi NGUYEN VAN
f3361d01c4 Merge "Add utils to convert Inet4Address <-> int" am: 2587292cd1 am: c9f4d7be9e
am: 4c10a126df

Change-Id: I8dac87304c9e7487715109b52fb8a43b948094e6
2018-08-06 12:18:52 -07:00
Remi NGUYEN VAN
4c10a126df Merge "Add utils to convert Inet4Address <-> int" am: 2587292cd1
am: c9f4d7be9e

Change-Id: Ia6830f33233210ea12816d6f099300231a7f9f6b
2018-08-06 12:09:31 -07:00
Remi NGUYEN VAN
c9f4d7be9e Merge "Add utils to convert Inet4Address <-> int"
am: 2587292cd1

Change-Id: I347d23f4682eca623e3b10f72bc9000b1c5954a3
2018-08-06 09:34:55 -07:00
Remi NGUYEN VAN
2587292cd1 Merge "Add utils to convert Inet4Address <-> int" 2018-08-06 05:49:52 +00:00
Remi NGUYEN VAN
6e2a93cf9a Add utils to convert Inet4Address <-> int
The current utilities map the higher-order bytes of ints to the
lower-order bytes of IPv4 addresses, which makes applying masks and
generating series of addresses confusing.

For example, the current utilities would convert 1.2.3.4 to 0x04030201,
or generate 0x0080ffff for a /17 subnet mask. The utilities in this CL
convert 1.2.3.4 to 0x01020304, and a /17 subnet mask is represented as
0xffff8000.

Includes tests for all the above methods and migration of
NetworkUtilsTest to JUnit4.

Test: added tests pass
Change-Id: I5f5aa2e6e3b054b66b9dc507dab64f41be9139b1
2018-08-03 15:55:24 +09:00
Nathan Harold
48452b82e3 Merge "Count and Report Bandwidth Requests by UID" am: e1d140619f am: 2bc5a4c9ee
am: b109118e28

Change-Id: I354ed7669f4c37842798a2ef8287a1b9132b8b89
2018-08-01 16:28:14 -07:00
Nathan Harold
b109118e28 Merge "Count and Report Bandwidth Requests by UID" am: e1d140619f
am: 2bc5a4c9ee

Change-Id: I2c1bd77de350c27206c9809a628d6d4e0eacad2f
2018-08-01 16:08:34 -07:00
Nathan Harold
2bc5a4c9ee Merge "Count and Report Bandwidth Requests by UID"
am: e1d140619f

Change-Id: Iadfb7c04a49055c57cc8eed2ce9ad5f10e15cf52
2018-08-01 15:48:12 -07:00
Nathan Harold
b89cbfbdca Count and Report Bandwidth Requests by UID
To debug power drain due to modem wakeups,
one of the signals we'd like to track is
requests for bandwidth estimate to see which
apps are making requests and how often. This
patch keeps a simple count per-UID when an
app requests a bandwidth update, and that
count is made available in dumpsys.

Bug: 77498849
Test: runtest frameworks-net
Change-Id: I30d2ce85f9fa6747030cf4039d1080113a32e386
2018-07-31 02:37:38 +00:00
Remi NGUYEN VAN
8d01a427d7 Merge "Increase network request timeouts" am: dab690a61a am: 86bbc9e887
am: 8f78e88b8b

Change-Id: I972f717a2ba2ef17e372f7d2afe3a29d4ed839d2
2018-07-27 06:24:25 -07:00
Remi NGUYEN VAN
8f78e88b8b Merge "Increase network request timeouts" am: dab690a61a
am: 86bbc9e887

Change-Id: I1f0840a3fec3605e51942e8bc0debb954fd571d5
2018-07-27 06:16:50 -07:00
Remi NGUYEN VAN
86bbc9e887 Merge "Increase network request timeouts"
am: dab690a61a

Change-Id: Iaae31d7eaa5e5ccccdcf63ba39dd3fdc729161a5
2018-07-27 06:08:08 -07:00
Treehugger Robot
dab690a61a Merge "Increase network request timeouts" 2018-07-27 11:56:31 +00:00
Remi NGUYEN VAN
f942290dd4 Merge "Use timeout consts in all ConnService tests" am: bbba1f7f9f am: 68225bc676
am: aa66c957f6

Change-Id: Ia2a25b560dd0aac670472a78583fa890b24c0633
2018-07-27 00:30:28 -07:00
Remi NGUYEN VAN
aa66c957f6 Merge "Use timeout consts in all ConnService tests" am: bbba1f7f9f
am: 68225bc676

Change-Id: I3d4a35aa3b78b455fe527c686b1a5cb2573ba47a
2018-07-27 00:20:07 -07:00