1106 Commits

Author SHA1 Message Date
Kenny Root
19138468ca Optional use of UTF-8 strings in resource bundles
Allows the use of UTF-8 for packing resources instead of the
default of UTF-16 for Java. When strings are extracted from the
ResStringPool, they are converted to UTF-16 and the result is
cached for subsequent calls.

When using aapt to package, add in the "-8" switch to pack the
resources using UTF-8. This will result in the value, key, and
type strings as well as the compiled XML string values taking
significantly less space in the final application package in
most scenarios.

Change-Id: I129483f8b3d3b1c5869dced05cb525e494a6c83a
2009-12-07 15:14:15 -08:00
Eric Laurent
38f6bdc418 am 0a08029f: Fix issue 2306779: Runtime restart - Init failed at android.media.ToneGenerator.
Merge commit '0a08029fc9a370c6ef2a2a6fd1d800d9159b61f8' into eclair-mr2

* commit '0a08029fc9a370c6ef2a2a6fd1d800d9159b61f8':
  Fix issue  2306779: Runtime restart - Init failed at android.media.ToneGenerator.
2009-12-07 12:36:30 -08:00
Eric Laurent
0a08029fc9 Fix issue 2306779: Runtime restart - Init failed at android.media.ToneGenerator.
The ToneGenerator failed to initialize because no more tracks were available in AudioFlinger mixer.

All tracks were used because the duplicating output was failing to free the tracks on audio hardware output mixer when exiting due to a misplaced test on output activity: output tracks where only freed if the duplicating output was active when exiting.

The fix consists in freeing the output tracks when the duplicating thread is destroyed without condition.
2009-12-07 12:30:22 -08:00
Eric Laurent
b8341cf7c8 am 6d42d806: Merge change I9cc489a2 into eclair
Merge commit '6d42d80653f2c41f3e72a878a1d9a6f9693b89f7' into eclair-mr2

* commit '6d42d80653f2c41f3e72a878a1d9a6f9693b89f7':
  Fix issue 2304669: VoiceIME: starting and canceling voice IME yields persistent "error 8" state on future attempts and breaks voice search.
2009-12-07 11:03:17 -08:00
Android (Google) Code Review
6d42d80653 Merge change I9cc489a2 into eclair
* changes:
  Fix issue 2304669: VoiceIME: starting and canceling voice IME yields persistent "error 8" state on future attempts and breaks voice search.
2009-12-07 11:00:54 -08:00
Eric Laurent
9cc489a219 Fix issue 2304669: VoiceIME: starting and canceling voice IME yields persistent "error 8" state on future attempts and breaks voice search.
Fixed AudioFlinger::openInput() broken in change ddb78e7753be03937ad57ce7c3c842c52bdad65e
so that an invalid IO handle (0) is returned in case of failure.
Applied the same correction to openOutput().
Modified RecordThread start procedure so that a failure occuring during the first read from audio input stream is detected and causes
the record start to fail.
Modified RecordThread stop procedure to make sure that audio input stream fd is closed before we exit the stop function.

Fixed AudioRecord JAVA and JNI implementation to take status of native AudioRecord::start() into account
and not change mRecordingState to RECORDSTATE_RECORDING if start fails.
2009-12-07 05:37:47 -08:00
Dima Zavin
401f422078 am 0019215f: Revert "When using MDP, we needed to use a texture for diming."
Merge commit '0019215fc395ef12c191049b1903eeabf70859cf' into eclair-mr2

* commit '0019215fc395ef12c191049b1903eeabf70859cf':
  Revert "When using MDP, we needed to use a texture for diming."
2009-12-07 01:36:26 -08:00
Dima Zavin
0019215fc3 Revert "When using MDP, we needed to use a texture for diming."
This reverts commit bf0c320afbf6bf2441916755ecb443b64afbe73f.
2009-12-07 00:17:06 -08:00
Erik Gilling
1d51165f49 am 20208ff6: am 9b565d5b: am cef8d031: Merge change I00d0b54a into eclair
Merge commit '20208ff643b33956c93d1f3fa1fa2c2d06fc7d02'

* commit '20208ff643b33956c93d1f3fa1fa2c2d06fc7d02':
  surfaceflinger: remove un-cached buffer hack for SGX
2009-12-04 04:28:12 -08:00
Android (Google) Code Review
5c49a9080d Merge change Ic73ec39b into eclair
* changes:
  DO NOT MERGE. Implement WAR which should prevent the white square bug from appearing on user devices.  If we see a 0 texture id during bind for rendering, attempt to re-upload.  If this fails log debug info and restart the app.
