2890 Commits

Author SHA1 Message Date
ztenghui
5eb5cde467 Fix one typo and add linear progress bar in the test.
Change-Id: Ib516fd4a27000d8e69a6640386332140ff0d6fdd
2014-08-04 20:46:20 +00:00
Sandeep Siddhartha
2c0273e50a Add a flag for multiple triggers with same recognition session
Also annotate the flags with @IntDef to make things clearer and safer

Add more debug logging

Revert to start/stop being synchronous since telephony and microphone will
need to be handled internally.

Bug: 16731586
Bug: 16514535
Bug: 16549061
Change-Id: I83695d52e9547269c95d443e4d921c9238b7401e
2014-08-01 17:46:27 -07:00
Sandeep Siddhartha
668327d028 Tighten the checks around a detector being invalidated
Don't call back for a detector being marked invalid because
that happens when someone else obtains a detector or VIS shuts down,
in either case we don't want a loop where two entities keep creating new detectors
and being invalidated.

Don't call back on an invalid detector for availability change/detected/started and stopped
only propagate errors.

This helps us with cases where a callback for the previous VIS may get called and then crash because it
tries to make calls without being the current VIS.

In the new scheme of things, if the VIS changes, or the current VIS obtains a new AlwaysOnHotwordDetector,
the previous one is shutdown and internally marked as invalid and all calls to it fail with an IllegalStateException.

Bug: 16629417
Change-Id: I74417bf76ba80916ebc21b042c18b3467857733e
2014-07-31 15:48:26 -07:00
Adam Lesinski
63e646eed5 Add shared library support to aapt dump
AAPT dump should be able to handle dynamic references
that often come with shared library resources.

Bug:16678251
Change-Id: I6c8cd943145aab20ca9db9694c8c433b3c64279b
2014-07-30 21:53:48 +00:00
Sandeep Siddhartha
1ed12ddb8c Make startRecognition async
- This is needed for telephony and audio integration which should happen via async callbacks
that'll end up starting/stopping recognition.

e.g. if a startRecognition happens when in a phone call - the onDetectionStarted will get called once the phone
call ends.

For now the transient stoppages due to internal reasons will not be propagated back to the client.

Bug: 16514535
Bug: 16515468
Change-Id: I1b2b8edd28f5c5e67c453f66c23e1a67a626114e
2014-07-30 11:43:41 -07:00
Sandeep Siddhartha
6817337118 Read the keyphrase ID from the recognition event
Bug: 16516658
Change-Id: Ibeee81c9543aa1091bb075066cfc2269107f13c0
2014-07-29 11:24:51 -07:00
Matthew Williams
ee410da42b remove possible JobScheduler race in cancel()
Client can jobFinished() before getting a cancel msg.
1) Do better clean up of JobServiceContext after client jobFinished()
to remove superfluous MSG_CANCELs
2) When processing MSG_CANCEL check whether the context is still active
3) Do JobServiceContext cleanup before calling back to JobSchedulerService
Client can get a cancel msg even after calling jobFinished() (opposite to above)
1) explicitly check whether there are any MSG_CALLBACKs in the queue before
processing a MSG_CANCEL. If there are we can throw away the cancel.

Bug: 16547638
Change-Id: I90644586c7895a9ce97de752a5d657faf7f74b78
2014-07-29 11:11:41 -07:00
Adam Lesinski
ae9e68a349 Merge "Have AEP GL feature depend on GLES 3.1 in badging" into lmp-dev 2014-07-28 22:45:16 +00:00
RoboErik
40495e0545 Fix checkbuild
Change-Id: I66321c6da4f921cee2db6f9f05312a6a8edc66d3
2014-07-29 15:51:07 +00:00
Adam Lesinski
d7a94da476 Have AEP GL feature depend on GLES 3.1 in badging
AAPT dump badging should output the uses-gl-es tag with
a version of 3.1 when android.hardware.opengles.aep is
declared as a feature.

