1525 Commits

Author SHA1 Message Date
Russell Brenner
adc25267f8 Merge "Adapt TextLayoutCache for new Harfbuzz scripts" 2011-08-04 09:41:53 -07:00
Mathias Agopian
452f035c31 Merge changes I689cb0c0,I09603218
* changes:
  Add a 'release' method to the SurfaceTexture public Java API
  Mark Window-Manager-specific APIs on android.view.Surface as @hide
2011-08-03 18:12:36 -07:00
Mathias Agopian
ec46b4e1ca Add a 'release' method to the SurfaceTexture public Java API
Bug: 5063618
Change-Id: I689cb0c01c14e597ccfb4eb0972e64fa570bd4e8
2011-08-03 17:23:44 -07:00
Kenny Root
1ebd74acf9 Better error codes for missing files
Make sure that files that don't exist aren't returning bogus 'out of
space' error codes.

Add some Javadoc so I can remember what each thing does in an IDE.

Add copyright header to NativeLibraryHelper

Bug: 3375299
Change-Id: Iac46019160921daca65b21d38897e5165063316e
2011-08-03 16:03:42 -07:00
Russell Brenner
7f4ae758ba Adapt TextLayoutCache for new Harfbuzz scripts
The Harfbuzz script setting was wired to HB_Script_Common for left-
to-right text and HB_Script_Arabic for right-to-left. This change
selects from additional scripts using some utility APIs from
Harfbuzz.

Change-Id: I34a6f1e0407c8d122bc968443948e7863d1f91ed
2011-08-03 11:56:27 -07:00
Derek Sollenberger
4f7c380d51 Merge "Reverting until we can find a better way to address this issue without affecting nine-patches with large stretchable areas." 2011-08-02 10:39:43 -07:00
Derek Sollenberger
09a22e33e7 Reverting until we can find a better way to address this issue without affecting nine-patches with large stretchable areas.
Revert "Fix NinePatch decoder when the target is smaller than the source."

This reverts commit c4c458c678567b899aae04631570460c5e729512
2011-08-02 05:17:49 -07:00
Wu-cheng Li
bb1e275c0e Pass camera frame metadata from camera service to Java.
bug:4460717
Change-Id: I2fae6e1dfca6b8f3a5ee5716fc7817f5417bf657
2011-08-02 15:48:41 +08:00
Jeff Brown
2a2ec87b55 Merge "Refactor input reader to add stylus support. Bug: 5064702" 2011-08-01 17:48:21 -07:00
Romain Guy
0965a3244b Allow Canvas.setBitmap() to receive a null Bitmap.
Change-Id: I6096f0b44866e532ccd96a29c816bf34d48c1dc2
2011-08-01 17:39:21 -07:00
Matthew Xie
569980c349 Merge "Change setDevicePropertyNative to no block." 2011-08-01 10:20:30 -07:00
Jeff Brown
be1aa8250c Refactor input reader to add stylus support.
Bug: 5064702

Introduced the concept of an InputListener to further decouple
the InputReader from the InputDispatcher.  The InputListener
exposes just the minimum interface that the InputReader needs
to communicate with the outside world.  The InputReader
passes arguments to the InputListener by reference, which makes
it easy to queue them up.

Consolidated all of the InputReader locks into one simple global
Mutex.  The reason this wasn't done before was due to potential
re-entrance in outbound calls to the InputDispatcher.  To fix this,
the InputReader now queues up all of the events it wants to send
using a QueuedInputListener, then flushes them outside of the
critical section after all of the event processing is finished.
Removing all of the InputMapper locks greatly simplifies the
implementation.

Added tests for new stylus features such as buttons, tool types,
and hovering.

Added some helpers to BitSet32 to handle common code patterns
like finding the first marked bit and clearing it.

Fixed a bug in VelocityTracker where the wrong pointer trace
could get cleared when handling ACTION_POINTER_DOWN.  Oops.

Changed PointerCoords so it no longer stores useless zero
axis values.  Removed editAxisValue because it is not very
useful when all zero value axes are absent and therefore
cannot be edited in place.

