42148 Commits

Author SHA1 Message Date
Hugo Benichi
6b480eca3f DO NOT MERGE Fix IP connectivity metrics tests
am: 93c0de0a35

Change-Id: Ia6a28b09263729caa72786062e134f8c684e3ccb
2016-12-19 08:39:55 +00:00
Hugo Benichi
3fc3dc2602 DO NOT MERGE IP connectivity metrics: introduce ConnectStatistics and DNS statistics
am: 097bde6c8f

Change-Id: Ibe6d3945cda64f55c6aab7ef4fc4a6cd8a6daf05
2016-12-19 08:38:54 +00:00
Hugo Benichi
66346ab78c DO NOT MERGE IP connectivity metrics: add transport field.
am: 4c9d3f19cd

Change-Id: I1e6b0f9e7b8f2e2808d85e302fdd3ca1dc4d5a41
2016-12-19 08:38:10 +00:00
Hugo Benichi
7f907b0341 DO NOT MERGE Network notifications: revamp keying scheme
am: 84daaea8fd

Change-Id: Ibad7d0210b2c69826462b781f43a82d65849ebfb
2016-12-19 08:29:23 +00:00
Hugo Benichi
04507a635b DO NOT MERGE Unit tests for NetworkNotificationManager
am: d3da17a260

Change-Id: I873ea4a5625c526d61017967604305ada548f907
2016-12-19 08:29:11 +00:00
Hugo Benichi
2f30e611eb DO NOT MERGE Netd events: record connect() success/errno
am: e8fe0aaab9

Change-Id: Ia9d271d4dac362e930c7c3463bdbafd9a85ca739
2016-12-19 06:00:28 +00:00
Hugo Benichi
403ea607a5 Captive portals: login activity probes like NetworkMonitor
am: cdf3ba48cc

Change-Id: Ie85df7dd734b872cc361d0820edbfffc928f9f3a
2016-12-19 02:07:41 +00:00
Hugo Benichi
cdf3ba48cc 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
Tamas Berghammer
f00963c71f Enable logwrapper functionality on user builds am: 0ca16fa584 am: db05d4b4ed
am: ed8757a761

Change-Id: I0f27f6aeb58690addb1c5f7978047ccb8d73ab84
2016-12-16 19:54:58 +00:00
Tamas Berghammer
b8d0e4d9fc Zygote: Add invoke-with to zygote protocol am: b8f7c351b9 am: 45c2fffc52
am: d71bb300e6

Change-Id: Ied54640c44ade52abd6a905526ba7789be14a332
2016-12-16 19:54:11 +00:00
Tamas Berghammer
ed8757a761 Enable logwrapper functionality on user builds am: 0ca16fa584
am: db05d4b4ed

Change-Id: Ic6c3395f9965657a7f9abe580867eeb81b59ed88
2016-12-16 19:46:55 +00:00
Tamas Berghammer
d71bb300e6 Zygote: Add invoke-with to zygote protocol am: b8f7c351b9
am: 45c2fffc52

Change-Id: I90999d84c9694bfeebea8d2c2d95d1d545bac7e8
2016-12-16 19:46:03 +00:00
Tamas Berghammer
db05d4b4ed Enable logwrapper functionality on user builds
am: 0ca16fa584

Change-Id: Ic18991f9a59f05356fcbcc65acc79be43fc68542
2016-12-16 19:38:38 +00:00
Tamas Berghammer
45c2fffc52 Zygote: Add invoke-with to zygote protocol
am: b8f7c351b9

Change-Id: I79db6f759b02ef612364fc857102615d51900cd9
2016-12-16 19:37:57 +00:00
Tamas Berghammer
0ca16fa584 Enable logwrapper functionality on user builds
When an app is debuggable, check whether a script called "wrap.sh" exists
in the app's native library directory. If so, start the app using the
invoke-with functionality over the script. Weaken the invoke-with check
on the zygote side to allow the functionality for debuggable apps.

The goal of the functionality is to make malloc debug, strace and other
similar tools available for NDK based application developers.

Bug: 33668201
Test: manual - debug malloc can be enabled using the new feature
Change-Id: Ia4bec0854cf4dc08446f1671494200f54ef366ee
2016-12-16 09:03:06 -08:00
Tamas Berghammer
b8f7c351b9 Zygote: Add invoke-with to zygote protocol
Add "--invoke-with" to the zygote connection protocol. It was
already understood as an argument by the zygote.

