Commit Graph

310 Commits

Author SHA1 Message Date
Steve Block
e6f43ddce7 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
2012-01-08 13:19:13 +00:00
Steve Block
a19954ab37 Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
2012-01-04 20:05:49 +00:00
Joe Onorato
99c520a069 Add a new ui mode for "appliance"
The idea is that this is a device which is more-or-less headless.  It
might have some limited interaction capabilities, but it's not something
that you want to rely on having.

Change-Id: Ib92f53a120bf83de781728011721a4859def7d9f
2011-12-15 16:16:14 -08:00
Romain Guy
870165d2a2 GenerationCache::get would return a random value instead of NULL
Bug #5401917

This was causing a ton of random crashes in apps.

Change-Id: I9069a060824ec89115cd3bcd38beaeb9ecc4488e
2011-12-08 18:50:27 -08:00
Jeff Brown
48585f35c7 Use sized integer typedefs in hash_type specializations.
Change-Id: I3f9e004db2f3be1cb43a885c3ae142f251fd6845
2011-11-24 11:54:21 -08:00
Jeff Brown
66fbde3050 Add a basic hashtable data structure, with tests!
The basic hashtable is intended to be used to support a variety
of different datastructures such as map, set, multimap,
multiset, linkedmap, generationcache, etc.

Consequently its interface is fairly primitive.

The basic hashtable supports copy-on-write style functionality
using SharedBuffer.

The change introduces a simple generic function in TypeHelpers for
specifying hash functions.  The idea is to add template
specializations of hash_type<T> next to the relevant data structures
such as String8, String16, sp<T>, etc.

Change-Id: I2c479229e9d4527b4fbfe3b8b04776a2fd32c973
2011-11-22 17:12:22 -08:00
Jeff Brown
b4293fe408 Clean up GenerationCache.
Use const references to keys and values where appropriate to avoid
copying them unnecessarily.

Deleted some dead code.

Simplified a few pieces that were doing unnecessary redundant work.

Change-Id: Ib2145b7094a40db2d679e05dafe050fe1e87b846
2011-11-11 22:14:07 -08:00
Jamie Gennis
7fbb39960e am 236aea35: Merge changes Ibc99cb1c,Ie1f4f6f8 into ics-mr1
* commit '236aea3579787961fdd41d87574760b63323c0c1':
  BlobCache: implement cache serialization
  BlobCache: remove the mutex locking
2011-11-03 18:55:14 +00:00
Jamie Gennis
0e1bc17429 BlobCache: implement cache serialization
This change adds serialization and deserialization functionality to
BlobCache, conforming to the Flattenable interface.

Change-Id: Ibc99cb1c3d015f363d57d0713eabccec07ff975e
2011-10-31 18:49:32 -07:00
Jamie Gennis
93ca6fb91c BlobCache: remove the mutex locking
This change removes the mutex from the BlobCache class.  The caller must
be responsible for thread synchronization in order to properly implement
the Flattenable interface, which is coming soon.  Otherwise would be the
potential for the cache contents to change between the call to the
getFlattenedSize and flatten methods.  Because the caller must do this
synchronization anyway there's no reason to also some synchronization
inside BlobCache.

Change-Id: Ie1f4f6f82b78744f46a41ce863cac0cad276a20e
2011-10-31 18:48:31 -07:00
Jeff Brown
e27d62bbf2 Use libcorkscrew for stack unwinding.
Change-Id: Iee1ee5a2018ab8cfc1ce12ec2a124809245eaa02
2011-10-22 15:44:12 -07:00
Romain Guy
5c78b6861f Reduce the size of libhwui by 50%
This change removes unnessary symbols. All symbols are hidden by
default, public APIs with exported symbols are explicitly marked
with ANDROID_API.

Change-Id: I692fde432a86c12108de1cfd1f6504919a7d5f3f
2011-10-12 13:48:51 -07:00
Jeff Brown
de27227026 Fix regression in CursorWindow.copyStingToBuffer.
Bug: 5332296

Change-Id: Iff9eed786f0a8293b6156f883a66a322ddad5e99
2011-10-07 13:28:18 -07:00
Dianne Hackborn
8938ed2c8e Add mechanism for Parcel to not allow FDs to be written to it.
This is to help implement issue #5224703.

