Do not disable a route unless routes is zero, to avoid accidentally disabling
if the same route is enabled twice in a row.
Signed-off-by: Mike Lockwood <lockwood@android.com>
The problem is that setRingerModeInt() does not handle streams not affected by ringer mode: when enabling "Alarm in silent mode" while in silent mode, setRingerModeInt is called after alarm streamis removed from ringer mode affected streams, and nothing is done.
The fix constists in also processing streams that are not affected by ringer mode and to restore last audible volume for them. It does not arm reapplying the volume for streams the are never affected by ringer mode as we don't do this very often.
The other problem noted in the bug report (ringer volume always restored to non zero value when exiting silent mode even if set to zero before) is also fixed: a new parameter is added to setIndex() and setStreamVolumeInt() to explicitely request to store the volume index as last audible instead of doing it automatically if index > 0.
Merge commit '1d7d5db74f14e871c7be719a0cddf52a5a40dcbf'
* commit '1d7d5db74f14e871c7be719a0cddf52a5a40dcbf':
Turned on the windows media related test cases as the binary already integrated.
Merge commit 'faf410443f0c2ab2d30a1c8ce90f83157b5e593b'
* commit 'faf410443f0c2ab2d30a1c8ce90f83157b5e593b':
Print a message to the log when a file can't be opened on the client side.
Merge commit 'b2df1699c996e62baa78877978cd2c5607ea4194'
* commit 'b2df1699c996e62baa78877978cd2c5607ea4194':
NJ-1409: (frameworks/base) Support new audio encoding types(AMR and AAC).
Merge commit 'bdf90a08a22189254274078ed39ec5a1db37a0b3'
* commit 'bdf90a08a22189254274078ed39ec5a1db37a0b3':
Capture the memory output before the playback and record start.
* changes:
Update MediaPlayer to allow setVideoSurface calls after prepare. Also allow passing a null surface. The API is now enabled to change the surface while the video is playing. This could allow orientation changes during playback or to allow the audio track from a video to play in the background. NOTE: There are still changes required to pmem driver to allow remapping shared physical memory into a process in order for this to work. This change only enables the API to send the appropriate calls when the lower level code supports it.
passing a null surface. The API is now enabled to change the surface while
the video is playing. This could allow orientation changes during playback
or to allow the audio track from a video to play in the background.
NOTE: There are still changes required to pmem driver to allow remapping
shared physical memory into a process in order for this to work. This
change only enables the API to send the appropriate calls when the lower
level code supports it.
Merge commit 'f6355e24f5382356ea197135fdeff827aabfdb90'
* commit 'f6355e24f5382356ea197135fdeff827aabfdb90':
Motorola additions for CDMA support without CdmaSuppConnTracker
Merge commit '2af7e639906981b1562f3187a60b6c848b7da17c'
* commit '2af7e639906981b1562f3187a60b6c848b7da17c':
Added the two validations for the memory stress test
- make sure that all binder Bn classes define a ctor and dtor in their respective library.
This avoids duplication of the ctor/dtor in libraries where these objects are instantiated.
This is also cleaner, should we want these ctor/dtor to do something one day.
- same change as above for some Bp classes and various other non-binder classes
- moved the definition of CHECK_INTERFACE() in IInterface.h instead of having it everywhere.
- improved the CHECK_INTERFACE() macro so it calls a single method in Parcel, instead of inlining its code everywhere
- IBinder::getInterfaceDescriptor() now returns a "const String16&" instead of String16, which saves calls to String16 and ~String16
- implemented a cache for BpBinder::getInterfaceDescriptor(), since this does an IPC. HOWEVER, this method never seems to be called.
The cache makes BpBinder bigger, so we need to figure out if we need this method at all.
This change is the first part of a fix for issue 1846343, :
- Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources.
- renamed streamType to inputSource in all native functions handling audio record.
A second change is required in opencore author driver and android audio input to completely fix the issue.
Merge commit 'c1c82509fb78403a969040cf057a66cbe3bfa538'
* commit 'c1c82509fb78403a969040cf057a66cbe3bfa538':
Fix permission hole for RECORD_AUDIO created when we moved the MediaRecorder
implementation to the mediaserver process. The permission check was previously
enforced only at the AudioRecord binder interface for clients not in the same
process. This change adds an additional check when the client tries to set
the audio source.
Bug 1868334
Merge commit '379d3bd974cfde9480fda733d4f442311924cbb9'
* commit '379d3bd974cfde9480fda733d4f442311924cbb9':
Replaced the old test media files with the new open source test media files.
Merge commit '988c4d1a3ece97c078658a67b15949db900641e0'
* commit '988c4d1a3ece97c078658a67b15949db900641e0':
Added the write sdcard permission so that the mediarecorder test
Merge commit '65ff54c44bbd8c1dd6818d42b7c91c634c644aa9'
* commit '65ff54c44bbd8c1dd6818d42b7c91c634c644aa9':
Document the media scanner's flow through native and java code, since
Merge commit 'b3af6b4805040ea42c01765387c99089822bbe7e'
* commit 'b3af6b4805040ea42c01765387c99089822bbe7e':
Add a tool to play all kinds of media files saved in /sdcard/media_api/samples/. It also tests the seeking functionality during the play of each sample file.