Bug: 33668201
Test: m
Change-Id: I59095f2ac542aadff78a7ff1dded86cf5f192707
2016-12-16 09:03:01 -08:00
Ruben Brunk
cc43150bd7 Don't call into VrManagerService with AM lock.
am: 27b53cfe88

Change-Id: I9670487f160e9ef2af6b8da250943c7ad4749e5d
2016-12-16 09:05:54 +00:00
Ruben Brunk
27b53cfe88 Don't call into VrManagerService with AM lock.
Bug: 33655854
Merged-In: If777e0ef40b29bff42722f2aa10cff86a5831bc0
Change-Id: I365d0033cf20172cee57b0ef2a53dd8648640c8d
2016-12-15 20:50:32 -08:00
dcashman
aa9ada00e6 Split mac_permissions.xml into plat and non-plat components. am: b1cc4f8ca4 am: 2a7ce100b7
am: 46d6966f43

Change-Id: I99def3496b5319c2dd717b02fe28d9c691b47880
2016-12-15 20:48:20 +00:00
dcashman
46d6966f43 Split mac_permissions.xml into plat and non-plat components. am: b1cc4f8ca4
am: 2a7ce100b7

Change-Id: I9d0e0f824fdc26c64d41f97b370f7483b63b97c5
2016-12-15 20:41:14 +00:00
dcashman
2a7ce100b7 Split mac_permissions.xml into plat and non-plat components.
am: b1cc4f8ca4

Change-Id: I4c3d3a9c088c4cfc75f5503966390030e1375305
2016-12-15 20:27:27 +00:00
Phil Weaver
037692d5ab Add null check to a11y interrupt. am: 74f9e1b867
am: 718f403b50

Change-Id: I9d70640813bd91e035f9614f0403e18b7706e53f
2016-12-15 19:12:02 +00:00
Phil Weaver
278782f275 Add null check to a11y interrupt.
am: 74f9e1b867

Change-Id: I51bcf42327f30a0c6b1dc7666a5c057d44eec98c
2016-12-15 19:05:00 +00:00
Phil Weaver
718f403b50 Add null check to a11y interrupt.
am: 74f9e1b867

Change-Id: I8bb63b88a12ab6f8dfae42918ab9fdf4b1a457b5
2016-12-15 19:04:59 +00:00
dcashman
b1cc4f8ca4 Split mac_permissions.xml into plat and non-plat components.
Bug: 31363362
Test: Bullhead and Sailfish both build and boot without new denials.
Change-Id: Ic9523ce4b0755d6c585548f4f2b1f00e7000195b
2016-12-15 10:04:38 -08:00
Michal Karpinski
abad2df4c2 DO NOT MERGE Make NetworkLogger.mIsLoggingEnabled an AtomicBoolean
am: 92cd0ce92d

Change-Id: I598cd5962f9e38750d528f480b7a99e3357fc437
2016-12-15 14:31:47 +00:00
Michal Karpinski
92cd0ce92d DO NOT MERGE Make NetworkLogger.mIsLoggingEnabled an AtomicBoolean
Fixes a potential race condition - when enabling/disabling the logging
some events might have been lost.

Bug: 29748723
Change-Id: I8a436d525393b2314805e287eddcea26d4ec073b
2016-12-15 12:54:36 +00:00
Hugo Benichi
93c0de0a35 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
Hugo Benichi
097bde6c8f DO NOT MERGE IP connectivity metrics: introduce ConnectStatistics and DNS statistics
This patch introduces a ConnectStatistics message for collecting
Android devices connect() statistics.

It also changes DNS latency events to be grouped by (query_type,
query_return_value) to optimize space usage. For this purpose, a new
DNSLookupLatencies message is introduced and DNSLookupBatch is
deprecated. New counter fields are added for the number of queries,
and number of responses with A and AAAA records.

Test: manually taking a diff with reference ipconnectivity.proto
Bug: 32198976

(cherry picked from commit 7c3a7869218216fceccb7fba983bc022e556df21)

Change-Id: I54403377bc5d4c7a1c77b563c588e5210edf56e5
2016-12-15 21:31:25 +09:00
Hugo Benichi
4c9d3f19cd DO NOT MERGE IP connectivity metrics: add transport field.
This patch adds a transport field dimension to IpConnectivityEvent for
replacing interface name, and eventually network ids.

