Commit Graph

310 Commits

Author SHA1 Message Date
Jamie Gennis
1853b7d790 Merge "Add incStrong and decStrong methods to android_native_{window,buffer}_t." into kraken 2010-05-11 12:25:31 -07:00
Jamie Gennis
5e67f87430 Add incStrong and decStrong methods to android_native_{window,buffer}_t.
This change adds the methods necessary to use sp<> to handle refcounting
android_native_window_t and android_native_buffer_t.  The new methods forward
the refcounting operations to the corresponding android_native_base_t
functions.

Change-Id: I7de8e262728e439bc1efdf69374a2a9f6f432ced
2010-05-10 17:33:32 -07:00
Dan Egnor
7dd2bb8412 am ca48c88c: am 8a8658a5: Merge "Make static versions of libutils and libbinder." into froyo
Merge commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f' into kraken

* commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f':
  Make static versions of libutils and libbinder.
2010-05-06 17:35:06 -07:00
Dan Egnor
e3c233d1a9 am 8a8658a5: Merge "Make static versions of libutils and libbinder." into froyo
Merge commit '8a8658a5de261c2da72d431940877bd054bc9837' into froyo-plus-aosp

* commit '8a8658a5de261c2da72d431940877bd054bc9837':
  Make static versions of libutils and libbinder.
2010-05-06 17:33:45 -07:00
Dan Egnor
386a332b4f Make static versions of libutils and libbinder.
Fix some small static-initialization-order issues (and a static-
initializers-missing issue) that result from doing so.  The static
libraries don't actually get used for anything real at the moment --
they're used for perf tests of bug 2660235.

Bug: 2660235
Change-Id: Iee2f38f79cc93b395e8d0a5a144ed92461f5ada0
2010-05-06 01:03:31 -07:00
The Android Open Source Project
ad3f4a4561 am f7896449: merge from open-source master
Merge commit 'f78964490d8098387d51444c87bf520ad3f674e2' into kraken

* commit 'f78964490d8098387d51444c87bf520ad3f674e2':
  Add new keycodes for the convenience of Japanese IMEs
  Call register_localized_collators() with the current locale.
  Fixed deserialization problem in DatePicker.
  Fix for bug 2467152 files with spaces fail to open.
  Set alpha value for newly created dim surface.
  telephony: Fix CID when CID is unknown
2010-05-05 16:00:01 -07:00
The Android Open Source Project
30f71ce597 merge from open-source master
Change-Id: Ia9e1f4e049f5870386ea29ddb6e3ef028ea918da
2010-05-05 15:57:42 -07:00
mogimo
ef1c5c314b Add new keycodes for the convenience of Japanese IMEs
Change-Id: Ibd308cef11261147856258595f6ca0137e03e05c
2010-05-05 13:37:21 -07:00
Mathias Agopian
30c4c182ec Merge "Add support for enqueuing buffers in arbitrary order" into kraken 2010-04-30 12:58:11 -07:00
Mathias Agopian
4fcad80654 Merge "cleanup. waitForCondition() now uses polymorphsim instead of templtes" into kraken 2010-04-29 14:17:12 -07:00
Mathias Agopian
a228cc5efa Merge "fix a race condition in undoDequeue(), where 'tail' could be computed incorrectly." into kraken 2010-04-29 14:16:14 -07:00
Dianne Hackborn
c93a781c24 New xlarge screen size.
Not complete, only for experimentation at this point.

This includes a reworking of how screen size configurations are matched,
so that if you are on a larger screen we can select configurations for
smaller screens if there aren't any exactly matching the current screen.

The screen size at which we switch to xlarge has been arbitrarily
chosen; the compatibility behavior has not yet been defined.

Change-Id: I1a33b3818eeb51a68fb72397568c39ab040a07f5
2010-04-28 16:51:52 -07:00
Mathias Agopian
c0a9164e9e Add support for enqueuing buffers in arbitrary order
Also added a very simple SharedBufferStack unit test.

Change-Id: I253dbbe98a53c966b78d22d4d6dd59f8aefc8c40
2010-04-28 16:12:54 -07:00
Mathias Agopian
b296533607 cleanup. waitForCondition() now uses polymorphsim instead of templtes
the reason for the above change is that waitForCondition() had become
large over time, mainly to handle error cases, using inlines to
evaluate the condition doesn't buys us much anymore while it increases
code size.