Added dispatch of stylus hover events.

Added support for distance and tool types.

Change-Id: I4cf14d134fcb1db7d10be5f2af7b37deef8f8468
2011-07-31 15:38:09 -07:00
Matthew Xie
3fd36737b3 Change setDevicePropertyNative to no block.
Change setDevicePropertyNative to use async dbus call to bluez instead of
blocking call. The old call was dbus_connection_send_with_reply_and_block.
It is replaced by dbus_connection_send_with_reply.

Change-Id: I1a772b33b54c8aad71a6f4d86dcd289354d8155b
2011-07-29 15:08:41 -07:00
Derek Sollenberger
f4fd53b381 Merge "Fix NinePatch decoder when the target is smaller than the source." 2011-07-29 10:41:12 -07:00
Nick Pelly
5ff1c1591f Merge "Workaround for bug 5082381 (EALREADY on ACL collision)." 2011-07-29 09:44:30 -07:00
Derek Sollenberger
c4c458c678 Fix NinePatch decoder when the target is smaller than the source.
If the target is smaller on a given axis than the source then we
just draw a downscaled version of the NinePatch.  If we use the
current path and the source has transparency then areas of the
NinePatch overlap and are blended together resulting in visual
inconsistancy.

bug: 5041053
Change-Id: I0fcc6fb5c214b188a164acf0651aa4ab2f35946d
2011-07-29 10:34:47 -04:00
Nick Pelly
fbbea2e1bf Workaround for bug 5082381 (EALREADY on ACL collision).
If connect() fails with EALREADY, then retry.

Unfortunately we also need to switch to a new FD. This is currently
safe, but its a little fragile to changes in the code (especially
if we ever expose the fd to applications) so it would be great to
fix this issue properly in the kernel sometime and revert this
commit.

Change-Id: I12fb6b7f2b8ca40f425f66b504754048c9460329
2011-07-28 18:11:34 -07:00
Matthew Xie
6903a7de88 Merge "Provide an API to set the friendly name of a remote device." 2011-07-28 17:46:45 -07:00
Wu-cheng Li
f0d6a48c6a Add frame metadata parameter to camera data_callback.
bug:4460717
Change-Id: Ib47d7d7df20af8155a719f3dabefe030893bfebc
2011-07-29 07:14:38 +08:00
Matthew Xie
269e81a563 Provide an API to set the friendly name of a remote device.
BluetoothDevice setName overwrite the locally cached remote name.
The changed name is saved in the local storage so that the change
is preserved over power cycle.
bug 5081605
Change-Id: I486966033828d153bfb1076a99e274c8a7f41636
2011-07-28 15:56:11 -07:00
Romain Guy
b6f7a27c59 Merge "Reclaim more memory, more often." 2011-07-27 18:53:32 -07:00
Romain Guy
65b345fa22 Reclaim more memory, more often.
Yay.

Change-Id: I04557ad575c307a55088549f48f0e9ad994b7275
2011-07-27 18:51:50 -07:00
Kenny Root
4f35092af5 Merge "Move extract native libraries to JNI code" 2011-07-27 15:54:51 -07:00
Jeff Brown
3d5a703db8 Merge "Report the external display size to the input reader." 2011-07-27 15:54:50 -07:00
Wu-cheng Li
4c2292efbb Add camera face detection API.
API are still hidden.

bug:4460717
Change-Id: I1a515061f141a89bd61c875257712789fb15d2d4
2011-07-27 05:25:35 +08:00
Kenny Root
66269ea6f6 Move extract native libraries to JNI code
The built-in ZipFile class was quite a long time to find an unpack
libraries. Move everything to using the libutils ZipFileRO class that
goes quite a bit faster. Initial measurements are 6 times faster than
the Java code.

Also, read files off the disk and compare their CRC against the APK's
CRC to see if we need to write the new file to disk. This also cuts down
the bootup time by up to a second per APK that has native files.

Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
2011-07-26 10:14:58 -07:00
Jean-Michel Trivi
af20eacc21 Merge "Fix bug 4319552 Java to native channel mask translation" 2011-07-26 09:27:53 -07:00
Jeff Brown
bc68a59c02 Report the external display size to the input reader.
The input reader needs this information so that it knows how to
interpolate touches on an external touch screen.

