2164 Commits

Author SHA1 Message Date
Ben Komalo
13c7197da8 Revert encryption mapping for device wipes.
External storage volumes that were emulated+encrypted needed to have
their encryption mapping removed so that it doesn't try to encrypt the
volume after formatting them.

This just wires through an argument through vold, and assumes that vold
will do the right thing even if there is no encryption mapping set.

Bug: 5017638
Change-Id: I858fae3d12cb415bc34637f520f71220ad9daaad
2011-09-09 14:44:40 -07:00
Dave Burke
fc301b0bb5 Require INTERNET permission for network-based content.
Bug #1870981

Change-Id: Ia3ad166390c4d60cea19c3783895b078a2c4c15f
2011-09-02 11:26:59 +01:00
Wu-cheng Li
98bb251c8b Add video snapshot camera parameter.
The API is still hidden.

bug:5187868

Change-Id: I59e1b5774ca32be049723d1a0887faa90d8884bb
2011-09-01 13:37:14 +08:00
Pannag Sanketi
abf82f9ea4 Merge "Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource" 2011-08-31 22:00:35 -07:00
Pannag Sanketi
ffd056fc73 Incr. MIN_UNDEQUEUED_BUFFERS in SurfaceMediaSource
The buffers in SurfaceMediaSource were 4 earlier, whereas
we need 5 for one of the devices.

Change-Id: I87bf5e28bbb0f7c9661dc01b040baa903d95d2c2
2011-08-31 17:43:24 -07:00
Eino-Ville Talvala
b2c4f0bf11 Merge "Fix SurfaceMediaSource timestamp handling." 2011-08-31 13:41:06 -07:00
Mathias Agopian
c21843a8b5 Merge "fix Surface positions are not floats" 2011-08-30 19:24:04 -07:00
Mathias Agopian
34cb9f2a96 fix Surface positions are not floats
Added Surface.setPosition(float, float) which allows to set a surface's
position in float.

Bug: 5239859
Change-Id: I903aef4ad5b5999142202fb8ea30fe216d805711
2011-08-30 18:51:54 -07:00
Eric Laurent
0e35c78d25 Merge "226483: A2DP connected, but music out to speaker" 2011-08-30 10:51:54 -07:00
Eino-Ville Talvala
728e08bc3f Fix SurfaceMediaSource timestamp handling.
Was not basing timestamps on startTimeUs.
Now synchronizes properly with audio.

Bug: 4510826
Change-Id: I613db0aa91e51fc75d120e65540e742d8ab2ae43
2011-08-30 10:49:15 -07:00
Eric Laurent
05ce094164 226483: A2DP connected, but music out to speaker
When the A2DP headset is connected, there is a possible
race condition when the audio tracks are moved from
the mixer thread attached to the speaker output to the thread
attached to A2DP output.
As the request to clear the stream type to output mapping cache in
the client process is asynchronous, it is possible that the flag
indicating to the client audio track to re-create the IAudioTrack
on the new thread is processed before the cache is invalidated.
In this case, the track will be attached to the old thread and
music will continue playing over the device speaker instead of being
redirected to A2DP headset.

Change-Id: Ib2ce1eb5320eaff83287b93779061bf4e7a330df
2011-08-30 10:19:38 -07:00
Glenn Kasten
b4bf90b40e Merge "Add C++ thread API androidGetThreadSchedulingGroup" 2011-08-29 14:38:52 -07:00
Pannag Sanketi
b8a9e15c2a Merge "Modify enum value of OMX_COLOR_FormatAndroidOpaque" 2011-08-26 20:05:58 -07:00
Pannag Sanketi
4da5660eee Modify enum value of OMX_COLOR_FormatAndroidOpaque
The enum value chosen earlier had a conflict with one of the vendors.

Change-Id: I47832dd1157447f89324d56e8ab146260cd7927c
2011-08-26 19:38:13 -07:00
Andreas Huber
539340fe2c Merge "Support for posting messages and synchronously waiting for a response." 2011-08-26 13:47:26 -07:00
Jean-Michel Trivi
22cb204cbb Bug 4364249 Play position is 0 after flushing AudioTrack
AudioTrack::stop() is not synchronous, so a stop() followed
 by flush(), which is synchronous, will not always report
 a playhead position of 0 after being called.
This CL adds a flag to mark a track as flushed, and report the
 correct playhead position in this state.
