SpeechRecognizer binds RecognitionService to realize it's feature.
When RecognitionService checks the record_audio permission, itself
doesn't have the capabilities to use the permission since it's not
a foreground process. We use the addition flag to allow the bounded
process to get same capabilities.
Bug: 154954447
Test: manual test:
1. Install Talkback with voice shortcut feature
3. assign voice shorct function to any gesture
2. launch any app to leave home and trigger shortcut via the gesture
Change-Id: I2f867af739c69a5ba29bb49397819cb61915e42d
Resets developer expectations on the way to deprecation of a parameter
in the Android Speech APIs.
This change was made by hand in the refdoc HTML (cl/303351535);
making the corresponding change to the source code, so the doc
fix won't be reverted with the next DP update.
Bug: 151475334
Test: make ds-docs
Exempt-from-owner-approval: Docs-only change
Change-Id: I053a8e9d9623c394954a118b5e068fc4015b2ba7
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing
For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish
Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
We had accidental usages of the PermissionChecker for cases where no
private data was provided to the app but the checkPermission API on
the latter also did blame data access on the app. The PermissionChecker
was designed to handle IPC calls and not for generic API checks.
To avoid future accidental incorrect PermissionChecker usages this
change renames the existing APIs of the latter to clearly indicate
that they should be used for data delivery and also adds sibling
methods for doing the same permission checks for preflight purposes.
Also the documentation is improved to furhter assist developers.
In addition, this change fixes accidental permission checker usages
that blame when they should not by using the new preflight flavor
of the permission check APIs.
Test:
atest com.android.settingslib.location.RecentLocationAppsTest
atest CtsPermissionTestCases
added: LocationAccessCheckTest#notificationOnlyForAccessesSinceFeatureWasEnabled
added: LocationAccessCheckTest#noNotificationIfFeatureDisabled
added: LocationAccessCheckTest#noNotificationIfBlamerNotSystemOrLocationProvider
added: LocationAccessCheckTest#testOpeningLocationSettingsDoesNotTriggerAccess
bug:141028068
Exempt-From-Owner-Approval: merge
Change-Id: I65c71569d0dd8a40bc6fecabb22c5373dd6e806e
instead of a File object
Bug: 131276728
Test: "run cts -m CtsSpeechTestCases" Added new CTS Test case ag/7932820
Change-Id: I4fb23150d17aa8a96f57389c28205df9af45fc20
Updated references to the deprecated speak method
that accepts a HashMap to the current version that
accepts a Bundle.
Bug: 127120857
Test: make docs
Change-Id: I6563f5039786e1e8ea44acd4819eaf42c34c0cb9
If they were null, then the Parcelable would fail to work.
Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
For packages:
android.speech
android.telephony.mbms.vendor
android.view
android.webkit
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: Iefe25091fa0fcc0adfe4ff85fe5e3ab3ac9c5f10
There was code to stop synthesis when a tts client died
but it was commented out in a seemingly unrelated CL,
possibly in error. Restore the code, now synthesis stops
as expected when the calling app dies.
Bug: 78187631
Test: Start playing a long body of text with the test app,
kill it is adb shell am force-stop. With this change,
the tts playout no longer continues.
Change-Id: I647ddcc46416ca33db4ad0fdbfca1fb5e88924a1
Fixes a bug where UtteranceProgressListener.onStart is called twice
when calling TextToSpeech.synthesizeToFile().
Bug: 22262115
Test: Ran cts android.speech.tts.cts.TextToSpeechServiceTest
Change-Id: I7fa4cf824508e2880d0d74bab7a35f8678c38250
For packages:
android.speech.tts
android.speech
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I578e17b05247d77e33b846e7e56633b0b4e4c69f
All of these activity-start intents might be unimplemented on some
Android products. Document this to make sure that developers are
aware of the need to safeguard against this.
Bug: 68300743
Bug: 62201251
Bug: 69587018
Fixes: 77282739
Test: atest CtsContentTestCases:.AvailableIntentsTest
Change-Id: Ia2346d03ccb7f2bdad2b84ba9efff72413fdc3c2
The code assumed that when stop() is called before run(), it's not
neccessary to signal mNotFull, but in rare cases the synthesizer may
already have filled the buffer before run() is called.
Test: manual
Bug: 70887227
Change-Id: I83117f3541d37830b344bc9eda34e1f380b58e76
When speak() is immediately followed by a stop(), the speak may not be
stopped at all due to a race condition.
Bug: 63649835
Test: android.speech.tts.cts.TextToSpeechServiceTest#testSpeakStop
Change-Id: Iae5660b455f5d845aa119c902057e2ca7131ce1b
The previous implementation calls back the dispatcher only at the end
of run() loop. It means, if stop() is called after enqueueing and
before running, none of onSuccess, onStop, or onError is called for
the items in the queue.
Bug: 63649835
Test: android.speech.tts.cts.TextToSpeechServiceTest#testSpeakStop
Change-Id: Ib20cb0e9157859866f694439858a27369ba8026e
Also rename onUtteranceRangeStart to onRangeStart based on feedback from
the API council.
Bug: 35767714
Bug: 35767290
Test: cts-tradefed run cts-dev --module CtsSpeechTestCases
Change-Id: I2c17a06e401313d4f35e5ec4958c2251c195ef05
just after the AudioTrack is initialized.
This solve the issue with cached synthesis in which updateMarker was
called before AudioTracker initialization and we never got the
callbacks.
Test: Built android and flashed to a device.
Change-Id: I9053d1d046cc9a76aeedd307d5d48920e26e584d
The service can inform the framework at which frame a part of the input
is spoken, and that information is then relayed to the client.
This can be used to highlight the currently spoken word/sentence or to
resume synthesis requests at the start of the last word/sentence.
Test: manual
Change-Id: Ie20a6764a8788cc3539cb058425e55eb6fde07db
When multiple QUEUE_DESTROY messages arrive in a short timespan, some
messages were not flushed. This is because every QUEUE_DESTROY message
resets mFlushAll just before it starts playing itself. The solution
is to keep a counter of the amount of flushes that are still behind it on
the queue and keep flushing until the last one is reached.
Bug: 27555444
Change-Id: Ic24aa2250bf684e74b541907e4c57e0d5f0069ca
Also prefer AudioManager.AUDIO_SESSION_ID_GENERATE over
AudioSystem.AUDIO_SESSION_ALLOCATE, because
AudioSystem.AUDIO_SESSION_ALLOCATE is @hide.
Bug: 27562099
Change-Id: I5924554feb919db7f2390f5b062faedd515421af
The body of {@code} must not be HTML escaped. This is one of
several changes that fix the source in conjunction with a
doclava fix.
Bug: 25757239
Change-Id: Ib38a0fa2dd2a3d68e467f78a812071e763d7e881
a warning.
TextToSpeech.synthesizeToFile has only ever worked with 8bit and 16bit
PCM. In case of float PCM an invalid file would be generated and in case
of other encodings the TTS engine would crash.
Also add more annotations to SynthesisCallback.
Change-Id: I1c44a44509e9b53bb2e1b0f2044b1a5919875e1c