51034 Commits

Author SHA1 Message Date
Hugo Benichi
0699cf9804 Connectivity metrics: log DnsEvents in-band
This patch changes how DnsEvents are logged in IpConnectivityMetrics.
The following changes are made:
 - DnsEventBatch are not logged after 100 queries on the same network
    - this allows to merge DnsEvent and DnsEventBatch into one class
 - DnsEventBatch are not logged after a network disconnect
    - this allows to remove the NetworkCallback
 - DnsEvent are now logged similarly to ConnectStats when statistics are
   flushed, in a direct call from IpConnectivityMetrics into
   NetdEventListenerService, in a direct call from IpConnectivityMetrics
   into NetdEventListenerService.
    - this allows to remove the Parcelable implementation of DnsEvent
 - transports information is added to DnsEvent.

Test: - simplified NetdEventListenerServiceTest covering dns logging
      - updated IpConnectivityEventBuilderTest
      - updated IpConnectivityMetricsTest
      - $ runtest frameworks-net passes
      - manually verified $ adb shell dumpsys connmetrics list proto
Bug: 34901696

Change-Id: Ia4b33fd4212741152662a2adbb0533bd1b4902ee
2017-04-13 23:08:20 +09:00
Hugo Benichi
df456e13a1 Connectivity metrics: add transports pretty printing
This patch also
  - partially reverts commit f927f0c52e7df5b057e7d28888c3cfed164d241a
    that exposed a getTransports method on NetworkCapabilities.
  - moves enumerateBits to BitUtils (as unpackBits), and adds the
    reverse packBit method.

Bug: 34901696
Test: manually looked at $ adb shell dumpsys connmetrics list
Change-Id: Id04f9080e7f75608deeb49306aec34941e71794c
2017-04-13 23:08:05 +09:00
Hugo Benichi
c03829d362 Merge "Revert "Captive portal: rotate fallback urls"" am: 9ea45b6106 am: 4d47eba86a am: 4d47a6a26b
am: e90070d528

Change-Id: I4c26b3bf4ae6179193768783781aa8fbe0ac92cc
2017-04-13 13:59:55 +00:00
Hugo Benichi
e90070d528 Merge "Revert "Captive portal: rotate fallback urls"" am: 9ea45b6106 am: 4d47eba86a
am: 4d47a6a26b

Change-Id: Ib4dd12ee716fbc06e1fbfbb2e0445836b1e7c475
2017-04-13 13:52:21 +00:00
Hugo Benichi
4d47a6a26b Merge "Revert "Captive portal: rotate fallback urls"" am: 9ea45b6106
am: 4d47eba86a

Change-Id: Ic2e927bec210f65a0de6face224ce0b8d227b0bc
2017-04-13 13:46:32 +00:00
Hugo Benichi
9ea45b6106 Merge "Revert "Captive portal: rotate fallback urls"" 2017-04-13 13:25:42 +00:00
Hugo Benichi
2e43e45e1e Revert "Captive portal: rotate fallback urls"
After discussion in the cl we agreed to use "|" as a separator. However  String.split() input arg is a regex and not a literal string, so that "|" will actually split the urls characters per characters.

Will revert and resubmit with a comma.

This reverts commit 0908daaaf00e6b56ebed0a0fce9c3e3fe183a06b.

Change-Id: Ifab25e41bec806fbc1d2c13ffd81d4ad91598c89
2017-04-13 12:43:49 +00:00
Hugo Benichi
fd0b79fb4e Merge changes Ia15f77e2,Icaa1f95c am: c923752929 am: 8e5ebd9261 am: b98eee1f78
am: 54e288cc6d

Change-Id: I80446a6c334661fb87e1dabc0765e50e39443612
2017-04-13 10:16:23 +00:00
Hugo Benichi
54e288cc6d Merge changes Ia15f77e2,Icaa1f95c am: c923752929 am: 8e5ebd9261
am: b98eee1f78

Change-Id: I124e328fb64b03eac6808865bf02af8d7dd939cc
2017-04-13 10:10:27 +00:00
Hugo Benichi
b98eee1f78 Merge changes Ia15f77e2,Icaa1f95c am: c923752929
am: 8e5ebd9261

