3800 Commits

Author SHA1 Message Date
Lorenzo Colitti
c34f0f7520 Merge changes from topic 'network_specifier' am: d0f476bdae am: 362bef45d1
am: cfd729093f

Change-Id: I7535495681da8f168c46d6d95e13925cffecc99b
2017-04-12 22:58:42 +00:00
Lorenzo Colitti
362bef45d1 Merge changes from topic 'network_specifier'
am: d0f476bdae

Change-Id: I783b2d06f3a5e8b9cd7940f1f1ef0dd951c734f1
2017-04-12 22:43:03 +00:00
Lorenzo Colitti
d0f476bdae Merge changes from topic 'network_specifier'
* changes:
  [CM] Unhide the NetworkSpecifier as object API
  Make the NetworkSpecifier a class instead of a string.
2017-04-12 22:27:37 +00:00
Erik Kline
f700d5cad7 Merge "Tethering: support Local-only Hotspot mode for downstreams" am: d3128d4b55 am: 908ce167eb
am: f6626e812c

Change-Id: I79677f7e8e7ae5abec2a13b5e5391b8f07857a36
2017-04-10 12:21:57 +00:00
Erik Kline
908ce167eb Merge "Tethering: support Local-only Hotspot mode for downstreams"
am: d3128d4b55

Change-Id: Ic7d5e3e23f9ccc0f094ba5991e2fdefa82865b01
2017-04-10 12:02:49 +00:00
Erik Kline
ea9cc488eb Tethering: support Local-only Hotspot mode for downstreams
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - "runtest frameworks-net" passes
Bug: 31466854

Change-Id: Ia50e28c8ce0af8cdd7ac63217d921aff213668e7
2017-04-10 19:11:08 +09:00
Lorenzo Colitti
0ad718aab1 Merge "Add an API hint for metered multipath traffic."
am: 7a12f7efc7

Change-Id: Ie0d289460f93d3b93d91545eb3dfa925f0bdee5f
2017-04-10 05:48:34 +00:00
Treehugger Robot
7a12f7efc7 Merge "Add an API hint for metered multipath traffic." 2017-04-10 05:40:10 +00:00
Hugo Benichi
fa0dadc540 DO NOT MERGE IP connectivity metrics: fix tests.
This patch fixes mismatch between current proto compiler and what is
expected in several IP connectivity metrics unit tests.

Test: built, flashed, $ runtest frameworks-net
Bug: 37126521
Change-Id: I1476c923d61f748ecac1146423127f54ba117502
2017-04-10 13:19:23 +09:00
Lorenzo Colitti
46aa9c022e Add an API hint for metered multipath traffic.
This allows an application that knows how to provide seamless
network connectivity (e.g., using QUIC multipath) to find out if
doing so is desired.

(cherry picked from commit 2de4925f5cc64aeb92e02a8f740d3ff20f36dddd)

Test: builds, boots, runtest frameworks-net passes.
Bug: 34630278
Change-Id: Ic7fd0b9e1cd879fdfaf84009d7125391895e9087
2017-04-06 16:50:06 +09:00
Etan Cohen
a743427896 Make the NetworkSpecifier a class instead of a string.
Bug: 27533960
Bug: 36053921
Bug: 36275276
Test: connectivity, wifi, telephony unit tests
Change-Id: Idd9b10a8418c53c8cf386d9ff8252226b076bbf9
2017-04-05 14:18:20 -07:00
Alan Viverette
ee4b52afd8 Merge "Automatic casts for more findViewById implementations" into oc-dev
am: 7458ea3827

Change-Id: I7c77634f1a5b2551830796118e1fe69d389d6884
2017-04-05 13:58:51 +00:00
Alan Viverette
db7423cd8d Automatic casts for more findViewById implementations
Bug: 24137209
Test: make -j32
Change-Id: I423297a78e63d74eb44fd14747fc3890a9c42937
2017-04-04 14:07:20 -04:00
Jorim Jaggi
b72e651fbe Boost thread priority when holding the WM lock
am: 36db127e47

