Commit Graph

3094 Commits

Author SHA1 Message Date
Hugo Benichi
fce1a04cc7 DO NOT MERGE Captive portal systel log improvements
This patch improves system logging around captive portal detection to
make inspection of bug reports sligthly easier:

- NetworkMonitor now logs by default CMD_CAPTIVE_PORTAL_RECHECK and
  CMD_CAPTIVE_PORTAL_APP_FINISHED. Other system logs are kept off with
  a new VDBG boolean contant,
- NetworkNotificationManager now prints the notification id at
  notification time. This allows to easily correlate show and clear.
- errors in NetworkNotificationManager are logged as Throwable instead
  of through their implicit toString() method.

Test: $ runtest frameworks-net
Bug: 32198726

(cherry picked from commit 2a3998dd05)

Change-Id: I1eaab5ea702063dde3e23324d3a1b3dc172c5ac5
2017-01-05 12:09:35 +09:00
Hugo Benichi
79a968d619 DO NOT MERGE Fix flaky IpPrefixTest.
Test: IpPrefixTest passes
Bug: 32561414

(cherry picked from commit f5ec69155d)

Change-Id: I42928da87f7f336900b3a95ebbf28563864da8d4
2017-01-05 12:07:38 +09:00
Hugo Benichi
29a41b05d1 NetworkNotificationManager: remove spammy log
am: 02e5966fac

Change-Id: I01785760854cd040c0d09f76e3832bbb7986dc4e
2016-12-22 03:02:39 +00:00
Hugo Benichi
02e5966fac NetworkNotificationManager: remove spammy log
Test: build, flashed, booted phone.
Bug: 32198726
Change-Id: I3ac2f07c756f48653195f6198aaee4d8b3939fb5
2016-12-22 09:51:01 +09:00
Hugo Benichi
4ff0a309da DO NOT MERGE Stricter NetworkNotificationManagerTest
am: 3cb1d2b45d

Change-Id: I94ea5c6994d181e730ec4f49e98001eb81ed8740
2016-12-20 06:49:08 +00:00
Paul Stewart
99ce10284e DO NOT MERGE Fix other String.format issues in NetworkNotificationManager.java
am: c39ecf10e0

Change-Id: I79c4129b861b9dd93ac14acce5a86aadd48e8d39
2016-12-20 05:04:46 +00:00
Joe LaPenna
b90b204141 DO NOT MERGE Fix malformed log statement.
am: 1360fb4b3b

Change-Id: Ie52f24f39305f325e01972f5046247482053db28
2016-12-20 05:04:02 +00:00
Hugo Benichi
3cb1d2b45d DO NOT MERGE Stricter NetworkNotificationManagerTest
This patch changes NetworkNotificationManagerTest to populate extraInfo
of NetworkInfo in order to catch regressions in malformed format Strings
of log statements in NetworkNotificationManager.

Test: verified that the test fails when reintroducing the format String
bug.
Bug: 33737715

Change-Id: If14063554b8246d9d80cd222cb41c30dee121c5a
2016-12-20 05:02:28 +00:00
Paul Stewart
c39ecf10e0 DO NOT MERGE Fix other String.format issues in NetworkNotificationManager.java
Commit fb2609d3eee1c7a4dda889c000f32183a044978a added a string
format which caused an exception.  On top of the fixes to this
from e1406167186c2cabe683b3c1511ad6733e9106c9, we can also fix
a few more issues here with some missing arguments to other
String.format invocations in the aforementioned CL, and other
formatting problems.

Bug: 33737715
Test: Build and run SUW

(cherry picked from commit 835cb49639fc7cb75819564fa15f2f5a0bd5dee2)

Change-Id: I40064d3e1a0f0300c43bdbc51839b579a5394a36
2016-12-20 12:31:49 +09:00
Joe LaPenna
1360fb4b3b DO NOT MERGE Fix malformed log statement.
Introduced in I1201d1d4fab8183dd83449c2afb2c35cfece883f

BUG: 33746580

Test: built, triggered notification, no crash.

(cherry picked from commit e1406167186c2cabe683b3c1511ad6733e9106c9)

Change-Id: I50594ad865e6f95abc5c67c58af604ef2aa88f9b
2016-12-20 12:31:45 +09:00
Hugo Benichi
2eceb602b2 Merge changes I1450c126,I8926a922,I54403377,Idf216797 into nyc-mr2-dev
am: e1eeda60e9