Change-Id: Idf1f5091144d93f88684df50fd38593400b0e23e
2017-04-13 09:40:19 +00:00
Treehugger Robot
c923752929 Merge changes Ia15f77e2,Icaa1f95c
* changes:
  Captive portal: regroup hardcoded http response codes.
  Captive portal: rotate fallback urls
2017-04-13 09:24:33 +00:00
Erik Kline
896a43c4a3 Merge "Extract SimChangeListener to its own file" am: 0ef8df6d52 am: 85f5725fb5 am: 270ab2fa7e
am: 152c9cf703

Change-Id: I8fa851793f50a4b4d8cd003790febeb3f2902d06
2017-04-13 08:50:05 +00:00
Erik Kline
152c9cf703 Merge "Extract SimChangeListener to its own file" am: 0ef8df6d52 am: 85f5725fb5
am: 270ab2fa7e

Change-Id: Ic39902fe33258dad0315a82b46f37582ba968085
2017-04-13 08:44:51 +00:00
Erik Kline
270ab2fa7e Merge "Extract SimChangeListener to its own file" am: 0ef8df6d52
am: 85f5725fb5

Change-Id: I51f350937450542d8217da5e3d4a415de6cb7f30
2017-04-13 08:38:44 +00:00
Treehugger Robot
0ef8df6d52 Merge "Extract SimChangeListener to its own file" 2017-04-13 08:19:07 +00:00
Hugo Benichi
a415870221 Captive portal: regroup hardcoded http response codes.
This patch regroups various hardcoded http codes into well defined
constants. This reduces risk of errors and makes the captive portal
logic clearer.

This patch also fixes the logging when a captive portal detection
probe fails, to take into account https ssl handshake failures: for
well-behaved portals it is expected that the https probe will fail,
however the error message was written before the introduction of the
https probe and had become ambiguous.

Test: built, flashed, tested manually with various portal networks
Bug: 36532213

Change-Id: Ia15f77e268cb414816fc52f92835289f9a9ce92b
2017-04-13 16:45:47 +09:00
Hugo Benichi
0908daaaf0 Captive portal: rotate fallback urls
This patch introduces a new settings value to specify more than one url
for the fallback http probe in addition to the existing settings value.
If more than one url exists, a network will rotate urls for the fallback
probe one by one everytime the fallback probe is sent.

Test: built, flashed, tested manually with various portal networks.
Bug: 36532213
Change-Id: Icaa1f95c5914e8840c83ccdf071047358a5b760f
2017-04-13 16:45:44 +09:00
Robert Carr
4684ba6c9e Merge "Stack APPLICATION_MEDIA_OVERLAY windows with relative layering." into oc-dev am: 9d5ac93cc3
am: b3871981f2

Change-Id: I2b413c9ba1d36fc8f8b3dffedf72331de82a4b40
2017-04-13 07:34:22 +00:00
Robert Carr
b3871981f2 Merge "Stack APPLICATION_MEDIA_OVERLAY windows with relative layering." into oc-dev
am: 9d5ac93cc3

Change-Id: I34c773700cb3dbb73803df1085034c3ac246943d
2017-04-13 07:22:01 +00:00
TreeHugger Robot
9d5ac93cc3 Merge "Stack APPLICATION_MEDIA_OVERLAY windows with relative layering." into oc-dev 2017-04-13 07:12:55 +00:00
Dan Sandler
15715786ff Merge "Minor text fixes." into oc-dev am: 818c408e5d
am: ba7435fd81

Change-Id: Id5bac5e8654e55d03835bdf5dc660d5985d67cbc
2017-04-13 07:10:34 +00:00
Dan Sandler
ba7435fd81 Merge "Minor text fixes." into oc-dev
am: 818c408e5d

Change-Id: I344ae2f6456893defd49d9efe5af8325770bcf83
2017-04-13 07:05:05 +00:00
Adam Lesinski
a23489806a Merge "OMS: Fix bug where overlay settings wouldn't persist" into oc-dev am: 4ad2ebcc90
am: 3395e15204

Change-Id: I983cee532196a5cd9a16fb65a2007a155428256c
2017-04-13 07:04:57 +00:00
TreeHugger Robot
818c408e5d Merge "Minor text fixes." into oc-dev 2017-04-13 07:00:57 +00:00
Adam Lesinski
3395e15204 Merge "OMS: Fix bug where overlay settings wouldn't persist" into oc-dev
am: 4ad2ebcc90

