1616 Commits

Author SHA1 Message Date
Jeff Brown
b1784a7b35 am 4b5441a7: Merge "TextLayoutCacheKey needs to store start and count."
* commit '4b5441a7201a2f28becf3ab7fb33694f137e1998':
  TextLayoutCacheKey needs to store start and count.
2011-09-19 16:27:58 -07:00
Jeff Brown
7aac297960 TextLayoutCacheKey needs to store start and count.
Bad merge.

Change-Id: Id6507b3a7e35808a6d34501a45d79fcb7470657d
2011-09-19 16:19:13 -07:00
Fabrice Di Meglio
447e482771 am 6c2d9a14: Merge "TextLayoutCache code refactoring"
* commit '6c2d9a14bf6048c5a1217d61246874c076eb9d20':
  TextLayoutCache code refactoring
2011-09-19 15:08:52 -07:00
Fabrice Di Meglio
4dd99e5912 TextLayoutCache code refactoring
- use vector (instead of array) for advances and glyphs
- reverse glyphs directly in computeRunValuesWithHarfbuzz() (instead of reversing them after)

Change-Id: I716a8f914fd043818d7cb80cca76ee5fb0effb96
2011-09-19 14:46:37 -07:00
Fabrice Di Meglio
8ab6a05283 am e0d558ac: Merge "Fix potential leak in TextLayouCache"
* commit 'e0d558ac92cd9e550b3d08bf09d9bb12c2a506c6':
  Fix potential leak in TextLayouCache
2011-09-19 11:43:04 -07:00
Fabrice Di Meglio
91199ad130 am 42b04f6f: Merge "Make TextLayoutCache no more dependent on ICU"
* commit '42b04f6fa8629dd480ab824d41c544a28e1c83a8':
  Make TextLayoutCache no more dependent on ICU
2011-09-19 11:43:01 -07:00
Fabrice Di Meglio
e0d558ac92 Merge "Fix potential leak in TextLayouCache" 2011-09-19 11:41:01 -07:00
Fabrice Di Meglio
54dc642cc1 Make TextLayoutCache no more dependent on ICU
- move ICU call to TextLayout

Change-Id: Id5a21e7b69e484536cfb5b86fbb0c112fb661dfa
2011-09-18 15:38:08 -07:00
Fabrice Di Meglio
e74fef3b55 Fix potential leak in TextLayouCache
- need a copy constructor for the key as the GenerationCache we are using
is actually a KeyedVector<K, sp<Entry<K, V> > >
- use the getText() API to access the text in the cache key

Change-Id: I5b60ebc062b62308ed7ac1284cfe2a9f28e2b8b1
2011-09-18 14:30:21 -07:00
Fabrice Di Meglio
9512eb9ddf am bfb9a9ae: Merge "Revert "Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits""
* commit 'bfb9a9ae1005998818dd2e75ac7e7f23277a1f03':
  Revert "Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits"
2011-09-18 13:01:24 -07:00
Fabrice Di Meglio
9c418dbc56 Revert "Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits"
This reverts commit d686d76814f18061e06995df0d5de9feb9f70a7e
2011-09-18 12:54:38 -07:00
Fabrice Di Meglio
2b0923449c am 7bec15a8: Merge "Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits"
* commit '7bec15a866c016bbdbf5622215467a5a0a87f0e9':
  Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits
2011-09-16 17:08:27 -07:00
Fabrice Di Meglio
d686d76814 Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits
- makes TextLayoutCache not carring about start/count. Basically he will cache the result for
the full string and gives back the "chunk" corresponding to start/count
- changed the TextLayoutCacheValue API to take start/count parameters
- added the Harfbuzz LogClusters in TextLayoutCacheValue as it is needed for extracting the start/count "chunk"
- fix potential issue of cache key leaking

Change-Id: I9276f9bec744e8de36349acfba8429f7c6f83394
2011-09-16 13:47:34 -07:00
JP Abgrall
9929b03b4f am c35f98ee: Merge "NetworkManagement SocketTagger: Migrate QTagUid support to JNI."
* commit 'c35f98eeae051e05f7df9f6277031278e0aa4899':
  NetworkManagement SocketTagger: Migrate QTagUid support to JNI.