Change-Id: I3c98498137581ec39555b0283b1cb59d7639a7e2
2017-04-04 13:18:42 +00:00
Jorim Jaggi
36db127e47 Boost thread priority when holding the WM lock
Test: Take systrace of open app, make sure thead is boosted while
doing stuff in WM
Test: Run WmSlam with and without boosting. Observe an
improvement.
Bug: 36631902
Change-Id: Iadb036f8d12bbf59091466500e82207cf6fa85d5
2017-04-04 12:54:09 +02:00
Hugo Benichi
83f89047f5 Merge "Move back networking policy logic into NetworkPolicyManagerService" into oc-dev
am: df9cf5450c

Change-Id: I7d7b66cc1dc6888ea28e2b4d83d570fa440c29f2
2017-04-04 00:58:02 +00:00
Lorenzo Colitti
391c97d506 Merge "Add test coverage for NetworkSpecifiers." am: 9a029b5262 am: 0e068f6360
am: 8ee38521bc

Change-Id: Ia7d36096f0e3f0b203d1d838043c03fcd1cea829
2017-04-03 10:59:17 +00:00
Lorenzo Colitti
0e068f6360 Merge "Add test coverage for NetworkSpecifiers."
am: 9a029b5262

Change-Id: Ia328b945af4c4f55ef560b33b00fa861b8f81b0d
2017-04-03 10:45:22 +00:00
Lorenzo Colitti
6556a220d7 Add test coverage for NetworkSpecifiers.
Tests various combinations of empty / non-empty NetworkSpecifiers
and changing specifiers on the fly.

Test: ConnectivityServiceTest passes
Bug: 27533960
Change-Id: Ibd6b4efc861dc51689e46f3882ba859223411bf0
2017-04-03 17:46:35 +09:00
Hugo Benichi
938ab4fa39 Move back networking policy logic into NetworkPolicyManagerService
This patch removes from ConnectivityService the logic involved in
deciding if a uid has access to networking based on networking policies.

This logic is moved into NetworkPolicyManagerService which is the source
of truth with regards to the state of networking policie, both for
existing networks and uids.

Instead ConnectivityService directly queries NetworkPolicyManagerService
in a synchronous fashion for a specific uid or a (uid, network) pair.

This eliminates the need to keep a copy of the uid policy rules inside
ConnectivityService and ensures that ConnectivityService takes
networking decisions based on the correct state of networking policies,
and therefore eliminates certain data races in ConnectivityManager API
that applications are exposed to.

Test: $ runtest frameworks-net
      $ runtest -x frameworks/base/services/tests/../NetworkPolicyManagerServiceTest.java
      $ runtest -c com.android.server.net.ConnOnActivityStartTest frameworks-services
Bug: 32069544, 30919851
Change-Id: Ic75d4f7a8853e6be20e51262c4b59805ec35093a
2017-03-31 13:28:45 +09:00
Robin Lee
913554a068 resolve merge conflicts of 943187668c44 to oc-dev-plus-aosp
Test: make -j30
Test: runtest -x tests/net/java/com/android/server/ConnectivityServiceTest.java
Test: runtest -x tests/net/java/com/android/server/connectivity/VpnTest.java
Change-Id: Ib87cdb96626cd7625e15bec5e4afab12920405e9
2017-03-30 17:39:56 +01:00
Robin Lee
e61a30f635 Merge "Move some VPN logic out of ConnectivityService"
am: ec86462033

Change-Id: I212c2d6de1676ab65e6bbf34148d66e183d60c62
2017-03-30 16:08:50 +00:00
Robin Lee
ec86462033 Merge "Move some VPN logic out of ConnectivityService" 2017-03-30 16:00:41 +00:00
Jason Monk
e1b237195f Have QS fragment keep track of some state on recreate
am: 64b214ea16

Change-Id: I6e9bb373a765e7ed04ee6fb055d5aec03ec7d505
2017-03-28 18:12:59 +00:00
Jason Monk
64b214ea16 Have QS fragment keep track of some state on recreate
Test: runtest systemui
Change-Id: I1cf84a0943092fcfc5428fcfccb4a887a83b294b
Fixes: 35205198
Fixes: 36592148
(cherry picked from commit 78187249c3e8aaf89a380816e123a3a4653d5b4e)
2017-03-28 18:01:50 +00:00
Lorenzo Colitti
9570e7dae7 resolve merge conflicts of 6c3cd4449517 to oc-dev-plus-aosp
Test: make -j64 framework services FrameworksNetTests
Change-Id: Ib828e56b271cd983ef325e366418ca8db9774628
2017-03-28 23:49:11 +09:00
Lorenzo Colitti
0a34afb48d Merge changes If94102c7,I8d51e8e0
am: 22b829c049

