Commit Graph

3209 Commits

Author SHA1 Message Date
Hugo Benichi
fd35080555 Network notifications: revamp keying scheme
This patch changes the (tag: String, id: Int) keying scheme for network
notifications so that TRON notification counters can count network
related notifications unambiguously.

TRON instruments all notifications shown for package "android" as well
as user interactions with these Notifications. These counters are
grouped by id. However the network notifications ("no internet" dialog,
"captive portal sign in" dialog, ...) use a static tag and a dynamic id
for keying notifications, preventing the counters to correctly
aggregate. In addition there is also the risk of collision with other
SystemUi notification ids not managed by NetworkNotificationManager.

In order to make the TRON counters useful for network notifications,
the id is now encoding the network notification type in a stable way
while the tag is used to uniquely identify network notifications.

Test: change covered by previously added new unit tests.
Bug: 32198726
Bug: 33030620
Change-Id: I1201d1d4fab8183dd83449c2afb2c35cfece883f
2016-12-15 10:31:38 +09:00
Hugo Benichi
5dc0334a8b Merge "DO NOT MERGE IpConnectivityMetrics: rate limit ApfProgramEvents" into nyc-mr2-dev am: 00cea2973c
am: e1d81d063b  -s ours

Change-Id: I9810fd2fec02285cc8c09ed10cb8386fadd15738
2016-12-13 04:23:21 +00:00
Hugo Benichi
57ad8920d0 DO NOT MERGE IpConnectivityMetrics: rate limit ApfProgramEvents am: 75663bba77
am: 85dec4774c  -s ours

Change-Id: Ie3547d74cdbf3a5333f3951b9375b00224c2ecd0
2016-12-13 04:22:20 +00:00
Hugo Benichi
2ddf1ba79f Merge "DO NOT MERGE IpConnectivityMetrics reads buffer size in settings" into nyc-mr2-dev am: d5478d96d7
am: 04f341474d  -s ours

Change-Id: I1ad2490adc9266aeba0dd0b47c965ba395784106
2016-12-13 04:21:18 +00:00
Hugo Benichi
c79aa041d5 DO NOT MERGE IpConnectivityMetrics reads buffer size in settings am: 8e597e85f6
am: 82e85fedb6  -s ours

Change-Id: Iecbd16612359797223c1a8b2885f20bdcc71b543
2016-12-13 04:20:19 +00:00
Hugo Benichi
ee3a9865cf DO NOT MERGE IpConnectivity metrics: add version number am: 62e743bc9d
am: ee0f284908  -s ours

Change-Id: I3c7e1476cf46cd03ea77b3a9bdcf30264fe2bcd7
2016-12-13 04:16:21 +00:00
Hugo Benichi
e1d81d063b Merge "DO NOT MERGE IpConnectivityMetrics: rate limit ApfProgramEvents" into nyc-mr2-dev
am: 00cea2973c

Change-Id: If2878fe4eec7683077be32bf167e7a309035c7ce
2016-12-13 04:09:56 +00:00
Hugo Benichi
85dec4774c DO NOT MERGE IpConnectivityMetrics: rate limit ApfProgramEvents
am: 75663bba77

Change-Id: I266f7b8da58513b1e6c1a9c2b37e528ba777a7d6
2016-12-13 04:09:49 +00:00
Hugo Benichi
04f341474d Merge "DO NOT MERGE IpConnectivityMetrics reads buffer size in settings" into nyc-mr2-dev
am: d5478d96d7

Change-Id: I24685ad75f67a59e20190c5dbb28ef43fa5bc8f4
2016-12-13 04:08:26 +00:00
Hugo Benichi
82e85fedb6 DO NOT MERGE IpConnectivityMetrics reads buffer size in settings
am: 8e597e85f6

Change-Id: I5c433faa0d43202ae1169fdba4c42c09dd9c17dd
2016-12-13 04:08:18 +00:00
Hugo Benichi
ee0f284908 DO NOT MERGE IpConnectivity metrics: add version number
am: 62e743bc9d

Change-Id: Iccdf7d09ef4dc80f05c76774c456b5effb2c08c7
2016-12-13 04:05:08 +00:00
Hugo Benichi
9fc36e03ef Merge "Fix IP connectivity metrics tests" 2016-12-13 03:56:53 +00:00
Hugo Benichi
00cea2973c Merge "DO NOT MERGE IpConnectivityMetrics: rate limit ApfProgramEvents" into nyc-mr2-dev 2016-12-13 03:55:32 +00:00
Hugo Benichi
d5478d96d7 Merge "DO NOT MERGE IpConnectivityMetrics reads buffer size in settings" into nyc-mr2-dev 2016-12-13 03:54:24 +00:00
Hugo Benichi
363aa69fb2 Merge "Unit tests for NetworkNotificationManager" 2016-12-13 02:23:05 +00:00
Hugo Benichi
75663bba77 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
8e597e85f6 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
62e743bc9d 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
Hugo Benichi
313e0ea0c2 DO NOT MERGE Captive portal systel log improvements am: 47230f539a
am: d3c9fb118c  -s ours

