3172 Commits

Author SHA1 Message Date
Jorim Jaggi
20df623459 Merge "Add callback to voice interaction session for lockscreen shown" into mnc-dev 2015-07-21 22:46:30 +00:00
Jorim Jaggi
19695d9711 Add callback to voice interaction session for lockscreen shown
Bug: 22402726
Change-Id: Iaf83e2f2b0389d74b6ecf480aa91a34443803f7b
2015-07-21 12:35:16 -07:00
Jorim Jaggi
55786e1164 Merge "Test app to emit all AccessibilityEvents to logcat." into mnc-dev 2015-07-20 23:43:51 +00:00
Dianne Hackborn
78ead58df0 Merge "Fix issue #22531747: Assist info should declare if user has disabled..." into mnc-dev 2015-07-20 19:50:50 +00:00
Dianne Hackborn
17f693520d Fix issue #22531747: Assist info should declare if user has disabled...
...context and/or screenshot

Added new API to find out what contextual data has been globally disabled.

Also updated various documentation to make it clear what kind of contextual
data you will get (and when it will be null).

Also added a new Activity.showAssist() API because...  well, I was already
in there, it was easy to do, it is safe, and maybe people will build cool
things with it.

Change-Id: Ia553d6bcdd098dc0fce4b9237fbfaca9652fc74b
2015-07-20 12:49:10 -07:00
ztenghui
35289f12d6 Scaling (Animated)VectorDrawable inside ImageView
Before, the VectorDrawable is behaving like BitmapDrawable inside a ImageView,
and it can be blurry due to scaling.
Now apply the scaling information to the cached bitmap, then the size of bitmap
will match the ImageView's screen size. Therefore, no blurry any more.

b/18185626

Change-Id: I979cef3b5178a9bd37ee6cc776df3361ca47c803
2015-07-17 11:16:41 -07:00
Dianne Hackborn
f6586cbde7 Merge "Implement issue #22403908: Enable assistant to refuse context sharing" into mnc-dev 2015-07-15 23:31:25 +00:00
Dianne Hackborn
1de1186d28 Implement issue #22403908: Enable assistant to refuse context sharing
New APIs allow the voice interaction service to set/retrieve a filter
for which of the show flags are allowed.

Change-Id: I588cbe55afee0548ad3afa22d3a7d3bc43cb54a6
2015-07-15 14:20:51 -07:00
Dianne Hackborn
d0a159025a Fix issue #22124996: VI: Command Request not Active
This stupid thing wasn't even completely implemented
in HandlerCaller!  D'oh!

Change-Id: I0dac42c208fa0f08a6e20a6cb17b072f51efcaa7
2015-07-15 11:18:09 -07:00
Dianne Hackborn
6f0fdc4167 Implement better handling of text in assist.
TextView is now much smarter about the text it reports, limiting it
to what is visible (plus a bit more).  Also add a facility for it to
report where the lines of text are, both as offsets in the text string
and their baselines on screen.

Part of fixing issue #22328792: Fix scalability issues in AssistStructure

Change-Id: Idddb8c3a3331355f381e2d4af06d520fe7c7ce8e
2015-07-07 16:47:37 -07:00
Dan Sandler
998e32db1f Test app to emit all AccessibilityEvents to logcat.
Additionally allows you to pop toasts for ones you're
particularly interested in.

Bug: 18778078
Change-Id: I2dc81109554cc13853a04e486b029ae4b8e085c9
2015-07-07 15:52:58 +00:00
Dianne Hackborn
de15edaa9b Work on issue #21589105: Scope WRITE_SETTINGS and SYSTEM_ALERT_WINDOW...
...to an explicit toggle to enable in Settings

Add a new permission flag, saying the permission can be automatically
granted to pre-api-23 apps.  Apply this to SYSTEM_ALERT_WINDOW.

Change-Id: I24a0ceabe7e9f5e458a864d30eda2696ad14a699
2015-07-01 12:37:00 -07:00
Dianne Hackborn
593334ab70 Fix issue #22124996: VI: Command Request not Active
Just forgot to add the request to the active set.

Also eradicate a bunch of old cruft that has been replaced
by the final APIs, and improve voice interaction test to
sit fully on top of the final APIs and have a test for
command request.

