3776 Commits

Author SHA1 Message Date
Erik Kline
5f2b7992cf 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 21:42:16 +09: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
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
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
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
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
Chris Craik
6097eca721 Expose color filter mutate methods
Bug: 36025103
Test: cts-tradefed run singleCommand cts-dev --module CtsGraphicsTestCases

Now, similar to Shaders, we defer native creation until Paint is being
used, and ensure that we have an up to date filter when drawing.

Also implements ColorMatrix#equals to behave like Matrix#equals.

Change-Id: I5f74addd97f5662800802e6f660fead58d518725
2017-03-16 15:45:43 -07:00
TreeHugger Robot
587b60282e Merge "frameworks/base: Add APCT tests to the device-tests suite." 2017-03-16 17:35:12 +00:00
TreeHugger Robot
44d5d0c2fb Merge "ConnectivityMetricsEvent: add ifname, netid, transports" 2017-03-16 02:50:23 +00:00
Hugo Benichi
946b7e424e ConnectivityMetricsEvent: add ifname, netid, transports
This patch adds new fields to ConnectivityMetricsEvent to make it more
symmetric to IpConnectivityEvent in ipconnectivity.proto.

Follow-up patches will start populating these fields for users of
IpConnectivityLog.

Test: unit tests updated, $ runtest frameworks-net passes
Bug: 34901696
Change-Id: I396767cdfcf38cce893c0d6e1f4524f12e3fdc64
2017-03-16 09:58:02 +09:00
Hugo Benichi
97035b4abf Merge "Connectivity metrics: simplify ConnectivityMetricsEvent" 2017-03-16 00:37:47 +00:00
Simran Basi
473a16e492 frameworks/base: Add APCT tests to the device-tests suite.
This CL adds the APCT tests within this project to
a similar suite as CTS known as device-tests.

The current method of running APCT tests in the infrastructure
is unaffected.

Bug: 35882476
Test: `make dist device-tests -j` and local builds of
      continuous_instrumentation_tests & continuous_native_tests

Change-Id: Ifa382fe691842c1cd76897775b9e2a1653449eb5
2017-03-15 14:46:27 -07:00
Hugo Benichi
ec27c4d9f3 Connectivity metrics: simplify ConnectivityMetricsEvent
Now that ConnectivityMetricsEvent is only used for core networking
metrics and is not @SystemApi anymore, remove unused fields and prepare
for additional new fields.

Test: updated unit tests, $ runtest frameworks-net passes
Bug: 34901696
Change-Id: I15abad19981d491f16f2a3afe401f1e833079907
2017-03-15 15:12:38 +09:00
TreeHugger Robot
1809db5cb1 Merge "IP connectivity metrics: add new APF counters." 2017-03-15 04:24:30 +00:00
Hugo Benichi
22d9b2d430 IP connectivity metrics: add new APF counters.
This patch adds a few missing counters to APF events:
 - an actual lifetime duration to ApfProgramEvent.
 - counters for total number of updates to ApfStatistics.

ApfProgramEvents are now recorded at program removal in order to
populate the actual lifetime of the program. ApfProgramEvents whose
actual lifetime was less than 1 second are filtered out.

Finally, instance fields of ApfProgramEvent and ApfStats classes are
made mutable to allow for simple record-like creation. This was not
possible when these classes were tagged @SystemApi.

Test: - manually verified output of $ dumpsys connmetrics list
      - unit tests updated.
Bug: 34901696

Change-Id: I02694ebb9421ce1c2aa757fa6aa209d19a654dcd
2017-03-15 11:49:48 +09:00
TreeHugger Robot
b40c82f230 Merge "Move out test utilities to a Testables library" 2017-03-15 00:55:20 +00:00
Jason Monk
340b0e5216 Move out test utilities to a Testables library
Test: runtest --path frameworks/base/tests/testablets/tests
        && runtest systemui

Change-Id: Ideef4aef5f26136b1741c556b9be5884f38842a0
2017-03-14 17:17:54 -04:00
Erik Kline
0df5ea973d Merge "Address some comments on IpManagerTest" am: b2afa1ede5 am: dea2371e71
am: eb04c52063

Change-Id: I8716a2f49c6adec97b260c32d65d53414068e41d
2017-03-14 06:17:39 +00:00
Erik Kline
dea2371e71 Merge "Address some comments on IpManagerTest"
am: b2afa1ede5

Change-Id: Ic986c23c693757b8311e0de0c0a94281db67f62d
2017-03-14 06:08:34 +00:00
Erik Kline
246bc1f795 Address some comments on IpManagerTest
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 26991160
Change-Id: Ib543874188537e31422206d67d1760762a7c85cd
2017-03-14 13:02:49 +09:00
Erik Kline
a93f236c73 Merge "Skeleton of an IpManagerTest" am: db4333a2c2 am: cf07e0d541
am: 4e8ae3eddc

Change-Id: I25dd93146efe7ce1cd9cb81da19dcb44afc96bd3
2017-03-14 03:25:04 +00:00
Erik Kline
cf07e0d541 Merge "Skeleton of an IpManagerTest"
am: db4333a2c2

Change-Id: I5817c2458c222afb85389deaf22b43d245577b2a
2017-03-14 03:11:15 +00:00
Erik Kline
aa95ae57ec Skeleton of an IpManagerTest
Test: as follows
    - biult (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 26991160
Change-Id: Idddddf0c1a7a8d0a8acff8a5526b02a533d5f3ec
2017-03-14 10:19:52 +09:00
Hugo Benichi
a2decca4f2 IP connectivity metrics: ConnectStats additions
This patch:
  - adds a counter to ConnectStats for counting the number of successful
    connect() calls done in blocking mode. This allows to compute error
    rates for connect() in blocking mode.
  - add printing of ConnectStats when dumping NetdEventListenerService
    and/or IpConnectivityMetrics service.

Test: $ runtest frameworks-net, + manual tests verifying logged events.
Bug: 34901696
Change-Id: I889e8ccd12681b0511be487e9d2ee44290a2d7d7
2017-03-13 09:25:15 +09:00
Hugo Benichi
77aac13d33 Merge "IP connectivity metrics: update ipconnectivity.proto" 2017-03-09 14:20:59 +00:00
Narayan Kamath
a444636d39 Merge "MathUtils: Remove static Random field." 2017-03-09 11:13:39 +00:00
Hugo Benichi
f684050e8f IP connectivity metrics: update ipconnectivity.proto
This patch adds several new fields to ipconnectivity.proto for
improving APF metrics, connect metrics, and link_layer inference.

Test: build, flashed, ran $ adb shell dumpsys connmetrics list proto
      updated metrics unit tests depending on proto schema
Bug: 34901696
Change-Id: I6f68e16f583a6b407f33f8a500133e100f3453c7
2017-03-09 15:19:02 +09:00
Joachim Sauer
40034ccac1 Merge "Renaming Czech Republic to Czechia." am: 33bade08de am: 260b81aaf2
am: d06f548226

Change-Id: Ie7c7c3415738623c184e2e9e96d85cbe05cbfee7
2017-03-08 17:50:44 +00:00
Joachim Sauer
260b81aaf2 Merge "Renaming Czech Republic to Czechia."
am: 33bade08de

Change-Id: Ie76ebb1bd53eb4993f0d01c7d3b5ba7dae9c6504
2017-03-08 17:40:13 +00:00
Joachim Sauer
33bade08de Merge "Renaming Czech Republic to Czechia." 2017-03-08 17:31:27 +00:00