2011-09-15 10:49:44 -07:00
JP Abgrall
98a4f7e7e1 NetworkManagement SocketTagger: Migrate QTagUid support to JNI.
* Instead of javaland trying to write commands to
   /proc/net/xt_qtaguid/ctrl
use the libcutils/qtaguid.c support via JNI.
* Get rid of tagToKernel() handled by qtaguid library.

Requires libcutils changes from c/132538/

Change-Id: I9de5b3fa4a596c56835024c6d376769a0eea7db1
2011-09-15 02:29:03 -07:00
Jeff Brown
1ac36b7729 am 93578af2: Merge "Velocity Tracker II: The Revenge of Velocity Tracker Bug: 5265529"
* commit '93578af23ecfb8f5b6001346d63c6214cdec5d17':
  Velocity Tracker II: The Revenge of Velocity Tracker Bug: 5265529
2011-09-14 21:29:11 -07:00
Jeff Brown
93578af23e Merge "Velocity Tracker II: The Revenge of Velocity Tracker Bug: 5265529" 2011-09-14 21:27:25 -07:00
Dianne Hackborn
cb8eeca141 am d32b472e: Merge "Fix issue #5155678: Portrait > Landscape full-screen transition..."
* commit 'd32b472edfda62c8c2713c4c72da4cdba32dd5ff':
  Fix issue #5155678: Portrait > Landscape full-screen transition...
2011-09-14 19:28:59 -07:00
Dianne Hackborn
ec537457cd Fix issue #5155678: Portrait > Landscape full-screen transition...
...mode cuts off screen rendering

The code for limiting application window sizes to not include the
navigation bar was dead.  Now it is back.

Change-Id: Ic0bde56e3300fd0d9d225e19d8de2766d07e8780
2011-09-14 19:19:55 -07:00
Jeff Brown
b59ab9f41f Velocity Tracker II: The Revenge of Velocity Tracker
Bug: 5265529

Rewrote the velocity tracker to fit a polynomial curve
to pointer movements using least squares linear regression.
The velocity is simply the first derivative of this polynomial.

Clients can also obtain an Estimator that describes the
complete terms of the estimating polynomial including
the coefficient of determination which provides a measure
of the quality of the fit (confidence).

Enhanced PointerLocation to display the movement curve predicted
by the estimator in addition to the velocity vector.

By default, the algorithm computes a 2nd degree (quadratic)
polynomial based on a 100ms recent history horizon.

Change-Id: Id377bef44117fce68fee2c41f90134ce3224d3a1
2011-09-14 19:16:37 -07:00
Fabrice Di Meglio
7f9052735b am 44445730: Merge "Fix some TextLayoutCache issues"
* commit '444457306041f00331283d0d470434d4922418f8':
  Fix some TextLayoutCache issues
2011-09-14 11:07:12 -07:00
Fabrice Di Meglio
4444573060 Merge "Fix some TextLayoutCache issues" 2011-09-14 11:05:04 -07:00
Fabrice Di Meglio
51f383d65f Fix some TextLayoutCache issues
- wrong ContextCount was passed
- better logs

Change-Id: Ie78ba70f98f3cf017c168ab8848cc080fc175f31
2011-09-13 15:57:58 -07:00
Matthew Xie
c260e3fc72 am 1667446c: Merge "Fix a compile error when debug is turned on"
* commit '1667446c90d3dc7806c03da6180c5e4103bda342':
  Fix a compile error when debug is turned on
2011-09-12 18:32:40 -07:00
Matthew Xie
62f7c9737f Fix a compile error when debug is turned on
logv uses a variable that is declared after its use

Change-Id: Id5c09698e4a0a91befa3ce2f60ce02ec28733889
2011-09-12 18:25:31 -07:00
Jaikumar Ganesh
a5465057f6 am 6d172e60: Merge "Add error codes for channel disconnection / connection."
* commit '6d172e60bb5c7dcaf1558e875bfbfe8cfe24b073':
  Add error codes for channel disconnection / connection.