Change-Id: Ieff7a6165ebf2a4c5fb80c1ebd020511a2ae63ee
2015-06-30 16:59:41 -07:00
Dianne Hackborn
70d8be7616 Fix issue #22013372: Assist should take translationX and friends...
...into account when calculating the position information

Actually what we need here is the full transformation matrix, if it
is available.  And that means actually computing the location of
views on the screen requires doing this all through transformations,
so the AssistVisualizer has been changed to do this (while still
also keeping the old mechanism for comparison to verify that things
are working correctly).

Also added new properties for elevation and alpha.

And optimized the parcelling of AssistStructure to not write things
that aren't needed; this reduces the parcelled size by about half.

Change-Id: I50b0dd2e6599c74701a5d188617a3eff64b07d03
2015-06-25 20:24:34 -07:00
Selim Gurun
cb247780d3 Merge "Remove Webviewtests in frameworks" into mnc-dev 2015-06-25 17:54:01 +00:00
Selim Gurun
e9f13e171d Remove Webviewtests in frameworks
Bug: 22090564

These tests were not touched for at least 3 years, and with webview
moving to chromium, they are tested at the chromium side.

Change-Id: I4424871dd97c5dc23bb3dbdcee0915d5ab893c7e
2015-06-25 10:50:26 -07:00
ztenghui
9336eb5d1c Merge "Update the internal test case to show the strokeWidth can scale now" into mnc-dev 2015-06-24 21:27:15 +00:00
ztenghui
92537303a2 Update the internal test case to show the strokeWidth can scale now
Change-Id: I16b0a232eb4108aedc9289e51a52ec9472b9dfd0
2015-06-24 14:06:53 -07:00
Dianne Hackborn
16036f2684 Fix issue #20654534: API Review: android.app.assist
Remove the old classes.

Change-Id: I949350cadc5fc304e2651d7db0ffd38e45db9b6e
2015-06-22 15:14:17 -07:00
ztenghui
91870fa281 Merge "Separate 2 clip paths into 2 groups" into mnc-dev 2015-06-18 17:05:13 +00:00
ztenghui
b6e9534ea5 Separate 2 clip paths into 2 groups
Since 2 clip paths is taking the intersection as the final clip, we should
separate this test case into 2 groups.

Prior to M release, the 2nd clip path is overriding the first one.
The behavior changed in this CL:
e9c01a40a2f0f0da195dfbb2909aaee5c005d1c6

b/16376848
b/19946683

Change-Id: Ib21c95e70f1317321725acbbe0ccf91713f748c3
2015-06-17 16:50:03 -07:00
Dianne Hackborn
1958e5e787 Fix issue #21813831: Need API for asking to be added to power whitelist
Add the API.  Clean up a few related things.

Change-Id: I190adad1812f36f6095b98a1001fedb94874e8b5
2015-06-15 11:53:59 -07:00
Dianne Hackborn
e554cc9659 Merge "Implement some control over ALLOW_WHILE_IDLE alarms." into mnc-dev 2015-06-12 19:38:39 +00:00
Dianne Hackborn
3d1933c45f Implement some control over ALLOW_WHILE_IDLE alarms.
Since these alarms allow you to bypass the idle restrictions,
we don't want them to be so open-ended like other alarms.  This
implements a policy where the alarm manager will only deliver these
types of alarms every X minutes to each application.  For this
initial implementation, X is 1 minute under normal operation and
15 minutes when in idle mode.

To do this, I needed to introduce a new internal allow-while-idle
flag for system alarms, which applications can't get, and doesn't
have these new restrictions.

Also tweaked how the alarm manager handles the alarm window, so it
doesn't change if the alarm gets rescheduld; the window is now always
what as computed based on the time when the alarm was first
given to it.

Finally, fix TimeUtils to be able to correctly print times that
are > 999 days.

Change-Id: Ibad8c6a7c14b0624b54e82267be23224b4c31e84
2015-06-12 12:37:35 -07:00
Chris Wren
17de4b2a73 Merge "remove usage of deprecated method setLatestEventInfo" into mnc-dev 2015-06-12 19:28:54 +00:00
Chris Wren
1ce4b6d3c6 remove usage of deprecated method setLatestEventInfo
Bug: 18510449
Change-Id: I56a77991c729990e501f402e007dfa79ee57621e
2015-06-12 10:16:04 -04:00
Adam Lesinski
c8e8729244 UsageStats: Change INTERACTION to SYSTEM_INTERACTION
SYSTEM_INTERACTION events are signals to the system for a package's
implicit actions (service bound, etc).