Changed Display so that it asks the WindowManager what the real
display size is (as opposed to the raw display size).  This means
it now takes into the forced display size set by
adb shell am display-size.

Replaced all calls to getRealWidth() / getRealHeight() /
getRealMetrics() in the WindowManager and replaced them with direct
usages of the mCurDisplayWidth / mCurDisplayHeight so that the WM
doesn't end up making a reentrant Binder call into itself.

Fixed the table status bar HeightReceiver so that it updates the
height on all configuration changes since it is possible that the
display size changed independently of an external HDMI display
being plugged / unplugged.

Improved the Display class documentation to make the distinctions
betweeen the various sizes clearer.

Change-Id: I3f75de559d3ebffed532ab46c4ae52c5e7f1da2b
2011-07-25 20:10:12 -07:00
Jean-Michel Trivi
d9ae1c573e Fix bug 4319552 Java to native channel mask translation
When creating a new AudioTrack instance, translate from a Java
  channel mask as defined in android.media.AudioFormat to one
  as defined in audio.h which matches industry-standard
  channel mask definitions.

Change-Id: I7eeece8ec2a437977c31f6e82590f9591158144b
2011-07-25 17:06:22 -07:00
Kenny Root
467cabe879 Throw NullPointerException on args to Time#compare
Check for null on arguments to Time#compare(Time, Time) before passing
it down to JNI code.

Bug: 5073949
Change-Id: I077e9d5194a89206d1e51fc89a72c8a72e29f8f1
2011-07-25 17:00:50 -07:00
Ted Bonkenburg
5518dd92d3 Merge "Add support for creating a Surface from a a SurfaceTexture." 2011-07-25 10:24:30 -07:00
repo sync
55bc5f3e04 Updated: Wi-Fi p2p framework
First stage. Get the bones in right now even though
we are not ready on the native side.

Once, we have things underneath working - we will further update the
framework

Change-Id: I4a7dab5cd4267373dc5f8989ae4122f91c384ed5
2011-07-24 10:08:47 -07:00
Ted Bonkenburg
0de171b0d4 Add support for creating a Surface from a a SurfaceTexture.
The Surface is already using SurfaceTexture internally and it is parcelable. This
is intended to replace and phase out ParcelSurfaceTexture in favor of creating a
new Surface.java object from an existing SurfaceTexture.

Change-Id: I8e2dd86614523da6abed6403e1d705a68fa19fdf
2011-07-22 16:36:44 -07:00
Jeff Brown
08695111cf Merge "Decouple GLES20RecordingCanvas lifetime from GLES20DisplayList. Bug: 5062011" 2011-07-21 17:44:08 -07:00
Jeff Brown
162a021756 Decouple GLES20RecordingCanvas lifetime from GLES20DisplayList.
Bug: 5062011

Previously, each GLES20DisplayList would hold onto an instance of
GLES20RecordingCanvas.  In turn, each GLES20RecordingCanvas
held onto an SkWriter with a 16Kb buffer along with several other
objects.  With one display list per view and hundreds of views,
the overhead could add up to a few megabytes.

Ensured that the GLES20RecordingCanvas is reset as soon as
the display list has been constructed, thereby promptly freeing
the 16Kb buffer.

Changed GLES20DisplayList so that it acquires a GLES20RecordingCanvas
from a pool as needed and recycles it when done.

Removed some dead code and cruft related to the construction of
GLES20Canvas objects in general.  Some code was written with the
assumption that the underlying renderer object could change
behind the scenes or might be lazily constructed, but that isn't
actually the case so we can simplify things.

Removed an unnecessary weak reference from GLES20DisplayList
to the View.  It isn't actually used anywhere.

