Commit graph

6279 commits

Author SHA1 Message Date
Glenn Kasten
77ed15a31a Scheduling group cleanup
Remove C++ APIs androidSetThreadSchedulingGroup and
androidGetThreadSchedulingGroup, and the ANDROID_TGROUP_* constants.

Former callers of these should now use the C APIs set_sched_policy and
get_sched_policy, and the SP_* constants.

Note: debug.sys.noschedgroups is not supported by the C APIs,
this needs to be discussed.

Change-Id: I32bbfc539ef4090faf9ef0320380e8cca9eae07c
2013-07-30 13:56:59 -07:00
Jeff Brown
2c1627dc49 Support tokenizing arbitrary content.
Bug: 6110399
Change-Id: I37be63b68934fd451e6dffbf7d6079553619c0a3
2013-07-30 13:56:59 -07:00
Chris Craik
52d59e2c48 Add webview tracing bit
Change-Id: I82e54f5eeb2666a255e372fd3bfcc54c1b3d76a0
2013-07-30 13:56:59 -07:00
Glenn Kasten
ec2e1323a0 Add a log tag
Change-Id: If30aa8536130cf6ff9918ce97c5e4e8651ae2fef
2013-07-30 13:56:59 -07:00
Keun young Park
4e371cec7f add Looper.cpp to build for linux host to use in CTS audio
Change-Id: I59cfe30fd48fcba0bb949033f4d2aef5ce9916e4
2013-07-30 13:56:59 -07:00
Colin Cross
e29b5c384b frameworks/native: link host libutils against external/zlib
Fix the SDK build by statically linking host libutils against libz
from external/zlib.

Change-Id: Id6805d3c9071e6fa0559024336642b5386cf3c52
2013-07-30 13:56:59 -07:00
Colin Cross
3abdea92ef frameworks/native: move Zip* from libandroidfw to libutils
ZipUtils is needed by build/tools, move it from libandroidfw
(frameworks/base) to libutils (frameworks/native).

Change-Id: Ib8c41134ccdec6d6aa8d49860f8dddef49a24783
2013-07-30 13:56:59 -07:00
Kenny Root
cd19987605 Add UniquePtr.h to frameworks/native
This is a copy of libcore's UniquePtr.h header which is used until we
get C++11 which has std::unique_ptr which is essentially the same.

Taken from libcore project at commit
3e6dd45baa0d7f9b4fa06f4ade76e088b59cc7bf

Change-Id: I7537b016f9eae33bfc4c57b24f86260909719ab8
2013-07-30 13:56:59 -07:00
Jeff Brown
27e6eaae87 Add a simple work queue abstraction.
Makes it easy to schedule a bunch of work to happen in parallel.

Change-Id: Id9c0e52fc8b6d78d2b9ed4c2ee47abce0a01775c
2013-07-30 13:56:59 -07:00
Jeff Brown
9a0a76df1e Add traits to common utils data structures.
Many of our basic data structures are trivially movable using
memcpy() even if they are not trivially constructable, destructable
or copyable.  It's worth taking advantage of this *ahem* trait.

Adding trivial_move_trait to String16 reduces appt running
time on frameworks/base/core/res by 40%!

Change-Id: I630a1a027e2d0ded96856e4ca042ea82906289fe
2013-07-30 13:56:59 -07:00
Andrew Hsieh
a19d2c7e3b Added rules to build f/n/libs/utils in 64-bit: lib64utils.a
It's needed to build four shared libraries in 64-bit for 64-bit
emulator with "-gpu on"
  lib64OpenglRender.so
  lib64EGL_translator.so
  lib64GLES_CM_translator.so
  lib64GLES_V2_translator.so

Change-Id: Ia6c05b23df1e9cd9e7f2e94e4cd5bde4be5d336b
2013-07-30 13:56:59 -07:00
Jeff Brown
59322a36c6 Expose the set of enabled tags.
This is used by the Java trace wrappers to avoid JNI overhead
when trace tags are disabled.

Also added a new tag for the input subsystem and view hierarchy.

Change-Id: Ia04a507e42a37b1d3bbb19859e6c07a92f4fe9aa
2013-07-30 13:56:59 -07:00
Andreas Huber
f03fd0a870 Instead of hardcoding OMX component names in our code, support
a config file instead.

