Commit Graph

761 Commits

Author SHA1 Message Date
Jeff Brown
ac69c9607f am 2dfd2aa4: am 92266a78: Merge "More work in progress on native events." into gingerbread
Merge commit '2dfd2aa413a91965c1a247980598c795db9b4c38'

* commit '2dfd2aa413a91965c1a247980598c795db9b4c38':
  More work in progress on native events.
2010-06-15 16:50:12 -07:00
Jeff Brown
c10612c77a Merge "More work in progress on native events." into gingerbread 2010-06-15 16:44:23 -07:00
Jeff Brown
54bc281639 More work in progress on native events.
Refactored the code to eliminate potential deadlocks due to re-entrant
calls from the policy into the dispatcher.  Also added some plumbing
that will be used to notify the framework about ANRs.

Change-Id: Iba7a10de0cb3c56cd7520d6ce716db52fdcc94ff
2010-06-15 16:43:18 -07:00
Jeff Brown
6f19e9c1c2 am e0e5da0d: am 96e59eb8: Merge "Support for multiple tests" into gingerbread
Merge commit 'e0e5da0d648f4167e2a12ea02f4794f81a057da7'

* commit 'e0e5da0d648f4167e2a12ea02f4794f81a057da7':
  Support for multiple tests
2010-06-14 17:06:56 -07:00
Jeff Brown
f69280ef72 Support for multiple tests
The build system enforces some invariants that were being ignored
before.

Change-Id: Ie7675042af7f961a507386c13b2a0b592b591af8
2010-06-14 15:46:08 -07:00
Jeff Brown
157a2647fc am 4166aec5: am 28a6c8e9: am d890cbf7: Remove PollLoop from host build.
Merge commit '4166aec567b6fa4aa725a20d7c0a6dc5866c9f7b'

* commit '4166aec567b6fa4aa725a20d7c0a6dc5866c9f7b':
  Remove PollLoop from host build.
2010-06-13 20:28:29 -07:00
Jeff Brown
beb2359b9b Remove PollLoop from host build.
We can't build (and we don't need) PollLoop in the SDK on all platforms.

Change-Id: I3b0f327bbb8bc58b9b8630b0161cf360403fea68
2010-06-13 20:21:19 -07:00
Jeff Brown
4215f50740 am 34b418cd: am 5e95930b: am 43a9527c: Fix include paths.
Merge commit '34b418cddbd2f05d5c0a98c550c65e457015134e'

* commit '34b418cddbd2f05d5c0a98c550c65e457015134e':
  Fix include paths.
2010-06-13 20:03:20 -07:00
Jeff Brown
66d9df50da Fix include paths.
Change-Id: Ifda45688f9f02710a74d5d7a7d902bacf1441e2e
2010-06-13 19:35:19 -07:00
Jeff Brown
04c1a8cdec resolved conflicts for merge of 9e660c82 to master
Change-Id: Ic4bd85cbaa5b9a10dcb474a0dad46490bf967e43
2010-06-13 19:16:55 -07:00
Jeff Brown
e839a589bf Native input dispatch rewrite work in progress.
The old dispatch mechanism has been left in place and continues to
be used by default for now.  To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.

Includes part of the new input event NDK API.  Some details TBD.

To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument.  The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points.  The ViewRoot then
provides the InputChannel to the InputQueue.  Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue.  This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.

There can be zero or more targets for any given input event.  Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets).  Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.

End-to-end event dispatch mostly works!

To do: event injection, rate limiting, ANRs, testing, optimization, etc.

Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
2010-06-13 17:42:16 -07:00
Andreas Huber
b3ed29c713 am b9d7b46b: am 8f864513: Merge "Fix String8 to free its memory only after assignment operations based on pointers are finished in case that pointer referred to the string\'s original contents." into kraken 2010-06-10 16:13:18 -07:00
Andreas Huber
a637eb4869 Fix String8 to free its memory only after assignment operations based on pointers are finished in case that pointer referred to the string's original contents.
Change-Id: I6961f3cf10ba3b728579ea63262db750a4cf8577
2010-06-10 11:25:51 -07:00
Kenny Root
c91e0eda56 Add invariant check for stylesString size
It was possible for stylesStrings to claim to start past the end of the
data area thereby making mStringPoolSize larger than the data area.

Change-Id: Ibc4d5b429e3a388516135801c8abc3681daae291
2010-06-08 20:50:37 -07:00
Mathias Agopian
67c4219aa3 am 34e5d967: am 55f8209d: Merge "allow re-targetting of surfaces" into kraken 2010-06-08 20:18:05 -07:00
Mathias Agopian
579b3f88d0 allow re-targetting of surfaces
Surfaces can now be parcelized and sent to remote
processes. When a surface crosses a process
boundary, it looses its connection with the
current process and gets attached to the new one.