Change-Id: I2595d850832628954b900ab8bb1796c863447bc7
2010-04-28 16:12:54 -07:00
Mathias Agopian
0a8cd0689a fix a race condition in undoDequeue(), where 'tail' could be computed incorrectly.
in the undoDequeue() case, 'tail' was recalculated from 'available' and 'head'
however there was a race between this and retireAndLock(), which could cause
'tail' to be recalculated wrongly.

the interesting thing though is that retireAndLock() shouldn't have any impact
on the value of 'tail', which is client-side only attribute.
we fix the race by saving the value of 'tail' before dequeue() and restore it
in the case of undoDequeue(), since we know it doesn't depend on retireAndLock().

Change-Id: I4bcc4d16b6bc4dd93717ee739c603040b18295a0
2010-04-28 16:12:54 -07:00
Mathias Agopian
245e4d78c5 better fix for [2420565] Surface.lockCanvas() updates the dirty region too often
Change-Id: I83438b40effd21538f1c74396dc665254b9d5ab6
2010-04-21 22:25:35 -07:00
The Android Open Source Project
a327dcfd79 am f021d12f: merge from open-source master
Merge commit 'f021d12f6f7116e9275cd3553a349ce5cb8aab14' into kraken

* commit 'f021d12f6f7116e9275cd3553a349ce5cb8aab14':
  Allow META* macros outside of the framework
  Fix printing order of phone objects creation
2010-04-21 09:15:15 -07:00
The Android Open Source Project
fc821e5d26 merge from open-source master
Change-Id: I08f1feae65b1dfc3f740d78654c267f2e3ae5e85
2010-04-21 09:10:43 -07:00
Michael Richardson
a3a884d9e2 Allow META* macros outside of the framework
The META* macros are useful outside of the framework
for other systems implementing Binder interfaces, but
they depend upon the android namespace. This includes
the appropriate namespace operations, which should be
sane even in that android namespace.

Change-Id: If600156c65191f51f487d0ee301d9f9f532b263d
2010-04-20 14:14:30 -07:00
Mathias Agopian
cc08e688f5 added setCrop() to android_native_window_t
hooked up the new method up to Surface.cpp
the actual crop is not implemented in SF yet

Change-Id: Ic6e313c98fd880f127a051a0ccc71808bd689751
2010-04-20 13:36:29 -07:00
Mathias Agopian
1100c8b901 add support for up to 16 buffers per surface
also increase the dirtyregion size from 1 to 6 rectangles.
Overall we now need 27KiB process instead of 4KiB

Change-Id: Iebda5565015158f49d9ca8dbcf55e6ad04855be3
2010-04-20 13:36:29 -07:00
Mathias Agopian
0ec1f2fc6e am 26f61635: am 0a4ab1b9: Merge "fix [2599939] "cannot play video" after open/close a video player a dozen of times" into froyo
Merge commit '26f6163557980062dbb203388b3d0794ee0d06f7' into kraken

* commit '26f6163557980062dbb203388b3d0794ee0d06f7':
  fix [2599939] "cannot play video" after open/close a video player a dozen of times
2010-04-19 19:29:22 -07:00
Mathias Agopian
65d8840637 am 0a4ab1b9: Merge "fix [2599939] "cannot play video" after open/close a video player a dozen of times" into froyo
Merge commit '0a4ab1b9b4c7b891c1ecb67eed99e9c9b30c93aa' into froyo-plus-aosp

* commit '0a4ab1b9b4c7b891c1ecb67eed99e9c9b30c93aa':
  fix [2599939] "cannot play video" after open/close a video player a dozen of times