Change-Id: I5835903ab9f1c4a22ccc605ca99ed966767adf57
2013-07-30 13:56:59 -07:00
Andrew Hsieh
24e57d5660 Fixed several 64-bit porting issues
1. Use "%zu" instead of "%d" for size_t in printf
2. Variable precision specifier (eg. "%.*s") in printf should be of type int.
   (iov_len is size_t which is 64-bit when compiled with -m64)
3. Use PRId64 instead of "%lld" to print variables of type int64_t

Change-Id: I2be40a6514b5dffa0038d62b9bccc3401b8756e6
2013-07-30 13:56:59 -07:00
Mathias Agopian
2bd99599bb split utils/threads.h into multiple headers
AndroidDefs.h - C/C++ enums and types
Mutex.h - Mutex class declaration
Condition.h - Condition class declaration
RWLock.h - RWLock class declaration
Thread.h - Thread class declaration
AndroidThreads.h - low-level thread creation functions
threads.h - includes all the above for backward source compatibility

Change-Id: Ia2f80c175333b59a41d1720985810bb2346e94cb
Note: implementations are still in Threads.cpp
2013-07-30 13:56:59 -07:00
Jamie Gennis
2ccfe1a060 libutils: add a system-wide tracing utility
This change adds some utility functionality for doing userland tracing
into the kernel trace log.

Change-Id: Id0a8cee9ea515b1d8765afd1cecf472a88b4b9e8
2013-07-30 13:56:59 -07:00
Jamie Gennis
b11abadc24 Add the atrace utility.
This change adds a new system binary to help with capturing and dumping
kernel traces.

Change-Id: If2fc074480f822588a4c171312dc4c04fd305356
2013-07-30 13:56:59 -07:00
Mathias Agopian
eb63cf29db frameworks/base refactoring
create the new libandroidfw from parts of libui and libutils

Change-Id: I1584995616fff5d527a2aba63921b682a6194d58
2013-07-30 13:56:59 -07:00
Al Sutton
6c865b58aa Xcode 4.3 compatibility checkin
The update compiler in Xcode 4.3 (and 4.4) requires lookups into dependant
bases of class templates to be qualified. This checkin fixes the issues
raised by the compiler by implementing the this-> recommendation from
the llvm page at http://clang.llvm.org/compatibility.html#dep_lookup_bases

Signed-off-by: Al Sutton <al@funkyandroid.com>
2013-07-30 13:56:59 -07:00
Mathias Agopian
c2b7fb1f91 frameworks/base refactoring.
step 2: move libutils headers to their new home: androidfw

Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
2013-07-30 13:56:59 -07:00
Iliyan Malchev
f21c255fde libs/utils: replace malloc() + memset() to zero with calloc()
Change-Id: I8bdf4360147e51e35c162856c9a859aed6acac34
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-07-30 13:56:58 -07:00
Glenn Kasten
73e263e5d6 Update comments
We no longer put the filename at start of file.

Change-Id: Ic435b159a23105681e3d4a6cb1ac097bc853302e
2013-07-30 13:56:58 -07:00
Ramanan Rajeswaran
5db7269c89 DO NOT MERGE
Revert "Add xxhdpi; fix ActivityManager.getLauncherLargeIconSize() etc."

This reverts commit c1496d2d9a496e4aba817a58ecb9e07fe55cdba5.

Change-Id: If60df742b19c925cc99b20d01108b84415b124ad
2013-07-30 13:56:58 -07:00
Dianne Hackborn
413022bc90 Add xxhdpi; fix ActivityManager.getLauncherLargeIconSize() etc.
Change-Id: I519d6cdc527a402d93b98df17a64fc1da52ad598
2013-07-30 13:56:58 -07:00
Ramanan Rajeswaran
81beedda90 DO NOT MERGE
Revert "Add xxhdpi; fix ActivityManager.getLauncherLargeIconSize() etc."

This reverts commit c1496d2d9a496e4aba817a58ecb9e07fe55cdba5.

Change-Id: If60df742b19c925cc99b20d01108b84415b124ad
2013-07-30 13:56:58 -07:00
Dianne Hackborn
78eb46c8e8 aapt now sorts the strings in the resource string pool.
In our current environment with very many translations, this can
save a lot of RAM -- for example over 200K in Gmail just by sorting
the strings in the Gmail .apk (not the framework).