Change-Id: Id6c15e6ed64f460f7f08c7358c751c1ab6dc8d2e
2016-12-13 00:43:49 +00:00
Hugo Benichi
d3c9fb118c DO NOT MERGE Captive portal systel log improvements
am: 47230f539a

Change-Id: Icbba206e8c035f566ff6d9e500d972a3dcf65bb6
2016-12-13 00:32:46 +00:00
Erik Kline
ef5d06d04c Merge "Stop setting net.dns{1234} system properties." am: 269d35f870 am: cc122a0d6c am: 43d5129fe5
am: f559069d8b

Change-Id: I63216568d2ec5606fdfe108d0263714238dc1886
2016-12-12 08:48:21 +00:00
Erik Kline
f559069d8b Merge "Stop setting net.dns{1234} system properties." am: 269d35f870 am: cc122a0d6c
am: 43d5129fe5

Change-Id: I38d6608f64076ffa3300255eb66c51c32e590b0f
2016-12-12 08:41:47 +00:00
Erik Kline
43d5129fe5 Merge "Stop setting net.dns{1234} system properties." am: 269d35f870
am: cc122a0d6c

Change-Id: I7d400352de4bc11204cd1ec8c9aeda5381cd4931
2016-12-12 08:35:20 +00:00
Erik Kline
cc122a0d6c Merge "Stop setting net.dns{1234} system properties."
am: 269d35f870

Change-Id: I9b31b281896995943ce8217c3230867db380a841
2016-12-12 08:29:14 +00:00
Treehugger Robot
269d35f870 Merge "Stop setting net.dns{1234} system properties." 2016-12-12 08:16:35 +00:00
Lorenzo Colitti
92849e4838 Merge changes from topic 'framework-net-aosp' am: 5ad2853426 am: 1a2fa0f372 am: 7fbb7d397d
am: c568d45d23

Change-Id: Ic6ee235cfbe3eea990f729de36119f8ce12a6a17
2016-12-09 11:25:03 +00:00
Hugo Benichi
9a6f9d224e DO NOT MERGE: frameworks-test: adding missing @SmallTest am: 787d3da986 -s ours am: 9f65f04157 -s ours am: 6bca82763d
am: c88e0b2ab3  -s ours

Change-Id: I349be4850debbdb6403ebf31d4478e800391bec5
2016-12-09 11:14:43 +00:00
Hugo Benichi
b2937ad61d DO NOT MERGE: Netd events: record connect() success/errno am: 74e67ae938 -s ours am: d84f932680 -s ours am: 3a00c6b08e
am: 5f35a1cd5c  -s ours

Change-Id: I04204d67dc2fb5b58d4769e69e905733e4e81f1e
2016-12-09 11:13:19 +00:00
Tony Mak
be557cb16b DO NOT MERGE: Show notification for always-on app VPN am: c777123d5c -s ours am: 118071a481 -s ours am: 22f0d5b47d
am: 2296ffa69d  -s ours

Change-Id: I785b6a367ceb5b032243659c80c08e43d8302671
2016-12-09 11:11:35 +00:00
Stephen Chen
88298cc8e1 DO NOT MERGE: Implement metered tracking for NetworkStats summary queries. am: 757658193d -s ours am: 3f5785260e -s ours am: 179fbd9c84
am: 4006015842  -s ours

Change-Id: I8d502d83e00fdc1cb295b32c557ab253f4b5c091
2016-12-09 11:10:40 +00:00
Hugo Benichi
b4f05acf17 DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings am: b1bddc92c5 -s ours am: a30ae5542b -s ours am: 858eef0c7d
am: 5b186cc142  -s ours

Change-Id: I13b634eaa559a2296c102d60c11e817b0af4ee5a
2016-12-09 11:06:30 +00:00
Hugo Benichi
ec08b52870 DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark am: 8436dae4c3 -s ours am: 0bef352535 -s ours am: 11051ef7f8
am: dfc0ec7c84  -s ours

Change-Id: I7bc91eaae2261bd152f3e9bb41c7ee70917a5d48
2016-12-09 11:05:31 +00:00
Felipe Leme
9f69ae3ba6 DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock. am: 6670ab4480 -s ours am: fbbaf25665 -s ours am: 2672fd0196
am: 94a8f25fc6  -s ours

Change-Id: Ic3005458ec91655ce105c70569877cf5dd8a920b
2016-12-09 11:02:22 +00:00
Felipe Leme
c039eb6818 DO NOT MERGE: Use @Ignore to explicitly disable a @Test method. am: b8a440f538 -s ours am: b296948b3b -s ours am: 38dd9dec90
am: 26ca4d4d4b  -s ours

Change-Id: I39e12c63872d13d0b8581d7385ee4c971283da9a
2016-12-09 11:01:32 +00:00
Felipe Leme
b504546bb4 DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4. am: 00a6e6c111 -s ours am: 82393f7b98 -s ours am: 0866b93abf
am: 2418431e4a  -s ours