Bug 5217011 has been created to address the real issue in the
 future, where flush could be made synchronous, to properly
 address bug 4364249.

Change-Id: Icf989d41a6bcd5985bb87764c287f3edb7e26d12
2011-08-25 17:33:49 -07:00
Andreas Huber
e688257456 Support for posting messages and synchronously waiting for a response.
Change-Id: Id6c7a08c34fd5cb6c4632f78ece9e7898b29e52c
2011-08-25 16:28:18 -07:00
Pannag Sanketi
409f95ff89 Merge "Testing the GL/ CPU encoding w/ Gralloc buffers" 2011-08-24 15:18:07 -07:00
Pannag Sanketi
557b7092cc Testing the GL/ CPU encoding w/ Gralloc buffers
This is the test for Gralloc buffers based encoding.
contains a combination of two main changes:

1. GL based encoding tests added to SurfaceMediaSource_test

2. SurfaceMediaSource ::read() colorformat

The SurfaceMediaSource::getformat() sets it to OMX_COLOR_FormatAndroidOpaque.
The omx encoder needs to interpret that colorformat and reads the format
from the Gralloc buffers directly

Change-Id: Iee2fe8901384109a4952e1d6c528c59eb01eb5b1
2011-08-24 13:57:46 -07:00
Jamie Gennis
d52c14df02 SurfaceFlinger: use the HWC gralloc usage bit
This change makes SurfaceFlinger always use the
GRALLOC_USAGE_HW_COMPOSER usage bit when allocating buffers that may be
passed to the HWComposer.

Change-Id: I70362a8ede2b359fb2046853f85149d597465817
2011-08-22 14:56:29 -07:00
Jeff Brown
65fd251c39 Input system bug fixes, particularly for stylus.
Bug: 5049148

Finished stylus support, including support for indirect stylus
and mouse tools.

Added TILT axis.  When stylus tilt X/Y is available, it is transformed
into an orientation and tilt inclination which is a more convenient
representation and a simpler extension to the exiting API.

Touch devices now only report touch data using a single input
source.  Previously touch devices in pointer mode would report
both absolute touch pad data and cooked pointer gestures.
Now we just pick one.  The touch device switches modes as needed
when the focused application enables/disables pointer gestures.
This change greatly simplifies the code and reduces the load
on the input dispatcher.

Fixed an incorrect assumption that the value of ABS_(MT_)DISTANCE
would be zero whenever the stylus was in direct contact.  It appears
that the correct way to determine whether the stylus is in direct
contact (rather than hovering) is by checking for a non-zero
reported pressure.

Added code to read the initial state of tool buttons and axis values
when the input devices are initialized or reset.  This fixes
problems where the input mapper state might have the wrong initial
state.

Moved responsibility for cancelling pending inputs (keys down,
touches, etc.) to the InputDispatcher by sending it a device reset
notification.  This frees the InputReader from having to synthesize
events during reset, which was cumbersome and somewhat brittle
to begin with.

Consolidated more of the common accumulator logic from
SingleTouchInputMapper and MultiTouchInputMapper into
TouchInputMapper.

Improved the PointerLocation output.

Change-Id: I595d3647f7fd7cb1e3eff8b3c76b85043b5fe2f0
2011-08-19 15:02:26 -07:00
Rajneesh Chowdury
3ced044154 Fix for 4142219 Don't hard code platform-specific limitations (Jni/ Java)
Also fixes 5118207 add other video codec support for video editor export.

Change-Id: If72427173bd8ff684af07ba00f4425c1deef29c6
2011-08-19 14:34:47 -07:00
Jamie Gennis
c8f4c6a5d0 Merge "SurfaceTexture: fix queues-to-composer" 2011-08-18 14:31:39 -07:00
Wu-cheng Li
fde00591c6 Merge "Add new camera focus mode FOCUS_MODE_CONTINUOUS_PICTURE." 2011-08-17 22:24:53 -07:00
Jamie Gennis
9b8fc65b03 SurfaceTexture: fix queues-to-composer
This change fixes the NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER query of
Surface and SurfaceTextureClient.  Surface now uses the inherited
SurfaceTextureClient implementation of this query.  SurfaceTextureClient
now queries SurfaceFlinger to determine whether buffers that are queued
to its ISurfaceTexture will be sent to SurfaceFlinger (as opposed to
some other process).

