Commit Graph

2134 Commits

Author SHA1 Message Date
Hugo Benichi
219d9ba4fa Merge \\"IpConn metrics: distinguish NUD_FAILED answers\\" into nyc-mr1-dev am: 42e608527a
am: 99b36c8b4f

Change-Id: Iade155a1941674edf642e99bd506d1676b67ab42
2016-07-07 13:17:27 +00:00
Hugo Benichi
99b36c8b4f Merge \"IpConn metrics: distinguish NUD_FAILED answers\" into nyc-mr1-dev
am: 42e608527a

Change-Id: I4303badea7760c6cd9a1b63db1df8a3766a638f2
2016-07-07 13:11:01 +00:00
Hugo Benichi
42e608527a Merge "IpConn metrics: distinguish NUD_FAILED answers" into nyc-mr1-dev 2016-07-07 13:02:31 +00:00
Hugo Benichi
a2332e55c5 Merge \\"ConnectivityManager: no double callback remove\\" into nyc-mr1-dev am: 78feae882a
am: a965203d5f

Change-Id: I8fb5bac2bb6b7665192c8c788d7818d637500935
2016-07-07 09:45:36 +00:00
Hugo Benichi
a965203d5f Merge \"ConnectivityManager: no double callback remove\" into nyc-mr1-dev
am: 78feae882a

Change-Id: Ib7b10c59c1f7c84ec78c7527fba8a6c9aa5b0c05
2016-07-07 09:38:29 +00:00
TreeHugger Robot
78feae882a Merge "ConnectivityManager: no double callback remove" into nyc-mr1-dev 2016-07-07 09:33:35 +00:00
Hugo Benichi
c31e68eadf Merge \\"IpConn metrics: add times to DHCP bound state\\" into nyc-mr1-dev am: bbf97cd121
am: af71487dd7

Change-Id: Icecc32a3c9d220f64dc807008354bb0678cf5564
2016-07-07 09:18:59 +00:00
Hugo Benichi
af71487dd7 Merge \"IpConn metrics: add times to DHCP bound state\" into nyc-mr1-dev
am: bbf97cd121

Change-Id: I0002c00d03165ac4bfa4a9790984d9e5615d7ff4
2016-07-07 09:13:22 +00:00
TreeHugger Robot
bbf97cd121 Merge "IpConn metrics: add times to DHCP bound state" into nyc-mr1-dev 2016-07-07 09:06:46 +00:00
Hugo Benichi
7643423521 IpConn metrics: add times to DHCP bound state
This patch adds DhcpClientEvent logging for:
 - time from init state to bound state
 - time from bound state to bound state when renewing

Example:
ConnectivityMetricsEvent(12:04:33.353, 0, 0): DhcpClientEvent(wlan0, WaitBeforeStartState, 94ms)
ConnectivityMetricsEvent(12:04:35.772, 0, 0): DhcpClientEvent(wlan0, DhcpInitState, 2417ms)
ConnectivityMetricsEvent(12:04:35.787, 0, 0): DhcpClientEvent(wlan0, DhcpRequestingState, 15ms)
ConnectivityMetricsEvent(12:04:35.793, 0, 0): DhcpClientEvent(wlan0, ConfiguringInterfaceState, 6ms)
ConnectivityMetricsEvent(12:04:35.811, 0, 0): DhcpClientEvent(wlan0, InitialBoundState, 2457ms)
ConnectivityMetricsEvent(12:05:35.791, 0, 0): DhcpClientEvent(wlan0, DhcpBoundState, 59998ms)
ConnectivityMetricsEvent(12:05:35.988, 0, 0): DhcpClientEvent(wlan0, WaitBeforeRenewalState, 196ms)
ConnectivityMetricsEvent(12:05:36.003, 0, 0): DhcpClientEvent(wlan0, DhcpRenewingState, 15ms)
ConnectivityMetricsEvent(12:05:36.010, 0, 0): DhcpClientEvent(wlan0, RenewingBoundState, 219ms)