Change-Id: Ia780475dbbd9ebd58f5bcc9cefa74108f48ca53b
2016-12-19 08:40:43 +00:00
Hugo Benichi
be1ee11ee7 DO NOT MERGE IP Connectivity metrics: add connect() statistics
am: 3ffb9c2099

Change-Id: I7ad93b1b3a3446ffd6dce7c0799ddb9a2b43955f
2016-12-19 08:40:37 +00:00
Hugo Benichi
9b3e6c82d1 DO NOT MERGE Fix IP connectivity metrics tests
am: 9bf9c9b375

Change-Id: Ia6a28b09263729caa72786062e134f8c684e3ccb
2016-12-19 08:39:55 +00:00
Hugo Benichi
e1eeda60e9 Merge changes I1450c126,I8926a922,I54403377,Idf216797 into nyc-mr2-dev
* changes:
  DO NOT MERGE IP Connectivity metrics: add connect() statistics
  DO NOT MERGE Fix IP connectivity metrics tests
  DO NOT MERGE IP connectivity metrics: introduce ConnectStatistics and DNS statistics
  DO NOT MERGE IP connectivity metrics: add transport field.
2016-12-19 08:31:17 +00:00
Hugo Benichi
9371a57fe3 Merge changes Iadf7f15d,I74702938,Ib8a725cd into nyc-mr2-dev
am: bd60fb5863

Change-Id: I09bbd93408e2de8b4ce159a7b22d3650a04ba081
2016-12-19 08:29:30 +00:00
Hugo Benichi
4adf1530db DO NOT MERGE Network notifications: revamp keying scheme
am: e9c9d4bf0c

Change-Id: Ibad7d0210b2c69826462b781f43a82d65849ebfb
2016-12-19 08:29:23 +00:00
Hugo Benichi
d7d78934af DO NOT MERGE Unit tests for NetworkNotificationManager
am: 3ca8a0d539

Change-Id: I873ea4a5625c526d61017967604305ada548f907
2016-12-19 08:29:11 +00:00
Hugo Benichi
bd60fb5863 Merge changes Iadf7f15d,I74702938,Ib8a725cd into nyc-mr2-dev
* changes:
  DO NOT MERGE Network notifications: revamp keying scheme
  DO NOT MERGE Define Network notification proto constants.
  DO NOT MERGE Unit tests for NetworkNotificationManager
2016-12-19 08:25:32 +00:00
Hugo Benichi
7aefeec9b3 Captive portals: login activity probes like NetworkMonitor
am: 454e066e27

Change-Id: Ie85df7dd734b872cc361d0820edbfffc928f9f3a
2016-12-19 02:07:41 +00:00
Hugo Benichi
454e066e27 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
Android Build Merger (Role)
4a2dd0e9b5 Merge "docs: changes to broadcast documentation am: 3e422ac3cc am: 276e436a24 am: 9e0c74f54c" into nyc-mr2-dev-plus-aosp 2016-12-16 05:15:15 +00:00
Mark Lu
3bddf473a1 docs: changes to broadcast documentation am: 3e422ac3cc am: 276e436a24
am: 9e0c74f54c

Change-Id: I84b0410fcef3bea08c5636927864298d30989308
2016-12-16 05:14:40 +00:00
Mark Lu
f92e4912ea docs: changes to broadcast documentation am: 3e422ac3cc am: 276e436a24
am: ec5096b07a

Change-Id: I18b47ba01b0af8882c25526d8823f263f456aae2
2016-12-16 05:14:34 +00:00
Mark Lu
ec5096b07a docs: changes to broadcast documentation am: 3e422ac3cc
am: 276e436a24

Change-Id: I2e8377b188ce6a10ea633e089c3a20f9ef7908fd
2016-12-16 05:06:42 +00:00
Mark Lu
9e0c74f54c docs: changes to broadcast documentation am: 3e422ac3cc
am: 276e436a24

Change-Id: I7dcb1bc57fb62f2b177c7ad15a9236da98fb749f
2016-12-16 05:06:37 +00:00
Mark Lu
276e436a24 docs: changes to broadcast documentation
am: 3e422ac3cc

Change-Id: I673efc100756ee6d6ef0d2afa99d48d471ce0987
2016-12-16 04:59:08 +00:00
Hugo Benichi
3ffb9c2099 DO NOT MERGE 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