Fixed a bug in GLES20DisplayList where isValid() would return
true while the display list was being recorded.  This is incorrect
because the native display list might not actually exist.  Worse,
even if the native display list does exist, it is stale and
potentially refers to old Bitmaps that have been GC'd (because the
mBitmaps list was cleared when recording started).

Change-Id: Ib12d5483688cb253478edeb0156d34c476c2566b
2011-07-21 17:15:48 -07:00
Irfan Sheriff
d7a374f6f8 Merge "Fix multicast API" 2011-07-21 13:45:38 -07:00
Irfan Sheriff
b0c1b80f47 Fix multicast API
Fix multicast API and disable mutlicast V6 packets at driver start

Bug: 5016558
Change-Id: I1e04a905a36045e52c785c1dc702cc246a381a57
2011-07-21 13:37:57 -07:00
Eric Laurent
0eecc27714 Merge "AudioRecord JAVA: expose audio session Id" 2011-07-20 19:25:34 -07:00
Romain Guy
648bee18a1 Convert looper traces to traceview traces
Change-Id: If9238e8b00744118c1c4d2182727569f94deb638
2011-07-20 18:47:17 -07:00
Fabrice Di Meglio
c2063a5b18 Fix bug #5037425 Canvas.drawText can't handle Right-to-Left text and text composing
- optimization for single run case was broken
- pass isRTL boolean along the call stack instead of the dirFlags integer
  (which was only used as a "isRTL" in the shaper)
- update unit tests

Change-Id: I33110b76a433633a0b92fbd1db03785204e0c3e6
2011-07-18 17:47:04 -07:00
Doug Kwan
3ad4d3ce01 Merge "Add C code to use BDADDR_ANY macro properly. The macro expands into code that is not valid C++. So we need to use a C helper." 2011-07-18 17:02:55 -07:00
Romain Guy
f40aa3834d Merge "Trim OpenGLRenderer's memory usage whenever possible" 2011-07-18 16:06:31 -07:00
Romain Guy
6be3d5561c Add lock/unlockCanvas to TextureView
With this change, TextureView has feature parity with SurfaceView.

Change-Id: I4ef2da33420fc9590f868636ae72a5a6de61965b
2011-07-18 15:02:06 -07:00
Romain Guy
bdf7609867 Trim OpenGLRenderer's memory usage whenever possible
Change-Id: I9225077184f374b1a43300add15cc1d5b6869d1c
2011-07-18 15:00:43 -07:00
Fabrice Di Meglio
46c7250798 Merge "Clean test APIs for Harfbuzz support" 2011-07-18 14:26:34 -07:00
Eric Laurent
44ff4cd8be AudioRecord JAVA: expose audio session Id
Added getAudioSessionId() method to AudioRecord class so that applications can
retrieve the AudioRecord's session ID and attach audio pre processes.

Change-Id: I1914770f0e54d97c9aef6a9eb36fff69b6d31552
2011-07-18 09:43:23 -07:00
Elliott Hughes
f9cf814440 Stop attempting to call the removed -Xdeadlockpredict option.
Bug: 5038293
Change-Id: If834f07355c110eb02cc8a96e25b432c508462cd
2011-07-17 15:58:30 -07:00
Dianne Hackborn
0e3328fbdd Rework and fix "adb shell dumpsys meminfo"
We now collect more detailed information splitting the maps into
additional useful categories.

Fixed some bugs in account, such as not correctly handling all of
the current dalvik allocations.

The activity manager now prints a final summary of all pss organized
by the apps and the categories.

Change-Id: Iafc5f27c998095812b1483c6803b8e0f0587aeae
2011-07-17 13:48:37 -07:00
Doug Kwan
75d086e5b2 Add C code to use BDADDR_ANY macro properly. The macro expands into code
that is not valid C++.  So we need to use a C helper.

Change-Id: I5e7a46dd2af404972c1b4b97d21398d77c339cac
2011-07-16 19:14:18 -07:00
Fabrice Di Meglio
796cc96243 Clean test APIs for Harfbuzz support
- also update unit tests

Change-Id: I557f61e84c4c4b6165163b783d9c679a6b3b4106
2011-07-15 17:49:22 -07:00