Change-Id: I2540dd102a6509dff55936e38015265659b20760
2016-07-07 16:10:20 +09:00
Hugo Benichi
0d1c65b221 IpConn metrics: distinguish NUD_FAILED answers
This patch adds in IpReachabilityMonitor a timestamp variable set
everytime that probeAll() send NUD probe requests to RTNETLINK.
This allows to distinguish between:
  1) NUD_FAILED events resulting from such a forced NUD probe
  2) "organic" NUD_FAILED notifications from the kernel

This distinction is added to IpReachabilityEvent as a one-bit flag.

This patch also changes the formatting of ApfProgramEvent flags to use
'|' as a joining character, similarly to other flags formatting.

Bug: 21859053
Change-Id: I24c64a3f17fa283eace5bd0a05c21a90a2305359
2016-07-07 15:58:28 +09:00
Jeff Sharkey
2e2c64556c Merge \"Merge \\"Switch network cycle calculation to use Calendar.\\" into nyc-mr1-dev am: 3a4408640a\" into nyc-mr1-dev-plus-aosp
am: 54a704bfcd

Change-Id: I2924d4f96cf0ab52131570a270091d0d9480af0f
2016-07-07 01:47:39 +00:00
Jeff Sharkey
6d8cffc4e9 Merge \"Switch network cycle calculation to use Calendar.\" into nyc-mr1-dev
am: 3a4408640a

Change-Id: Icd8026e94b3d67523858486844f2195fc18f107b
2016-07-07 01:31:46 +00:00
Hugo Benichi
39e10e88ff ConnectivityManager: no double callback remove
This patch partially undoes ag/869831 (Change-Id:
Ia42ed7aefaebd8caf3eada8e42b6cb7a940d7647) so that ConnectivityManager
does not remove callbacks from its internal request-to-callback map at
unregistration, but instead let the singleton CallbackHandler do it when
receiving a CALLBACK_RELEASED from ConnectivityService.

ag/869831 was thought to fix b/26749700 that reported a callback leak
from sNetworkCallback, but a finer analysis of the code shows that
callbacks were correctly removed by the CallbackHandler before
ag/869831. There was therefore no callback leak.

Bug: 26749700
Bug: 28537383
Change-Id: I421d889d0e225c0e3d1eebea664f44a1cc0f3191
2016-07-07 09:44:02 +09:00
Jeff Sharkey
f2bead5117 Switch network cycle calculation to use Calendar.
The older Time class is deprecated and doesn't handle edge cases
very well.  So migrate the cycle calculation logic to use the
long-standing and well-supported Calendar API.

Bug: 28689087
Change-Id: Ic1802b3f8556402f99bfea4cd625c35dfed81ac0
2016-07-06 17:15:33 -06:00
Hugo Benichi
58caee56cf Merge \\"IpConn metrics: use @IntDef\\" into nyc-mr1-dev am: 018a205824
am: 48d9a3d42f

Change-Id: I526e118a53f6402c1728df33c623d281c3ae3e79
2016-07-05 15:02:04 +00:00
Hugo Benichi
48d9a3d42f Merge \"IpConn metrics: use @IntDef\" into nyc-mr1-dev
am: 018a205824

Change-Id: Ie2b1fc7934ea51bd65a9f360fa3949c2f03afe01
2016-07-05 14:51:02 +00:00
TreeHugger Robot
018a205824 Merge "IpConn metrics: use @IntDef" into nyc-mr1-dev 2016-07-05 14:39:47 +00:00
Hugo Benichi
cf6b12f50a IpConn metrics: use @IntDef
Change-Id: Iae23f04abd3d1a43e7217f4fd641cd5fa61a7a1b
2016-07-05 21:52:15 +09:00
Hugo Benichi
fc47039136 Merge \\"IpConn metrics: correctly read RA lifetimes\\" into nyc-mr1-dev am: 54756fdfd9
am: 5142df5613

Change-Id: I4d4edbdd30a4a2c321d0141faaa8a0d227c9823a
2016-07-05 12:47:19 +00:00
Hugo Benichi
5142df5613 Merge \"IpConn metrics: correctly read RA lifetimes\" into nyc-mr1-dev
am: 54756fdfd9