Change-Id: I8aa529a05fc40241ec9664775ca0ebd8960098a8
2017-03-28 12:33:28 +00:00
Lorenzo Colitti
42cdf57703 Make ConnectivityServiceTest pass on wifi-only devices.
Test: ConnectivityServiceTest passes on ryu on internal master
Test: ConnectivityServiceTest passes on bullhead
Change-Id: If94102c7df0257ea9e69e72b07a685ae3c2c4022
2017-03-28 12:53:06 +09:00
Robin Lee
b8c2a2b850 Move some VPN logic out of ConnectivityService
This cleanup helps declutter ConnectivityService, and encapsulates the
always-on setting inside of Vpn instead of spreading it across two
classes.

In particular having the save code in one file and the load code in
another file was weird and I apologise for that.

Added a SystemServices wrapper for Settings.Secure and PendingIntent
calls to decouple some of the global state nastiness and make it
testable without forcing ConnectivityService to drive the load/save.

Test: runtest -x tests/net/java/com/android/server/ConnectivityServiceTest.java
Test: runtest -x tests/net/java/com/android/server/connectivity/VpnTest.java
Bug: 33159037
Change-Id: Ie2adb1c377adfcef0a5900dc866e6118f451b265
2017-03-27 13:40:51 +01:00
Jason Monk
fd8f615953 Revert "Integrate new looper apis into testables"
This reverts commit f715f417d23d0605abcac309135340ac6ce311ce.

Change-Id: I4c0c12d8687426cecccf0f8dad710ea42699727b
2017-03-24 12:44:34 +00:00
Jason Monk
f715f417d2 Integrate new looper apis into testables
Test: runtest --path frameworks/base/tests/testables
Change-Id: Ic12c85ecbd9534a676bd2d7f8643a0c2b4b849b2
2017-03-23 14:52:10 -04:00
TreeHugger Robot
ff51916f83 Merge "Fix NetworkNotificationManagerTest" 2017-03-23 06:25:38 +00:00
Hugo Benichi
f8b804be5a Fix NetworkNotificationManagerTest
The testNotificationsShownAndCleared test was not doing anything
because the list of notification to show was always empty.

This patch fixes this issue and actually makes the test loop on
non-empty collections, and also fixes another ordering issue in
assertions themselves, hidden until now by the first issue.

Test: runtest -x frameworks/base/tests/net/java/com/android/server/connectivity/NetworkNotificationManagerTest.java
Change-Id: I4837b1175d7c9133e9156e33acaa1e7e3341cc62
2017-03-23 12:32:27 +09:00
TreeHugger Robot
f974766169 Merge "SoundTriggerTestApp: also unload on error conditions" 2017-03-22 22:31:48 +00:00
Chris Thornton
e492e493f4 SoundTriggerTestApp: also unload on error conditions
When the service is killed/going down, it should unload all the sound
models it has running as part of being a good citizen.

Test: Kill/stop the service and see that the models are evicted from the
HAL

Change-Id: I6f88c8327682df5870b381d5bafda79e67fb7079
2017-03-22 13:50:04 -07:00
Dan Shi
874a0916fc Merge "Add test configs to apct tests under frameworks/base" 2017-03-22 17:55:58 +00:00
Jorim Jaggi
541feb1ccf Merge "When snapshots are disabled, fill it with single color." 2017-03-22 17:03:00 +00:00
Jorim Jaggi
a359c9846d Merge "Add API to disable snapshotting of activities" 2017-03-22 16:42:57 +00:00
Jorim Jaggi
8f4fe6eccb When snapshots are disabled, fill it with single color.
Test: Launch DisableScreenshotsActivity, go to recents, make sure
content is blue. Reopen activity from home, make sure starting
window is blue.

Bug: 31339431
Change-Id: I29689774c3cdcb784d8f5bfa4f947a6f35b91e01
2017-03-22 16:29:15 +01:00
Jorim Jaggi
0fe7ce968b Add API to disable snapshotting of activities
Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotControllerTest
Test: Launch DisableScreenshotsActivity, go to recents, make sure
content is white.
Bug: 31339431