Change-Id: I026a5890495537d15b57fe61227a640aac806d46
2011-10-03 16:58:41 -07:00
Andreas Huber
1d60b9629c A new API "androidGetThreadPriority"
Change-Id: I6baeead8c70460863343fd557250635fb1e6a170
2011-09-16 09:33:22 -07:00
Glenn Kasten
940673f92e Merge "Add C++ thread API androidGetThreadSchedulingGroup" 2011-08-29 14:38:52 -07:00
Xavier Ducrohet
de16a5a62b 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
754b249bcd 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
242915f3d0 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
35302266fa 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
Josiah Gaskin
37bf88e547 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
Mathias Agopian
cbe527884a 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
Mathias Agopian
a11499a026 Fix typos and use new HAL_PRIORITY_URGENT_DISPLAY constant
Change-Id: I703f8a96dd0dfec427e74363ad95729bfefc95c7
2011-08-09 18:57:37 -07:00
Jeff Brown
5873ce46ad 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
Mathias Agopian
aa599086f8 DO NOT MERGE. may fix build on some version of gcc
Change-Id: Id99d390862731fd3fbc009dbffdf1d2a59dbe348
2011-07-27 11:31:57 -07:00
Kenny Root
49a65e5526 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
Jeff Brown
585ef1e14a Remove unimplemented memory pool.
dlmalloc does such a great job that we don't need a pool anyways.

Change-Id: I105b28c4a5c491543959190c7c0a9de75a5b8052
2011-07-20 15:19:50 -07:00
Glenn Kasten
4fb2427591 Add C++ thread API androidGetThreadSchedulingGroup
This API is intended for applications that need to read a thread's
scheduling group, while using the higher-level (C++) family of thread APIs.

Change-Id: I5e58017f74c3989b20b5b1cc2bc4483c95720520
2011-07-08 10:11:08 -07:00
Glenn Kasten
be3c018f8b Merge "Add Thread::join" 2011-07-06 11:37:53 -07:00
Glenn Kasten
f44c896b09 Merge "Thread ID zero for androidSetThreadSchedulingGroup" 2011-07-05 15:08:31 -07:00
Jeff Brown
2e0b543c09 Workaround apps that make assumptions about pointer ids.
Modified the touch input mapper to assign pointer ids sequentially
starting from 0 instead of using the tracking id or slot index
supplied by the driver.  Applications should not depend on this
ordering but some do.  (sigh)

Bug: 4980884
Change-Id: I0dfeb3ac27c57a7102a13c960c760e2a02eb7669
2011-07-01 19:08:15 -07:00
Mathias Agopian
e6786c92d7 Merge "SF transactions are now O(1) wrt IPC instead of O(N)." 2011-06-29 16:15:56 -07:00
Mathias Agopian
698c0873cf SF transactions are now O(1) wrt IPC instead of O(N).
Change-Id: I57669852cbf6aabae244ea86940a08a5a27ffc43
2011-06-29 15:05:41 -07:00
Xavier Ducrohet
73b607f9ce am 54146a63: Merge "DO NOT MERGE. may fix build on some version of gcc" into gingerbread
* commit '54146a634e0e66a5e4732ba1a80079a1e93bdd8a':
  DO NOT MERGE. may fix build on some version of gcc
2011-06-28 18:53:51 -07:00
Jason Simmons
c18d4da5e4 Add a linear transform library to libutils
Change-Id: Icdec5a6bebd9d8f24b3f335f8ec8b09a5810a774
2011-06-28 17:43:30 -07:00
Glenn Kasten
58e012d1e3 Add Thread::join
This new API will be used by applications that previously used the
lower-level pthread APIs (including pthread_join).  Centralizing on the
Thread class instead of pthread will permit additional functionality to
be added later in only one location.

Change-Id: I8460169ac9c61ac9f85752405ed54c94651058d7
2011-06-23 12:55:29 -07:00
Glenn Kasten
ce63396eff Thread ID zero for androidSetThreadSchedulingGroup
Already implemented by androidSetThreadPriority but not documented

Change-Id: I85302b17092952065f3f3a4214d8d8abdd465dbd
2011-06-22 17:45:30 -07:00
Mathias Agopian
66ff46b366 DO NOT MERGE. may fix build on some version of gcc
Change-Id: Id99d390862731fd3fbc009dbffdf1d2a59dbe348
2011-06-16 18:26:14 -07:00
Mathias Agopian
e2fc756f7d am 48294b0d: am e7d3ee9d: Revert "merge various SF fixes from gingerbread to honeycomb-mr2" (DO NOT MERGE)
* commit '48294b0d9388cff632f0e6ae5220305d342c76fb':
  Revert "merge various SF fixes from gingerbread to honeycomb-mr2" (DO NOT MERGE)