Change-Id: Iabf3cfa4b6aaf5a1fbda6f169a65a1c7c117fd32
2016-07-05 12:38:42 +00:00
Hugo Benichi
8acc08ed9d IpConn metrics: add dhcp transition times am: 176ed01a1f
am: a2595b3b22

Change-Id: Ie7394b77e2200fe80ec0dd62ce83cb476706d354
2016-07-05 12:38:14 +00:00
Hugo Benichi
a2595b3b22 IpConn metrics: add dhcp transition times
am: 176ed01a1f

Change-Id: I0375b97958614c4a1d1e9f904beef07d55c43462
2016-07-05 12:29:59 +00:00
Hugo Benichi
54756fdfd9 Merge "IpConn metrics: correctly read RA lifetimes" into nyc-mr1-dev 2016-07-05 12:25:55 +00:00
Hugo Benichi
176ed01a1f IpConn metrics: add dhcp transition times
This patch adds lifetime durations of DhcpClient states to
DhcpClientEvents.

To record the duration of a state, the event is now recorded when the
DhcpClient state machine exits that state.

In addition this patch removes event logging of StoppedState,
DhcpState and DhcpHaveLeaseState.

Change-Id: Ibd37b5e3070f35113b6b45942b1e1ff19c27a90b
2016-07-05 17:32:56 +09:00
Hugo Benichi
6ccd51a338 IpConn metrics: correctly read RA lifetimes
This patch
  - adds a Builder class for RaEvent.
  - uses this Builder class for correctly recording the minimum
    lifetime seen for every ICMP6 options tracked, instead of
    recording the last lifetime seen.
  - adds unit test coverage for RaEvent logging.

Change-Id: I6443932f5cf7a613a5c695c65a60eab01e60602a
2016-07-05 13:52:24 +09:00
Lorenzo Colitti
6e7deb491a Merge \\"Unbreak unregisterNetworkCallback.\\" into nyc-mr1-dev am: f9b050ed9e
am: 7252e8c673

Change-Id: I7861e8ff7b8528d8468f8217e13398f78be50de5
2016-07-05 02:28:07 +00:00
Lorenzo Colitti
7252e8c673 Merge \"Unbreak unregisterNetworkCallback.\" into nyc-mr1-dev
am: f9b050ed9e

Change-Id: I35ee16554e17c503b1f5628629c2c0a48d85d399
2016-07-05 02:19:18 +00:00
Lorenzo Colitti
1ec11eb5bc Unbreak unregisterNetworkCallback.
http://ag/1194313 broke unregisterNetworkCallback because the
system does not parcel the type of the request back to the app.
So when the app calls unregisterNetworkCallback, the
NetworkRequest that's passed in does not have a type and thus
doesn't match the request in mNetworkRequests.

Fix this by parceling over the type as well.

This was not caught by the unit test because the unit test all
runs in the same process with no parceling.

Bug: 23113288
Change-Id: I58b2ed651b9bf5cbdcca5b25c3ca24db53cffdf1
2016-07-05 01:59:49 +09:00
Lorenzo Colitti
38d40a5c06 Merge changes from topic \\'networkrequest_private\\' into nyc-mr1-dev am: 0317e03dc3
am: 09daa02022

Change-Id: I09231f4f4f3bd13f6b51fe8117eff7d002cf10dd
2016-07-01 15:27:07 +00:00
Lorenzo Colitti
09daa02022 Merge changes from topic \'networkrequest_private\' into nyc-mr1-dev
am: 0317e03dc3

Change-Id: Ia063c378bd32fdb056c0ecdc0f721d32e9fa49af
2016-07-01 15:20:21 +00:00
Lorenzo Colitti
b35d40d4e2 Move the request type from NetworkRequestInfo to NetworkRequest.
This will allow us to simplify code that deals with
NetworkRequests outside ConnectivityService.

Bug: 23113288
Change-Id: I9b3a859d0c68cad73d7f6baa4b584d13ffd2ae36
2016-07-01 20:15:19 +09:00
Hugo Benichi
88a9b54cdf Merge changes Ia28652e0,Id2eaafdc,I9c4c8286 into nyc-mr1-dev am: f5e3481951
am: 0664017da0

