Commit Graph

2620 Commits

Author SHA1 Message Date
Robin Lee
fd5ac1ac7c Merge "Merge changes I31d5260d,Ied92f558 into nyc-dev am: 9677633814 am: adab05fdfc" into nyc-mr1-dev-plus-aosp
am: 21d0fa8c49

* commit '21d0fa8c49e86acaaf7268d014b61ba356e613a0':

Change-Id: If71bb13a2871cb577a9b39cf0db9eca0c880d79c
2016-05-04 22:10:33 +00:00
Robin Lee
865deed1df Merge "Merge "Add lockdownEnabled parameter to always-on VPN API" into nyc-dev am: 4c2242b254 am: 78d0888e8c" into nyc-mr1-dev-plus-aosp
am: 062a28b6a4

* commit '062a28b6a403a48d6f5f88e109a899c9c60581c1':
  Add lockdownEnabled parameter to always-on VPN API

Change-Id: I9ebd6221451ee10649a1f340031d62c6483832f1
2016-05-04 22:04:40 +00:00
Robin Lee
e823566924 Merge "Merge changes I31d5260d,Ied92f558 into nyc-dev am: 9677633814 am: 31b3676cce" into nyc-mr1-dev-plus-aosp
am: fbde3272fd

* commit 'fbde3272fd4e49ab269920339793bc40d0cb9628':
  Start VPN as early as possible during startup
  Split network agent created state from connected state

Change-Id: I6e1d6a1977db342f45a1a9114a56c181540e12bf
2016-05-04 22:03:54 +00:00
Android Build Merger (Role)
21d0fa8c49 Merge "Merge changes I31d5260d,Ied92f558 into nyc-dev am: 9677633814 am: adab05fdfc" into nyc-mr1-dev-plus-aosp 2016-05-04 21:48:10 +00:00
Robin Lee
b9a2ef1e09 Merge changes I31d5260d,Ied92f558 into nyc-dev am: 9677633814
am: adab05fdfc

* commit 'adab05fdfc7ff389b65cb949b5c66d5c96f68382':
  Start VPN as early as possible during startup
  Split network agent created state from connected state

Change-Id: Ibb02f2731536ebafaa4c24ef5cd2113f7cd43632
2016-05-04 21:42:47 +00:00
Robin Lee
7c540243de Merge "Add lockdownEnabled parameter to always-on VPN API" into nyc-dev am: 4c2242b254
am: 78d0888e8c

* commit '78d0888e8c9358681a6f564b30b2cc35bbe72a45':
  Add lockdownEnabled parameter to always-on VPN API

Change-Id: I7ec39775980ec839aa814cf284ea352789aa788f
2016-05-04 21:41:23 +00:00
Robin Lee
1054057e75 Merge changes I31d5260d,Ied92f558 into nyc-dev am: 9677633814
am: 31b3676cce

* commit '31b3676ccec847b1e86c23b2f5073dc1cc83abf4':
  Start VPN as early as possible during startup
  Split network agent created state from connected state

Change-Id: I6bb605a83b96a3efab36ab6a7bdb5859e1eafea8
2016-05-04 21:40:46 +00:00
Robin Lee
adab05fdfc Merge changes I31d5260d,Ied92f558 into nyc-dev
am: 9677633814

* commit '9677633814868394f11097c549cea65155f80c29':
  Start VPN as early as possible during startup
  Split network agent created state from connected state

Change-Id: I55167ad8f3cde11407a2d35b0f859c263c0fbbec
2016-05-04 18:55:11 +00:00
Robin Lee
4c2242b254 Merge "Add lockdownEnabled parameter to always-on VPN API" into nyc-dev 2016-05-04 18:38:30 +00:00
Robin Lee
9677633814 Merge changes I31d5260d,Ied92f558 into nyc-dev
* changes:
  Start VPN as early as possible during startup
  Split network agent created state from connected state
2016-05-04 18:35:19 +00:00
Robin Lee
3cc9ba48ef Start VPN as early as possible during startup
- Switch from USER_STARTING to USER_STARTED which is the foreground
  version of the broadcast

- Set the new VPN network as CONNECTING initially to avoid spamming
  apps with useless notifications ahead of the network being fully
  available

Bug: 26694104
Fix: 28335277
Change-Id: I31d5260dda62ff440c31c44eb0aa5c891e2717e5
2016-05-04 17:46:10 +01:00
Robin Lee
bc024e5d66 Split network agent created state from connected state
Network creation setup sometimes involves extra steps after actually
calling into netd to create the underlying network, rules & routes &
to begin allowing sockets bound to it.

