Commit Graph

62408 Commits

Author SHA1 Message Date
Michal Karpinski
ea792a7c11 DO NOT MERGE Fixes in comments for NetworkEvent, DnsEvent and ConnectEvent
am: e3639a0a07

Change-Id: Ie91f46915144c0f15e9a058b45ca7e55c54f796c
2016-12-14 10:58:22 +00:00
Michal Karpinski
306b268fb7 DO NOT MERGE Fix Lint errors for network logging API
am: 0c4ec00f85

Change-Id: I3fc8e08509440057c1d87dd2023cd2b7d8177530
2016-12-14 10:57:26 +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
Ruben Brunk
a1501095cf Prevent crash on uninstall.
am: 12ab5e1d70

Change-Id: I8301d17bb0bbd16a4adeaadb7b7bd04ad7159407
2016-12-14 00:34:59 +00:00
Robert Carr
948eb32664 [DO NOT MERGE] Prevent crash from early Toast surface destruction.
am: 0bfaa461c6

Change-Id: I78c60bbb725cb3ea694f090e4f493c7a8247a41b
2016-12-13 23:02:22 +00:00
Robert Carr
0bfaa461c6 [DO NOT MERGE] Prevent crash from early Toast surface destruction.
To understand this change it's first helpful to review Toasts.
The ViewRoot is constructed on the client side, but it's added,
to a window token controlled by the NotificationManagerService.
When we call NotificationManagerService#cancelToast, the system
will remove this window token. With the window token removed,
the WindowManager needs to destroy the surface to prevent orphaned
windows. If we destroy the Surface before removing the toast on the
client side however, we've never asked the ViewRoot to stop rendering
and we could have a crash. To solve this we just have to ensure we call
removeView before cancelToast.

Bug: 31547288
Bug: 30150688
Change-Id: I96672b0ac07ff18e9f51348f2ed42913c5a5226f
2016-12-13 21:11:10 +00:00
Ivan Podogov
4460839e5c Finish resolving conflict from d23dc17
Test: Treehugger
Change-Id: If7fa9f7e300f3d810e41447369ccbbfbc3963b94
2016-12-13 20:36:04 +00:00
Michal Karpinski
e3639a0a07 DO NOT MERGE Fixes in comments for NetworkEvent, DnsEvent and ConnectEvent
Test: the APIs will be tested by CTS when unhidden
Bug: 29748723

(cherry picked from commit da9d3ad3ac)

Change-Id: Iaff05eb6d4a2fd12e0271c703d694ecfc0dc9a17
2016-12-13 17:25:49 +00:00
Michal Karpinski
0c4ec00f85 DO NOT MERGE Fix Lint errors for network logging API
Bug: 29748723

(cherry picked from commit 0879eb41ca)

Change-Id: I187aa5b96c283323edb6a1ebe5005d70e19bf563
2016-12-13 17:25:24 +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 a9ff206af2)

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
Jeremy Joslin
63c577c510 Merge "Make the onRequestRecommendation() method async." am: fbeacb02c0 am: a6c6bc333d
am: eb0a34f26b

Change-Id: I62200f11d6be2bf83350255d9902dc67cf1a908e
2016-12-13 16:25:44 +00:00
Jeremy Joslin
eb0a34f26b Merge "Make the onRequestRecommendation() method async." am: fbeacb02c0
am: a6c6bc333d

Change-Id: I56a830273f8e3246b598c2ea7a027b87e3066e16
2016-12-13 16:19:14 +00:00
Jeremy Joslin
a6c6bc333d Merge "Make the onRequestRecommendation() method async."
am: fbeacb02c0

Change-Id: I9b98480499c2366eee06de163b561c4583e475d2
2016-12-13 16:13:44 +00:00
Svetoslav Ganov
d23dc17754 Add Bluetooth toggle prompts - framework
am: b1e2da7c24