Change-Id: I75a518b8909e5cd85c7554ceaa11dc7519717075
2016-06-30 14:17:41 +00:00
Hugo Benichi
0664017da0 Merge changes Ia28652e0,Id2eaafdc,I9c4c8286 into nyc-mr1-dev
am: f5e3481951

Change-Id: Ic853ff8e8e1745821627e796d22daea227bafca2
2016-06-30 14:12:13 +00:00
Tobias Thierer
2df6976bb1 Merge \\\\"Changes for upgrade to OkHttp 2.7.5\\\\" am: a31247bd8d am: f6bcab7f97 am: 6b473f7b67
am: 847fe1668e

Change-Id: I02fe28e773df3b328be8c7ea26b0df065014188a
2016-06-30 13:12:46 +00:00
Tobias Thierer
847fe1668e Merge \\\"Changes for upgrade to OkHttp 2.7.5\\\" am: a31247bd8d am: f6bcab7f97
am: 6b473f7b67

Change-Id: I3a0dc1da2ee96d71c38cab727141efcb686627e1
2016-06-30 13:04:52 +00:00
Tobias Thierer
f6bcab7f97 Merge \"Changes for upgrade to OkHttp 2.7.5\"
am: a31247bd8d

Change-Id: Id79249756929a61dca374f9f1d43d0ea9e6b1280
2016-06-30 12:49:47 +00:00
Hugo Benichi
cfbf7414a1 Record events for RA option lifetimes
This patch defines a new android.net.metrics.RaEvent class carrying
lifetime values contained in RA packets. RaEvent are recorded when
ApfFilter processes a new RA for which there is no match.

Example:
ConnectivityMetricsEvent(15:39:39.808, 0, 0): RaEvent(lifetimes: router=3600s, prefix_valid=2592000s, prefix_preferred=604800s, route_info=-1s, dnssl=-1s, rdnss=3600s)

Change-Id: Ia28652e03ed442d5f2a686ef5b3fafbcb77c503a
2016-06-30 18:26:39 +09:00
Hugo Benichi
647c86d70a Log RA listening statistics
This patch adds a new ApfStats event class that counts RA packet
reception statistics on the RA listener thread of ApfFilter and reports
the maximum program size advertised by hardware.

Statistics are gathered for the lifetime of a network with APF
capabilities and uploaded at network teardown when the listener thread
exits.

Example event:
ConnectivityMetricsEvent(15:44:23.741, 0, 0): ApfStats(284945ms 2048B RA: 2 received, 0 matching, 0 ignored, 0 expired, 0 parse errors, 2 program updates)

Bug: 28204408
Change-Id: Id2eaafdca97f61152a4b66d06061c971bc0aba4c
2016-06-30 18:26:33 +09:00
Hugo Benichi
4fc3ee5be2 Log events at APF program generation
Example:
ConnectivityMetricsEvent(15:24:52.018, 0, 0): ApfProgramEvent(0/0 RAs 121B forever FLAG_MULTICAST_FILTER_ON)
ConnectivityMetricsEvent(15:24:53.036, 0, 0): ApfProgramEvent(1/1 RAs 334B 600s)
ConnectivityMetricsEvent(15:24:53.590, 0, 0): ApfProgramEvent(1/1 RAs 360B 600s FLAG_MULTICAST_FILTER_ON, FLAG_HAS_IPV4_ADDRESS)
ConnectivityMetricsEvent(15:24:58.157, 0, 0): ApfProgramEvent(1/1 RAs 294B 599s FLAG_HAS_IPV4_ADDRESS)

Bug: 28204408
Change-Id: I9c4c82861cf42eb2c7e7bf5471f05e8ff2fc560c
2016-06-30 18:21:09 +09:00
Tobias Thierer
851d806dbd Changes for upgrade to OkHttp 2.7.5
- Use com.android.okhttp.Dns in place of com.android.okhttp.internal.Network
 - Specify TimeUnit.MILLISECONDS for timeouts which 2.7.5 allows and
   brings us closer to 3+

Change-Id: I95b5d72a94ebe1389f7c2e8d95903aa1aadd944b
2016-06-29 17:41:32 +01:00
Hugo Benichi
186e5b57d3 Refactor IP connectivity event logging am: cfddd68792
am: 17427c9770

