110 Commits

Author SHA1 Message Date
Eric Laurent
5964e73774 Fix issue 1946033: dialer deadlocks and/or ANRs when using dialpad in-call
The cause is very likely that the WaveGenerator *lpWaveGen returned by lpToneGen->mWaveGens.valueFor(lFrequency) just before calling lpWaveGen->getSamples(lpOut, lGenSmp, lWaveCmd) is invalid. The frequency lFrequency is not part of the frequencies in mWaveGens.
This can happen if a different tone is started while the callback function is active: The state is changed to TONE_RESTARTING and the call to prepareWave() at line 1226 will change the tone descriptor pointed to by mpToneDesc as well as the content of mWaveGens. However, mpToneDesc was cached in a local variable lpToneDesc when entering the callback and is not reloaded when exiting prepareWave(). This causes a mismatch between the tone frequencies listed in lpToneDesc and the frequencies present in mWaveGens.
This regression was introduced in change 973 when mpToneDesc was cached in a local variable.
2009-07-09 01:56:20 -07:00
Android (Google) Code Review
b799616d8f Merge change 6208 into donut
* changes:
  Move ExifInterface to android.media package so we can reference it from MediaScanner. Also hide public constructor and wrap common use cases as atomic operation to avoid race condition in jhead native codes.
2009-07-08 23:04:34 -07:00
Eric Laurent
4050c93601 Fix issue 1967295: Add a method to request reloading of audio settings by AudioService. 2009-07-08 06:59:50 -07:00
repo sync
20b03ea70b Move ExifInterface to android.media package so we can reference it from MediaScanner.
Also hide public constructor and wrap common use cases as atomic operation to avoid
race condition in jhead native codes.
2009-07-08 17:59:47 +08:00
Eric Laurent
88e209dcf8 Fix issue 1743700: AudioTrack: setPlaybackRate can not set the playback rate to twice of the ouputSR
Store sample rate on 32 bits instead of 16 bits in audio_track_cblk_t.
Removed sampleRate() methods from AudioTrack and AudioRecord: replaced by getSampleRate().
AudioTrack::setSampleRate() no returns a status.
2009-07-07 07:10:45 -07:00
Marco Nelissen
73bb511ade Don't trim() in the mediascanner, as that would remove the special "sort first" character. 2009-07-06 11:07:27 -07:00
Marco Nelissen
899725b05d Make sure ringtones are sorted correctly. 2009-07-06 10:57:01 -07:00
Android (Google) Code Review
2f8d58b7ae Merge change 5420 into donut
* changes:
  Added two test cases to trace the failure in closing the hw decoder and the current playtime is greater than the duration.
2009-06-30 11:41:05 -07:00
Yu Shan Emily Lau
f47b8e991f Added two test cases to trace the failure in closing the hw decoder and the current playtime is greater than the duration. 2009-06-30 11:13:06 -07:00
Dave Sparks
978811960a We might try to close the Vorbis file twice under certain
circumstances. This fix nulls the mFile member so we don't
try to close it twice. Bug 1904783.
2009-06-26 17:24:22 -07:00
Dave Sparks
5e27115995 Use a ref-counted callback interface for Camera.
This allows the camera service to hang onto the callback interface
until all callbacks have been processed. This prevents problems
where pending callbacks in binder worker threads are processed
after the Java camera object and its associated native resources
have been released.
Bug 1884362
2009-06-24 07:58:27 -07:00
Android (Google) Code Review
9efba9d29f Merge change 5176 into donut
* changes:
  Export the output to a text file and save to sdcard
2009-06-23 19:51:00 -07:00
Yu Shan Emily Lau
f16da13585 Export the output to a text file and save to sdcard 2009-06-23 19:36:43 -07:00
Android (Google) Code Review
1bee98af65 Merge change 5100 into donut
* changes:
  Fill in CDMA gaps and clean up ToneGenerator code
2009-06-23 13:38:34 -07:00
David Krause
b6d90ca129 Fill in CDMA gaps and clean up ToneGenerator code 2009-06-23 12:32:12 -07:00
Yu Shan Emily Lau
327420252c Rollback the number of loop in the memory stress test 2009-06-22 21:19:53 -07:00
Yu Shan Emily Lau
a74603052b Merge the output file into one. 2009-06-22 14:50:25 -07:00
Mike Lockwood
d1f362fe14 AudioService: Fix routing problem recently introduced in setRouting().
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>
2009-06-16 08:23:13 -04:00
Android (Google) Code Review
3d4b7065e9 Merge change 4047 into donut
* changes:
  Fix issue #899198	MODE_RINGER_STREAMS_AFFECTED does not restore volumes correctly
2009-06-12 08:33:59 -07:00
Eric Laurent
9bcf401d13 Fix issue #899198 MODE_RINGER_STREAMS_AFFECTED does not restore volumes correctly
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.
2009-06-12 06:09:28 -07:00
Nicolas Catania
32f8277488 Removed trailing whitespaces. 2009-06-11 16:54:48 -07:00
Android (Google) Code Review
1d7d5db74f Merge change 3799 into donut
* changes:
  Turned on the windows media related test cases as the binary already integrated.
