Commit Graph

3257 Commits

Author SHA1 Message Date
Hugo Benichi
a68bf9adea DO NOT MERGE Unit tests for NetworkNotificationManager am: f9b95ad8f3
am: 567cf7c47d  -s ours

Change-Id: Idd8f1032790fea21bf69a7e8e00744f0a1e5c3c5
2016-12-19 18:33:39 +00:00
Hugo Benichi
08ad0b7525 Captive portals: login activity probes like NetworkMonitor am: dce21c52bf
am: 9061297f0d

Change-Id: I57a5a1a92385d4a3bf2fdd6bedeaf93430ecc158
2016-12-19 18:29:41 +00:00
Hugo Benichi
567cf7c47d DO NOT MERGE Unit tests for NetworkNotificationManager
am: f9b95ad8f3

Change-Id: I873ea4a5625c526d61017967604305ada548f907
2016-12-19 08:29:11 +00:00
Hugo Benichi
9061297f0d Captive portals: login activity probes like NetworkMonitor
am: dce21c52bf

Change-Id: Ie85df7dd734b872cc361d0820edbfffc928f9f3a
2016-12-19 02:07:41 +00:00
Hugo Benichi
dce21c52bf Captive portals: login activity probes like NetworkMonitor
This patch changes CaptivePortalLoginActivity captive portal test to be
consistent with NetworkMonitor by:
 - using Network.java to open the http connection.
 - adding a UserAgent property to the request header.

Test: manually tested.
Bug: 32369183
Change-Id: I33cbcdab9809c712d998da6d925bdd4e3093f8ff
2016-12-19 09:19:13 +09:00
Mark Lu
893dcb17ac Merge "docs: changes to broadcast documentation am: e1682a08b7 am: 538a5cf796 am: c4fe74f7f2" into nyc-mr2-dev-plus-aosp
am: 6fb51da60a

Change-Id: I2fcd1cda185dc2b3583624ea1ad08e0bcde9a28f
2016-12-16 05:31:35 +00:00
Mark Lu
dd266bcf6a docs: changes to broadcast documentation am: e1682a08b7 am: 538a5cf796 am: c4fe74f7f2
am: fa02b61bd9

Change-Id: Ib6e3f02b97b57a6cb0bed778fed97f39367ad372
2016-12-16 05:31:26 +00:00
Mark Lu
a35f0ad98f docs: changes to broadcast documentation am: e1682a08b7 am: 538a5cf796 am: 2157cf135a
am: 3dffb146df

Change-Id: I2dcb6bc7f8ebf385bc7d6a571a760c140a65e9fb
2016-12-16 05:30:20 +00:00
Android Build Merger (Role)
6fb51da60a Merge "docs: changes to broadcast documentation am: e1682a08b7 am: 538a5cf796 am: c4fe74f7f2" into nyc-mr2-dev-plus-aosp 2016-12-16 05:15:15 +00:00
Mark Lu
fa02b61bd9 docs: changes to broadcast documentation am: e1682a08b7 am: 538a5cf796
am: c4fe74f7f2

Change-Id: I84b0410fcef3bea08c5636927864298d30989308
2016-12-16 05:14:40 +00:00
Mark Lu
3dffb146df docs: changes to broadcast documentation am: e1682a08b7 am: 538a5cf796
am: 2157cf135a

Change-Id: I18b47ba01b0af8882c25526d8823f263f456aae2
2016-12-16 05:14:34 +00:00
Mark Lu
2157cf135a docs: changes to broadcast documentation am: e1682a08b7
am: 538a5cf796

Change-Id: I2e8377b188ce6a10ea633e089c3a20f9ef7908fd
2016-12-16 05:06:42 +00:00
Mark Lu
c4fe74f7f2 docs: changes to broadcast documentation am: e1682a08b7
am: 538a5cf796

Change-Id: I7dcb1bc57fb62f2b177c7ad15a9236da98fb749f
2016-12-16 05:06:37 +00:00
Mark Lu
538a5cf796 docs: changes to broadcast documentation
am: e1682a08b7

Change-Id: I673efc100756ee6d6ef0d2afa99d48d471ce0987
2016-12-16 04:59:08 +00:00
TreeHugger Robot
05d915adba Merge "IP Connectivity metrics: add connect() statistics" 2016-12-15 16:09:18 +00:00
Hugo Benichi
c1329a2874 IP Connectivity metrics: add connect() statistics
This patch adds a ConnectStats class to aggregate connect() statistics
gathered in NetdEventListenerService. ConnectStats is uploaded once a
day by IpConnectivityMetrics.

Test: $ runtest frameworks-net + new unit test
Bug: 32198976
Change-Id: Iea63339035415513a5ba0ff4b8f4d79f75fc652d
2016-12-15 22:53:53 +09:00
Erik Kline
028fa0af62 Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity." am: 80ff5ecd4a am: 479b8c3a2c am: 86abfb03b9
am: cecf9952da