Change-Id: I9979e5411c032f500995efe7c83df31d40fda0f5
2016-12-09 11:00:02 +00:00
Jeremy Joslin
40af2d67f5 DO NOT MERGE: VPN network stat accounting changes. am: 8c7be6114c -s ours am: 12bb3f057b -s ours am: 652c3e59e9
am: 826d4ea141  -s ours

Change-Id: I356877d99b1304777d3d9103e9e0d421b1bb112b
2016-12-09 10:59:11 +00:00
Hugo Benichi
7cf79c1b99 DO NOT MERGE: ConnectivityThread: use lazy holder idiom am: 8f201294fe -s ours am: f6cb43ae32 -s ours am: fde28b4f2b
am: 8e2798c72d  -s ours

Change-Id: Iafa9ac6e49566a7165c2c586128c8e663e6a1b9a
2016-12-09 10:58:23 +00:00
Hugo Benichi
9614021975 DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper am: 301b09738a -s ours am: 7337239702 -s ours am: 8358a5fbdf
am: 4a9ef15314  -s ours

Change-Id: I649b6bcd026ad86055fa6cbe59cb85e0141d22b8
2016-12-09 10:57:34 +00:00
Hugo Benichi
a093394482 DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler am: 56260ed9cb -s ours am: ef148edaa2 -s ours am: 7135d5e6f2
am: d886103e29  -s ours

Change-Id: I07908e3f1734503e58bbf62586dbfc3a6c1f887a
2016-12-09 10:56:27 +00:00
Jeremy Klein
f78d3f1804 DO NOT MERGE: Add a null check for the OnStartTetheringCallback. am: fb63d5a4ef -s ours am: 3cd1ae2261 -s ours am: aa7506310c
am: 14667351d8  -s ours

Change-Id: I9d5983d4f197d7cedb841081f48291288359988a
2016-12-09 10:53:51 +00:00
Lorenzo Colitti
c568d45d23 Merge changes from topic 'framework-net-aosp' am: 5ad2853426 am: 1a2fa0f372
am: 7fbb7d397d

Change-Id: Idb0e86655f5d4f835796f5ebe31da99e419d66bf
2016-12-09 10:53:48 +00:00
Hugo Benichi
c88e0b2ab3 DO NOT MERGE: frameworks-test: adding missing @SmallTest am: 787d3da986 -s ours am: 9f65f04157 -s ours
am: 6bca82763d

Change-Id: Ib6a8f4b7ca365ab5cb42b9e57311228be273075a
2016-12-09 10:40:12 +00:00
Hugo Benichi
5f35a1cd5c DO NOT MERGE: Netd events: record connect() success/errno am: 74e67ae938 -s ours am: d84f932680 -s ours
am: 3a00c6b08e

Change-Id: Ic83b2d46bc4d25878c70c0a02d39f14ecbeab84f
2016-12-09 10:39:20 +00:00
Tony Mak
2296ffa69d DO NOT MERGE: Show notification for always-on app VPN am: c777123d5c -s ours am: 118071a481 -s ours
am: 22f0d5b47d

Change-Id: I871444d296f0c49f587e98d1e0b760846da37c13
2016-12-09 10:37:38 +00:00
Stephen Chen
4006015842 DO NOT MERGE: Implement metered tracking for NetworkStats summary queries. am: 757658193d -s ours am: 3f5785260e -s ours
am: 179fbd9c84

Change-Id: Ic0f11bdb50d43c0dd9c449ae3c784b0214b865e3
2016-12-09 10:36:45 +00:00
Hugo Benichi
5b186cc142 DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings am: b1bddc92c5 -s ours am: a30ae5542b -s ours
am: 858eef0c7d

Change-Id: Iebd06f7c03b2068314c24a14a2b38d2413b88536
2016-12-09 10:32:40 +00:00
Hugo Benichi
dfc0ec7c84 DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark am: 8436dae4c3 -s ours am: 0bef352535 -s ours
am: 11051ef7f8

Change-Id: I7379d8223778d3f2df97d88c0d6f291df219c579
2016-12-09 10:31:27 +00:00
Felipe Leme
94a8f25fc6 DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock. am: 6670ab4480 -s ours am: fbbaf25665 -s ours
am: 2672fd0196

Change-Id: I4aa888c55824eba58b7e0af78b510a144608e704
2016-12-09 10:28:28 +00:00
Felipe Leme
26ca4d4d4b DO NOT MERGE: Use @Ignore to explicitly disable a @Test method. am: b8a440f538 -s ours am: b296948b3b -s ours
am: 38dd9dec90

Change-Id: Icaa4e18775b6e810738fb9d180ea20f7ce5c4506
2016-12-09 10:27:35 +00:00
Felipe Leme
2418431e4a DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4. am: 00a6e6c111 -s ours am: 82393f7b98 -s ours
am: 0866b93abf

Change-Id: I4acc3df60493e5ac388772f8c0e22ac92bc3ce4c
2016-12-09 10:26:08 +00:00