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
The name of the voices was not normalized in getVoices(), therefore if
you use getDefaultVoiceName, that name possibly doesn't appear in
getVoices(). The framework would then run into a NullPointerException.
This was caught by the cts tests. Also added a few more log statements.
BUG: 22115315
Change-Id: I51404ddcd1bc10dd3e1ddaac410cfa9873bf1438
When the synthesizer returns LANG_AVAILABLE or LANG_COUNTRY_AVAILABLE
for a certain locale, we strip the country and variant from the locale
before asking the synthesizer for the default voice name for this
locale.
This can prevent the synthesizer from picking the right locale. For
instance it prevents the synthesizer from picking en-gb if en-au is
requested, now it can only have a single preferred voice for all English
countries.
The solution is not to strip the country and variant from the locale.
This is not likely to break anything, because the input to
onGetDefaultVoiceNameFor was never expected to be a subset of all
supported language-country-variant combinations. The default
implementation handles this correctly.
Change-Id: I017f69d321039c7aa7a3ef5a09ba138e35b66670
(cherry picked from commit 4758e99783)