For example, VPN networks can set a UID whitelist or blacklist. This
should happen:

  - AFTER there is a netID & network created in netd as
    network-specific rules will need to be tied to / point at it. Those
    rules are tied to the lifecycle of netd's network which is tracked
    by `NetworkAgentInfo.created` on the frameworks side.

  - BEFORE the CONNECTED broadcast and network callbacks have been sent
    out so that we don't create a race condition between clients that
    want to use the network and the server actually having the network
    ready

The race condition existed prior to this change and required any client
making use of network callbacks to sleep for a short amount of time after
receiving to actually be able to use the network.

Among other things, that race condition is now fixed.

Bug: 26694104
Change-Id: Ied92f5588a98c3e97f456bc98b676bf201ab5472
2016-05-04 16:24:46 +00:00
Robin Lee
ab2788acbc Add lockdownEnabled parameter to always-on VPN API
Allows callers to opt-out of blockading network traffic during boot and
on VPN app failure.

Bug: 26694104
Change-Id: Ibfbd43ad09a25f2e38053fcd6306df3711f8bde2
2016-05-03 13:24:42 +01:00
Lorenzo Colitti
b4a3c1d9d6 Merge "Merge changes I86257bc8,I5c2221c5 into nyc-dev am: 8925ef3257 am: 3ac235673c" into nyc-mr1-dev-plus-aosp
am: 8683428dfb

* commit '8683428dfb84956f4fa791cdd70e3987ecf01fec':

Change-Id: Ifc14f948bdda1fed18bce50c6642dd154eaff0ed
2016-05-02 13:12:37 +00:00
Pierre Imai
f20c9a7024 Merge changes I86257bc8,I5c2221c5 into nyc-dev am: 8925ef3257 am: d35f90b205
am: cd8cf492fe

* commit 'cd8cf492feeaddf20f61696e6f6c1e093842c5ac':
  Use Netd's binder interface to set resolver configuration.
  Add Gservices settings for resolver configuration.

Change-Id: I83cb2668c50e910a7ce3a4dede7414b4c2bfa8d9
2016-05-02 13:08:34 +00:00
Android Build Merger (Role)
8683428dfb Merge "Merge changes I86257bc8,I5c2221c5 into nyc-dev am: 8925ef3257 am: 3ac235673c" into nyc-mr1-dev-plus-aosp 2016-05-02 13:05:01 +00:00
Lorenzo Colitti
f8d9a33caa Merge changes I86257bc8,I5c2221c5 into nyc-dev am: 8925ef3257
am: 3ac235673c

* commit '3ac235673cc49f7648cef4710522cc2ce76021aa':
  Use Netd's binder interface to set resolver configuration.
  Add Gservices settings for resolver configuration.

Change-Id: I69f888bb27b3bd632f63ec95558db14d59605c71
2016-05-02 13:04:25 +00:00
Lorenzo Colitti
cd8cf492fe Merge changes I86257bc8,I5c2221c5 into nyc-dev am: 8925ef3257
am: d35f90b205

* commit 'd35f90b2055e0fdf962f4dd153b148ff94c54a84':
  Use Netd's binder interface to set resolver configuration.
  Add Gservices settings for resolver configuration.

Change-Id: I36c07f09ac62620fd4119eff1f9da5a278d08144
2016-05-02 13:04:22 +00:00
Pierre Imai
d35f90b205 Merge changes I86257bc8,I5c2221c5 into nyc-dev
am: 8925ef3257

* commit '8925ef3257d71dfb9dc383706f2aa611cfcbd9dd':
  Use Netd's binder interface to set resolver configuration.
  Add Gservices settings for resolver configuration.

Change-Id: I80fdc381bd3ff33a8efa6624d7115c346789ca17
2016-05-02 13:00:13 +00:00
Lorenzo Colitti
8925ef3257 Merge changes I86257bc8,I5c2221c5 into nyc-dev
* changes:
  Use Netd's binder interface to set resolver configuration.
  Add Gservices settings for resolver configuration.
2016-05-02 12:49:19 +00:00
Pierre Imai
5b5fe390dd Use Netd's binder interface to set resolver configuration.
BUG: 25731675
Change-Id: I86257bc84371832466161e5357ae173c305a7d18
2016-05-02 08:29:21 +00:00
Jeff Sharkey
752b74ec01 Merge "Merge "Flag to mark foreground jobs, fix data saver." into nyc-dev am: 9a977b7d45 am: 0c5c67f743" into nyc-mr1-dev-plus-aosp
am: 61cd431e8c

* commit '61cd431e8c1a4dd68c6754d3f152bb571bdc5112':