Change-Id: I8affc6dad574c8303c6ba9810ad8e6e205ea9506
2014-07-25 22:45:33 +00:00
Yao Chen
8470857ee4 Fix build
Change-Id: Ia2a09417451dd9cdca0a6351b8ddd00f9195f361
2014-07-25 11:01:45 -07:00
wsmlby
194124965f Merge "Add memory tracking for persistent proccesses and launcher" into lmp-dev 2014-07-24 20:48:02 +00:00
wsmlby
6c77e104bc Add memory tracking for persistent proccesses and launcher
Change-Id: I5228bd67884dc8b77207a597f279fd4032c7f9d9
2014-07-24 15:58:54 -07:00
Yao Chen
c2c0bdc10a Merge "s/thumbnail/icon in the browsing api." into lmp-dev 2014-07-24 20:48:02 +00:00
Yao Chen
5f3e1f2a2d s/thumbnail/icon in the browsing api.
Change-Id: I73bf76ed9628872094db74aef48a8e68864d6b4d
2014-07-28 11:35:36 -07:00
Sandeep Siddhartha
39c12fab49 Use blob (shared memory) for large data in sound model/recognition event/config
Also add a missing null check in writeBlob

Bug: 16516353
Change-Id: Ie702f8daae541cab7c2cee6e13d49e7fc84c84e1
2014-07-28 11:10:32 -07:00
Adam Lesinski
d4bd75be4f Merge "Add <feature-group> tag and change aapt badging" into lmp-dev 2014-07-24 15:36:09 +00:00
Jeff Brown
0f208eb707 Remove DozeHardware since it will not be used.
Bug: 16516536
Change-Id: I14597d3c9470c94e3bc5b8cff500d2fe6b2fd977
2014-07-26 15:41:21 -07:00
ztenghui
a95c8abb36 API REVIEW: VectorDrawable
- Merge <size> and <viewport> attributes all in to top-level <vector> tag
- Indent attributes under <group> in java doc.
- Updata android:stroke to be android:strokeColor, likewise android:fill
- Instead of android:clipToPath, make this a different clip-path tag.
- Document units of the various attributes
- Add example code for defining a VectorDrawable resource

More than that:
= Refactor the code to better support clipPath as a sub-class.
= Update all the xml files to use the new attributes and clip-path tag.

TODO:
-- Remove clipToPath, since that should happen on build break Friday.

bug:16488254

Change-Id: I6db5680ef83cb26c8f064a60fc7d6e7142974b0f
2014-07-25 23:26:41 +00:00
Adam Lesinski
2c72b6822d Add <feature-group> tag and change aapt badging
A <feature-group> represents a set of features required
for an app to be compatible with a device. Multiple
<feature-group> elements represent a logical 'or'
of required features.

Features defined in the old way with <uses-feature> tags
under the <manifest> tag are automatically added to each
feature-group defined.

Defining a <feature-group> means that any default
features are not included (such as android.hardware.touchscreen)
and declared permissions do not imply any features.

Change-Id: I45626f0fdc546e47bcf2aead7ef05ebcca12b023
2014-07-23 14:11:46 -07:00
Joe Onorato
69b078599b Allow apps to be slow at loading children and thumbnails by making those functions allowed to be asynchronous.
Change-Id: Ibcaee3f0f8d9ba14f1b002df9c6d4594c6278045
2014-07-23 17:56:57 -07:00
Joe Onorato
77bfc8f228 s/MediaBrowseService/MediaBrowserService/
Change-Id: Ie07308739cdf94796a900e15527616608e02a3d4
2014-07-24 00:45:56 +00:00
ztenghui
5a836f74df Add negative sign separation support in the pathData
bug:14585171

Change-Id: I61dec27856be09c44bb1d32ff61b3c3cd458cc34
2014-07-23 21:46:16 +00:00
Adam Lesinski
59abf5305b Merge "Add test UsageStats App" into lmp-dev 2014-07-22 16:21:19 +00:00
Adam Lesinski
e159e2e0b8 Add test UsageStats App
Also fixed UsageStatsService to do the right thing
when AppOps returns MODE_DEFAULT.

Change-Id: I0bdb28350fb2528daf2859cdcbbf9ca48d96dde9
2014-07-22 18:21:58 -07:00
Sandeep Siddhartha
f63bc523ea Make hotword availability a callback
This helps us make the list sound models operation an async one, it also helps us
with the case where a detector is invalidated, so the client doesn't have to keep checking the
state.

