42148 Commits

Author SHA1 Message Date
Jeremy Joslin
e7f273d508 Add an IPC for requesting network scores.
Migrating the NetworkScoreManager.requestScores() method to use an
IPC rather than a broadcast.

Defined the new IPC in the AIDL files for NetworkScoreService and
NetworkRecommendationProvider. Added a no-op implementation in
NetworkScoreService and a full implementation in
NetworkRecommendationProvider (plus tests).

Test: adb shell am instrument -e class android.net.NetworkRecommendationProviderTest -w com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
BUG: 33593157
Change-Id: Iacf7b6d424ec3c57e8b89e5abc6bc3e8414097b9
Merged-In: I951f6186aa11ddbe5a94e374173a1fd40b2a4cce
2016-12-14 09:11:29 -08:00
Erik Kline
20cad0821d More correct startup and shutdown procedures.
am: 6c0782f1ae

Change-Id: Ib488e0cb49da2d3f655e189600f839721ea73358
2016-12-14 11:39:36 +00:00
TreeHugger Robot
c8059fb94c Merge "More correct startup and shutdown procedures." into nyc-mr2-dev 2016-12-14 11:33:38 +00:00
Michal Karpinski
4c7693e121 DO NOT MERGE Logging when the new batch of network logs broadcast is sent to DO
am: c4e7c32063

Change-Id: I64e032e5482cb917cb298fea578e157f7d9038d3
2016-12-14 10:56:34 +00:00
Michal Karpinski
8cfca9dbfe DO NOT MERGE Disable DO single user features when clearDeviceOwner() is called regardless of the amount of users
am: 504fa62f9e

Change-Id: I36bae185c96e9ee9f04d8e14654560803d2e89a1
2016-12-14 10:55:45 +00:00
Michal Karpinski
a507f28143 DO NOT MERGE Fix disabling DO single user features when clearDeviceOwner() is called
am: 5c64223da4

Change-Id: I37fabc41064e7fd0a1c42dab61697f74721e0beb
2016-12-14 10:54:55 +00:00
Michal Karpinski
eaaf9a1213 DO NOT MERGE [DPM] Minor code fixes in NetworkLoggingHandler
am: 896b9db8ed

Change-Id: I497a699c3137ef85c0ffd1c887bf8bd60600c182
2016-12-14 10:53:30 +00:00
Michal Karpinski
fd4ec31313 DO NOT MERGE [DPM] DO uses batch token to retrieve network logs, and can retrieve the same batch many times
am: bbf352a2c1

Change-Id: I6df35873ec30044780fab02329bab327af8df161
2016-12-14 10:52:18 +00:00
Michal Karpinski
d1c710d5cf DO NOT MERGE [DPM] Management and retrieval of network logs
am: 4c47adef60

Change-Id: I39486c9d6116023f1ee9bd576b7fcd0fe20023a1
2016-12-14 10:51:33 +00:00
Michal Karpinski
b2e8690507 DO NOT MERGE [DPM] DO can start network logging and listen for events
am: c3abd34cfe

Change-Id: I7952d67d22a141040f3ee3ac2b6c3aa2cfccbbf7
2016-12-14 10:50:36 +00:00
Michal Karpinski
d9eb4fce7d Merge changes from topic 'network-logging-nyc-mr2-dev' into nyc-mr2-dev
* changes:
  DO NOT MERGE Fixes in comments for NetworkEvent, DnsEvent and ConnectEvent
  DO NOT MERGE Fix Lint errors for network logging API
  DO NOT MERGE Logging when the new batch of network logs broadcast is sent to DO
  DO NOT MERGE Disable DO single user features when clearDeviceOwner() is called regardless of the amount of users
  DO NOT MERGE Fix disabling DO single user features when clearDeviceOwner() is called
  DO NOT MERGE [DPM] Minor code fixes in NetworkLoggingHandler
  DO NOT MERGE [DPM] DO uses batch token to retrieve network logs, and can retrieve the same batch many times
  DO NOT MERGE [DPM] Management and retrieval of network logs
  DO NOT MERGE [DPM] DO can start network logging and listen for events
2016-12-14 10:44:23 +00:00
Erik Kline
6c0782f1ae More correct startup and shutdown procedures.
During IpManager startup, anything sending messages to the state machine
must not begin doing so until after the state machine has been started.
Reorder the constructor accordingly.