2009-12-03 16:15:46 -08:00
Jason Sams
c73ec39bd0 DO NOT MERGE. Implement WAR which should prevent the white square bug from appearing on user devices. If we see a 0 texture id during bind for rendering, attempt to re-upload. If this fails log debug info and restart the app. 2009-12-03 15:43:18 -08:00
Erik Gilling
9b565d5bf3 am cef8d031: Merge change I00d0b54a into eclair
Merge commit 'cef8d031e842b773bbd6481b517996a185391e92' into eclair-mr2

* commit 'cef8d031e842b773bbd6481b517996a185391e92':
  surfaceflinger: remove un-cached buffer hack for SGX
2009-12-03 15:35:55 -08:00
Erik Gilling
00d0b54af1 surfaceflinger: remove un-cached buffer hack for SGX
Signed-off-by: Erik Gilling <konkers@android.com>
2009-12-03 14:09:31 -08:00
Mathias Agopian
a65168a0d3 am 2aa10791: am 96dac84b: am 121a31ac: Merge change Id86beb99 into eclair
Merge commit '2aa107917b5a7e6de720a34c4701de55ee9772eb'

* commit '2aa107917b5a7e6de720a34c4701de55ee9772eb':
  fix [2291418] Camera preview cannot work in Emulator
2009-12-02 20:46:21 -08:00
Eric Laurent
2f065852d6 am 52d390e8: am 6076046a: am 1ac56b60: Merge change Iac196e17 into eclair
Merge commit '52d390e8892967c1fad717a00731c0a25e268686'

* commit '52d390e8892967c1fad717a00731c0a25e268686':
  Fix issue 2292062: Audio freezes for three seconds when choosing ringtones with a headset connected and music playing.
2009-12-02 20:28:16 -08:00
Mathias Agopian
67fd40f51b am 44dcf411: am f764dae4: am 33ad0f9e: Merge change I0e44976a into eclair
Merge commit '44dcf411b01bdbd0ae2aeef3e958403a1096f36b'

* commit '44dcf411b01bdbd0ae2aeef3e958403a1096f36b':
  fix [2297155] SurfaceFlinger's freeze-timeout doesn't work
2009-12-02 20:27:37 -08:00
Mathias Agopian
96dac84be4 am 121a31ac: Merge change Id86beb99 into eclair
Merge commit '121a31ac3901fcb81c808da2b4a9a7cf66c12b7c' into eclair-mr2

* commit '121a31ac3901fcb81c808da2b4a9a7cf66c12b7c':
  fix [2291418] Camera preview cannot work in Emulator
2009-12-02 17:50:45 -08:00
Mathias Agopian
d86beb99a7 fix [2291418] Camera preview cannot work in Emulator
The image buffer used by glTexImage2d() would be uninitialized when no copybit engine
can be found.
We now always initialize images, since the abscence of copybit is not necessarily fatal.
2009-12-02 16:23:11 -08:00
Eric Laurent
6076046a11 am 1ac56b60: Merge change Iac196e17 into eclair
Merge commit '1ac56b602aa6a1ac54c608e5a8b76f44638db23b' into eclair-mr2

* commit '1ac56b602aa6a1ac54c608e5a8b76f44638db23b':
  Fix issue 2292062: Audio freezes for three seconds when choosing ringtones with a headset connected and music playing.
2009-12-02 09:48:52 -08:00
Mathias Agopian
f764dae4a5 am 33ad0f9e: Merge change I0e44976a into eclair
Merge commit '33ad0f9ec8d47660b16ced45242a45f369fe2547' into eclair-mr2

* commit '33ad0f9ec8d47660b16ced45242a45f369fe2547':
  fix [2297155] SurfaceFlinger's freeze-timeout doesn't work
2009-12-02 09:47:48 -08:00
Android (Google) Code Review
1ac56b602a Merge change Iac196e17 into eclair
* changes:
  Fix issue 2292062: Audio freezes for three seconds when choosing ringtones with a headset connected and music playing.
2009-12-01 22:39:33 -08:00
Mathias Agopian
2b9d7b1d60 am a628e023: am 102f4dbb: am 8e4a110b: Merge change I5469a4ac into eclair
Merge commit 'a628e0238519a596e2d10981aae0aab65418f271'

* commit 'a628e0238519a596e2d10981aae0aab65418f271':
  fixed [2260070] display stopped updating
2009-12-01 18:51:13 -08:00
Mathias Agopian
0e44976aa4 fix [2297155] SurfaceFlinger's freeze-timeout doesn't work
There was bug in the logic that calculated the relative timeout, the start time was
reset each time an event was received, which caused the timeout to never occur if
an application was constantly redrawing.