Change-Id: I329925d2fca389e561da3389a67fe888b5bb1033
2017-03-22 15:59:44 +01:00
TreeHugger Robot
2bcca1d624 Merge "BZZZZZZT! BZZZZZT! New Vibrator APIs" 2017-03-21 13:40:36 +00:00
Dan Shi
7f2afd2dff Add test configs to apct tests under frameworks/base
TouchLatency is needed by test TouchLatencyJankTestWear
UiBench is needed by test UiBenchJankTests

Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test
make -j32 TouchLatency TouchLatencyJankTestWear  && \
tradefed.sh run template/local --template:map test=TouchLatencyJankTestWear \
      --test-tag testname --log-level-display VERBOSE
make -j32 UiBenchJankTests UiBench  && \
tradefed.sh run template/local --template:map test=UiBenchJankTests \
      --test-tag testname --log-level-display VERBOSE

Change-Id: I63f23e3a21ad1343607953958fb7bb0a5fb8c343
2017-03-21 00:05:14 -07:00
TreeHugger Robot
1bff34337c Merge "Connectivity metrics: add transports to validation probes" 2017-03-21 04:22:40 +00:00
TreeHugger Robot
afdd4cfc76 Merge changes I8bfabcb1,I563a6a31
* changes:
  Connectivity metrics: change how interface names are logged
  Connectivity metrics: serialize networkId, transports, ifname
2017-03-21 02:59:20 +00:00
Hugo Benichi
f927f0c52e Connectivity metrics: add transports to validation probes
This patch adds transports info to ValidationProbeEvent and migrates
netId logging for this event to the topt-level netId field in
ConnectivityMetricsEvent.

Test: modified unit tests. $ runtest frameworks-net passes
Bug: 3490169
Change-Id: Ibf51049ba8901ae5ca4ea86e2f500944a4738b5c
2017-03-21 11:43:18 +09:00
Hugo Benichi
948a85948d Connectivity metrics: change how interface names are logged
This patch deprecates the ifname field for specific metrics events of
types DhcpClientEvent, DhcpErrorEvent, IpReachabilityEvent and
IpManagerEvent.

Instead ifnames are logged in ConnectivityMetricsEvent, allowing for
link layer inference.

Test: updated unit tests, $ runtest frameworks-net passes
Bug: 34901696
Change-Id: I8bfabcb115bbd5289471d653c153a40bb48f28cd
2017-03-21 10:18:56 +09:00
Hugo Benichi
73fd4d1faf Connectivity metrics: serialize networkId, transports, ifname
This patch adds translation from ConnectivityMetricsEvent to
IpConnectivityEvent of recently added fields:
 - top-level network id
 - top-level ifname
 - transports

Also adds inference of link layer from transports or ifname.

At the moment these new fields are not populated in
ConnectivityMetricsEvent. Follow-up patches will fill this gap for
the events of the android.net.metrics package.

Test: new unit tests, $ runtest frameworks-net passes
Bug: 34901696
Change-Id: I563a6a3183470bdfaabb7c781a1beaf6b1058bf0
2017-03-21 10:18:11 +09:00
Michael Wright
7121697a5e BZZZZZZT! BZZZZZT! New Vibrator APIs
Replace the existing Vibrator APIs with a new class to encapsulate the
haptic effect information, and add the ability to control the vibration
strength.

Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibratorTest
      cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibrationEffectTest
      runtest systemui-notification
      Manual testing with $T/google_experimental/users/michaelwr/Vibrator

Bug: 30961353

Change-Id: Idbb9864a7b084c85e7b7de3257a0e6b40d9d91d6
2017-03-20 16:09:51 +00:00
Paul Duffin
a7773c2fb1 Change dependency to standard mockito-target-minus-junit4
The mockito-updated-target-minus-junit4 target was added because
some tests needed a later version of mockito than was available
through mockito-target-minus-junit4. Since the latter has now
been upgraded to 2.7.13 that is no longer true and so users of
mockito-updated-target-minus-junit4 can be switched to use
mockito-target-minus-junit4 instead.

Bug: 32912773
Test: make checkbuild && runtest systemui
Change-Id: If7e4dd26d7d0e93731856e9739a048c89a835333
2017-03-17 13:52:15 +00:00
Chris Craik
97b4ccbd97 Merge "Expose color filter mutate methods" 2017-03-17 00:32:21 +00:00