During shutdown, AvoidBadWifiTracker needs to unregister the registered
BroadcastReceiver and might as well also unregister the ContentObserver.

Bug: 33388922
Change-Id: I58e07f7ccddaab160c153bcfb69fd45f50bb8710
2016-12-14 18:53:26 +09:00
Ruben Brunk
1244608172 Fix VR interaction with screen on/off/lockscreen.
am: 040484cf90

Change-Id: I16023e2b02d9660b8c109c1586125316526f3fc9
2016-12-14 08:27:58 +00:00
TreeHugger Robot
3661a6f91b Merge "Fix VR interaction with screen on/off/lockscreen." into nyc-mr2-dev 2016-12-14 08:22:33 +00:00
Erik Kline
ee39ac1ceb Merge "Stop setting net.hostname" am: 06178a39f8 am: 35cc49e03f
am: da70b6b287

Change-Id: I9976537d761a761e9aeca5cb15298f689032664f
2016-12-14 08:13:30 +00:00
Erik Kline
da70b6b287 Merge "Stop setting net.hostname" am: 06178a39f8
am: 35cc49e03f

Change-Id: Id261566422c4af7a3ce65877ba04b0a401685c23
2016-12-14 08:07:01 +00:00
Erik Kline
35cc49e03f Merge "Stop setting net.hostname"
am: 06178a39f8

Change-Id: Id03d2f8bf6fa8b447c5f32d3d2a51faef193ba62
2016-12-14 07:59:59 +00:00
Erik Kline
fc1b6a3f2a Stop setting net.hostname
Test: as follows
    - basics:
        - built
        - flashed
        - booted
    - connect to {v4-only, dualstack, v6-only} networks
        - verified expected connectivity on each
    - runtest frameworks-net
Bug: 30979015

Change-Id: I65e9878c7b8eaddaba1c0e1b8566ddfa0760047f
2016-12-14 13:11:15 +09:00
Erik Kline
6ba22b5d19 Merge "DHCPv4 anonymity profile: support skipping hostname option" am: eef38717b9 am: 94e328c22f
am: 68700dc757

Change-Id: I7e587b8b45a722c085a1081321357b2f8e9e73c8
2016-12-14 03:35:45 +00:00
Erik Kline
68700dc757 Merge "DHCPv4 anonymity profile: support skipping hostname option" am: eef38717b9
am: 94e328c22f

Change-Id: I4d46a9aa4b601098e55bf681906cb245d4d9a5cb
2016-12-14 03:29:10 +00:00
Erik Kline
94e328c22f Merge "DHCPv4 anonymity profile: support skipping hostname option"
am: eef38717b9

Change-Id: Id0eff1bdb60f1895fa6dd6c619071994efd79939
2016-12-14 03:22:12 +00:00
Treehugger Robot
eef38717b9 Merge "DHCPv4 anonymity profile: support skipping hostname option" 2016-12-14 03:07:48 +00:00
Ruben Brunk
040484cf90 Fix VR interaction with screen on/off/lockscreen.
- Add mechanism to prevent VR mode from being enabled.
- Disable VR mode while screen is off, or user is in lockscreen,
  and re-enable when this is no longer the case.

Merged-In: Ia0a7fe8d443a24dce9395053cfe3d1c5847a88f2

Bug: 31665197
Change-Id: Ia0a7fe8d443a24dce9395053cfe3d1c5847a88f2
2016-12-13 17:32:21 -08:00
Ruben Brunk
a1501095cf Prevent crash on uninstall.
am: 12ab5e1d70

Change-Id: I8301d17bb0bbd16a4adeaadb7b7bd04ad7159407
2016-12-14 00:34:59 +00:00
Ruben Brunk
f755dfb89e Merge "Prevent crash on uninstall." into nyc-mr2-dev 2016-12-14 00:24:41 +00:00
Ivan Podogov
4460839e5c Finish resolving conflict from d23dc17
Test: Treehugger
Change-Id: If7fa9f7e300f3d810e41447369ccbbfbc3963b94
2016-12-13 20:36:04 +00:00
Ivan Podogov
d97e21c0e1 Really resolve merge conflicts of 903d641 to nyc-mr2-dev-plus-aosp
Test: Treehugger
Change-Id: Idd62dc36b4257f31148b29dec19a2785043e3d11
2016-12-13 20:27:15 +00:00
Ivan Podogov
90a198a659 resolve merge conflicts of 903d641 to nyc-mr2-dev-plus-aosp
Test: Treehugger
Change-Id: Ie994c37011f6f4255ca681e4f0c0a99fa5c337fd
2016-12-13 20:15:44 +00:00
Ivan Podogov
903d6414e5 resolve merge conflicts of b1e2da7 to nyc-mr1-dev-plus-aosp
Test: build police
Change-Id: Ifec1ab6760ebb94b0b411c9c60f07066e151206b
2016-12-13 17:55:14 +00:00
Michal Karpinski
c4e7c32063 DO NOT MERGE Logging when the new batch of network logs broadcast is sent to DO
Test: this only adds a log message
Bug: 29748723