Change-Id: Idf6c3f6d9be248209ae5f135a88677a2423e72a9
2016-04-29 23:06:32 +00:00
Jeff Sharkey
ba27db0800 Merge "Flag to mark foreground jobs, fix data saver." into nyc-dev am: 9a977b7d45 am: cb8bc7c3f9
am: a410ef9790

* commit 'a410ef97906acf76554948cb44981af4563c1198':
  Flag to mark foreground jobs, fix data saver.

Change-Id: Id863d0ff4f8e7f13049231298feaab9839b4667c
2016-04-29 23:04:05 +00:00
Android Build Merger (Role)
61cd431e8c Merge "Merge "Flag to mark foreground jobs, fix data saver." into nyc-dev am: 9a977b7d45 am: 0c5c67f743" into nyc-mr1-dev-plus-aosp 2016-04-29 23:02:13 +00:00
Jeff Sharkey
9b36c5e8f8 Merge "Flag to mark foreground jobs, fix data saver." into nyc-dev am: 9a977b7d45
am: 0c5c67f743

* commit '0c5c67f743abeba5c30112634ce82fd63ae2d1a1':
  Flag to mark foreground jobs, fix data saver.

Change-Id: Idbf3bdfc76cadfbcb6bbf17ac1aa99df72a7a0a1
2016-04-29 23:01:49 +00:00
Jeff Sharkey
a410ef9790 Merge "Flag to mark foreground jobs, fix data saver." into nyc-dev am: 9a977b7d45
am: cb8bc7c3f9

* commit 'cb8bc7c3f95b4c629489e05a221bbb42e614ce9d':
  Flag to mark foreground jobs, fix data saver.

Change-Id: I30b87193a1d5d45f4ffeb919276a70ae709a1cdc
2016-04-29 23:01:47 +00:00
Jeff Sharkey
cb8bc7c3f9 Merge "Flag to mark foreground jobs, fix data saver." into nyc-dev
am: 9a977b7d45

* commit '9a977b7d45df0d3d59c5eec7f9534c3bd5fcd91d':
  Flag to mark foreground jobs, fix data saver.

Change-Id: I908d725a84e9590d0da38a586b066a63473d4f28
2016-04-29 22:59:31 +00:00
Jeff Sharkey
833c35b354 Flag to mark foreground jobs, fix data saver.
When a job will eventually run in the foreground, the internal
scheduling needs to ignore any background network restrictions when
satisfying constraints.  This also means the job should ignore the
current device doze state, since the requesting app could get the
same behavior by starting their own foreground service.

Always dispatch network policy changes to ConnectivityService first
to ensure that it has up-to-date information.  Fix bugs around data
saver that were causing networks to not be marked as BLOCKED for
background apps; before this fix apps would have been spinning in
internal connectivity loops, thinking that the network was actually
connected when the kernel was actually blocking their traffic.

Offer new ConnectivityService method overloads to ignore the blocked
state for a specific UID.

Print unsatisfied job constraints to aid debugging.

Bug: 26571724
Change-Id: Iaaa17933e6dc1bf6d3dff26d0bfc12222e51e241
2016-04-29 13:44:07 -06:00
Amith Yamasani
9c61cedc28 Merge "Merge "Stop user faster and clear stale broadcasts" into nyc-dev am: ec6faca007 am: 9dee0bccd8" into nyc-mr1-dev-plus-aosp
am: 01c037a234

* commit '01c037a234b01c836f1381c97ac681bb680659e7':

Change-Id: I9a304eda38e348109f0b251ff5148f3630341abe
2016-04-29 01:03:49 +00:00
Amith Yamasani
b7f0a8467c Merge "Stop user faster and clear stale broadcasts" into nyc-dev am: ec6faca007 am: 390636bf45
am: 4f3e0055b1

* commit '4f3e0055b1754e33cfbed95af257d5938b279254':
  Stop user faster and clear stale broadcasts

Change-Id: I5b69b7432f7cedd92f6891734643809e0170b3cc
2016-04-29 01:01:26 +00:00
Android Build Merger (Role)
01c037a234 Merge "Merge "Stop user faster and clear stale broadcasts" into nyc-dev am: ec6faca007 am: 9dee0bccd8" into nyc-mr1-dev-plus-aosp 2016-04-29 00:59:33 +00:00
Amith Yamasani
3fd3ffcb20 Merge "Stop user faster and clear stale broadcasts" into nyc-dev am: ec6faca007
am: 9dee0bccd8

* commit '9dee0bccd8e692d1ca86bcf7180170f153dc99c7':
  Stop user faster and clear stale broadcasts