Change-Id: Icd6e6452cfb2f1ee460851db95fa42f8d25f3279
2016-12-15 12:43:16 +00:00
Erik Kline
cecf9952da Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity." am: 80ff5ecd4a am: 479b8c3a2c
am: 86abfb03b9

Change-Id: I05da79d601d412270a71026bbbad3c516a785422
2016-12-15 12:35:13 +00:00
Erik Kline
86abfb03b9 Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity." am: 80ff5ecd4a
am: 479b8c3a2c

Change-Id: Ib46bdab897cef221f4c22326e562130822d42298
2016-12-15 12:28:41 +00:00
Erik Kline
479b8c3a2c Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity."
am: 80ff5ecd4a

Change-Id: If85702e1cc44967841ab91d723aa627862bcda21
2016-12-15 12:22:06 +00:00
Erik Kline
bfdf051585 Have IpManager track L2-L4 signaling traffic required for IP connectivity. am: 4adb18679e
am: cdb620fbcb

Change-Id: Iccd81c5d722a14409fc4f22bc34c3607bca653da
2016-12-15 10:21:08 +00:00
Erik Kline
cdb620fbcb Have IpManager track L2-L4 signaling traffic required for IP connectivity.
am: 4adb18679e

Change-Id: Ie95309464d8f368f5040c74b59daba9700191e86
2016-12-15 10:13:36 +00:00
Erik Kline
4abe144dd7 Have IpManager track L2-L4 signaling traffic required for IP connectivity.
Test: as follows
    - built and flashed
    - observed logcat
    - observed "dumpsys wifi ipmanager"
    - runtest BlockingSocketReaderTest passes
    - runtest ConnectivityPacketSummaryTest passes
Bug: 21859053
Bug: 26101306
Bug: 31742572
Bug: 31707128
Bug: 33531488

Change-Id: Ibecaf809dcc1813924b25749e8ba8eb2d4bdf114
2016-12-15 19:09:49 +09:00
TreeHugger Robot
b10d6c022e Merge "Network notifications: revamp keying scheme" 2016-12-15 09:26:58 +00:00
Erik Kline
4adb18679e Have IpManager track L2-L4 signaling traffic required for IP connectivity.
Test: as follows
    - built and flashed
    - observed logcat
    - observed "dumpsys wifi ipmanager"
    - runtest BlockingSocketReaderTest passes
    - runtest ConnectivityPacketSummaryTest passes
Bug: 21859053
Bug: 26101306
Bug: 31742572
Bug: 31707128
Bug: 33531488

Change-Id: Ibecaf809dcc1813924b25749e8ba8eb2d4bdf114
2016-12-15 17:16:48 +09:00
Erik Kline
eb20d07be1 Merge "More correct startup and shutdown procedures." am: 0530b1e65d am: 22c6c1a5b2 am: fec0502419
am: 7590d5d5ba

Change-Id: Ia55c27ee51892a7dc29f2e1f1379eb8312cf3cb3
2016-12-15 05:47:25 +00:00
Erik Kline
7590d5d5ba Merge "More correct startup and shutdown procedures." am: 0530b1e65d am: 22c6c1a5b2
am: fec0502419

Change-Id: I8c1e0b235808635a910262a65530e655408cc5d8
2016-12-15 05:40:17 +00:00
Erik Kline
fec0502419 Merge "More correct startup and shutdown procedures." am: 0530b1e65d
am: 22c6c1a5b2

Change-Id: I8a2bcab3b9373d2573601fa3bffa123020b3fbae
2016-12-15 05:32:50 +00:00
Hugo Benichi
f9b95ad8f3 DO NOT MERGE Unit tests for NetworkNotificationManager
Test: new unit test, no functional changes.
Bug: 32198726

(cherry picked from commit 20904677af)

Change-Id: Ib8a725cdd8c708ccb9cffad62321e0db8b27e593
2016-12-15 14:32:02 +09:00
Erik Kline
22c6c1a5b2 Merge "More correct startup and shutdown procedures."
am: 0530b1e65d

Change-Id: I4844130b04ded0fc913593081d07a6052bdc0e42
2016-12-15 05:25:48 +00:00
Treehugger Robot
0530b1e65d Merge "More correct startup and shutdown procedures." 2016-12-15 05:10:11 +00:00
Erik Kline
46e27d950b More correct startup and shutdown procedures.
During IpManager startup, anything sending messages to the state machine
must not begin doing so until after the state machine has been started.
Reorder the constructor accordingly.

During shutdown, AvoidBadWifiTracker needs to unregister the registered
BroadcastReceiver and might as well also unregister the ContentObserver.