Change-Id: I39c7b055bcd3ea1162ef2718d3d4b866bf7c81c0
2010-06-08 20:10:02 -07:00
Mathias Agopian
7b268e7967 am 37583aeb: am 1debc665: fix [2751143] Device crashes when in a text box for too long 2010-06-08 15:49:45 -07:00
Mathias Agopian
53503a97a9 fix [2751143] Device crashes when in a text box for too long 2010-06-08 15:40:56 -07:00
Kenny Root
615f5d64db Range checking for ResTable_map
Correct previous offset change and get ready for safe-iop.

Change-Id: Ib276c726f32b0711a72f47d3263eb21640e5a800
2010-06-08 12:51:49 -07:00
Kenny Root
61c22be593 Improve checking in aapt dump
The aapt dump reading had less error checking than the actual parsing,
so this change brings it more into parity so that bad APKs don't crash
"aapt dump"

Change-Id: Ib30e63e41be5c652645c4aa0de580a87b184529d
2010-06-08 10:28:19 -07:00
Mathias Agopian
fcd61524e8 am f5f7d389: am fae5cb2b: optimize Surface.readFromParcel() 2010-06-04 19:17:16 -07:00
Mathias Agopian
e78d81eddd am fd89b1c8: am 7623da43: split surface management from surface\'s buffers management 2010-06-04 19:17:12 -07:00
Mathias Agopian
a0b3ad88db am cfa6de70: am 593c05ce: clean-up client management. 2010-06-04 19:17:08 -07:00
Mathias Agopian
a0c30e9241 optimize Surface.readFromParcel()
this is called for each relayout() and used to create a full Surface (cpp)
which in turn did some heavy work (including an IPC with surfaceflinger),
most of the time to destroy it immediatelly when the returned surface
(the one in the parcel) was the same.

we now more intelligentely read from the parcel and construct the new
object only if needed.

Change-Id: Idfd40d9ac96ffc6d4ae5fd99bcc0773e131e2267
2010-06-04 18:57:41 -07:00
Mathias Agopian
b7e930db17 split surface management from surface's buffers management
Change-Id: If3c5655d1231f8f0c49ba68f972b1b20c93b3f87
2010-06-04 18:57:41 -07:00
Mathias Agopian
96f0819f81 clean-up client management.
simplified things a lot, the biggest change is that the concept
of "ClientID" is now gone, instead we simply use references.

Change-Id: Icbc57f80865884aa5f35ad0d0a0db26f19f9f7ce
2010-06-04 18:57:40 -07:00
Konstantin Lopyrev
bad51959c5 Fix 1684100: Making sure that empty package, type and resource ids are not accepted.
Change-Id: I4c94877e4312e9a5b4d22c8625069ca056c62e40
2010-06-04 14:37:37 -07:00
Eric Laurent
0d20832fbf am 030a1553: am 2ea200c5: Merge "Issue 2667801: [Audio Effect Framework] AudioFlinger, AudioMixer AudioTrack modifications." into kraken 2010-06-04 00:18:07 -07:00
Eric Laurent
eafff459aa Issue 2667801: [Audio Effect Framework] AudioFlinger, AudioMixer AudioTrack modifications.
First drop of audio framework modifications for audio effects support.

- AudioTrack/AudioRecord:
Added support for auxiliary effects in AudioTrack
Added support for audio sessions
Fixed left right channel inversion in setVolume()

- IAudioFlinger:
Added interface methods for effect enumeraiton and instantiation
Added support for audio sessions.

- IAudioTrack:
Added method to attach auxiliary effect.

- AudioFlinger
Created new classes to control effect engines in effect library and manage effect connections to tracks or
output mix:
  EffectModule: wrapper object controlling the effect engine implementation in the effect library. There
	is one EffectModule per instance of an effect in a given audio session
  EffectChain: group of effects associated to one audio session. There is one EffectChain per audio session.
	EffectChain for session 0 is for output mix effects, other chains are attached to audio tracks
	with same session ID. Each chain contains a variable number of EffectModules
  EffectHandle: implements the IEffect interface. There is one EffectHandle object for each application
	controlling (or using) an effect module. THe EffectModule maintians a list of EffectHandles.

Added support for effect modules and effect chains creation in PlaybackThread.
modified mixer thread loop to allow track volume control by effect modules and call effect processing.

-AudioMixer
Each track now specifies its output buffer used by mixer for accumulation
Modified mixer process functions to process tracks by groups of tracks with same buffer
Modified track process functions to support accumulation to auxiliary channel

Change-Id: I26d5f7c9e070a89bdd383e1a659f8b7ca150379c
2010-06-03 03:21:53 -07:00
Mathias Agopian
7704f5da75 am 7258fd92: am 5be7de5f: Merge "fix a bug where fading in/out of opaque 32-bits windows wasn\'t working" into kraken 2010-06-01 16:11:31 -07:00
Mathias Agopian
d13f23fca6 am 5220af87: am 770492cb: more clean-up in preparation of bigger changes 2010-06-01 16:08:48 -07:00
Mathias Agopian
49753266d2 fix a bug where fading in/out of opaque 32-bits windows wasn't working
opaque 32-bits windows are now allocated as RGBX_8888 buffers and
SurfaceFlinger always uses GL_MODULATE instead of trying to
optimize to GL_REPLACE when possible (makes no sense on
h/w accelerated GL).