Now we always check for a timeout when we come back from the waitEvent() and
process the "anti-freeze" if needed, regardless of whether an event was received.
2009-12-01 17:23:28 -08:00
Mathias Agopian
102f4dbb23 am 8e4a110b: Merge change I5469a4ac into eclair
Merge commit '8e4a110b3e146b30b804d7e2cd0825bf56bd7d0f' into eclair-mr2

* commit '8e4a110b3e146b30b804d7e2cd0825bf56bd7d0f':
  fixed [2260070] display stopped updating
2009-12-01 17:10:08 -08:00
Eric Laurent
ac196e175d Fix issue 2292062: Audio freezes for three seconds when choosing ringtones with a headset connected and music playing.
The problem comes from a deadlock with AudioPolicyService mutex: When the second ringtone starts,
this mutex is locked by AudioPolicyService::startOutput() which in turn calls setParameters() to change the output device.
Audioflinger::ThreadBase::setParameters() signals the parameter change to the AudioFlinger mixer thread and waits for a condition
indicating that the parameter change has been processed.
At the same time, the mixer thread detects that the audio track corresponding to the first ring tone has been killed and calls its destructor.
This calls AudioPolicyService::releaseOutput() which tries to lock the AudioPolicyService mutex.
If this happens before the mixer thread can process the setParameters() command we are deadlocked.
The deadlock ends because setParameters() uses a timeout when waiting for the condition.

This regression was introduced by change 33736 fixing issue 2265163.

The fix consists in calling AudioPolicyService::releaseOutput() from Track::destroy() instead of from Track destructor: as detroy() is never called from the mixer thread loop (as opposed to the destructor) the deadlock described above cannot occur.
2009-12-01 02:17:41 -08:00
Jason Sams
54c0ec14e0 Beging GL2 user shaders. Switch master to using GL2 by default. 2009-11-30 15:34:03 -08:00
Mathias Agopian
5469a4ac1c fixed [2260070] display stopped updating
always check that the visible region isn't empty after all visible regions are recomputed
clear he freeze-lock if it is.
2009-11-30 11:15:41 -08:00
Jason Sams
7efde12a03 Fix film 2009-11-25 15:14:50 -08:00
Jason Sams
bb51c40d89 Begin gl2 support. Renderscript still uses GL1.1 by default. However, 2.0 can be enabled and will render most tests correctly. 2009-11-25 13:22:07 -08:00
Eric Laurent
3fdee335fe am 3f6ee1a1: am 1565d2ef: Merge change I4ad9ec48 into eclair-mr2
Merge commit '3f6ee1a180268ca2e30723ce2c45b81c2e671abb'

* commit '3f6ee1a180268ca2e30723ce2c45b81c2e671abb':
  Fix A2dpAudioInterface getParameters.
2009-11-25 11:17:03 -08:00
Eric Laurent
4ad9ec488c Fix A2dpAudioInterface getParameters.
A2dpAudioInterface::getParameters() was prepending a ';' to the key value pair returned from underlying AudioHardwareInterface.
2009-11-25 06:08:44 -08:00
Mathias Agopian
02395a2788 am 40f92fe9: am 1e22cffa: am 63851404: Merge change Ibf0c320a into eclair
Merge commit '40f92fe967f36d524d173b7819dc875af2cd9971'

* commit '40f92fe967f36d524d173b7819dc875af2cd9971':
  When using MDP, we needed to use a texture for diming.
2009-11-24 15:02:25 -08:00
Android (Google) Code Review
6385140481 Merge change Ibf0c320a into eclair
* changes:
  When using MDP, we needed to use a texture for diming.
2009-11-24 14:26:28 -08:00
Jason Sams
0a2e7a3963 am e4df64bd: am 66358e24: am 9dab667e: Force a crash under conditions where white square bug in all apps is likely to occur.
Merge commit 'e4df64bdaaf86fb7d06715de122a97d723d7fea2'

* commit 'e4df64bdaaf86fb7d06715de122a97d723d7fea2':
  Force a crash under conditions where white square bug in all apps is likely to occur.
2009-11-24 12:57:57 -08:00
Jason Sams
9dab667e03 Force a crash under conditions where white square bug in all apps is likely to occur. 2009-11-24 12:26:35 -08:00
Mathias Agopian
bf0c320afb When using MDP, we needed to use a texture for diming. 2009-11-23 22:41:36 -08:00
Jason Sams
79e2646504 am 9f96a37a: am 6a2500a3: am 39dbb099: Merge change I36176536 into eclair
Merge commit '9f96a37aabbffffe719c1dfb73b5c437f190bcf0'

* commit '9f96a37aabbffffe719c1dfb73b5c437f190bcf0':
  Fix ref counting bug that could cause memory leak in allApps.