These should not affect the API visible stats like lastTimeUsed, etc.
USER_INTERACTION is for user initiated actions (notification interaction, etc).

Bug:21761781
Change-Id: I4585cf35fbb158612a3c737710108bec34e89183
2015-06-11 22:01:45 +00:00
Dianne Hackborn
a3acdb33df Fix issue #21621920: VI: need mechanism to get current request
Add new APIs to associate a Request with a name, get all active
requests, and get active request by name.

Also add a new Activity.onProvideReferrer() which will allow
applications to propagate referrer information to the assistant
(and other apps they launch) in a consistent way.

Change-Id: I4ef74b5ed07447da9303a74a1bdf42e4966df363
2015-06-09 14:15:49 -07:00
James Cook
5ac36cea86 Merge "Use VoiceInteractor.Prompt in VoiceInteraction test app" into mnc-dev 2015-06-08 20:03:39 +00:00
Dianne Hackborn
54d729b73f Merge "Fix issue #21572679: API Review: ActivityOptions, usage time report" into mnc-dev 2015-06-08 19:46:24 +00:00
James Cook
dd231d466f Use VoiceInteractor.Prompt in VoiceInteraction test app
The framework API that takes a CharSequence as a prompt is now
deprecated, so update the test code to use the new API.

Bug: 21695917
Change-Id: Ic4b7afa6c547a9885a900ed092910f3c6bdd1dd4
2015-06-08 10:03:35 -07:00
Dianne Hackborn
67ba2c7fa2 Fix issue #21572679: API Review: ActivityOptions, usage time report
Change-Id: I62751e93e39f90d5d2ec725586880724f3edbbc7
2015-06-05 14:23:38 -07:00
ztenghui
83a52031fd Setup the animation callback for AnimatedVectorDrawable
b/21341096

Change-Id: I84e20366db21ceaa4f044be3e322f9215bb06ad2
2015-06-04 12:55:21 -07:00
Dianne Hackborn
b0a5e78fc0 Merge "More API changes." into mnc-dev 2015-06-04 16:56:52 +00:00
Dianne Hackborn
69c6adc96e More API changes.
Start moving Assist* stuff to android.app.assist.

Clean up some more of the VoiceInteractionSession APIs.

Clearly document that finish() is not the same as hide(),
always call hide() instead, and fix the finish() path to
also always do a hide to make sure everything is cleaned
up correctly.

Change-Id: I962d4069fcb34fe89547a95d395ae1b9fa3b4148
2015-06-02 16:56:41 -07:00
Jorim Jaggi
7d01d2c6cf Merge "Fix API review: Camera prewarm" into mnc-dev 2015-06-02 22:25:29 +00:00
Jorim Jaggi
d944986fbd Fix API review: Camera prewarm
Let the intent receiver of a camea launch intent declare a prewarm
service instead of sending broadcasts.

Bug: 21347653
Change-Id: I11e31aad4f788ad90eb46a661b819d3e808ddb51
2015-06-01 18:01:20 -07:00
Dianne Hackborn
9ed0c4109d Merge "Update VoiceInteractionService from API review." into mnc-dev 2015-06-01 22:28:45 +00:00
Dianne Hackborn
2ee5c368f8 Update VoiceInteractionService from API review.
This may even manage to retain compatibility with existing
binaries!  (For now.)

Change-Id: I3b1386287a6b9b20b57ac2e2444fd6f458837277
2015-06-01 11:42:04 -07:00
Andrew Flynn
b2c589c3f7 Change colors of AVD test
so you can actually see the animation rather than animating between
the same color.

Change-Id: Id32f6f5a22c000093fb9cbc1e9274eacbd183373
2015-06-01 09:27:38 -04:00
Chris Craik
1cd7e4c3d0 Merge "Use path intersection instead of saveLayer+mesh to mask projected ripples" into mnc-dev 2015-05-28 22:03:08 +00:00
Dianne Hackborn
4573dddcce Merge "Add new API to set URI on AssistContent." into mnc-dev 2015-05-28 21:35:41 +00:00
Guang Zhu
6ac0c8c5fa lock device orientation during app compatibility test
Devices on test benches are usually held sideways, which leads to app
rotation during launch. While it's useful to identify such issue from an
app perspective, the app compatibility test should be isolated from such
noise for the purpose of the testing for basic level of compatibility.