Change-Id: Iff187e72f30d454229f07f896b438198978270a8
2011-08-17 18:19:00 -07:00
Mathias Agopian
c395530de8 Merge "don't return the current buffer from dequeueBuffer" 2011-08-17 16:45:35 -07:00
Mathias Agopian
8618ebcc5d don't return the current buffer from dequeueBuffer
we were not reseting mCurrentTexture in some situations
which in turn caused dequeueBuffers() return a
"FREE" buffer that was also current.
Very often it was harmless, but it created a race with
updateTexImage() which could cause the following
queueBuffers() to fail.

Bug: 5156325
Change-Id: If15a31dc869117543d220d6e5562c57116cbabdb
2011-08-17 15:49:13 -07:00
Xavier Ducrohet
32f6846516 am ddf155b8: am 5dcda1fd: am 88512f59: am a8313e71: Merge "Fix String16 operator+ to actually work"
* commit 'ddf155b8338eb894a97612e4cb21257c11d8434a':
  Fix String16 operator+ to actually work
2011-08-17 14:40:57 -07:00
Xavier Ducrohet
ddf155b833 am 5dcda1fd: am 88512f59: am a8313e71: Merge "Fix String16 operator+ to actually work"
* commit '5dcda1fda53bdc6dfe80cf37e62cacdc216224b1':
  Fix String16 operator+ to actually work
2011-08-17 14:38:15 -07:00
Xavier Ducrohet
5dcda1fda5 am 88512f59: am a8313e71: Merge "Fix String16 operator+ to actually work"
* commit '88512f59bc051a42f4dd70acc8af5622f7e99db6':
  Fix String16 operator+ to actually work
2011-08-17 14:35:20 -07:00
Xavier Ducrohet
88512f59bc am a8313e71: Merge "Fix String16 operator+ to actually work"
* commit 'a8313e71fe8b483448d14e22610101c5f3672744':
  Fix String16 operator+ to actually work
2011-08-17 14:31:08 -07:00
Wu-cheng Li
b9ac75d3df Add new camera focus mode FOCUS_MODE_CONTINUOUS_PICTURE.
The API is still hidden.

bug:5086125
Change-Id: I69268a95ad6aae249771d3a8dfb423ffe2d87081
2011-08-18 00:15:40 +08:00
Josiah Gaskin
4d07453ded Fix String16 operator+ to actually work
This change fixes the String16 utility's operator+ function.

Change-Id: Ibed7b07277b50bf178febc72b6ce497893e66f17
2011-08-16 15:16:04 -07:00
Andreas Huber
d84fd7927e Error handling in ACodec and Nuplayer.
Codec errors (and codec not found errors) now trigger a controlled shutdown
of playback and signal errors to the MediaPlayer client.

Change-Id: I2ee23ff2a1422d05a1a21e50ecb87d7c7ab958cc
2011-08-16 13:48:44 -07:00
Mathias Agopian
6fe2481392 fix a memory leak and memory corruption in RefBase
we would leak a weakref_impl if a RefBase was never incWeak()'ed.
there was also a dangling pointer that would cause memory corruption
and double-delete when a custom destroyer was used to delay the
execution of ~RefBase.

it turns out that the custom destroyer feature caused most of the
problems, so it's now gone. The only client was SurfaceFlinger
who now handles things on its own.

RefBase is essentially back its "gingerbread" state, but the
code was slightly cleaned-up.

Bug: 5151207, 5084978
Change-Id: Id6ef1d707f96d96366f75068f77b30e0ce2722a5
2011-08-11 22:33:02 -07:00
Ted Bonkenburg
1ee60119c4 Remove ParcelSurfaceTexture and update MediaPlayer
This removes the ParcelSurfaceTexture class since that functionality has been
folded into Surface.java. The change also updates the MediaPlayer to get rid
of setParcelSurfaceTexture() and modifies setTexture() to use the new Surface
functionality in order to simplify the code.

Change-Id: Iafa75ea3188263928128325d8a726786971b4de4
2011-08-11 19:58:25 -07:00
Jean-Baptiste Queru
ed3418076d am b654e6e5: am d144748d: Merge "Add missing include"
* commit 'b654e6e55a3e8d7e8c2e0b8b1ff4bb4f76c10e05':
  Add missing include
2011-08-11 15:22:42 -07:00
Jean-Baptiste Queru
b654e6e55a am d144748d: Merge "Add missing include"
* commit 'd144748d4767b2ccfb13857e23f78bc944e9531d':
  Add missing include
