If the "ro.audio.monitorOrientation" system property is
defined and true, monitor device configuration changes
and see if the device orientation changed. If it did,
set the "orientation" audio system parameter to one
of "landscape", "portrait", "square" or "undefined".
Set orientation when starting AudioService, and
when media server restarts.
Change-Id: Idce548f93abf3aab30149e5952daaa7051630232
Deprecate methods, intent and constants related to vibrate
settings management: getVibrateSetting(), setVibrateSetting(),
shouldVibrate() ...
According to new vibrate/notification policy, applications should
maintain their own vibrate settings.
Issue 6036529.
Change-Id: I99bcef2c5f602131f1d9b0222f7fb39f3bbef823
Changing STREAM_MUSIC from volume panel on tablets should exit silent
mode as does changing STREAM_RING on phones.
Issue 5970208.
Change-Id: Ia8ed62033da07a5d4dfcfa84b0b47b27414bdd9a
AudioService maintains a stack of registered media button event
receivers.
This change modifies the broadcasters of ACTION_MEDIA_BUTTON intents
let AudioService directly handle the corresponding key event instead
of trapping the intent sent by PhoneWindowManager, KeyguardViewBase
and PhoneFallbackEventHandler.
Because the key event may be sent through a PendingIntent,
AudioService now also implements the OnFinished interface to be
notified when the event was consumed so it can release the wake
lock held if it was held when the key event needed to be sent
(see where PassHeadsetKey was instanciated in PhoneWindowManager).
Change-Id: I2e8614df94af9d54edbf714ef443cc372d21827a
o made all the member variables in helper classes for TimedText to be public and final
since they are read-only
o removed Text and TextPos helper classes
o added two public methods in TimedText class: getText() and getBounds()
o cleaned up the javadoc of related methods in MediaPlayer.java and TimedText.java classes
o make the inner classes of TimedText static and final
o change invoke and let it throw RuntimeException on failure (thus a test class needs to be
modified also).
o related-to-bug: 6110705,5542712
Change-Id: Ia1dd1fd5eb8e9fd1b61c6c0d67405edb627a3002
Introduce IRingtonePlayer, which handles playback for both Ringtone
objects and Notifications. SystemUI now hosts this player, which it
registers with AudioService. It also keeps MediaPlayer instances
warm, and cleans them up after stop() or Binder death.
Move both Ringtone and NotificationManagerService to play back audio
through this new interface.
Bug: 6376128, 6350773
Change-Id: I1dcb86d16ee3c4f07cdb2248d33dcff4ead3609a
Implement a more consistent policy for system and UI sounds (key clicks, lock/unlock,
camera shutter, DTMF, low battery...):
- All system sounds are played over STREAM_SYSTEM stream type.
- The STREAM_SYSTEM volume that was previously fixed now tracks the volume of a "master"
stream type. This "master" stream type is STREAM_RING for phones and STREAM_MUSIC for
tablets which corresponds to the stream whose volume is modified by default by the volume
keys.
- The STREAM_SYSTEM volume ranges from -24dB to -6dB (-24dB to -12dB over headphones) when the
"master" stream volume ranges from its min to its max.
- DTMF tones are played over STREAM_DTMF that tracks the "master" stream volume in the same
manner with the following exception: when in call, DTMF stream tracks STREAM_VOICE_CALL volume.
- Camera shutter sound is played over STREAM_SYSTEM_ENFORCED stream that tracks the "master"
stream volume except in countries where regulation enforces this sound. In this case
its volume is fixed and cannot be muted.
- Low battery sound is played over STREAM_SYSTEM and therefore has a tunable volume and is
heard while in call.
Issue 6344620.
Issue 6069229.
Issue 6213100.
Change-Id: I53a237878ead596e706c5dbbb1420e62cde32bd7
AudioManager.forceVolumeControlStream() is used by VolumePanel to temporarily force the
stream type which volume is controlled by volume keys.
Current implementation is not working if the VolumePanel is not executed by the same process
as the one receiving the volume key events.
Issue 6302421.
Change-Id: I2700587a027ffb962429b42083312cd92fe79215
Previously when processing playlists, the entire audio table would be read for
every line in a playlist file. While there would be only one query, a lot of
data was being moved from sqlite to java over and over again, and if the data
didn't all fit in a CursorWindow, additional queries would be done under the
hood.
With this change, playlists are first cached in memory. Then the audio table
is queried, and for every row in the audio table, the best match from the
playlist cache is found. This way the audio table is only traversed once,
so each row is only fetched once. Once the entire audio table has been read,
the in-memory playlist cache contains the best matching entry for each line,
and the playlists are written out to the database. Currently, the audio table
is traversed once for each playlist. This could be further optimized in the
future by processing all playlists at the same time.
b/6346786
Change-Id: Iead3f9ae838d600d085e8e6d3c4874d42314468e
To give RINGTONE_PICKER external storage access, move it from system
to MediaProvider. Fix OOBE when getRingtoneUri() kicked requery().
Bug: 6346701
Change-Id: I837002eef0580b8cdd8920a27b068c745995a8a3
Compare the channel configuration against a mask of the public
channel masks in AudioFormat for up to 5.1 with back channels,
and allow combinations within this mask.
Change-Id: I84b72dfd88d4490f0c67bf10d13151a9eb06f6a8
o Throw runtime exception when selectTrack, unselectTrack, getTrackInfo fails
o remove redundant code for selectTrack and unselectTrack methods
o related-to-bug: 6110705,5542712
Change-Id: I59f0ed638e93d0365eccab1e33c9d50354a9c1ba
unhide MediaSyncEvent class and AudioRecord.startRecording() method with synchronization
event allowing to start audio capture upon occurence of a specific event.
So far the only event defined is playback presentation complete but more events and synchronized
playback/capture methods could be defined in the future.
Change-Id: If05fc6cd125dd9afad451727f792a3fd9e916bef
Unhide APIs for Noise Suppressor(NS), Acoustic Echo Canceler (AEC) and
Automatic Gain Control (AGC) audio pre processings.
Also unhide getAudioSessionId() method on AudioRecord.
Change-Id: I788f7a0724b152cc98c8167d9434e64c12bada95
New API on MediaExtractor to retrieve a CryptoInfo structure where applicable.
Change-Id: I18edfc9ac56a4544c8f17cba24401b96dacbff7d
related-to-bug: 6275919
o the failure was because the mediaserver does not have read permission to sdcard
o related-to-bug: 6325960,6322913
Change-Id: I4feec01b8165c78563eee8aab69cb24df3244d03