2010-04-19 19:26:31 -07:00
Mathias Agopian
3c772b706d fix [2599939] "cannot play video" after open/close a video player a dozen of times
get rid off the MAP_ONCE flag is MemoryHeapBase (as well as it's functionality),
this feature should not be used anymore.

the software renderer was incorrectly using the default ctor which set MAP_ONCE,
causing the leak. the software renderer itself is incorrectly used while coming
back from sleep.

Change-Id: I123621f8d140550b864f352bbcd8a5729db12b57
2010-04-19 19:09:03 -07:00
Mathias Agopian
5629eb1676 when a zero dimension buffer is allocated, turn the allocation into
a 1x1 buffer instead of Nx1 (or 1xN)

Change-Id: I27eeb15e83e13002dd9405f4e52b54f7dffc0fe7
2010-04-15 15:23:25 -07:00
Mathias Agopian
e4e8cf1f19 don't hardcode "mSurface" throughout our source code
this is used in a few places to get access to the android.view.Surface
native surface. use a macro instead. Also rename the field to mNativeSurface.

Change-Id: I1c6dea14abd6b8b1392c7f97b304115999355094
2010-04-12 16:29:36 -07:00
The Android Open Source Project
529973acc2 merge from open-source master
Change-Id: I975030d9572463bc69245bcffa25c47d7acb2b51
2010-04-08 11:27:55 -07:00
Chih-Wei Huang
e5f56fb1b4 Add keycodes PageUp and PageDown
This is useful for applications like web browser.

Change-Id: Ie9262d5b75de87ecd0971407a7c3ce9aa6e4998e
2010-04-02 14:39:20 -07:00
Mathias Agopian
c8620b60d6 fix [2545826] calling into gralloc with external lock held
Change-Id: I2d0e017382404c684c768a0dd0423d574213f10a
2010-03-25 14:34:49 -07:00
Mathias Agopian
26d244281a libutils Condition are now PRIVATE by default
Condition must be initialized with SHARED for the old behavior, where
they can be used accross processes.

Updated the two places android that require SHARED conditions.

PRIVATE conditions (and mutexes) use more efficient syscalls.

Change-Id: I9a281a4b88206e92ac559c66554e886b9c62db3a
2010-03-19 16:16:43 -07:00
Jean-Michel Trivi
ae4d8ac982 Update TTS plugin interface to receive engine configuration data
coming from the plugin helper code (handling config and preferences).

Change-Id: Ibc1d229463f11f8977552d74d1fd2aa6a6cab88e
2010-03-18 11:52:41 -07:00
Mathias Agopian
55fa25161a implement connect/disconnect in our native_window_t implementations
the framebuffer implementation doesn't do anything special with this
but the surfaceflinger implementation makes sure the surface is not used
by two APIs simultaneously.

Change-Id: Id4ca8ef7093d68846abc2ac814327cc40a64b66b
2010-03-11 15:06:54 -08:00
Mathias Agopian
e156e6478f Add a new connect/disconnect API to android_native_window_t
it's used to keep track of which API owns the surface.

Change-Id: I1021c5905c020efc3c428e561b38189377168b22
2010-03-11 15:05:52 -08:00
Dianne Hackborn
82fecb01df Add ability for some manifest attributes to reference resources.
This loosens our restriction on many manifest attributes requiring
literal string values, to allow various ones to use values from
resources.  This is only allowed if the resource value does not change
from configuration changes, and the restriction is still in place
for attributes that are core to security (requesting permissions) or
market operation (used libraries and features etc).

Change-Id: I4da02f6a5196cb6a7dbcff9ac25403904c42c2c8
2010-03-09 17:18:05 -08:00
Dianne Hackborn
2856c5b19a Refactor car mode.
Extract all UI behavior from dock observer and ACTION_DOCK_EVENT.

Also introduce a desk type to go along with the car type all through
the resource system, since we now need to have corresponding high-level
broadcasts for desk dock mode.  As part of that I also reworked some
of the logic for switching modes to all funnel through a single
update() call that looks all of the current state to decide what to
do next, and fixed various locking issues.

In addition I found there were bugs in the configuration change
handling causing us to only switch into the car mode config and
then never get out of it.  Unfortunately now that we are actually
changing the configuration for each mode change, the transitions
between them are really crummy as we restart all kinds of
activities. :(
2010-03-05 10:57:47 -08:00
Dianne Hackborn
8eca036d24 Fix issue #2448075: aapt doesn't fix up activity-alias android:targetActivity links
And related:

- The aapt tool now sets a resource configurations sdk level to match any configs
  that have been set (for example if you specify density your sdk level will be
  at least 4).
- New option to modify the targetPackage attribute of instrumentation.
- Clean up of aapt options help.
- Fix of UI type values to leave 0 for "unspecified".
- Make the UI mode config APIs public.
2010-03-01 20:42:14 -08:00
Mathias Agopian
285dbde2e0 Added a name to Surface created by SurfaceFlinger
Updated the window manager to use this new facility.
Surfaces name are now printed by "dumpsys".
2010-03-01 18:34:50 -08:00
Kenny Root
9e333ab42c Use UTF-8 strings to avoid duplicate caching, part 1
StringBlock instances containing UTF-8 strings use a cache to convert
into UTF-16, but using that cache and then using a JNI call to NewString
causes the UTF-8 string as well as two copies of the UTF-16 string to
be held in memory. Getting the UTF-8 string directly from the StringPool
eliminates one copy of the UTF-16 string being held in memory.

This is part 1. Part 2 will include ResXMLParser optimizations.

Change-Id: Ibd4509a485db746d59cd4b9501f544877139276c
2010-02-23 10:02:20 -08:00
Mathias Agopian
98e71ddaed remove a dependency of GraphicBuffer (libui) on Parcel (libbinder).
Add a Flattenable interface to libutils which can be used to flatten
an object into bytestream + filedescriptor stream.
Parcel is modified to handle Flattenable. And GraphicBuffer implements
Flattenable.

Except for the overlay classes libui is now independent of libbinder.
2010-02-21 23:27:25 -08:00
Mathias Agopian
b6121422ef Remove a dependency of Region (libui) on Parcel (libbinder). 2010-02-17 20:26:47 -08:00
Mathias Agopian
3db2164051 fix a bug I introduced recently where YUV formats would crash the system 2010-02-16 20:43:39 -08:00
Mathias Agopian
54ed4f6282 get rid off the YUV formats at the libui layer 2010-02-16 17:33:37 -08:00
Kenny Root
0d88e7a8d7 Totally remove Unicode.cpp and rely on ICU
Unicode.cpp used a packed data table for character data that essentially
duplicated ICU's functionality.

Change-Id: Ia68fe4ac94e89dc68d9a3f45f33f6e648a5500b7
2010-02-12 14:37:42 -08:00
Kenny Root
196e320734 Excise code from Unicode.cpp that was dead
Remove some utility functions for discovering character data
that ICU probably took over a while ago.

Change-Id: I97abe4de2f51eb2bf48679941258bc501184c3dc
2010-02-12 13:01:16 -08:00
Mathias Agopian
9cce325fae split libsurfaceflinger_client and libcamera_client out of libui 2010-02-11 13:16:22 -08:00
Tobias Haamel
70fa84f6ab Introduce special UI modes for night and car usage.
The device mode is now called ui mode. Furthermore is the order of
precedence for the resources now in such a way that the ui mode needs
to be specified after the orientation and before the density.

The ui mode can be set, like it is done for the locale, as follows:

IActivityManager am = ActivityManagerNative.getDefault();
Configuration config = am.getConfiguration();
config.uiMode = Configuration.UI_MODE_TYPE_CAR | Configuration.UI_MODE_NIGHT_ANY;
am.updateConfiguration(config);

To allow users to disable the car mode and set the night mode the IUiModeManager
interface is used.

The automatic night mode switching will be added in a separate change.
2010-02-11 21:25:58 +01:00
Wu-cheng Li
a05c822704 Add exposure compensation parameter.
bug:2375993
2010-02-09 18:28:50 +08:00
Mathias Agopian
04a3f57d19 fix [2133133] Software OpenGL ES Lighting is buggy (GL Gears washed out bug)
A typo caused GL_AMBIENT_AND_DIFFUSE to only set the the ambient color.

Fix another typo which caused the viewer position to be wrong for
specular highlights.

Switch back to eye-space lighting, since there are still some issues
with some demos (San Angeles in particular).
2010-02-03 12:13:15 -08:00
Mathias Agopian
18b915a102 implement [2396050] Add ETC1 texture support to AGL 2010-02-02 20:19:54 -08:00
Wu-cheng Li
391f3f8b5e Add float support for set and get in CameraParameters.
bug:2375989
bug:2375987
2010-01-31 17:03:10 +08:00