Change-Id: I326ba95cb4a81305588924a3c987754263b68a4c
2017-04-13 06:54:21 +00:00
TreeHugger Robot
4ad2ebcc90 Merge "OMS: Fix bug where overlay settings wouldn't persist" into oc-dev 2017-04-13 06:42:52 +00:00
Erik Kline
4b7af54762 Merge "Ignore potential SystemProperties errors when setting net.dns" am: f854c9034c am: 1303b8b9ca am: 1d3528ba86
am: 23c0170352

Change-Id: I1f99a5fdcf2285a2579610d1eb0a946d21043e3d
2017-04-13 06:25:02 +00:00
Erik Kline
23c0170352 Merge "Ignore potential SystemProperties errors when setting net.dns" am: f854c9034c am: 1303b8b9ca
am: 1d3528ba86

Change-Id: Ic9bf0af39fc2f879fb1fa365480f4d6d187a4d79
2017-04-13 06:18:38 +00:00
Erik Kline
1d3528ba86 Merge "Ignore potential SystemProperties errors when setting net.dns" am: f854c9034c
am: 1303b8b9ca

Change-Id: I3fb343daa4d1d5f01d5cc99d842574c841970d03
2017-04-13 06:12:30 +00:00
Svet Ganov
c3d1c85bda Allow custom buttons in autofill UI
Test: added CTS test in topic

bug:36871561

Change-Id: I78ffd8ba33fb982183677fffc587bbf1a077e132
2017-04-12 22:34:32 -07:00
Winson Chung
3f103eb430 Fix issue with non-focusable PiP activities being resumed.
- When the change to finish activities was made in ag/2067154, it exposed
  an issue in pinned stacks where we would resume the next top activity
  once the top activity finished pausing. Normally, the pinned stack is
  not focusable, but since it has an alwaysFocusable menu activity it
  becomes the focused stack and falls into this case.

  Instead of finding the next top activity, we need to find the next top
  focusable activity to resume, and fall through to focusing the top
  activity in the next focusable stack if there is none.

Bug: 37199067
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testNoResumeAfterTaskOverlayFinishes
Change-Id: Ib79826ff38bb3beb38a40183ddc6819e5040bb27
2017-04-12 22:31:12 -07:00
Robert Carr
af422a8c5b Stack APPLICATION_MEDIA_OVERLAY windows with relative layering.
See accompanying frameworks/native commit
 "SurfaceFlinger: Add parent-less relative layering" for a full explanation.

Test: Manual of bug repro steps. Plus tests for new SurfaceControl functionality included in frameworks/native.
Bug: 36693738
Change-Id: Ic54598117c1f44a206d33f03d0cc463fbef43fcc
2017-04-12 21:40:30 -07:00
Fyodor Kupolov
0c48ce1309 Merge "Report app data fixup and prepare timings" into oc-dev am: 1423ea3a45
am: 9f3cf1a692

Change-Id: I81dfcf98097d356e53994ba7ffaf247618349304
2017-04-13 04:24:51 +00:00
Erik Kline
4edba01eb4 Ignore potential SystemProperties errors when setting net.dns
Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
Bug: 33308258
Bug: 36249702

Change-Id: I76ae853ceb61b7b900f36f9c3cd67b2d2284aab0
2017-04-13 13:16:22 +09:00
Fyodor Kupolov
9f3cf1a692 Merge "Report app data fixup and prepare timings" into oc-dev
am: 1423ea3a45

Change-Id: I59bead1f8f0dd6a8cafe2ae564f028dd27dda222
2017-04-13 04:13:44 +00:00
TreeHugger Robot
1423ea3a45 Merge "Report app data fixup and prepare timings" into oc-dev 2017-04-13 04:08:21 +00:00
Dongwon Kang
2e7f5ce709 TIF: add helper methods for making a channel browsable.
Test: build and manually tested with a local app.
Bug: 36395259, Bug: 36097352
Change-Id: I512ed6f4da21af01445fdbcd2f200a681c5dde19
2017-04-12 20:55:22 -07:00
Jocelyn Dang
6306035a26 Merge "Add set-mode command to turn battery saver mode on and off." into oc-dev am: 78b3b2308c
am: ae624f3f0b