(cherry picked from commit bcf1c58ec25f275fa25f8aab1c265da868e64e29)

Change-Id: Iad57528c60f35d4820a2f0196cccc92f7c4d3830
2016-12-13 17:24:55 +00:00
Michal Karpinski
504fa62f9e DO NOT MERGE Disable DO single user features when clearDeviceOwner() is called
regardless of the amount of users

Bug: 32901196
Bug: 29748723
Change-Id: Ie419b5e496e23656cbe5436942d9aba402bfe68e
2016-12-13 17:24:17 +00:00
Michal Karpinski
5c64223da4 DO NOT MERGE Fix disabling DO single user features when clearDeviceOwner() is called
We should disable those features before the DO is actually cleared.

Bug: 32901196
Bug: 29748723

(cherry picked from commit c44e67961170ddfb668372dc6e9ce6b391e3740f)

Change-Id: I74679abc26753585f302f3d52bca81fe21e2e668
2016-12-13 17:23:42 +00:00
Michal Karpinski
896b9db8ed DO NOT MERGE [DPM] Minor code fixes in NetworkLoggingHandler
Added a comment and renamed field to follow mConvention.

Test: will be CTS tested once APIs unhidden
Bug: 29748723

(cherry picked from commit aabe96db87838501d3abeb96c25a4b1c50b9c12c)

Change-Id: I7ef118723d13ce1d313c3c56299c2dca2411eee6
2016-12-13 17:22:53 +00:00
Michal Karpinski
bbf352a2c1 DO NOT MERGE [DPM] DO uses batch token to retrieve network logs, and can retrieve
the same batch many times

This allows DO to:
a) know that some logs were dropped (by trying with token and not
getting anything)
b) know how many logs were there in each batch (useful especially
for the dropped ones)
c) retry batch retrieval if it failed

Test: will be CTS tested once APIs unhidden
Bug: 29748723

(cherry picked from commit a9ff206af26871695bfce54969428b8ad03e31e6)

Change-Id: Iac10e61cdf3b100719a9c029ff897bd5ef5c8e2f
2016-12-13 17:22:07 +00:00
Michal Karpinski
4c47adef60 DO NOT MERGE [DPM] Management and retrieval of network logs
This CL follows up on ag/1530343 and adds:
1) Various network events.
2) Retrieval method in DPM and APIs in DeviceAdminReceiver.
3) Extension of NetworkLogger and it's NetworkLoggingHandler.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
Bug: 29748723
Change-Id: I42a1a477e7c75c109a3982f809c22732b814e8b2
2016-12-13 17:19:22 +00:00
Michal Karpinski
c3abd34cfe DO NOT MERGE [DPM] DO can start network logging and listen for events
This CL adds:
1) Setter and getter in DPM to manipulate logging switch (retrieval
method to come in a subsequent CL(s)).
2) A way for DPM to register to listen for events.
3) Skeleton of NetworkLogger class (more to come in subsequent CL(s)).

Bug: 29748723
Change-Id: I5c04662ccc6febd2ba294b0eaca1ed1da9c16e47
2016-12-13 17:15:38 +00:00
Svetoslav Ganov
d23dc17754 Add Bluetooth toggle prompts - framework
am: b1e2da7c24

Change-Id: I29c038d23488c504c838a85bd97c255b84919aab
2016-12-13 16:01:39 +00:00
Ivan Podogov
e5592abb83 Merge changes from topic 'f-radio-toggle' into cw-f-dev
* changes:
  Add WiFi toggle prompts - framework
  Add Bluetooth toggle prompts - framework
2016-12-13 15:55:30 +00:00
Erik Kline
511818ffb3 DHCPv4 anonymity profile: support skipping hostname option
Per https://tools.ietf.org/html/rfc7844#section-3.7

   When using the anonymity profile, DHCP clients SHOULD NOT send the
   Host Name option.