At the moment the transport field is not populated.

Test: manually taking a diff against reference ipconnectivity.proto
Bug: 32198976

(cherry picked from commit 807124a7f5891b8be5496d9fae3c6c5fdd9f5492)

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

Change-Id: Ib46bdab897cef221f4c22326e562130822d42298
2016-12-15 12:28:41 +00:00
Erik Kline
cdcc931d93 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
e8fe0aaab9 DO NOT MERGE Netd events: record connect() success/errno
Test: $ runtest frameworks-net pass
Bug: 32198976

(cherry picked from commit 8b06bcdfd24100302818ae0e11ee751dd813d5cf)

Change-Id: I527f98c28b31f490ea999222ef8d0b685a2f24ed
2016-12-15 20:51:14 +09:00
Hugo Benichi
84daaea8fd 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
eff558cd30 Have IpManager track L2-L4 signaling traffic required for IP connectivity.
am: 473355f96b

Change-Id: Ie95309464d8f368f5040c74b59daba9700191e86
2016-12-15 10:13:36 +00:00
Erik Kline
ade3a8ccb0 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
473355f96b 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
Phil Weaver
74f9e1b867 Add null check to a11y interrupt.
Also adding same robustness to interrupt that we have for
sending a11y events.

Bug: 32507871

Test: Ran a11y CTS. Verified manually with sample app
that sends interrupt and accessibility service that
crashes when started. That case used to crash the
app, and doesn't anymore.
Change-Id: I5cf05dcbb54ea23ae876cb3258dd206c55dce775
(cherry picked from commit 867ad35d9c676b5ba2047b0fc9a4006737e5c4aa)
2016-12-15 08:06:15 +00:00
Erik Kline
7074b562d9 Merge "More correct startup and shutdown procedures." am: 618d4215a2
am: b6588f9a41

Change-Id: I8a2bcab3b9373d2573601fa3bffa123020b3fbae
2016-12-15 05:32:50 +00:00
Hugo Benichi
d3da17a260 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
b6588f9a41 Merge "More correct startup and shutdown procedures."
am: 618d4215a2

Change-Id: I4844130b04ded0fc913593081d07a6052bdc0e42
2016-12-15 05:25:48 +00:00
Erik Kline
c8585b9742 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
Jeremy Joslin
9f15b30858 Merge "Add an IPC for requesting network scores." am: e89ed4a001 am: 724b26c902
am: a00fda5311

Change-Id: I5b529ba1f9a151e108229c493cbdc0facd494d30
2016-12-14 23:28:56 +00:00
Marie Janssen
2f94877c01 resolve merge conflicts of 7a2518e to nyc-mr1-dev-plus-aosp
am: f2fc15824d

Change-Id: I71d80c8a24f206d5919f56a28b1f1333021b7d46
2016-12-14 23:27:54 +00:00
Jeremy Joslin
a00fda5311 Merge "Add an IPC for requesting network scores." am: e89ed4a001
am: 724b26c902

Change-Id: If6284c934cd47257367c614523d4928758ab34e1
2016-12-14 23:22:15 +00:00
Marie Janssen
f2fc15824d resolve merge conflicts of 7a2518e to nyc-mr1-dev-plus-aosp
Change-Id: I903680717ed121a93fee3b7c2ed358cb29726d71
2016-12-14 13:44:28 -08:00
Jeremy Joslin
724b26c902 Merge "Add an IPC for requesting network scores."
am: e89ed4a001

Change-Id: I23bee3f29d3b3f71da6103e23afafc2df128ab75
2016-12-14 20:02:45 +00:00
Marie Janssen
7a2518ee6e Merge "Bluetooth: log message improvements"
am: f34bdf7676

Change-Id: Ic89c59257559d95119829fa4157dbb763124e86f
2016-12-14 20:01:39 +00:00
Treehugger Robot
e89ed4a001 Merge "Add an IPC for requesting network scores." 2016-12-14 19:47:48 +00:00
Marie Janssen
cb21ad71ed Bluetooth: log message improvements
Some log improvements:
 - Reduce logspam
 - Use names for states in logs instead of numbers
 - Be more consistent with messages

Also remove some commented out dead code.

Test: run on phone, observe more useful logs
Change-Id: I32163278e148be144c03d4e8aaf0eb761226c94c
2016-12-14 09:51:30 -08:00