Change-Id: Ibae7b4256adfdf9265d68dffbb5189326342471e
2017-04-13 03:08:46 +00:00
Jocelyn Dang
ae624f3f0b Merge "Add set-mode command to turn battery saver mode on and off." into oc-dev
am: 78b3b2308c

Change-Id: Ie7e78b33cc17ef29eba1ecf304ddbd4b40c17074
2017-04-13 02:58:37 +00:00
Jocelyn Dang
78b3b2308c Merge "Add set-mode command to turn battery saver mode on and off." into oc-dev 2017-04-13 02:50:52 +00:00
Hugo Benichi
b2f960d1bc Captive portal: fix probe urls at network creation
This patch changes how url configuration values for captive portal
detection are read: instead of re-reading the settings at every probe
detection, the settings are read once when the NetworkMonitor associated
to a network is created.

If the settings are updated, the new values are picked up by new
networks, but not by existing networks. Since captive portal detection
is most important when joining WiFi networks, the newest available
settings values will still be used.

This change prepares introducing further changes for rotating probe
urls. Especially it helps making the detection strategy stateful with
respect to the lifecycle of a single NetworkMonitor.

Test: built, flashed, tested manually with various portal networks
Bug: 36532213
Merged-In: I71cc8bb8b996462f27f50798d67bceee5ffb898d

(cherry picked from commit b03272c9b5d1b5c71ae591f0e38b1d139d11f19f)

Change-Id: I33ac2b52fea6099969c3fec9b60ba0131f9d672d
2017-04-13 11:32:50 +09:00
Hugo Benichi
19e3cbdb35 NetworkMonitor: improve captive portal validation logs
This patch adds probe type and url to all validation logs about web
probes sent for captive portal detection.

Test: built, flashed, looked at $ adb shell dumpsys connectivity
Bug: 36830206, 36532213
Merged-In: Iee2caaf6664f3d097f9d1888ccc5fece0a95994c

(cherry picked from commit d9ac87ed65aa12b93e0b70f5e8560562c850fde0)

Change-Id: I5ab8bb117d2bbad123136dfbbf78cbe84a7f688e
2017-04-13 11:32:45 +09:00
Sudheer Shanka
911abd9bcf Merge "Update NPMS internal state when app idle parole state is changed." into oc-dev am: 67e802dd5e
am: 012ddf15c7

Change-Id: Ic491c87920519ac0fc04353f62f02a45dc1ba5fc
2017-04-13 02:05:17 +00:00
Sudheer Shanka
012ddf15c7 Merge "Update NPMS internal state when app idle parole state is changed." into oc-dev
am: 67e802dd5e

Change-Id: I88cacca1d3a576b69dc0aaa6806b6c2901afa696
2017-04-13 01:59:13 +00:00
Sudheer Shanka
67e802dd5e Merge "Update NPMS internal state when app idle parole state is changed." into oc-dev 2017-04-13 01:53:32 +00:00
Winson Chung
3ab2d3328e Merge "Fix regression when removing task." into oc-dev am: efbcb0d2cc
am: 67004e209d

Change-Id: I523d86f963a6346edac079abde552e5dff732fb6
2017-04-13 01:48:53 +00:00
Dianne Hackborn
6cdf56764c Merge "Work on issue #36427964: SecurityException: Unable to find app..." into oc-dev am: c62f0d7495
am: bea817a712

Change-Id: I58010d9417177fed45d01a5c9498aa38cc3c2566
2017-04-13 01:47:43 +00:00
Winson Chung
67004e209d Merge "Fix regression when removing task." into oc-dev
am: efbcb0d2cc

Change-Id: I0f20de44ecbfab8a411e99623f407a4b7c6c6986
2017-04-13 01:39:01 +00:00
Dianne Hackborn
bea817a712 Merge "Work on issue #36427964: SecurityException: Unable to find app..." into oc-dev
am: c62f0d7495

Change-Id: I87cbbdef2014cdc914b5165e68428aab2fa436c7
2017-04-13 01:38:01 +00:00
TreeHugger Robot
efbcb0d2cc Merge "Fix regression when removing task." into oc-dev 2017-04-13 01:29:31 +00:00