Test: backport from internal
Bug: 33388922
Change-Id: I58e07f7ccddaab160c153bcfb69fd45f50bb8710
2016-12-15 10:43:41 +09:00
Hugo Benichi
51727428fc 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
Erik Kline
04ad778465 Merge "More correct startup and shutdown procedures." into nyc-mr2-dev am: ae8bdd4525
am: 14b5952d9b

Change-Id: I1385649a71bdba3f19fd863bd4a3ace66d56b568
2016-12-14 11:47:22 +00:00
Erik Kline
b9631bfd28 More correct startup and shutdown procedures. am: af209807ce
am: 205f7599df

Change-Id: I5096f6a6f3d42bd55b9d3c80e279f2ee2fb0a795
2016-12-14 11:46:26 +00:00
Erik Kline
14b5952d9b Merge "More correct startup and shutdown procedures." into nyc-mr2-dev
am: ae8bdd4525

Change-Id: Ib017af2b267689c0833b92c13f29da1d2e69a011
2016-12-14 11:39:44 +00:00
Erik Kline
205f7599df More correct startup and shutdown procedures.
am: af209807ce

Change-Id: Ib488e0cb49da2d3f655e189600f839721ea73358
2016-12-14 11:39:36 +00:00
TreeHugger Robot
ae8bdd4525 Merge "More correct startup and shutdown procedures." into nyc-mr2-dev 2016-12-14 11:33:38 +00:00
Michal Karpinski
94ecf621a5 DO NOT MERGE [DPM] DO can start network logging and listen for events am: 7260c83c0d
am: fbffd00d49  -s ours

Change-Id: I4fbfb006f8d5d398cae5e593fd4ce905b6c50f94
2016-12-14 11:08:38 +00:00
Michal Karpinski
fbffd00d49 DO NOT MERGE [DPM] DO can start network logging and listen for events
am: 7260c83c0d

Change-Id: I7952d67d22a141040f3ee3ac2b6c3aa2cfccbbf7
2016-12-14 10:50:36 +00:00
Erik Kline
af209807ce More correct startup and shutdown procedures.
During IpManager startup, anything sending messages to the state machine
must not begin doing so until after the state machine has been started.
Reorder the constructor accordingly.

During shutdown, AvoidBadWifiTracker needs to unregister the registered
BroadcastReceiver and might as well also unregister the ContentObserver.

Bug: 33388922
Change-Id: I58e07f7ccddaab160c153bcfb69fd45f50bb8710
2016-12-14 18:53:26 +09:00
Erik Kline
e4bb6883da Merge "Stop setting net.hostname" am: 042b78ef5e am: 06c37fff06 am: 2c062156df
am: 4559839045

Change-Id: Id89ab1373d9cf633d9fae45131f18eabc200a8f9
2016-12-14 08:21:04 +00:00
Erik Kline
4559839045 Merge "Stop setting net.hostname" am: 042b78ef5e am: 06c37fff06
am: 2c062156df

Change-Id: I9976537d761a761e9aeca5cb15298f689032664f
2016-12-14 08:13:30 +00:00
Erik Kline
2c062156df Merge "Stop setting net.hostname" am: 042b78ef5e
am: 06c37fff06

Change-Id: Id261566422c4af7a3ce65877ba04b0a401685c23
2016-12-14 08:07:01 +00:00
Erik Kline
06c37fff06 Merge "Stop setting net.hostname"
am: 042b78ef5e

Change-Id: Id03d2f8bf6fa8b447c5f32d3d2a51faef193ba62
2016-12-14 07:59:59 +00:00
Treehugger Robot
042b78ef5e Merge "Stop setting net.hostname" 2016-12-14 07:51:00 +00:00
Erik Kline
06da441cfa Stop setting net.hostname
Test: as follows
    - basics:
        - built
        - flashed
        - booted
    - connect to {v4-only, dualstack, v6-only} networks
        - verified expected connectivity on each
    - runtest frameworks-net
Bug: 30979015

Change-Id: I65e9878c7b8eaddaba1c0e1b8566ddfa0760047f
2016-12-14 13:11:15 +09:00
Mark Lu
e1682a08b7 docs: changes to broadcast documentation
- move BroadcastReceiver info to developer guide. see cl/140402421
- add usage note to CONNECTIVITY_ACTION broadcast

bug:32533262
bug:33106411

Change-Id: Ic2aa517831d29418e0c42aa6fc1e7f9aeb50f802
2016-12-13 18:28:32 -08:00
Michal Karpinski
7260c83c0d 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
Hugo Benichi
2294097af9 Merge "DO NOT MERGE IpConnectivityMetrics: rate limit ApfProgramEvents" into nyc-mr2-dev am: 8c584ea6d6
am: f35e5b53cd  -s ours

Change-Id: I9810fd2fec02285cc8c09ed10cb8386fadd15738
2016-12-13 04:23:21 +00:00