3793 Commits

Author SHA1 Message Date
TreeHugger Robot
f84467e19f Merge "Api updates" into oc-dev 2017-04-27 04:51:46 +00:00
Julia Reynolds
bad4297600 Api updates
- Better documentation on DEFAULT_CHANNEL_ID
- Renaming getChannel/setChannel/getTimeout/setTimeout
- Add documentation to getShortcutId
- @hide parcel constructors

Test: make, make cts
Bug: 37672218

Change-Id: I695b2620c51638a84930e9d1c5fbfd6d85699b55
2017-04-25 17:00:05 -04:00
Jason Monk
745d0a8b77 Revert "Revert "Integrate new looper apis into testables""
This reverts commit fd8f615953631863c94d7080441f8dd4a0a74f56.
+ some minor adjustments.

Test: runtest systemui
Change-Id: Ie4349fcfb2aadbbd8826506faa8a6fb1ecd5b589
2017-04-25 13:49:58 -04:00
Erik Kline
5fe3718c6d Clarify IControlsTethering LOCAL_ONLY state name
Test: as follows
    - build
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - manually starting tethering shows Settings and icon updates
Bug: 31466854
Bug: 32163131

Change-Id: I1f45511f00aca37480f894be4a9a004f1a3b35d7
(cherry picked from commit ca41be796a56fab152cd07bbeaf9283de7e8be90)
2017-04-21 18:03:19 +09:00
Erik Kline
668b722498 Add local-only hotspot info into tether state change broadcast
Test: as follows
    - build
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - manually starting tethering shows Settings and icon updates
Bug: 31466854
Bug: 32163131

Change-Id: I938074587dfeec221c5cdb43a392802ad3fc3589
2017-04-21 13:26:04 +09:00
Robert Greenwalt
1eeec7880d Mark Restricted APN connections as restricted.
If anything unrestricted is bundled in the whole thing has to be
unrestricted (we can't restrict based on destination or intent)
but the NOT_METERED flag wasn't taken into account.

This wasn't a problem before because telephony set that statically
and late, but a change caused it to be marked NOT_METERED earlier
which exposed this bug.

bug: 37208956
Test: new NetworkCapabilitiesTest.  Fails without fix, works with.
Change-Id: I7b7a1c38621ce0ecde8cf041e82b1ebb7a9c6f15
2017-04-18 11:29:20 -07:00
TreeHugger Robot
7eb8260236 Merge changes I76ae853c,If94102c7 into oc-dev
* changes:
  Ignore potential SystemProperties errors when setting net.dns
  Make ConnectivityServiceTest pass on wifi-only devices.
2017-04-17 05:11:21 +00:00
TreeHugger Robot
d98f26e4f3 Merge changes from topics 'network_specifier', 'networkspecifier' into oc-dev
* changes:
  [CM] Unhide the NetworkSpecifier as object API
  Make the NetworkSpecifier a class instead of a string.
  Add test coverage for NetworkSpecifiers.
2017-04-15 02:16:14 +00:00
TreeHugger Robot
7c8ab2651b Merge "Remove unnecessary casts on calls to findViewById" into oc-dev 2017-04-14 16:56:28 +00:00
Alan Viverette
51efddbd3b Remove unnecessary casts on calls to findViewById
Just frameworks/ this time. More paths to come.

Bug: 24137209
Test: make -j32
Change-Id: Iff27abd26fa43296ac2fff8f534fc6742d2ae80c
2017-04-14 11:15:50 -04:00
TreeHugger Robot
46ae660bf2 Merge "Implement new splash screen API" into oc-dev 2017-04-14 11:54:47 +00:00
Etan Cohen
29fe0c9930 Make the NetworkSpecifier a class instead of a string.
Bug: 27533960
Bug: 36053921
Bug: 36275276
Test: connectivity, wifi, telephony unit tests
Change-Id: Idd9b10a8418c53c8cf386d9ff8252226b076bbf9
Merged-In: I7535495681da8f168c46d6d95e13925cffecc99b
Merged-In: I6500639ae839ee9ad5af34d1292d1539c943e2ad
2017-04-14 18:22:10 +09:00
Lorenzo Colitti
677999af11 Add test coverage for NetworkSpecifiers.
Tests various combinations of empty / non-empty NetworkSpecifiers
and changing specifiers on the fly.

Test: ConnectivityServiceTest passes
Bug: 27533960
Bug: 36053921
Change-Id: Ibd6b4efc861dc51689e46f3882ba859223411bf0
Merged-In: Ia7d36096f0e3f0b203d1d838043c03fcd1cea829
Merged-In: Ia71b72cc10dba6bac7c8fbe1ab3c5f40bc5506ff
2017-04-14 18:20:59 +09:00
Jorim Jaggi
7d0d102752 Implement new splash screen API
Test: mmm frameworks/base/tests/ActivityTests, launch
CustomSplashscreenActivity
Test: android.server.android.server.cts.SplashscreenTests

Bug: 37252694
Change-Id: Ie2aec4764d958086897296ed0fc3c39c55c4d8aa
Merged-In: I9a5bc19b8f63312e682e536500411e4ff4639f88
2017-04-13 19:43:45 -07:00
Hugo Benichi
5eb9053c4e Connectivity metrics: add transports to connect stats
This patch groups connect() events per netId. It adds netid and
transport information to serialized ConnectStatistics events.

Test: updated NetdEventListenerServiceTest
      updated IpConnectivityMetricsTest
      $ runtest frameworks-net passes
Bug: 34901696
Change-Id: Id0d536ff723ded5c26eafe0bb138ba75ba2856c5
Merged-In: I4769496383943e714a1d350c298e093c2ed57477

(cherry picked from commit dfc2cc5857199345e08f07977b79b20292f964a2)
2017-04-14 01:44:52 +00:00
Hugo Benichi
2a5cfb9738 Connectivity metrics: log DnsEvents in-band
This patch changes how DnsEvents are logged in IpConnectivityMetrics.
The following changes are made:
 - DnsEventBatch are not logged after 100 queries on the same network
    - this allows to merge DnsEvent and DnsEventBatch into one class
 - DnsEventBatch are not logged after a network disconnect
    - this allows to remove the NetworkCallback
 - DnsEvent are now logged similarly to ConnectStats when statistics are
   flushed, in a direct call from IpConnectivityMetrics into
   NetdEventListenerService, in a direct call from IpConnectivityMetrics
   into NetdEventListenerService.
    - this allows to remove the Parcelable implementation of DnsEvent
 - transports information is added to DnsEvent.

Test: - simplified NetdEventListenerServiceTest covering dns logging
      - updated IpConnectivityEventBuilderTest
      - updated IpConnectivityMetricsTest
      - $ runtest frameworks-net passes
      - manually verified $ adb shell dumpsys connmetrics list proto
Bug: 34901696
Change-Id: I4fcd0ad7a7b85d587647f471a90c1e53a18fc95a
Merged-In: Ia4b33fd4212741152662a2adbb0533bd1b4902ee

(cherry picked from commit 0699cf98042a64e41ee076c464eb115a6579be08)
2017-04-14 01:41:48 +00:00
Lorenzo Colitti
8b3da2ff4a Make ConnectivityServiceTest pass on wifi-only devices.
Test: ConnectivityServiceTest passes on ryu on internal master
Test: ConnectivityServiceTest passes on bullhead
Bug: 36249702
Change-Id: If94102c7df0257ea9e69e72b07a685ae3c2c4022
(cherry picked from commit 42cdf577037770a66d27f831d0f9e26532c3628d)
2017-04-13 18:03:58 +09:00
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