Synchronize DatabaseHelper methods on its instance so that other VoiceInteractionManagerService
calls aren't blocked on db writes/reads.
It's still possible for the list operation to be blocked on update and vice-versa

Change-Id: Ib8ec4ac5056b62d443038560ce31d0641b4627b0
2014-07-22 17:11:52 -07:00
Yao Chen
319f9a979c Add thumbnail related api.
Change-Id: Ifcb06bbaf8f37df367f130124cbcef065fa25766
2014-07-22 17:05:04 -07:00
Sandeep Siddhartha
6daae96226 AlwaysOnHotwordDetector needs to reflect enrollment changes
Add a callback for when any sound model change happens. This helps the VIS
to re-check the availability and either enroll the user, or start/stop recognition.

Also shut down any active recognition when VIS dies, or a different hotword detector instance is obtained from VIS.

Change-Id: I03f94e78c6ee307afe822a84aebc7e74c64de7b4
2014-07-22 09:16:18 -07:00
Dianne Hackborn
dc2cfff87c Merge "Add permissions associated with app ops." into lmp-dev 2014-07-19 22:40:06 +00:00
Dianne Hackborn
33f5ddd1be Add permissions associated with app ops.
Change-Id: I575ad7a3ceea59486ca601f69760b14f6269511d
2014-07-21 20:15:59 -07:00
Jeff Brown
970d4132ea Allow dreams to control screen state and brightness.
Added setDozeScreenState() and setDozeScreenBrightness() methods to
DreamService.  The values specified here only take effect once
startDozing is called and can be changed while dozing.

This required some significant rework of the display power controller
but the result seems quite nice and better represents the policy
we want to apply.

Changed the test dream a little bit to make it flash the screen
every minute using the new functions.

Bug: 15903322
Change-Id: I83bcc34503f1b87727d2b2b3c0ef08507f9f0808
2014-07-22 01:18:26 +00:00
Yao Chen
17d47989ee Updated media browsing API & tests.
Change-Id: I3a1e3eead99a98b1890e05843dd90203cee517b7
2014-07-21 21:14:43 -07:00
Sandeep Siddhartha
110f569b47 Fix synchronization issues in AlwaysOnHotwordDetector
- Remove unnecessary recognition status from AlwaysOnHotwordDetector

- Remove unnecessary recognition started callback from IRecognitionStatusCallback

- Fix a bug around the fact that we weren't picking up enrollment at runtime because
we were storing the availability at instantiation time.

- Handle 0-length arrays in SoundTrigger classes while parceling/unparceling

- Fix issue in SoundTrigger helper where we were not comparing binders for start/stop calls

- Unload the previous model when starting a new recognition

- Add more debug logging

Change-Id: Icc56d7f3dd1ffa49a8cfeea49080e3ab4d342c32
2014-07-20 16:53:09 -07:00
John Reck
c01bd1167a Return Animator instead of ValueAnimator
Change-Id: I29a7cfdc7ffbb3a4d33f9e64f9d7ca791f5c947c
2014-07-19 02:00:15 +00:00
Chris Craik
31ba192dd2 Tweaks to outline API
b/15283203
b/16142564

Remove boolean return value chaining, as it's redundant with
the data in the Outline itself.

Change-Id: I3116e57cd1b35c98b74e95195117edd7e39fb2df
2014-07-19 00:13:59 +00:00
John Reck
d3de42cae8 Add RT-enabled reveal animator
Bug: 16161431

 Also re-writes RevealAnimator to avoid using any listeners internally,
 removing the logic around shadowing the update listeners.

Change-Id: I6ed8126398eed971a87f20bccb7584c9acafbb6c
2014-07-18 22:10:22 +00:00
ztenghui
9d59a76dd0 Fix FIT_XY scaleType issue on VectorDrawable
bug:16019658

Change-Id: I8b6ac23bf14de5427d3029436acf76bd1161f0ea
2014-07-18 20:39:35 +00:00
Sandeep Siddhartha
7444c906fa Test hotword flow
- Also fix a few StrictMode violations in DatabaseHelper