2011-09-09 15:21:53 -07:00
Jaikumar Ganesh
3bed2b1383 am cedd4608: Merge "Make Bluetooth Health APIs public."
* commit 'cedd460820ffc3e88fdac5926baf588279c38b6f':
  Make Bluetooth Health APIs public.
2011-09-09 09:01:27 -07:00
Jaikumar Ganesh
b5d2d4526c Add error codes for channel disconnection / connection.
Channel connection / disconnection was handled as boolean,
doesn't capture all the values. Also make it asynchronous
instead of the dbus call being synchronous.

Change-Id: If30177b9f93b7c83f162fbbc1233edf3e46dbfea
2011-09-08 15:26:53 -07:00
Jaikumar Ganesh
eb9d34630f Make Bluetooth Health APIs public.
Fix a few bugs:
  a) Pass a integer token to identify the channel.
  b) Close fds in case of errors.

Change-Id: I2046787be5008769435f2f72a5bd67c19b749da0
2011-09-08 15:17:17 -07:00
Fabrice Di Meglio
b51154d167 am 9f443fb6: Merge "Fix bug #5274332 TextLayoutCache is having multiple instances"
* commit '9f443fb6e70f4dafdc9610385c66425410bb3ff1':
  Fix bug #5274332 TextLayoutCache is having multiple instances
2011-09-07 18:32:27 -07:00
Fabrice Di Meglio
163268b3a8 Fix bug #5274332 TextLayoutCache is having multiple instances
- also fix the missing LOG_TAG define

Change-Id: I25e96d1ba372e84768604f18702e0724fdecefb0
2011-09-07 18:25:58 -07:00
Jeff Brown
665da8c9ec am b6957413: Merge "Fix JNI leak in copyStringToBuffer Bug: 5244396"
* commit 'b695741330f56405f559a0fb2df89a21dbbb3b1f':
  Fix JNI leak in copyStringToBuffer Bug: 5244396
2011-08-31 16:56:51 -07:00
Jeff Brown
b695741330 Merge "Fix JNI leak in copyStringToBuffer Bug: 5244396" 2011-08-31 16:55:08 -07:00
Jeff Brown
f786b6ca5d Fix JNI leak in copyStringToBuffer
Bug: 5244396

Code was acquiring the char array twice for FIELD_TYPE_INTEGER
or FIELD_TYPE_FLOAT but only releasing it once.

Removed the redundant calls to GetCharArrayElements.

Change-Id: If767d3295d5a663a823e5ca0cd979379a3ccd024
2011-08-31 16:09:24 -07:00
Jeff Brown
79753f387a am 9d4bc852: Merge "Fix input channel leak. Bug: 5156144"
* commit '9d4bc852ea459c2a4347a87ce0357b3328a25db8':
  Fix input channel leak. Bug: 5156144
2011-08-31 13:03:26 -07:00
Jeff Brown
9d4bc852ea Merge "Fix input channel leak. Bug: 5156144" 2011-08-31 13:01:16 -07:00
Jeff Brown
cc4f7db698 Fix input channel leak.
Bug: 5156144

Input channels could leak or simply live longer than they should
in some cases.

1. Monitor channels (used by the pointer location overlay) are never
   unregistered, so they would leak.

   Added code to handle failures in the receive callback by closing
   the input channel.

2. The DragState held onto its input window and application handles
   even after the input channel was disposed.

   Added code to null these handles out when they are no longer needed.

3. Input channels previously used as input event targets would stick
   around until the targets were cleared (usually on the next
   event).

   Added code to detect when the input dispatcher is in
   an idle state and to proactively clear the targets then
   to ensure that resources are released promptly.

4. Native input window handles held onto the input channel even
   after the input window was removed from the input dispatcher.
   Consequently, the input channel would not be disposed until
   the input window handle itself was freed.  Since the input
   window handle is held from managed code, this meant that the
   window's input channel could stick around until the next GC.

   Refactored the input window handle to separate the properties
   (info) and identify (handle) state into different objects.
   Then modified the dispatcher to release the properties (info)
   when no longer needed, including the input channel.

7. The pointer location overlay does not actually use its
   standard input channel, only the monitor input channel.

   Added INPUT_FEATURE_NO_INPUT_CHANNEL to allow windows to
   request that they not be provided with an input channel
   at all.