2011-08-11 15:18:22 -07:00
Eric Laurent
6752ec80b2 Audio effects: track CPU and memory use separately
Before this change, CPU and memory usage for an audio effect were
registered and checked against the limit by audio policy manager
upon effect instantiation. Even if an effect was not enabled
it would prevent another effect to be created if the CPU load budget
was exceeded, which was too restrictive.

This change adds a method to register/unregister CPU load only when
an effect is enabled or disabled.
It also adds a mechanism to place all effects on the global output mix
in suspend state (disabled) when an effect is enabled on a specific session.
This will allow applications using session effects to have the priority
over others using global effects.

Also fixes some issues with suspend/restore mechanism:
- avoid taking actions when an effect is disconnected and was not enabled.
- do not remove a session from the suspended sessions list when corresponding
effect chain is destroyed.

Change-Id: I5225278aba1ae13d0d0997bfe26a0c9fb46b17d3
2011-08-11 14:33:45 -07:00
Jean-Baptiste Queru
d1c5b0233c Add missing include
Change-Id: I00181029e80a2ba75320550c14e950fadbab8a64
2011-08-11 13:36:04 -07:00
Jean-Baptiste Queru
e30af493a6 am 44874c23: am c962512c: Merge "added stub for getting buffer from surface texture"
* commit '44874c236de282b0d898f179fc9fdafa84aae40d':
  added stub for getting buffer from surface texture
2011-08-11 12:24:51 -07:00
Jean-Baptiste Queru
44874c236d am c962512c: Merge "added stub for getting buffer from surface texture"
* commit 'c962512cac19e2bb1103c0c1a5f739d40d4d7740':
  added stub for getting buffer from surface texture
2011-08-11 12:19:44 -07:00
Chris Craik
311ffe37a5 added stub for getting buffer from surface texture
Change-Id: If61153cacdd8027848f40f8d9035f7c4aead0a98
2011-08-11 11:56:59 -07:00
Mathias Agopian
875dee4e12 Merge changes I5174a6ec,I1f8538b6,Idb71fdcf
* changes:
  fix a crasher in SurfaceTexture::updateTexImage()
  rework dequeueBuffer()'s main loop.
  error out when SurfaceTexture APIs are called while not connected
2011-08-10 19:40:48 -07:00
Mathias Agopian
379eac2474 Merge "Fix typos and use new HAL_PRIORITY_URGENT_DISPLAY constant" 2011-08-10 19:40:15 -07:00
Mathias Agopian
5c71575983 fix a crasher in SurfaceTexture::updateTexImage()
we now make sure to drain the buffer queue on disconnect.
this happens only when in synchrnous mode. in async mode
we clear all buffers except the head of the queue.

for extra safety we also catch the null pointer
in updateTexImage (which should  never happen) and return
an error.

Bug: 5111008

Change-Id: I5174a6ecbb0de641c6510ef56a611cbb4e9e1f59
2011-08-10 17:35:52 -07:00
Mathias Agopian
71fd1213b4 rework dequeueBuffer()'s main loop.
this simplifies the code a bit and also makes sure
we reevaluate mAbandoned and mConnectedApi each time
we come back from waiting on mDequeueCondition

Change-Id: I1f8538b62ad321b51ed79d953b700036daba796d
2011-08-10 17:35:26 -07:00
Mathias Agopian
a04cda9986 error out when SurfaceTexture APIs are called while not connected
- also log a warning when freeAllBuffers is called with a non empty buffer queue
- rename freeAllBuffers to freeAllBuffersLocked

Change-Id: Idb71fdcf233b9ccae62d5a2a7c3c4bad2501d877
2011-08-10 17:33:46 -07:00
Jeff Brown
8f226dcb21 am ca97671e: am 6f5a837c: Merge "Fix getSwitchState according to device capabilities."
* commit 'ca97671e2b74ed31b5bef6fd0b39e489f1ec5f51':
  Fix getSwitchState according to device capabilities.
2011-08-10 13:59:44 -07:00
Jeff Brown
b4459d8d6d am 7e79b9aa: am dbff9107: Merge "Support wrapping app processes to inject debug instrumentation. Bug: 4437846"
* commit '7e79b9aad85db332d334f8bc1625bf46f030830f':
  Support wrapping app processes to inject debug instrumentation. Bug: 4437846
2011-08-10 13:59:41 -07:00