Also add a new aapt command to print the contents of the resource
table string pool.

Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
2013-07-30 13:56:58 -07:00
Dianne Hackborn
e956c5c197 Add xxhdpi; fix ActivityManager.getLauncherLargeIconSize() etc.
Change-Id: I519d6cdc527a402d93b98df17a64fc1da52ad598
2013-07-30 13:56:58 -07:00
Glenn Kasten
d731f07cc9 Thread::getTid returns pid_t gettid() after run
This is needed when the parent or any other thread besides the child
needs access to the child's kernel tid.

Change-Id: Ib148505913eb78314cfd76657c30d7b20663dffd
2013-07-30 13:56:58 -07:00
Evgeniy Stepanov
4cc144c4fb Fix compilation with Clang.
warning: extraneous template parameter list in template specialization
template<>

Change-Id: If3e3e1d06a018343b40ac0984dfd9ecc12629f8d
2013-07-30 13:56:58 -07:00
Steve Block
ae07445e97 Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE
See https://android-git.corp.google.com/g/157519

Bug: 5449033
Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
2013-07-30 13:56:58 -07:00
Steve Block
1b781ab0e0 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
2013-07-30 13:56:58 -07:00
Steve Block
61d341b8d3 Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
2013-07-30 13:56:58 -07:00
Steve Block
a1d3391b1e 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
2013-07-30 13:56:58 -07:00
Steve Block
eb0953307c Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
2013-07-30 13:56:58 -07:00
Joe Onorato
53ddace1a5 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
2013-07-30 13:56:58 -07:00
Romain Guy
587042dfa3 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
2013-07-30 13:56:58 -07:00
Jeff Brown
142dbcd817 Use sized integer typedefs in hash_type specializations.
Change-Id: I3f9e004db2f3be1cb43a885c3ae142f251fd6845
2013-07-30 13:56:58 -07:00
Jeff Brown
e735f23018 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
2013-07-30 13:56:58 -07:00
Jeff Brown
11189f5f79 Use libcorkscrew to format the stack trace.
Change-Id: I3a5439ada76bc77c2dd491eaed2272e16a811cc7
2013-07-30 13:56:58 -07:00
Jeff Brown
f36821289c 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
2013-07-30 13:56:58 -07:00
Jeff Brown
e7f3716572 Slight change to the unwinder API.
Change-Id: I5424de76a21b74842e004e0281936b3f492d3c7a
2013-07-30 13:56:58 -07:00
Jamie Gennis
7451bb4410 BlobCache: implement cache serialization
This change adds serialization and deserialization functionality to
BlobCache, conforming to the Flattenable interface.

Change-Id: Ibc99cb1c3d015f363d57d0713eabccec07ff975e
2013-07-30 13:56:58 -07:00
Jamie Gennis
90f43dce84 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
2013-07-30 13:56:58 -07:00
Steve Block
b37fbe9f81 Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
2013-07-30 13:56:58 -07:00
Steve Block
8b4cf779b2 Rename (IF_)LOG() to (IF_)ALOG() DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/141576

Bug: 5449033
Change-Id: I42575e7c29cf1c0f465c357a5c97ab118df6f473
2013-07-30 13:56:58 -07:00
Jeff Brown
ea45b01f9b Use libcorkscrew for stack unwinding.
Change-Id: Iee1ee5a2018ab8cfc1ce12ec2a124809245eaa02
2013-07-30 13:56:58 -07:00
Iliyan Malchev
26ad34522e add -ldl to host executables
This fixes the build on Linux when RefBase is compiled with reference tracking
enabled.

Change-Id: I3e931e0b463ce836f6fdb30c37068d77144631a3
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-07-30 13:56:58 -07:00
Romain Guy
5cd324794c 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
2013-07-30 13:56:58 -07:00
Jeff Brown
aa983c91ca Fix regression in CursorWindow.copyStingToBuffer.
Bug: 5332296

Change-Id: Iff9eed786f0a8293b6156f883a66a322ddad5e99
2013-07-30 13:56:58 -07:00
Dianne Hackborn
6c31a2fb60 Add mechanism for Parcel to not allow FDs to be written to it.
This is to help implement issue #5224703.

Change-Id: I026a5890495537d15b57fe61227a640aac806d46
2013-07-30 13:56:58 -07:00