The problem is that even if silent mode is active, changing the alarm volume will change current
alarm stream volume. This is true for other stream types affected by ringer mode (ring, notification...) but
the UI design is such that it is not possible to change these volumes while in silent mode.
The fix consists in modifying AudioService.setStreamVolumeInt() so that when a stream is affected by ringer mode
and we are in silent mode, only the saved volume value is modified, current value remaining to unchanged (0).
In earlier versions of Android, "vibrate mode" (in which
only alarms and media produce sound, but notifications may
operate the vibe motor) was only accessible by adjusting the
ringer volume (via the device's volume rocker) down until
the "vibrate" icon appeared (between the lowest ring volume
and silent mode).
Many users prefer that "silent mode" always allow vibration.
Others prefer Android's historical behavior, in which silent
mode stops the vibes as well.
To accommodate these two distinct usage patterns, we now
allow the user to decide whether vibration is allowed in
"silent mode", a user interface abstraction that now spans
both AudioManager.RINGER_MODE_VIBRATE and
AudioManager.RINGER_MODE_SILENT.
To minimize API impact (and therefore maximize backward
compatibility), RINGER_MODE_VIBRATE and RINGER_MODE_SILENT
remain unchanged. What has changed is what happens when the
user activates silent mode, either via Settings,
GlobalActions (longpress on power), volume rocker, or the
keyguard tab. In essence, there is now only one "silent"
position in these controls, and whether RINGER_MODE_VIBRATE
or RINGER_MODE_SILENT is actually set on the AudioService is
determined by a new one-off setting
(System.VIBRATE_IN_SILENT). This new setting isn't meant to
be a long-term API, however: in the future we hope to
replace and extend this design with a much more
sophisticated set of systemwide feedback profiles. ETA TBD.
Related changes:
* I09ad7d69 (GlobalActions and keyguard)
* I22ba7bcf (Settings app)
Bug: 2457183
Change-Id: I14cf91b0910261ffdfd1bf302423f41ec747d057
- I decided to completely remove jpeg decoding related stuff from this change
I think that setting is better off if it is specified by the system properties.
We don't have to include MediaProfiles.h header in skia files
AudioService now sends intent AudioManager.VOLUME_CHANGED_ACTION when the volume is changed
on any stream type (previously the intent was sent only for STREAM_BLUETOOTH_SCO stream).
A new extra for previous volume value is added to the intent.
This implements the spec for external storage organization, and
properly reflects how the media scanner organizes the files it finds.
Also includes package manager support for removing app private
files from external storage when the application is uninstalled.
For the new APIs and paths, the main place to look is Environment
and Context.
Modified AudioService.getActiveStreamType() so that STREAM_VOICE_CALL is selected when a track using this stream
type is playing.
Chanded isMusicActive() for a more generic isStreamActive(stream) method in AudioSystem, IAudioFlinger and AudioFlinger.
This change fixes a problem occuring when an application (for instance a VoIP application)
changes the audio mode to MODE_IN_CALL and crashes. In this case, the audio routing policy
remains as if we were in call until the audio mode is changed back to MODE_NORMAL, for instance when a new call
made or received and terminated.
The fix consists in registering a death receipient to the binder that made the setMode() request and resetting the audio
mode in case of client process crash.
absolute path names. This allows us to store other things (perhaps
with http or content URIs) in the database, without the media scanner
removing them again.
Move reset of A2DP suspend state from handleSinkStateChange() in BluetoothA2dpService to
BluetoothA2dp.ACTION_SINK_STATE_CHANGED intent receiver in AudioService.
Previous implementation could cause a false reset of suspend state if a new sink attempted to
connect while A2DP was suspended.
New implementation only resets A2DP suspend state when a new sink is actually connected.
Merge commit '484d2888680e18e6ad8c3fcc51e3b70a705a096e' into eclair-mr2-plus-aosp
* commit '484d2888680e18e6ad8c3fcc51e3b70a705a096e':
Fix issue 2299360: Change in in-call volume affects the Bluetooth in-call volume and vice versa.
Add new config values to AudioSystem::FOR_DOCK force usage to differenciate car and desk docks.
Use a receiver for the sticky Intent.ACTION_DOCK_EVENT in AudioService to detect the type
of dock and select force usage accordingly.
Merge commit '3a3fd2ba1ffc6171725375396cc59711a34bb39e' into eclair-mr2-plus-aosp
* commit '3a3fd2ba1ffc6171725375396cc59711a34bb39e':
Implement API to have new broadcasts replace existing broadcasts.
Use this in various places where it should serve no purpose to deliver
both broadcasts. This is intended to reduce somewhat the flurry of
broadcasts that we churn through during boot.