When doing a "like" match on a path, add a second non-like constraint
so that sqlite wildcard characters don't match arbitrary other characters.
b/6501408
Change-Id: I21f9b1c2d8e7c7ef27c0ad5fe24c3e01cd67fb61
When the user long presses on the headset key, the type of search
that will launched must depend on the state of the device. The
following logic is implemented:
- screen on and device unlocked: action is ACTION_WEB_SEARCH,
- device locked or screen off: action is ACTION_VOICE_SEARCH_HANDS_FREE
with EXTRA_SECURE set to true if the device is securely locked.
Bug 6518222
Change-Id: I318770346b8d83e44dfcd4154bcdb517ea7098b5
Handle canceled key events correctly and don't synthesize
key events in that case.
Unfortunately, the state machine was confused by some sequences
of key events that it might receive from the input dispatcher
when new activities take focus during a long-press on the headset key.
The audio service may receive a cancel event intended for the old
window, followed by a repeated down and finally an up for the new window.
Simplified this down to just two booleans.
Bug: 6484717
Change-Id: I9587d0a5e282419ef4d7c17665940682aacea96a
Add functionality in AudioManager/AudioService to register a
media button receiver for telephony that, when registered, gets
priority for media button key events during a phone call or
when ringing.
Bug 6484717
Change-Id: I0835fc02cb24d06ca59af5a32c3ba0ae93e54442
Whenever a stream type is muted, the progress bar in volume panel
is at 0.
If a stream is muted by ringer mode and does not control ringer mode,
the progress bar is disabled.
Pressing VOL- when in vibrate or silent mode resets the last audible
volume of ringtone stream (music strem on tablets) to 0.
VolumePanel implementation:
- Always prefer AudioManager APIs over AudioService APIs when available on both.
- Do not use AudioManager.shouldVibrate() (deprecated).
Change-Id: I57fcb19ada4e8d729b6b41d668496562ebe340c3
Enforce the same rules as for HDMI output:
- FL/FR must be present
- paired channels must be used in pairs (e.g. no rear left
without rear right)
Bug 6392126
Change-Id: I0a39e474dcf509cb7eabd8edd1f0e44852d72b51
Implement the interception of long-press on keys that
can be used to trigger voice-based interactions (here
only HEADSETHOOK) only if the long-press hasn't been
trapped by the foreground application:
- if the key is not one that is used for voice input, handle
the event as before.
- if the key press wasn't long enough, simulate a delayed
key press.
- if long press is detected, send
RecognizerIntent.ACTION_WEB_SEARCH. Long press duration
is set to 300ms (a typical key press is under 100ms).
Bug 3225090
Change-Id: I5b3adeb91d3c41ccd54d23fdb93d7eaec496eee7
Also broadcast ACTION_AUDIO_BECOMING_NOISY on USB audio disconnect
Change-Id: I46dfcc744df880066aea6bf651334a081c14af0f
Signed-off-by: Mike Lockwood <lockwood@google.com>
Fix various issues in adjustStreamVolume() related to stream type aliases
using different ranges.
Always Update last audible index on all streams sharing the same alias.
Add check on setRingerMode() to prevent setting mode to VIBRATE when no
vibrator is present.
Issue 6455831.
Change-Id: Id110e05d2f16e208e1e398922617bf31967b62db
Add synchronization to prevent concurrent accesses to
volume indexes HashMap in VolumeStreamState.
Use ConcurrentHashMap for VolumeStreamState mIndex and
mLastAudibleIndex.
Issue 6421841.
Change-Id: I6dee805a79aa5e2cd0ba4072014a2fcdda4ed507
o Removes mParcel from TimedText class.
o Converts native parcel into java parcel object directly without
copying to an intermediate byte array.
o JNIMediaPlayerListener::notify checks for Java exceptions, logs them,
and clears the exception state.
related-to-bug: 6405934
Change-Id: I8b82d3cd5b9b3ef8cad27e805202a0e445a88a45
Clean up related to new Vibration policy.
The vibrate behavior is now only derived from:
- presence of a vibrator on the device
- current ringer mode selected: NORMAL, VIBRATE or SILENT
If no vibrator is present the ringer mode can only be NORMAL or SILENT.
The control of ringer mode via volume keys when volume keys control the "master"
stream type (RING on phones, MUSIC on tablets) is as follows:
If a vibrator is present:
VOL- and volume equals 1: NORMAL => VIBRATE
VOL- and volume equals 0 and not continuous press: VIBRATE => SILENT
VOL+ and in SILENT mode: SILENT => VIBRATE
VOL+ and in VIBRATE mode: VIBRATE => NORMAL, volume = 1
If no vibrator is present:
VOL- and volume equals 0 and not continuous press: NORMAL => SILENT
VOL+ and in SILENT mode: SILENT => NORMAL, volume = 0
VIBRATE_ON and VIBRATE_IN_SILENT settings are not stored/retreived any more.
AudioService checks and corrects ringer mode and stream volumes if necessary when reading from
DB at boot time.
Also:
Added dump for stream volumes in AudioService.
Added device names missing in AudioSystem for USB accessory and USB device.
Issue: 6036529
Issue: 6414950
Issue: 6448163
Change-Id: I77fb821ec63e4e566320cac2701b4ac466e86aef
Silent ringtones have a valid Uri, but isn't openable by MediaPlayer,
so treat as no-op playback instead of throwing. Also handle missing
permissions when resolving title.
Bug: 6448074, 6447538
Change-Id: I656675d7fc2e78a6ba05824e13bdd43193fcfdf2
This lets us avoid a Binder roundtrip to the system process during
volume changes. Previously volume change would be staged at key-down,
then applied at key up in tandem with playback of the sonic feedback
about volume key presses. The reason for this two-stage handling was
to defer playback of the sound [at the target volume] while the volume
key was being held for repeat.
On some devices volume is always sent as key down/up pairs rather than
down-repeat-up sequences. On these devices it is more efficient to
apply the new volume immediately during down handling, and have the
up handling be a no-op. This CL adds a configuration resource item
selecting this new fast path.
Bug 6433943
Change-Id: Icffa56e958243b841d514e2fe4609ba3a7b20f14