Change-Id: I29c038d23488c504c838a85bd97c255b84919aab
2016-12-13 16:01:39 +00: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
Jeremy Joslin
280f82c312 Make the onRequestRecommendation() method async.
Converted the NetworkRecommendationProvider.onRequestRecommendation()
method into an async call to give implementors more flexibility.

Added unit tests for NetworkRecommendationProvider.

Test: Added NetworkRecommendationProviderTest.
BUG: 32909424
Change-Id: I8c1d2e11baa539744d77a012e85351f750523e3b
Merged-In: Iebe72f260133e9ad1946b0b75e2f69635e154ef3
2016-12-12 17:48:41 -08: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 e1c173d224)

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 05686dbb6b)

Change-Id: Ie7ca1638533479601c5983bb6e54705003561b6c
2016-12-13 10:20:03 +09:00
Josh Gao
19c4422c7c Merge "Add trace category for adb." am: 6968d90dc5 am: 15dc5951e6
am: 96446b5bd3

Change-Id: I1d354df518f19d61eaa17e03fd696193464b6f7b
2016-12-13 00:55:32 +00: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
Josh Gao
96446b5bd3 Merge "Add trace category for adb." am: 6968d90dc5
am: 15dc5951e6

Change-Id: I1e60464308807f09a4d89ee4c0fc1a007fb1be88
2016-12-13 00:42:42 +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
Josh Gao
15dc5951e6 Merge "Add trace category for adb."
am: 6968d90dc5

Change-Id: Id542769172f3d40221a6b20ea8af1db5a70abfd1
2016-12-13 00:36:54 +00:00
Hugo Benichi
a948fb6bdc DO NOT MERGE NetworkMonitor metrics: add first validation information
am: dd22982e25

Change-Id: I9540a8357fd44cfcb17b244c66e5883f3a1a100b
2016-12-13 00:34:19 +00:00
Josh Gao
6968d90dc5 Merge "Add trace category for adb." 2016-12-13 00:28:09 +00:00
Jerry Zhang
830874dbe7 Merge "Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers."
am: 1975240f17

Change-Id: I4b6532719b848ba4b595c8069ecbbd42e855382b
2016-12-13 00:26:33 +00:00
Hugo Benichi
d792f9d032 Merge changes Ic83c3f8f,I7ed954de,I7780c389 into nyc-mr2-dev
* changes:
  DO NOT MERGE NetworkMonitor: send one DNS probe per web probe
  DO NOT MERGE NetworkMonitor metrics: add first validation information
  DO NOT MERGE Captive portal systel log improvements
2016-12-13 00:22:34 +00:00
Jerry Zhang
1975240f17 Merge "Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers." 2016-12-13 00:12:04 +00:00
sghuman
3339d5b120 Merge "Fix erroneous constructor in ScoredNetwork.java" am: 9d55f43719 am: eaed9ef0b7
am: 60a850b670

Change-Id: I2c3de5b2cb0d60fc4aef08256939b50e67d7aa53
2016-12-12 23:18:31 +00:00
sghuman
60a850b670 Merge "Fix erroneous constructor in ScoredNetwork.java" am: 9d55f43719
am: eaed9ef0b7

Change-Id: I0314c02497dcabd6f3fa1caeb665ff5ecb9a0f59
2016-12-12 23:12:36 +00:00
sghuman
eaed9ef0b7 Merge "Fix erroneous constructor in ScoredNetwork.java"
am: 9d55f43719

Change-Id: I6f24c92a9638f91197a4d17bfdc3fbeeede3daf4
2016-12-12 23:07:22 +00:00
Sundeep Ghuman
23f98ebe33 Fix erroneous constructor in ScoredNetwork.java
Test: Unit tests in ag/310934.
Change-Id: I0075b15f59796872ea9779c04373563607d2f883
2016-12-12 14:36:03 -08:00
Marie Janssen
47e1f497c0 Merge "DO NOT MERGE Add Bluetooth toggle prompts - framework" 2016-12-12 21:27:23 +00:00
Josh Gao
552d86b520 Add trace category for adb.
Bug: http://b/31289465
Test: systrace
Change-Id: I765c55c264329227556ff25655e3f00c5c3e8b54
2016-12-12 12:32:57 -08:00
Jeff Sharkey
8ad8c65c62 Merge "Catch all exceptions from installd, log codes." am: 9a10ca3f4c am: 6f7b136b40
am: 5226bbb5a6