2011-06-16 18:15:19 -07:00
Mathias Agopian
debc234c24 Revert "merge various SF fixes from gingerbread to honeycomb-mr2" (DO NOT MERGE)
Also revert all dependent changes:
This reverts commit 8e18668d14adf601cbe5973030c310ec23d88461.
This reverts commit 69b4587bfbb3e98f793959d9123340360fa233a2.
This reverts commit a9c9a4baf24700e8817d47d8ea8da1742caea0b5.
This reverts commit 2c0042b666a969091c931614f2fc0dce2f1cfac8.
This reverts commit f6c8206735e7e078461e5f2aef6e1a1446fdd075.
This reverts commit 24855c09173a6caaec7dcedd0c2d7ce15121d39b.

Change-Id: I33e699640f3f59e42fa03c99a9a1b7af0d27d4d8
2011-06-16 17:22:28 -07:00
Mathias Agopian
e397ce2880 am 0887b8c2: am 8e18668d: revert surfaceflinger leak fix as it uncovered a crasher on xoom (DO NOT MERGE)
* commit '0887b8c2e583e682cd2c1bc909cb3fdbec704004':
  revert surfaceflinger leak fix as it uncovered a crasher on xoom (DO NOT MERGE)
2011-06-15 22:42:52 -07:00
Mathias Agopian
dbe60ddd85 am d5244e0a: am 52a43990: Revert "revert surfaceflinger leak fix as it uncovered a crasher on xoom"
* commit 'd5244e0a88ed2f843651aa5ffdc71a45c968e0f3':
  Revert "revert surfaceflinger leak fix as it uncovered a crasher on xoom"
2011-06-15 22:12:32 -07:00
Kenny Root
111280a8de Use rand() for MinGW
The version of MinGW we use doesn't have nrand48() which is really lame,
but we need to use libutils in the Windows SDK.

Change-Id: If854c03dbf02bc29e79f49e4539f08c2bf057517
2011-06-15 20:55:49 -07:00
Mathias Agopian
1b2c2a9ea0 revert surfaceflinger leak fix as it uncovered a crasher on xoom (DO NOT MERGE)
This reverts commit 52a43990880b27808bcf562afcc4209d34728e6e.

Change-Id: I1856a48f863b051395b8091ddfd1e01292fa1b1e
2011-06-15 20:45:32 -07:00
Mathias Agopian
63ad28fb53 Revert "revert surfaceflinger leak fix as it uncovered a crasher on xoom"
This reverts commit af6edba59e250adbdfa5b3c3be134f70d8c38a16.

Change-Id: I7793d3ca8a4d20a2b188364f47854328ab5f586d
2011-06-15 20:42:25 -07:00
Mathias Agopian
e776586a08 am 7ecdeb6e: am d20d72d1: Merge "revert surfaceflinger leak fix as it uncovered a crasher on xoom" into honeycomb-mr2
* commit '7ecdeb6e548ff71d4f70b343e30136e89eaa3e33':
  revert surfaceflinger leak fix as it uncovered a crasher on xoom
2011-06-15 20:21:31 -07:00
Mathias Agopian
3790e7997a revert surfaceflinger leak fix as it uncovered a crasher on xoom
Bug: 4600244
Change-Id: Ia68ebf0f243a051ff6a21b3863e3e5d259bbf7ac
2011-06-15 19:31:04 -07:00
Mathias Agopian
35cc0fcd51 am afffa8fa: fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
* commit 'afffa8fa9f82a7343e1158bf921931fd3e3df615':
  fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
2011-06-15 14:13:04 -07:00
Mathias Agopian
fbb8272db3 am a9007fbd: am 69b4587b: DO NOT MERGE. may fix build on some version of gcc
* commit 'a9007fbdae6671f66535da4b9dad04b19aaf9186':
  DO NOT MERGE. may fix build on some version of gcc
2011-06-14 13:30:34 -07:00
Mathias Agopian
7b1ef58d56 DO NOT MERGE. may fix build on some version of gcc
Change-Id: Iff6d9ab3a7caf58f65fc3f60633a3bd577b7af25
2011-06-14 12:05:42 -07:00