Change-Id: I16c4c1dfcff9f4d63da0444923a29fda0bea5ee8
2016-04-29 00:59:02 +00:00
Amith Yamasani
4f3e0055b1 Merge "Stop user faster and clear stale broadcasts" into nyc-dev am: ec6faca007
am: 390636bf45

* commit '390636bf45725f1180af69592694fe5552578fcb':
  Stop user faster and clear stale broadcasts

Change-Id: I423d1f8448f8ba5b54f90a2fa192f231f38b761c
2016-04-29 00:58:58 +00:00
Amith Yamasani
390636bf45 Merge "Stop user faster and clear stale broadcasts" into nyc-dev
am: ec6faca007

* commit 'ec6faca0078263dfbf2b41d11cdb14586e40fd75':
  Stop user faster and clear stale broadcasts

Change-Id: I36eeb177791730a26077542606559e3e4428b87e
2016-04-29 00:56:43 +00:00
Amith Yamasani
f786dbf65c Stop user faster and clear stale broadcasts
Moved several USER_STOPPING registered receivers to listen
to USER_STOPPED, since they don't need to be blocking the
shutdown of the user.

Clear all stale broadcasts when stopping a user, so that we
don't unnecessarily start up processes and deliver stale
broadcasts. This was causing code to run when the user was
already stopped and resulted in crashes when other providers
and services couldn't be started anymore. Hopefully this fixes
many of those races.

Bug: 28371487
Change-Id: Ic35a7a23fa8fe009a53f8bf7545d4dad5fa34134
2016-04-28 10:02:44 -07:00
Felipe Leme
05711141a9 Merge "Tethering and Data Saver: There Can Be Only One!" into nyc-dev am: eee5866 am: 4844eaf
am: 5449c0b

* commit '5449c0b3e6ef394e990ef66dafdb34f54b82a108':
  Tethering and Data Saver: There Can Be Only One!

Change-Id: I184d03847abe86dd2f5e10c10bd12f90f7cc14d8
2016-04-28 00:52:46 +00:00
TreeHugger Robot
5449c0b3e6 Merge "Tethering and Data Saver: There Can Be Only One!" into nyc-dev am: eee5866
am: 4844eaf

* commit '4844eafcca60ca253c510714c7a348de45fba89b':
  Tethering and Data Saver: There Can Be Only One!

Change-Id: Idb0ab16443ca061f97ed2f12e0ee01d9fa61b187
2016-04-27 23:40:42 +00:00
Felipe Leme
4844eafcca Merge "Tethering and Data Saver: There Can Be Only One!" into nyc-dev
am: eee5866

* commit 'eee58665f3732fb0b2fbf8a49f0d3df582d33ca4':
  Tethering and Data Saver: There Can Be Only One!

Change-Id: I876c9a30e9451b1c346296c233068bdfb579f584
2016-04-27 23:31:49 +00:00
TreeHugger Robot
eee58665f3 Merge "Tethering and Data Saver: There Can Be Only One!" into nyc-dev 2016-04-27 22:41:13 +00:00
TreeHugger Robot
62d8813a79 Merge "Merge changes I8de95add,Ia6f4ccfd into nyc-dev am: f2f244a am: d00f83f" into nyc-mr1-dev-plus-aosp
am: cb8494c

* commit 'cb8494ca4e8727b39a5e331f37d2ca5a73c6b4d8':

Change-Id: I57b142451b258387d41e0fb3706661760c31387a
2016-04-27 02:52:23 +00:00
Hugo Benichi
f94f0b0fa5 Merge changes I8de95add,Ia6f4ccfd into nyc-dev am: f2f244a am: 27f44c4
am: aa9e2ee

* commit 'aa9e2ee4b6e0714770a12bbc8c4967de0d8007d0':
  Remove unused event tags of IpConnectivityEvent
  Better ConnectivityMetricsEvent printing

Change-Id: I8625da2af299337f385596f8015a8f7255aa2c37
2016-04-27 02:51:44 +00:00
Android Build Merger (Role)
cb8494ca4e Merge "Merge changes I8de95add,Ia6f4ccfd into nyc-dev am: f2f244a am: d00f83f" into nyc-mr1-dev-plus-aosp 2016-04-27 02:02:03 +00:00
TreeHugger Robot
cbc95c7b5c Merge changes I8de95add,Ia6f4ccfd into nyc-dev am: f2f244a
am: d00f83f

* commit 'd00f83f56024ddcce1d42a03c6a27f317ccab7f3':
  Remove unused event tags of IpConnectivityEvent
  Better ConnectivityMetricsEvent printing