(cherry picked from commit 4f71a15973f7048076ed10f63d708f020e1a21e0)

Change-Id: I1450c126b90b628d9f1c73ddf054b4742f5e84c5
2016-12-15 22:56:36 +09:00
Erik Kline
7452d409e7 Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity." am: 80ff5ecd4a am: 4f4a914a0f
am: c372b4ba35

Change-Id: I05da79d601d412270a71026bbbad3c516a785422
2016-12-15 12:35:13 +00:00
Hugo Benichi
9bf9c9b375 DO NOT MERGE Fix IP connectivity metrics tests
So that test assumptions match previous changes in ipconnectivity.proto.

This patch also tags metrics tests with @SmallTest.

Test: $ runtest frameworks-net
Bug: 32561414
Bug: 32198976

(cherry picked from commit 80df43ea8a4286f2b7e0678be35dbca3f16f3766)

Change-Id: I8926a92248ac2d46fc78749afc40bc5f0de10878
2016-12-15 21:31:25 +09:00
Erik Kline
c372b4ba35 Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity." am: 80ff5ecd4a
am: 4f4a914a0f

Change-Id: Ib46bdab897cef221f4c22326e562130822d42298
2016-12-15 12:28:41 +00:00
Erik Kline
4f4a914a0f 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
Hugo Benichi
e9c9d4bf0c DO NOT MERGE 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

(cherry picked from commit fb2609d3eee1c7a4dda889c000f32183a044978a)

Change-Id: Iadf7f15da38de28587090ed0395f15c24d4ad442
2016-12-15 20:31:11 +09:00
Erik Kline
63c2cd962a Have IpManager track L2-L4 signaling traffic required for IP connectivity.
am: 929ed666b5

Change-Id: Ie95309464d8f368f5040c74b59daba9700191e86
2016-12-15 10:13:36 +00:00
Erik Kline
867dfd1057 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
Erik Kline
929ed666b5 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
f61f77a380 Merge "More correct startup and shutdown procedures." am: 8a825051a2 am: 7b5f0a82d0
am: 84a2a19c36

Change-Id: I8c1e0b235808635a910262a65530e655408cc5d8
2016-12-15 05:40:17 +00:00
Erik Kline
84a2a19c36 Merge "More correct startup and shutdown procedures." am: 8a825051a2
am: 7b5f0a82d0

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

(cherry picked from commit 74264329da5c52fbbafc1d20457056fdeabe19dc)

Change-Id: Ib8a725cdd8c708ccb9cffad62321e0db8b27e593
2016-12-15 14:32:02 +09:00
Erik Kline
7b5f0a82d0 Merge "More correct startup and shutdown procedures."
am: 8a825051a2

Change-Id: I4844130b04ded0fc913593081d07a6052bdc0e42
2016-12-15 05:25:48 +00:00
Treehugger Robot
8a825051a2 Merge "More correct startup and shutdown procedures." 2016-12-15 05:10:11 +00:00
Erik Kline
679d496620 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
Erik Kline
928b1db69e Merge "More correct startup and shutdown procedures." into nyc-mr2-dev
am: eede3e7f7b

Change-Id: Ib017af2b267689c0833b92c13f29da1d2e69a011
2016-12-14 11:39:44 +00:00
Erik Kline
5c75a5c2cc More correct startup and shutdown procedures.
am: 79308eb129

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

Change-Id: I7952d67d22a141040f3ee3ac2b6c3aa2cfccbbf7
2016-12-14 10:50:36 +00:00
Erik Kline
79308eb129 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
b71d43fe69 Merge "Stop setting net.hostname" am: 5603f5aabc am: af3207bddd
am: 5adcdbad97

Change-Id: I9976537d761a761e9aeca5cb15298f689032664f
2016-12-14 08:13:30 +00:00
Erik Kline
5adcdbad97 Merge "Stop setting net.hostname" am: 5603f5aabc
am: af3207bddd

Change-Id: Id261566422c4af7a3ce65877ba04b0a401685c23
2016-12-14 08:07:01 +00:00
Erik Kline
af3207bddd Merge "Stop setting net.hostname"
am: 5603f5aabc

Change-Id: Id03d2f8bf6fa8b447c5f32d3d2a51faef193ba62
2016-12-14 07:59:59 +00:00
Treehugger Robot
5603f5aabc Merge "Stop setting net.hostname" 2016-12-14 07:51:00 +00:00