2009-06-10 17:10:05 -07:00
Yu Shan Emily Lau
afbc17ead2 Turned on the windows media related test cases as the binary already integrated. 2009-06-10 15:46:32 -07:00
Marco Nelissen
a2df60598a Print a message to the log when a file can't be opened on the client side. 2009-06-09 15:49:23 -07:00
Android (Google) Code Review
b2df1699c9 Merge change 1548 into donut
* changes:
  NJ-1409: (frameworks/base) Support new audio encoding types(AMR and AAC).
2009-06-08 15:58:21 -07:00
Yu Shan Emily Lau
32e959163f Capture the memory output before the playback and record start. 2009-06-08 11:29:55 -07:00
Jianhong Jiang
2bcda90c02 NJ-1409: (frameworks/base) Support new audio encoding types(AMR and AAC). 2009-06-08 08:50:42 -07:00
Android (Google) Code Review
162c9d0e90 Merge change 2805 into donut
* changes:
  base: Rename WRITE_SDCARD -> WRITE_EXTERNAL_STORAGE
2009-06-01 09:58:44 -07:00
Android (Google) Code Review
450ad31b62 Merge change 2774 into donut
* changes:
  Limit check on maxChannels for SoundPool. Bug 1838724
2009-06-01 09:57:24 -07:00
San Mehat
5a3a77dabd base: Rename WRITE_SDCARD -> WRITE_EXTERNAL_STORAGE
Signed-off-by: San Mehat <san@google.com>
2009-06-01 09:25:28 -07:00
Dave Sparks
3c8704b171 Limit check on maxChannels for SoundPool.
Bug 1838724
2009-06-01 08:16:19 -07:00
Android (Google) Code Review
0f5179c7d3 Merge change 2716 into donut
* 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.
2009-05-29 14:17:44 -07:00
Dave Sparks
8b0b174198 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.
2009-05-29 13:51:38 -07:00
Android (Google) Code Review
f6355e24f5 Merge change 2399 into donut
* changes:
  Motorola additions for CDMA support without CdmaSuppConnTracker
2009-05-28 20:29:10 -07:00
Yu Shan Emily Lau
01c0596b75 Added the two validations for the memory stress test
1) Set the maximum memory leakage to 150K in 200 loops of playback.
2) Check the pid of the meidaserver.
2009-05-28 18:59:33 -07:00
Wink Saville
dda5391d50 Motorola additions for CDMA support without CdmaSuppConnTracker
There are corresponding changes to hardware/ril and packages/apps/Phone
that are required to go with these changes.
2009-05-28 17:32:34 -07:00
Dave Sparks
814941997f setVolume did not check interface descriptor
DO NOT MERGE
2009-05-26 14:39:29 -07:00
Eric Laurent
4bc035a65c Fix issue 1846343 - part 1
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.
2009-05-26 07:44:28 -07:00
Dave Sparks
6690dc5454 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
2009-05-20 19:20:31 -07:00
Android (Google) Code Review
379d3bd974 Merge change 2016 into donut
* changes:
  Replaced the old test media files with the new open source test media files. Fix the bug in testGetThumbnail test.
2009-05-19 16:51:29 -07:00
Yu Shan Emily Lau
be467b579e Replaced the old test media files with the new open source test media files.
Fix the bug in testGetThumbnail test.
2009-05-19 15:46:22 -07:00
Yu Shan Emily Lau
f30c700e13 Added the write sdcard permission so that the mediarecorder test
can write the new recorded video into sdcard.
2009-05-19 15:14:51 -07:00
Marco Nelissen
77f2c4c1f9 Document the media scanner's flow through native and java code, since
I always forget how it works after a while.
2009-05-19 10:00:33 -07:00
Xia Wang
55eef638fa 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. 2009-05-15 15:03:33 -07:00
Marco Nelissen
d282ac8610 Findbugs fixes. 2009-05-14 13:18:16 -07:00
Android (Google) Code Review
7f2ae493c5 Merge change 1370 into donut
* changes:
  Fix a JNI layer crash due to null camera object passed to get_native_camera() The fix will check on the camera object and if it is a null object, we throw a NullPointerException; application layer should also avoid passing a null java object to MediaRecorder.setCamera().
2009-05-11 12:18:55 -07:00
James Dong
429a3b5f1d Fix a JNI layer crash due to null camera object passed to get_native_camera()
The fix will check on the camera object and if it is a null object, we
throw a NullPointerException; application layer should also avoid passing a null
java object to MediaRecorder.setCamera().
2009-05-11 10:58:03 -07:00
Android (Google) Code Review
b85c37432b Merge change 1155 into donut
* changes:
  Don't allow negative numbers in ToneGenerator toneType parameter Bug 1836596
2009-05-07 11:52:06 -07:00
Android (Google) Code Review
0efb086884 Merge change 1120 into donut
* changes:
  Suppress all tests on Windows Media in MediaPlayerApiTest and MediaMetadataTest (Currently not supported by OpenCore 2.0)
2009-05-07 09:34:28 -07:00
Dave Sparks
4c92247098 Don't allow negative numbers in ToneGenerator toneType parameter
Bug 1836596
2009-05-07 09:26:06 -07:00