2009-11-23 16:29:46 -08:00
Jason Sams
361765361a Fix ref counting bug that could cause memory leak in allApps. 2009-11-23 15:28:55 -08:00
Eric Laurent
0b74d40ac1 am 86526461: am 949c572a: am e7800946: Merge change I49f02be9 into eclair
Merge commit '8652646105a6ace559280b579ee8935541ada6c1'

* commit '8652646105a6ace559280b579ee8935541ada6c1':
  Issue 2265163: Audio still reported routed through earpiece on sholes
2009-11-21 00:29:36 -08:00
Android (Google) Code Review
e7800946a4 Merge change I49f02be9 into eclair
* changes:
  Issue 2265163: Audio still reported routed through earpiece on sholes
2009-11-21 00:18:24 -08:00
Dianne Hackborn
5973cbc163 am e71db657: am f2900600: am 1824ec8c: Merge change If2b0bbed into eclair
Merge commit 'e71db6579c2afe06fe95dd88217a667d18fe4e20'

* commit 'e71db6579c2afe06fe95dd88217a667d18fe4e20':
  Debugging for issue #2228381 android.view.InflateException
2009-11-20 15:31:17 -08:00
Dianne Hackborn
b8d8167955 Debugging for issue #2228381 android.view.InflateException
Binary XML file line #37: Error inflating class <unknown> after adding a secondary account

Now that I have these debug logs, I want to keep them since they will make
debugging these kinds of issues a lot easier in the future.  (Note in this
case there was no problem in the framework.)

Change-Id: If2b0bbeda4706b7c5dc1ba4a5db04b74f40e1543
2009-11-20 14:26:42 -08:00
Eric Laurent
49f02be9d7 Issue 2265163: Audio still reported routed through earpiece on sholes
This is a second attempt to fix the audio routed to earpiece syndrom.
The root cause identified this time is the crash of an application having an active AudioTrack playing on the VOICE_CALL stream type.
When this happens, the AudioTrack destructor is not called and the audio policy manager is not notified of the track stop.
Results a situation where the VOICE_CALL stream is considered as always in use by audio policy manager which makes that audio is routed to earpiece.

The fix consists in moving the track start/stop/close notification to audio policiy manager from AudioTrack to AudioFlinger Track objet.
The net result is that in the case of a client application crash, the AudioFlinger TrackHandle object (which implements the remote side of the IAudioTrack binder interface) destructor is called which in turn destroys the Track object and we can notify the audio policy manager of the track stop and removal.

The same modification is made for AudioRecord although no bug related to record has been reported yet.
Also fixed a potential problem if record stop is called while the record thread is exiting.
2009-11-19 23:57:45 -08:00
Mathias Agopian
5e04bbc761 am 9aaf01b9: am 793810f6: am 23aa34a7: Merge change I137dac6f into eclair
Merge commit '9aaf01b9d03e931c9d37858562ea47dbaf44a3be'

* commit '9aaf01b9d03e931c9d37858562ea47dbaf44a3be':
  backout a workaround that is not needed anymore
2009-11-19 17:45:20 -08:00
Mathias Agopian
0fd4a3007c am ce18c968: am fc64165e: am 74a331b5: Merge change I4c29c948 into eclair
Merge commit 'ce18c9680e3c151dcd4df5cdaa9fa352ad134691'

* commit 'ce18c9680e3c151dcd4df5cdaa9fa352ad134691':
  fix [2269022] The raw picture displayed post shutter seems to have low-resolution
2009-11-19 17:44:33 -08:00
Jason Sams
857d2b1565 am 93f409b5: am d581b1a8: am ddac83a5: Fix extended logging for object dumping.
Merge commit '93f409b5f7992767594107b7f468143e4a89a8c1'

* commit '93f409b5f7992767594107b7f468143e4a89a8c1':
  Fix extended logging for object dumping.
2009-11-19 17:43:24 -08:00
Mathias Agopian
137dac6f10 backout a workaround that is not needed anymore
we had to add a call to glFinish() before glReadPixels() because of a bug in the GL ES
driver of a certain device. This is not needed anymore.
2009-11-19 15:52:28 -08:00
Android (Google) Code Review
74a331b5dd Merge change I4c29c948 into eclair
* changes:
  fix [2269022] The raw picture displayed post shutter seems to have low-resolution
2009-11-19 15:44:13 -08:00
Mathias Agopian
4c29c9487e fix [2269022] The raw picture displayed post shutter seems to have low-resolution
Make sure to always enable linear filtering in LayerBuffer. This change doesn't affect
devices using overlays.
2009-11-19 14:46:26 -08:00
Jason Sams
ddac83a516 Fix extended logging for object dumping. 2009-11-19 13:08:17 -08:00