Change-Id: I7b9588ab0533963ed918ec8aee7ba7c4ec1dea0a
2016-04-27 02:01:14 +00:00
TreeHugger Robot
aa9e2ee4b6 Merge changes I8de95add,Ia6f4ccfd into nyc-dev am: f2f244a
am: 27f44c4

* commit '27f44c4704b98bb969ab836a3cc30df75c1e626e':
  Remove unused event tags of IpConnectivityEvent
  Better ConnectivityMetricsEvent printing

Change-Id: I07a76836e84a71844332b387fef64511c01bf6bf
2016-04-27 02:01:11 +00:00
Hugo Benichi
27f44c4704 Merge changes I8de95add,Ia6f4ccfd into nyc-dev
am: f2f244a

* commit 'f2f244aa21b8d1f4d84973550c5e78a29fc42a24':
  Remove unused event tags of IpConnectivityEvent
  Better ConnectivityMetricsEvent printing

Change-Id: I57ce8977a481d3c9a441ea4dab407ec367e3adca
2016-04-27 01:57:13 +00:00
TreeHugger Robot
f2f244aa21 Merge changes I8de95add,Ia6f4ccfd into nyc-dev
* changes:
  Remove unused event tags of IpConnectivityEvent
  Better ConnectivityMetricsEvent printing
2016-04-27 01:49:53 +00:00
Hugo Benichi
c41a4e4266 Better ConnectivityMetricsEvent printing
This patch adds more information printing for IpConnectivity event
classes in android.net.metrics.

example:

ConnectivityMetricsEvent(14:36:35.799, 0, 1026): DhcpClientEvent(wlan0, DhcpRequestingState)
ConnectivityMetricsEvent(14:36:35.805, 0, 1026): DhcpClientEvent(wlan0, DhcpHaveAddressState)
ConnectivityMetricsEvent(14:36:35.809, 0, 4096): IpManagerEvent(wlan0, PROVISIONING_OK, 155ms)
ConnectivityMetricsEvent(14:36:35.810, 0, 1026): DhcpClientEvent(wlan0, DhcpBoundState)
ConnectivityMetricsEvent(14:36:35.871, 0, 2048): NetworkEvent(101, NETWORK_CONNECTED, 0ms)
ConnectivityMetricsEvent(14:36:35.874, 0, 2051): ValidationProbeEvent(101, PROBE_HTTP:599, 3ms)
ConnectivityMetricsEvent(14:36:35.874, 0, 2048): NetworkEvent(101, NETWORK_VALIDATION_FAILED, 0ms)
ConnectivityMetricsEvent(14:36:35.928, 0, 3072): DefaultNetworkEvent(0 -> 101, [WIFI], IPv4: false, IPv6: false)
ConnectivityMetricsEvent(14:36:37.008, 0, 2051): ValidationProbeEvent(101, PROBE_HTTP:204, 134ms)
ConnectivityMetricsEvent(14:36:37.008, 0, 2050): NetworkEvent(101, NETWORK_VALIDATED, 1137ms)

Also fixes a couple of event logging issues:
  - do no record spurious receive DhcpErrorEvent when a network goes down.
  - add an eventType field to IpManagerEvent instead of using the
    loggger component tag.

Bug: 28204408
Change-Id: Ia6f4ccfd7a0c63a5ccec18825f226c0b5781217b
2016-04-27 09:11:29 +09:00
Andreas Gampe
1944faf41a Merge "Frameworks/base: Make debug helper lazy in ConnectivityManager" into nyc-dev am: 9eabb38 am: 400a090
am: a5f54d7

* commit 'a5f54d7174ec0e8cde81e680bff7fecaa2ae2441':

Change-Id: I3b3713997e91d7070b67510e548247cfe7b59eab
2016-04-26 16:15:50 +00:00
Andreas Gampe
ae3f78707e Merge "Frameworks/base: Make debug helper lazy in ConnectivityManager" into nyc-dev am: 9eabb38 am: 12aea50
am: e0f1d13

* commit 'e0f1d13cb6c5492a538d41d2f49ab7aa52ffed0e':
  Frameworks/base: Make debug helper lazy in ConnectivityManager

Change-Id: Iae09599af115044fd6e1c37c0f0222fe766281f0
2016-04-26 16:15:18 +00:00
TreeHugger Robot
a5f54d7174 Merge "Frameworks/base: Make debug helper lazy in ConnectivityManager" into nyc-dev am: 9eabb38
am: 400a090

* commit '400a0902c930e1e98fc2baa811464b9353c0fa76':

Change-Id: Ie39d3e645eeb4b792cede5e24248a9b5c6afe980
2016-04-26 15:37:28 +00:00