Change-Id: If8775031f2a293e94e564dde502d0775d5808fe6
2016-06-29 07:23:19 +00:00
Hugo Benichi
cfddd68792 Refactor IP connectivity event logging
This patch removes static methods for logging IP connectivity events
defined in android.net.metrics and replaces them with a single log()
instance method defined on IpConnectivityLog. Event constructors are
now public also. Every classes logging such events now create an
instance of IpConnectivityLog for logging event objects directly
instantiated with new.

Removing static dependencies allow straightforward testing of logging.

This patch also removes the base IpConnectivityEvent class which is not
needed any more.

Bug: 29035129
Change-Id: I3de700f93f46deaa48a759f938f7d00e1d8bff98
2016-06-29 14:28:51 +09:00
Hugo Benichi
21b6b821df Merge changes I9b4e55c2,I429562a0 into nyc-mr1-dev am: 41a3acc55a
am: ca9a575a79

Change-Id: I948403eb8ff92b2de87d8ce402921b3ede7e0b82
2016-06-29 00:30:17 +00:00
Hugo Benichi
3bba249c47 Tests for IpConnectivityMetricsLog
Bug: 28204408
Bug: 29035129
Change-Id: I429562a00904188947b11da9928ec5c01296ff97
2016-06-28 11:43:03 +09:00
Hugo Benichi
021d635ac6 Merge \\"ConnectivityMetricsLogger subclass for IpConnectivity\\" into nyc-mr1-dev am: ce2c5fa466
am: 71ffd2278d

Change-Id: Ibcdeec246f8d46d72e0eb0979786f6040402818f
2016-06-09 05:25:29 +00:00
Hugo Benichi
623ab7d7a6 ConnectivityMetricsLogger subclass for IpConnectivity
IpConnectivityEvent was using ConnectivityMetricsLogger directly for
logging events. However ConnectivityMetricsLogger keeps track in a
thread-unsafe way of skipped events rejected by MetricsLoggerService.

This patch introduces a subclass of ConnectivityMetricsLogger that
does not track skipped events, for using in IpConnectivityEvent.

It also qualifies the mServiceBlockedTimestampMillis variable as
volatile so that throttling is effective accross concurrent callers
of logEvent.

Bug: 28204408
Bug: 29023888
Change-Id: I33707ba1d07487b42f3ce9a1ad9a66d785e99fa7
2016-06-07 13:55:37 +09:00
Chen Xu
ac5392467a Merge "cold sim clean up" into nyc-mr1-dev am: ba3428f01b
am: 2581d13f25

* commit '2581d13f25878caf6011a2498b869d1dc84115ca':
  cold sim clean up

Change-Id: Ie35dd1dbede46a1ae6f6a1c902e8d54321325500
2016-06-04 05:58:44 +00:00
fionaxu
1bf6ec2f86 cold sim clean up
- add a new field: provisioningNotificationEnabled from NetworkMisc. set
  to false if we want to hide "sign in" notification and placed
  carrier-specific notification instead. it is set on connect, once set,
  it is carrier-app's responsibility to post new UI to users
- rework on the interaction between carrier app and framework
- code cleanup
- unit test support

Bug: 28567303
Change-Id: Ic84db7ffbb920d15344717f104496d3cb82e1a85
2016-06-03 11:45:12 -07:00
Paul Jensen
b569d8bbf9 Merge "Don\'t pass URL path and username/password to PAC scripts" into klp-dev am: af0b4466ff am: 8940d2b0ff am: bb27626141 am: 6c35cf2434 am: 42a5983364 am: 75095e6f02 am: 7c625e1938 am: 54a62d5feb am: a5a2c88fb3 am: 7ff57eaff9 am: 94c8855da6 am: 50615e498e am: fdc53e96d3
am: 257c5b2e9c

* commit '257c5b2e9ce5969e22c88d84213f394953740c64':
  Don't pass URL path and username/password to PAC scripts

Change-Id: If9f1006bd7d4ab2acc3ce3e75a0746f6ca44b01a
2016-05-27 17:42:22 +00:00