Change-Id: I403f96e5d8512ca6a17b05a83d69f4b02f760a32
2015-05-28 20:26:37 +00:00
Dianne Hackborn
09d57fe9b3 Add new API to set URI on AssistContent.
Also rework how we transfer AssistContent and AssistStructure
to the assistant, so they are delivered as completely separate
objects rather than the kludgy bundling them in the assist
data thing.

Change-Id: Ib40cc3b152bafeb358fd3adec564a7dda3a0dd1d
2015-05-28 11:44:58 -07:00
Tenghui Zhu
01d1acc3c7 Merge "AnimatedVectorDrawable Attr proof of concept" into mnc-dev 2015-05-27 20:33:49 +00:00
Guang Zhu
4f486ee696 don't report missing launch intent as failure
Some apks includes widgets and does not have a launchable
activity. The inclusion of such apk for launching is an issue
with test configuration, not test failure.

Also logging intent used for app package for debugging purpose.

Change-Id: Ibca05757a401ea036e9910d8580d7cafd356567c
2015-05-26 18:26:46 -07:00
Chris Craik
fca52b7583 Use path intersection instead of saveLayer+mesh to mask projected ripples
bug:14297149

SaveLayer's performance cost is high, and proportional to the surface
being projected onto. Since ripples (even unbounded ones) are now
always projected to the arbitrary background content behind them, this
cost is especially important to avoid.

This removes the last semi-secret, saveLayer from the projected
ripple implementation.

Also fixes the HW test app to correctly demonstrate this projection
masking behavior.

Additionaly, alters PathTessellator to gracefully handle
counter-clockwise paths, and simplifies the work done by
ShadowTessellator to ensure all of its paths are counterclockwise.

Change-Id: Ibe9e12812bd10a774e20b1d444a140c368cbba8c
2015-05-26 17:53:16 -07:00
Guang Zhu
9f521c9b17 update app compatibility post launch detection
decide if the app is still running after launch by checking
running tasks and look for a task with base activity belonging
to the package launched.

Change-Id: Ibb3894e765ccbca62f803decc3c1c1f36dc2d454
2015-05-25 12:10:36 -07:00
Dianne Hackborn
e5c4262109 Improve reporting to apps of transaction too large failures.
If the app tried to do various things with too much data --
starting an activity, starting a service, sending a broadcast --
this would fairly silently fail with little indication of what
was going on.  Fix this in two ways:

- Now when the native code generates a TransactionTooLargeException,
  it may include an additional message in it telling you how much
  data was in the parcel being sent, to help you understand why
  this happening.

- In all the framework code paths where we call to the system and
  may fail, convert these failures into a a runtime exception and
  rethrow them back to the app so that it will clearly get the
  above message.

Change-Id: I745159b97d3edb6fca86aa09cbc40c1f15a7d128
2015-05-21 18:19:50 -07:00
Dianne Hackborn
b5a380d409 Add API to track usage time of apps.
This adds a new ActivityOption for the caller to ask the
system to track the time the user is in the app it launches,
delivering the result when they are done.

The time interval tracked is from when the app launches the
activity until the user leaves that app's flow.  They are
considered to stay in the flow as long as new activities
are being launched or returned to from the original flow,
even if they cross package or task boundaries.  For example,
if the originator starts an activity to view an image, and
while there the user selects to share, which launches gmail
in a new task, and they complete the share, the time during
that entire operation will be included.

The user is considered to complete the operation once they
switch to another activity that is not part of the tracked
flow.  For example, use the notification shade, launcher, or
recents to launch or switch to another app.  Simply going
in to these navigation elements does not break the flow
(although the launcher and recents stops time tracking of
the session), it is the act of going somewhere else that
completes the tracking.

The data is delivered to the app through a PendingIntent,
which includes the total time the app was in the flow along
with a time break-down by app package.

Change-Id: If1cf8892d422c52ec5042eba0e15a8e7e8f83abf
2015-05-21 16:45:29 -07:00