we still have a small hack for devices that don't support
RGBX_8888 in their gralloc implementation where we revert to
RGBA_8888.
2010-06-01 15:57:44 -07:00
Mathias Agopian
7e27f05739 more clean-up in preparation of bigger changes
the most important change here is the renaming of
ISurfaceFlingerClient to ISurfaceComposerClient

Change-Id: I94e18b0417f50e06f21377446639c61f65f959b3
2010-05-28 17:19:16 -07:00
Mike Lockwood
3d11c77bae Merge "Move CursorWindow class from core/jni to libbinder" 2010-05-28 10:24:29 -07:00
Mathias Agopian
ea4412c1df am 6a9d88ff: am 64ff6ab4: Merge "more clean-up of Surfaceflinger\'s client management" into kraken 2010-05-28 09:35:08 -07:00
Mike Lockwood
244a7655ae Move CursorWindow class from core/jni to libbinder
To allow use of the native CursorWindow class outside of the core framework jni

Change-Id: I72e8dcb91a2c691130c33cdfd9a25d343da1c592
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-05-28 10:08:21 -04:00
Mathias Agopian
d4784a3b90 more clean-up of Surfaceflinger's client management
SurfaceComposerClient now only exist on the WindowManager side,
the client side uses the new SurfaceClient class, which only
exposes what a client needs.

also instead of keeping mappings from IBinder to SurfaceComposerClients
we have a SurfaceClient per Surface (referring to the same IBinder), this
is made possible by the fact that SurfaceClient is very light.

Change-Id: I6a1f7015424f07871632a25ed6a502c55abfcfa6
2010-05-27 19:55:43 -07:00
Mathias Agopian
5d4f4eaf84 am ec272924: am df0364de: Merge "minor clean-up GLclampx -> GLclampf" into kraken 2010-05-26 22:52:06 -07:00
Mathias Agopian
010fccb063 minor clean-up GLclampx -> GLclampf 2010-05-26 22:26:12 -07:00
Mathias Agopian
1d111ec85c am ed34e950: am d908822d: Merge "clean-up dead-code" into kraken 2010-05-26 22:23:40 -07:00
Mathias Agopian
dc7a80f07a clean-up dead-code 2010-05-26 22:19:19 -07:00
Mathias Agopian
adb1550d38 am 521b8d5c: am a950aa84: Merge "Make sure to use filtering while in fixed-size mode" into kraken 2010-05-26 22:14:43 -07:00
Mathias Agopian
a7f669256f Make sure to use filtering while in fixed-size mode 2010-05-26 22:10:04 -07:00
Mathias Agopian
4f20157df2 am 2a0f01ea: am 7ca7eedb: Merge "oopsie. forgot to displatch SET_BUFFERS_GEOMETRY" into kraken 2010-05-26 21:38:42 -07:00
Mathias Agopian
38ece279ea oopsie. forgot to displatch SET_BUFFERS_GEOMETRY 2010-05-26 21:31:09 -07:00
Mathias Agopian
5a733d4455 am eaac2761: am 64f7549b: Merge "fix [2712278] The preview buffer left some black borders in left and bottom edges" into kraken 2010-05-26 11:42:51 -07:00
Mathias Agopian
631f358d34 fix [2712278] The preview buffer left some black borders in left and bottom edges
we were incorrectly flagging push_buffer surfaces as invalid

Change-Id: I4dfd4ffbbe8a71f7e23e835db8d71966416c29bb
2010-05-25 17:51:34 -07:00
Eric Laurent
0b6a930096 Fix issue 2641884: Bluetooth volume is dependent on in call volume.
The problem is that the code in AudioPolicyManagerBase::checkAndSetVolume() that forces
voice volume to max when setting bluetooth SCO volume is not called if the bluetooth stream
volume did not actually change. So even if we re apply volumes when switching to bluetooth
device, the volume voice volume is not changed and remains what it was when routed to earpiece
What makes things worse on Passion is that stream volumes are limited when connected to bluetooth
and their actual value does not change as soon as they exceed the limit threshold.

Change-Id: I18265e5e6686db0a1f30fc37a31e2ecde4f3fbc6
2010-05-25 09:31:59 -07:00
Mathias Agopian
a138f89c5e added the notion of fixed-size buffers
the new native_window_set_buffers_geometry allows
to specify a size and format for all buffers to be
dequeued. the buffer will be scalled to the window's
size.

Change-Id: I2c378b85c88d29cdd827a5f319d5c704d79ba381
2010-05-24 18:26:01 -07:00
Mathias Agopian
a0b3f1d2eb fix a bug when reallocating a window's buffers is needed
we need to mark the buffers that need to be reallocated,
NOT the buffer's indices.

Change-Id: I809e2e1b03b56c4d2ab983c25523dae99aa1da74
2010-05-24 13:47:24 -07:00