Change-Id: I3a3903c4dfb9113bf9549504a1d9859fb6ee5687
2016-12-12 19:55:17 +00:00
Jeff Sharkey
5226bbb5a6 Merge "Catch all exceptions from installd, log codes." am: 9a10ca3f4c
am: 6f7b136b40

Change-Id: Ia62a8a11907fe5dd4e524fbe181a094500248850
2016-12-12 19:48:53 +00:00
Jeff Sharkey
6f7b136b40 Merge "Catch all exceptions from installd, log codes."
am: 9a10ca3f4c

Change-Id: Iee50cdea3115ff868f8ae29b7e0d0ab590a7cc34
2016-12-12 19:42:22 +00:00
Jerry Zhang
bb598ee16f Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers.
Functionfs requires MtpServer to write descriptors before the device can be
configured. This adds a new configure call that will occur only when
functions are changed (new argument added to updateUsbStateBroadcast for this)
and be called after sys.usb.config is changed but before the waitForState
call to ensure compatibility with configfs devices.

Bug: 30976142
Change-Id: I7e94a5847d3b19c0fd75139e1b15a3f2a1cea01d
Test: Manual
2016-12-12 11:05:32 -08:00
Svetoslav Ganov
c2ac5bde6f DO NOT MERGE Add Bluetooth toggle prompts - framework
If permission review is enabled toggling bluetoth on or off
results in a user prompt to collect consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

Also added a configuration resource which controls whether
permission review mode is enabled. By default it is not and
an OEM can change this via an overlay. For now we also keep
the old mechanism to toggle review mode via a build property
which is still used and will be removed when clients have
transitioned.

bug:28715749
Change-Id: I77bca2305f9d0f20034b2c8fc5b58e0565d5e617
2016-12-12 09:50:24 -08:00
Jeff Sharkey
447a3ac16b Catch all exceptions from installd, log codes.
Now that installd is throwing both SecurityException and
IllegalArgumentException, it's time that we turned all these
into InstallerException.

Also extend ServiceSpecificException to include the contained
errorCode value when printing.

Test: builds, boots, apps install/uninstall fine
Bug: 13758960, 30944031
Change-Id: Ic9c1e99ae87f4442402ef528bf352c7978572c85
2016-12-12 10:16:32 -07:00
Fyodor Kupolov
ea3345d6a6 [DO NOT MERGE] Switch to using UMS.mUserStates
am: 7a1e682794

Change-Id: I666e7fe9602198b450c324b36d1ecebde8f1aedb
2016-12-12 17:15:44 +00:00
TreeHugger Robot
3c5965d339 Merge "[DO NOT MERGE] Switch to using UMS.mUserStates" into nyc-mr2-dev 2016-12-12 17:05:10 +00:00
Jeremy Joslin
5364e2b82b Merge "Update registerNetworkScoreCache() to accept a filter type." am: a511a07fa3 am: 4150ec18e9
am: 9f38345a08

Change-Id: I13f01dbfa300463a34c34d7c49f3dc97e42391d8
2016-12-10 00:16:39 +00:00
Jeremy Joslin
9f38345a08 Merge "Update registerNetworkScoreCache() to accept a filter type." am: a511a07fa3
am: 4150ec18e9

Change-Id: I589bead5cf4e9f57f21c234d7d0b5d62cdb1e2b3
2016-12-10 00:11:12 +00:00
Jeremy Joslin
4150ec18e9 Merge "Update registerNetworkScoreCache() to accept a filter type."
am: a511a07fa3

Change-Id: I51983da8fe63db15d9b38e3ebe4a20cb95cb5f13
2016-12-10 00:06:37 +00:00