Once the net.hostname property is removed and ensured unset via CTS
this option will no longer be sent.

Test: as follows
    - build, flashed
    - connected to v4-only and dualstack networks, verified v4 works
    - android.net.dhcp.DhcpPacketTest passes
    - setprop net.hostname "" and verified no hostname option
Bug: 30979015
Change-Id: Ieab3f04ea38e176d9147bb788742a5397762c2e4
2016-12-13 18:14:44 +09:00
Hugo Benichi
b37d43b83c DO NOT MERGE IpConnectivityMetrics: rate limit ApfProgramEvents
am: 97d10ffcad

Change-Id: I266f7b8da58513b1e6c1a9c2b37e528ba777a7d6
2016-12-13 04:09:49 +00:00
Hugo Benichi
fbbf03a3c2 DO NOT MERGE IpConnectivityMetrics reads buffer size in settings
am: ff0b58627f

Change-Id: I5c433faa0d43202ae1169fdba4c42c09dd9c17dd
2016-12-13 04:08:18 +00:00
Hugo Benichi
064d4f183c DO NOT MERGE IpConnectivity metrics: add version number
am: 31cf55bdfe

Change-Id: Iccdf7d09ef4dc80f05c76774c456b5effb2c08c7
2016-12-13 04:05:08 +00:00
Hugo Benichi
8b43f6eb02 Merge "DO NOT MERGE IpConnectivityMetrics: rate limit ApfProgramEvents" into nyc-mr2-dev 2016-12-13 03:55:32 +00:00
Hugo Benichi
6674f7a3b4 Merge "DO NOT MERGE IpConnectivityMetrics reads buffer size in settings" into nyc-mr2-dev 2016-12-13 03:54:24 +00:00
Hugo Benichi
97d10ffcad DO NOT MERGE IpConnectivityMetrics: rate limit ApfProgramEvents
This patch uses the previously introduced TokenBucket to rate limit
ApfProgramEvents, still allowing for burst of ApfProgramEvents when a
new interface is set up (due to ipv4 provisioning, multicast lock, ipv6 RAs
triggering new APF program events in short amounts of time).

Test: new test in IpConnectivityMetricsTest
Bug: 1550402

(cherry picked from commit e1c173d2240a8eedf7685c9371087dc047a6931f)

Change-Id: Ibe41e9a76db36ea502697a5f19fc0d91c40a3087
2016-12-13 10:20:03 +09:00
Hugo Benichi
ff0b58627f DO NOT MERGE IpConnectivityMetrics reads buffer size in settings
Test: IpConnectivityMetricsTest passes. Also manually changed the new
setting and verified the buffer size is as expected after flushing the
buffer.
Bug: 32198637

(cherry pick from commit 05686dbb6b965eb1a54591d2ed2334337886c6ee)

Change-Id: Ie7ca1638533479601c5983bb6e54705003561b6c
2016-12-13 10:20:03 +09:00
Hugo Benichi
31cf55bdfe DO NOT MERGE IpConnectivity metrics: add version number
This patch adds a version field to ipconnectivity.proto and populates it
to 2, which is the logical version number for NYC-MR2.

Test: IpConnectivity{EventBuilder,Metrics}Test pass
Bug: 32127906

(cherry picked from commit d680d4c856f54bea0c60dea74ba4204822391e49)

Change-Id: I5f37633afd9ec82f5402c5b6670fe2febae82a14
2016-12-13 10:19:13 +09:00
Jerry Zhang
11dc0eccfb Merge "Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers." am: 1975240f17 am: 830874dbe7
am: 88672d7d29

Change-Id: Ic083ac68e2a6acaa211cfb8baaf3b9ea0bbe47e2
2016-12-13 00:42:47 +00:00
Jerry Zhang
88672d7d29 Merge "Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers." am: 1975240f17
am: 830874dbe7

Change-Id: I930f006ffd7a429379638aa4f8268ed443a3696b
2016-12-13 00:37:12 +00:00
Hugo Benichi
a6ac3479af DO NOT MERGE NetworkMonitor: send one DNS probe per web probe
am: eb5e9aa2ce

Change-Id: I2e3d9794e56d434f838ead9f12ee4edc74a3d6f2
2016-12-13 00:35:08 +00:00