Change-Id: I93f27407dae34cc0dca5e9f891d4ca718d6010a5
2014-07-17 18:44:12 -07:00
ztenghui
738177caf6 Add the RTL support to VectorDrawable.
bug:15905631

Change-Id: Ieb3dcac2dd446ba89f307716411688dcd6ec5279
2014-07-17 17:37:19 +00:00
Dianne Hackborn
fee756ff91 Implement issue #16330060: Inform ActivityManager about WebView...
...state changes.

Add a new API to tell the activity manager about a new dependency
one process has on another package.  Start using it already for
when apps is Context.createPackageContext() to load code from another
app.

Also do some work on getting the monitoring of proc/uid states
in shape so it can be used by unundled code, along with an
AppImportanceMonitor class for doing so.

Some small fixes and additions to VoiceInteractionService.

Improve handling of unaccounted/overcounted battery use so that
they aren't shown to the user unless they are significant.

Change-Id: I22dd79a73f4e70103d3f8964494aebc8a31f971c
2014-07-16 22:50:31 -07:00
Sandeep Siddhartha
e6cd2476aa Add recognition modes to the enrollment metadata
This will be used by the Voice interaction service to determine what type of recognition may be run
on the DSP. e.g. If the DSP supports voice trigger only for the given keyphrase,
the voice interaction service may want to perform user identification at its end.

Also support keyphrase metadata for all keyphrases and locales.
In case the enrollment app supports open-ended keyphrases, it can leave the keyphrase text
to be empty
similarly, if the enrollment app supports all locales, it can leave the supported locales
attribute to be empty,

Change-Id: I782a17a877fc79ed569fa7c3a81697641182590b
2014-07-16 22:03:03 -07:00
ztenghui
0d12785dfb Merge "Add more reverse support to AnimatedVD" into lmp-dev 2014-07-16 00:46:50 +00:00
ztenghui
7bc6a3f023 Add more reverse support to AnimatedVD
bug:16162242

Change-Id: Ie0b7618beeb65ebeb65db41600165837524bcee4
2014-07-16 19:26:26 +00:00
RoboErik
8b4bffcac9 Make MediaSession and MediaController constructors public
This makes the MediaSession/Controller constructors public and registers
with the system behind the scenes.

This also adds a bit about needing to call setActive(true) to start receiving
commands in MediaSession's docs.

Change-Id: If882d229b54c36bf0831aca0255052dda667a2bc
2014-07-16 12:03:45 -07:00
Craig Mautner
c2d6400fb6 Fix build
Add parameter to WindowManagerPermissionTests.

Fixes build.

Change-Id: Iecf064ee0be612e59aa1b7f0a42807be1bc59e78
2014-07-15 12:28:43 -07:00
RoboErik
c785a78fb4 Make PlaybackState immutable with a builder
bug:15862252
Change-Id: I51f2e466bd2c41bbe80d20aa9785126a7ac6ab3f
2014-07-14 13:40:43 -07:00
RoboErik
550116576c Add API to set a default session in Activity
We may have multiple remote sessions at once so an app needs a way
to specify a default session to route media and volume commands to
when its activity is in the foreground. This adds an api that works
in parallel with the default stream api on Activity.

bug:15727927
Change-Id: I5b67cb3e20647f9437d90aa65be63efe8c7865cf
2014-07-14 11:17:06 -07:00
Jeff Brown
ff0215dd64 Update media session test application for new media router.
Change-Id: I3c19e008d211099b4d7320e3f195850cfb4dd927
2014-07-14 04:38:15 -07:00
Barnaby James
d3fdb8bed8 Add VoiceInteraction request type for successful actions.
Add CompleteVoiceRequest to VoiceInteractor to allow apps to indicate when a voice interaction was successfully completed.

Change-Id: I1481cfe96e9e2495d88a7a4fb62263bdd1e03c54
2014-07-11 10:34:50 -07:00
Leon Scroggins III
d66a8719b0 Merge "Simplify Shader.setLocalMatrix." 2014-07-10 21:35:02 +00:00