Improved some of the error handling logic to emit the status
code as part of the exception message.

Change-Id: I01988d4391a70c6678c8b0e936ca051af680b1a5
2011-08-30 21:40:28 -07:00
Mathias Agopian
4ca738b6f6 am c21843a8: Merge "fix Surface positions are not floats"
* commit 'c21843a8b5c395cbaae6db0f786bdee556075f5d':
  fix Surface positions are not floats
2011-08-30 19:25:50 -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
Christopher Tate
a1cf91d033 am 95901a1b: Merge "Fix JNI for warning about failure to unlink DeathRecipients"
* commit '95901a1b8b9ee85a8cfe5603f6fa3cca15b2cb85':
  Fix JNI for warning about failure to unlink DeathRecipients
2011-08-30 15:12:05 -07:00
Christopher Tate
0d4a792e8d Fix JNI for warning about failure to unlink DeathRecipients
We now (a) use the right Class getName() method, and (b) look it
up once at setup time rather than doing that lookup every time we
want to emit the warning.  Verified to work properly and no longer
crash or throw or otherwise complain.

Change-Id: If0767f8845588ba7f34bac21474f4e2ad5c111d6
2011-08-30 14:06:20 -07:00
Mike Lockwood
a72177a4e8 Merge "New Serial Manager API:" into ics-aah 2011-08-30 09:59:19 -07:00
Mike Lockwood
8b3b98d622 New Serial Manager API:
SerialManager: provides access to serial ports
SerialPort: for reading and writing data to and from serial ports

IO with both array based and direct ByteBuffers is supported.

Accessing serial ports requires android.permission.SERIAL_PORT permission

Each platform must configure list of supported serial ports in the
config_serialPorts resource overlay
(this is needed to prevent apps from accidentally accessing the bluetooth
or other system UARTs).

In addition, the platform uevent.rc file must set the owner to the
/dev/tty* files to "system" so the framework can access the port.

Change-Id: I6afa78ceacf08486aaebced4156ecd2e33051879
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-30 12:56:26 -04:00
Irfan Sheriff
f7ecb1aff4 am 335e40c0: Merge "Use seperate config file for p2p"
* commit '335e40c0f1c3aec550e61fa159130527fda597b6':
  Use seperate config file for p2p
2011-08-29 16:33:00 -07:00
Irfan Sheriff
335e40c0f1 Merge "Use seperate config file for p2p" 2011-08-29 15:22:58 -07:00
Christopher Tate
b4ff29381f am 97c06141: Merge "Warn if we\'re tearing down "live" DeathRecipient content [take 2]"
* commit '97c06141f0ee4013076dc63af3337535c1df7e61':
  Warn if we're tearing down "live" DeathRecipient content [take 2]
2011-08-26 16:19:55 -07:00
Irfan Sheriff
f42c39b3d1 Use seperate config file for p2p
Keep p2p and sta config seperate to avoid conflicts.

Bug: 5002384
Change-Id: I8f8fc5f984f4f91f9ece4012bf536daa5cc00bba
2011-08-26 14:45:23 -07:00
Christopher Tate
ac5e350e56 Warn if we're tearing down "live" DeathRecipient content [take 2]
If the native-side bookkeeping still has strong references to VM-side
DeathRecipient objects at the time when it's being torn down, that
suggests that the app is doing unwholesome.  Log a warning to that
effect, with the class name of the objects to try to help the developer
figure out what they're mishandling.

Fixes bug 5202777 -- in particular, it no longer logs in the
working-as-intended case following delivery of the death notices,
when we've got the existing list shell but the weak refs have properly
cleared.  Also step down from "error" to "warning" logging as befits
the nature of the actual situation now being described.

This new patch fixes the JNI bug present in the earlier version.

Change-Id: I095862777a8d0e3905cb7f416af658878280041d
2011-08-26 14:34:21 -07:00
Romain Guy
92e33bd7cb am 8d8533a9: Merge "Implement saveLayer*() correctly"
* commit '8d8533a9f0d2ed1955f548e7d255de747e01b8cf':
  Implement saveLayer*() correctly
2011-08-25 13:24:23 -07:00