Commit graph

1020 commits

Author SHA1 Message Date
Mathias Agopian
96675ed91f Fix rotation in camera2 API
Bug: 10804238
Change-Id: I093945789d9c6d373392fc9dfd18ec2c6058d3b9
2013-09-17 23:48:54 -07:00
Andrew Boie
30fb83b6e5 cutils: list: add list_for_each_safe
For when you want to modify the list whilst iterating over it.

Change-Id: I84432892890987c218e56883c35e52c9ff0240a3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-09-12 15:30:40 -07:00
Eric Laurent
04c12ca061 Add HOTWORD audio source to audio.h
- This is a complimentary change to the one adding this new source to
  MediaRecorder.java

Bug: 10640877.

Change-Id: Ie213e82b5a60dad2a277cef367c2f5e4df70df06
2013-09-09 15:42:31 -07:00
Lorenzo Colitti
f34861346d Switch back to subsystem "net" for netlink events.
The change to enable address tracking via netlink incorrectly
changed the subsystem of rtnetlink events from "net" to
"interface". This broke interface add/delete notifications,
which come from the kernel with subsystem "net".

Switch back to "net" and deal with address tracking via new
action codes instead of a new subsystem.

Bug: 10433320
Change-Id: Ibf30efb426949dfd02304cc1d9adb1c005a539a6
2013-09-03 00:25:14 +09:00
Jeff Brown
8ecc7afca4 Add helpers for audio remote submix devices.
Bug: 10265163
Change-Id: Iea7ecab4f2a655b719ff14b04c757d6dbd7a7ef3
2013-08-16 20:21:10 -07:00
Jesse Hall
1e26356da1 Replace sRGB_888 with sRGB_X_8888
Bug: 10357459
Change-Id: I23a3eca77acd8b4b40b1a67e7c050a7245b1821a
2013-08-16 08:40:52 -07:00
Lorenzo Colitti
a4b4e9ad8e Parse IP address changes in NetlinkEvent.
This adds support for parsing RTM_NEWADDR and RTM_DELADDR
netlink messages received on netd's netlink socket and
formatting them them so NetlinkHandler can process them.

Address changes are notified in subsystem "address". Interface
changes, which used to be notified in subsystem "net", are now
notified in subsystem "interface" to avoid confusion.

Bug: 10232006
Change-Id: I93a50e8de17014e118a42f5cc0eb90a0cbfa73cc
2013-08-14 19:50:22 +09:00
Jeff Sharkey
dfe0cbab3f Richer SD card permissions through FUSE.
Changes the FUSE daemon to synthesize an Android-specific set of
filesystem permissions, even when the underlying media storage is
permissionless.  This is designed to support several features:

First, apps can access their own files in /Android/data/com.example/
without requiring any external storage permissions.  This is enabled
by allowing o+x on parent directories, and assigning the UID owner
based on the directory name (package name).  The mapping from package
to appId is parsed from packages.list, which is updated when apps are
added/removed.  Changes are observed through inotify.  It creates
missing package name directories when requested and valid.

Second, support for separate permissions for photos and audio/video
content on the device through new GIDs which are assigned based on
top-level directory names.

Finally, support for multi-user separation on the same physical media
through new /Android/user/ directory, which will be bind-mounted
into place.  It recursively applies the above rules to each secondary
user.

rwxrwx--x root:sdcard_rw     /
rwxrwx--- root:sdcard_pics   /Pictures
rwxrwx--- root:sdcard_av     /Music

rwxrwx--x root:sdcard_rw     /Android
rwxrwx--x root:sdcard_rw     /Android/data
rwxrwx--- u0_a12:sdcard_rw   /Android/data/com.example
rwxrwx--x root:sdcard_rw     /Android/obb/
rwxrwx--- u0_a12:sdcard_rw   /Android/obb/com.example

rwxrwx--- root:sdcard_all    /Android/user
rwxrwx--x root:sdcard_rw     /Android/user/10
rwxrwx--- u10_a12:sdcard_rw  /Android/user/10/Android/data/com.example

These derived permissions are disabled by default.  Switched option
parsing to getopt().

Change-Id: I21bf5d79d13f0f07a6a116122b16395f4f97505b
2013-08-08 17:26:41 -07:00
Glenn Kasten
9de3fd115a Merge "Add audio_input_flags_t" 2013-08-05 19:11:34 +00:00
Dmitry Shmidt
be06210c50 libnetutils: Get mtu together with dhcp session results
Change-Id: I517fd1f62d451b07466a21a2b770d9ce389dac19
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-08-02 14:09:09 -07:00
Glenn Kasten
c051ffd7c2 Add audio_input_flags_t
Change-Id: Ie65398cc67218cc63be4baa8a2a61d0ea591a2a3
2013-08-02 10:30:42 -07:00
Eino-Ville Talvala
b4802413a7 Merge "Window: Add query for consumer usage bits." 2013-08-02 00:23:02 +00:00
Mathias Agopian
ddff623049 minor tweaks to FlattenableUtils
Change-Id: Ibfceec36434baac92c8815a18d902375d3fa1a6d
2013-08-01 12:47:58 -07:00
Dianne Hackborn
0f10d0abf3 Add a new utf8-to-utf16 conversion function.
Change-Id: I957c22fb219596ca4239db7a169473d3894b09eb
2013-07-31 16:04:39 -07:00
Mathias Agopian
6d611a891d Make Flattenable not virtual (libutils)
Making an object Flattenable doesn't force it to
become virtual anymore. For instance, Fence and GraphicBuffer
are now non-virtual classes.

Also change Flatennable protocol a bit so that it updates
its parameters (pointers, sizes) to make it easier
to implement a flattenable in terms of other flattenables.

Change-Id: Ie81dc7637180b3c2cfcbaf644f8987ca804eb891
2013-07-31 13:41:41 -07:00
Eino-Ville Talvala
f88a5b4f88 Window: Add query for consumer usage bits.
Bug: 9592202
Change-Id: Ied2fdb985dc59dd9c0f26c515353abdc37f0eb77
2013-07-30 21:38:13 +00:00
Alex Ray
0d8f3d6c45 libutils: give BasicHashtableImpl a virtual destructor
Change-Id: I4ec590b060d732af5fe525670becbe778684247b
2013-07-30 13:57:01 -07:00
Alex Ray
567ea471ff utils: move thread enums to system/core
Change-Id: Ia97963cc9acf8661d01355786f5e7e7bf54581c2
2013-07-30 13:57:01 -07:00
Michael Wright
d614ee4557 Added bitwise-or and bitwise-and to BitSet
Change-Id: I9bbf41f9d2d4a2593b0e6d7d8be7e283f985bade
2013-07-30 13:57:01 -07:00
Tim Murray
214c701ec6 Make trace macros slightly more robust
Change-Id: I9544eb7b27fc1a971cabadd8d5b4b4b80678febf
2013-07-30 13:57:01 -07:00
Mathias Agopian
8db925f777 remove unused declarations and reformat
Change-Id: I4e168fb62c275e02621c4b6e0c6000d0f006c327
2013-07-30 13:57:01 -07:00
Mathias Agopian
d3d3fceb7c remove reserved virtual slots
these consume small amount of space (plt) in every library that
links against libutils.

Change-Id: I1b6b3dd9098aa5a051243f7a5dbf91cd7dcb8b2c
2013-07-30 13:57:01 -07:00
Mathias Agopian
4485d0d966 new String8, String16 ctors to initialize empty static strings with static linkage
when libutils is statically linked, the ordering of the static
initializer is not guaranteed and therefore it's unsafe to use
empty static strings: e.g.:

static String8 sThisStaticStringIsNotSafe;

instead, this new constructor can be used:

static String8 sThisStaticStringIsSafe(kEmptyString);

Change-Id: Ia3daf1cab1c97d021c0ee9c2b394b5e27e8d6c0d
2013-07-30 13:57:01 -07:00
Mathias Agopian
9eb2a3b1c0 libutils clean-up
Change-Id: I6ff4cfc736751de2912c697f954e45e275f2d386
2013-07-30 13:57:01 -07:00
Dianne Hackborn
19159f9002 Add new Looper API to check whether the looper is idle.
This is just to support the watchdog to give it a faster
way to determine if a thread is deadlocked without having
to post a message to it.

Change-Id: I068dc8b9387caf94fe5811fb4aeb0f9b57b1a080
2013-07-30 13:57:01 -07:00
Mathias Agopian
d34a8cad1e improved CallStack a bit
- added a ctor that updates and dumps the stack immediately
- added a "logtag" parameter to dump()

Change-Id: Ie51c256071d282591752243bdb4f68cf9ff8829d
2013-07-30 13:57:01 -07:00
Mathias Agopian
6cd548c715 Fix a crasher with RefBase debugging and vectors of wp<>
background:
we have some code to fix-up the IDs of references when
using RefBase's DEBUG_REFS when those refs are managed by
arrays wp<> or sp<> (this is because wp<> / sp<> don't have
a trivial ctor when DEBUG_REFS is enabled, and Vector
treats them as trivial for obvious performance reasons)

this is complicated by the fact that we don't want to have
to recompile everything when enabling DEBUG_REFs (i.e.: the
Vector code cannot know wheter it's enabled or not for its
template stuff).

problem:
there was a bug in the fix-up code for wp<> which was trying
to access the weakref_impl from the RefBase* however, this was
moronic since RefBase could have been destroyed if there wasn't
any more strong refs -- and this happned. Instead we need to get
the weakref_impl directly from the wp<>

Change-Id: Ie16e334204205fdbff142acb9faff8479a78450b
2013-07-30 13:57:01 -07:00
Jesse Hall
b73559d86c Add Vector::resize()
Bug: 8384764
Change-Id: Icee83d389f3e555eba7d419b64c8d52a9aa21b8b
2013-07-30 13:57:01 -07:00
Romain Guy
31ba37f1c8 Add Thread::isRunning and Condition::signal(WakeUpType)
The signal() method is useful to choose whether to wake up one or
all threads.

Change-Id: I062ab6d3ddd306a9fb735549ea140e2a76eed75a
2013-07-30 13:57:01 -07:00
Mathias Agopian
6090df85a8 rename binder services main thread to Binder_*
When a binder service's main thread joins the thread pool
it retains its name (whatever the exec name was), which is
very confusing in systrace.

we now rename that thread just like its friends in the
thread pool.

Change-Id: Ibb3b6ff07304b247cfc6fb1694e72350c579513e
2013-07-30 13:57:01 -07:00
Naseer Ahmed
ca3e2a276a utils: Allow non android namespaces to use ALOGD_IF_SLOW
Change-Id: I9207b64954fae2f56cc5f6aa5796a2e737400623
2013-07-30 13:57:00 -07:00
Chris Craik
551fcf4fe3 Add LinearAllocator
Moving from external/webkit/Source/WebCore/platform/graphics/android/utils/

Change-Id: If91830aa9b207dbc8692b2ca7c4a0b76778addd5
2013-07-30 13:57:00 -07:00
Igor Murashkin
a27c1e0839 utils: fix warnings for unused parameters
Change-Id: Ibfb755a30ba2923669060fe0aed019beecbe38a1
2013-07-30 13:57:00 -07:00
Alex Ray
fcb349ff75 utils: clarify scoped tracing functionality
ScopedTrace objects were being used in place of ATRACE_NAME because of a
misunderstanding of it's function.  Cleared up documentation for usage.

Also explicitly use global namespace for sysprop callback.

Change-Id: I7c248b486b614ccdb841659ca0dcfc644fda670a
2013-07-30 13:57:00 -07:00
Alex Ray
5b2d36e38a utils: Use cutils tracing functionality.
Tracing functionality has moved to cutils.

Change-Id: Ie78ccc1d59dd5178f5058fbc3858a37f9adce552
2013-07-30 13:57:00 -07:00
Romain Guy
5ca402a4e2 Add LruCache::Iterator
Required by libhwui

Change-Id: I164b9a4a82d89d132da01a56535c0df084de86f7
2013-07-30 13:57:00 -07:00
Romain Guy
bdce9baa88 Add another ifndef and a couple of methods to LruCache
The new methods on LruCache are needed by libhwui to manage
the cache of paths.

Change-Id: If54fa325c54e2b04e7fe5dfe6dad66066c40127c
2013-07-30 13:57:00 -07:00
Romain Guy
b3176acd5f Add #ifndef to prevent multiple definitions
Change-Id: Ib861eee0f333fe29290437b7e67623622d8dabd0
2013-07-30 13:57:00 -07:00
Andy McFadden
45ad8f44d0 Reduce emulator logspam
The emulator doesn't support systrace, but we should point that out
at most once per process.

Bug 7436352

Change-Id: I06b2c1ea0df6c02c11cd2496423c337f8d7c62a1
2013-07-30 13:57:00 -07:00
Raph Levien
b6ea175b6b Add an LRU cache plus hashing primitives
This patch adds a hashtable-based LRU cache. This should be
significantly higher performance than the GenerationCache it is intended
to replace. It is a large part of the fix for bug 7271109
TextLayoutCache low-level performance issues.

We added a new method to BasicHashtable to detect when rehashing is
needed, because the internal linked list pointers would get invalidated
by that rehashing.

Also, the hash_type specialized to pointers had a small flaw.

Change-Id: I950c2083f96519777b851dbe157100e0a334caec
2013-07-30 13:57:00 -07:00
Jason Simmons
61db1669f4 Ensure that Vector::erase() returns a valid iterator
Vector::erase may reallocate the Vector's storage while removing an element.
However, erase() calls begin() before calling removeItemsAt(), thus caching
a pointer the the Vector's old storage.  If the storage is reallocated,
the iterator returned by erase() will be based on the old storage pointer
and will thus be invalid.

Change-Id: I2450c55fd418e6b1c558a4ca7c024573abbaa098
2013-07-30 13:57:00 -07:00
Dave Burke
d49555291a Revert "Revert "put back the unused virtuals in Vector<>""
This reverts commit 225c66a48cdc3acef21ee380dc134449749d3cb3

Change-Id: If31a04b81052cbc7dd7bf237c07107c33066d03d
2013-07-30 13:57:00 -07:00
Romain Guy
3fc49adfd2 Add runtime debugging capabilities to OpenGL
The shell property debug.egl.trace can now be set to:

0
  disables tracing
1
  logs all GL calls
error
  checks glGetError after every GL call, logs a stack trace on error
systrace
  logs each GL call to systrace

Change-Id: I34a2a2d4e19c373fd9eaa1b0cd93e67c87378996
2013-07-30 13:57:00 -07:00
Kenny Root
b9fd6f9864 Add TEMP_FAILURE_RETRY to ZipUtils
Change-Id: I275c415f14eeffaf9a58d45f3ea014d766441ec3
2013-07-30 13:57:00 -07:00
Mathias Agopian
e79aadd143 minor SharedBuffer clean-up
Change-Id: If38b7ce85806ae628c00f2c938de4e3f75142543
2013-07-30 13:57:00 -07:00
Mathias Agopian
919fa297fe Add a way to retrieve a Region as a SharedBuffer
Change-Id: Ia53cb905fbc88f899521658545f990fb9217b1e1
2013-07-30 13:57:00 -07:00
Mathias Agopian
11b9acf765 Revert "put back the unused virtuals in Vector<>"
This reverts commit 1648d4c13ba2eff3ea14cd87ee94028458a39f97.

Bug: 6977192

Change-Id: Idbb6b239aaed4fb1c054ce943f6ba06ede3492bb
2013-07-30 13:57:00 -07:00
Tareq A. Siraj
cacf429b56 Fixed clang build error for libgui
Fixed the order of the statements in ANDROID_SINGLETON_STATIC_INSTANCE
macro so that the templated static member variable initialization
comes before the instantiation of the Singleton class. This
fixes the clang compile error.

Change-Id: Ic47d17e152b657f2dff3191ccc3770753fdf002b
Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
Reviewed-by: Edwin Vane <edwin.vane@intel.com>
2013-07-30 13:57:00 -07:00
Mathias Agopian
8d0c1a0316 put back the unused virtuals in Vector<>
some binaries are using these private APIs and broke
(as they should!) with this change. Temporarily restore the
virtuals to work around this.

Bug: 6977550
Change-Id: I7c37f24b16e4d586b89205c493db5169cf87e024
2013-07-30 13:57:00 -07:00
Mathias Agopian
156eb98091 get rid of mirrorItemAt() which isn't used anywhere
Change-Id: Id6f2dbeed21cabc127d39538c0ff464077ada83f
2013-07-30 13:57:00 -07:00
Mathias Agopian
2497a1524d improve [un]marshalling of non-binder objects
this change introduces a new class LightFlattenable<> which is
a protocol to flatten simple objects that don't require
binders or file descriptors; the benefit of this protocol is that
it doesn't require the objects to have a virtual table and give us
a consitant way of doing this.

we also introduce an implementation of this protocol for
POD structures, LightFlattenablePod<>.

Parcel has been update to handle this protocol automatically.

Sensor, Rect, Point and Region now use this new protocol.

Change-Id: Icb3ce7fa1d785249eb666f39c2129f2fc143ea4a
2013-07-30 13:57:00 -07:00
Jeff Brown
6454f46166 Add a very simple helper function to log slow functions.
Change-Id: I2e2e072206d02b572a330dd25857c161b5b563bf
2013-07-30 13:57:00 -07:00
Mathias Agopian
bdf73c7efc improve Vector<> safety checks
- make errors that will always cause a memory corruption always fatal
  (for eg: KeyedVector<>::editValue{For|At}() failure)
- make other errors fatal in debug mode, those that can be caught by
  the caller.
- fix typos

Change-Id: I65cc7d81035c37ce2906fc4500c50e5d5b5c49eb
2013-07-30 13:56:59 -07:00
Mathias Agopian
5363183d2a libutils cleanup: remove unused or seldom used code from misc.{cpp|h}
Change-Id: I72206f16619d81887e3b85603494563faab3b445
2013-07-30 13:56:59 -07:00
Mathias Agopian
67b5851491 We now have a real list of displays.
displays can be dynamically added or removed, and the
list is part of the SF's transaction.

Change-Id: I4186ea39f1317c0e7c044f869004017738968fab
2013-07-30 13:56:59 -07:00
Nick Pelly
af1e7b7721 Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible.
Change-Id: I4231c8ca32663e6e2cb5b7c126d091f837373807
2013-07-30 13:56:59 -07:00
Mathias Agopian
e6bee12f94 one more step towards multiple display support
- remove dependency on cached state in validateVisibility
- get rid of mVertices and mTransformedBounds
- get rid of validateVisibility
- get rid of unlockPageFlip
- handleTransaction now returns a dirty region
- computevisibileregion now uses window-manager space
2013-07-30 13:56:59 -07:00
Jeff Brown
dd1b0378ce Support looper callbacks based on smart pointers.
Bug: 6559630
Change-Id: I5a667f219f431838638acefbc9fa6afa610971bd
2013-07-30 13:56:59 -07:00
Eino-Ville Talvala
970701fbd2 Add camera as an ATRACE tag
Change-Id: Ib4f22d593836c4b973d122efa114d359f1529914
2013-07-30 13:56:59 -07:00
Jeff Brown
5705e69825 Delete unused poll() code.
We don't need this code anymore and it is just in the way.

Bug: 6559630
Change-Id: I1dc9decf85d5ea1feab159c2985da6c20baffdd5
2013-07-30 13:56:59 -07:00
Jeff Brown
55195d745c Remove unused statistics code.
Bug: 6559630
Change-Id: Iacdf4bb4c1c125c09305cbd8cb443c7c80cfc010
2013-07-30 13:56:59 -07:00
Jamie Gennis
69fc3d4e1e libutils: add a tracing tag for video
Change-Id: Icbecc7184844e95ee81a558b0a54d5513d5cf59f
2013-07-30 13:56:59 -07:00
Dianne Hackborn
c1309d74e8 Add callback hack to find out when to reload system properties.
Every IBinder object can accept a new transaction to tell it that
it might want to reload system properties, and in the process
anyone can register a callback to be executed when this happens.

Use this to reload the trace property.

This is very much ONLY for debugging.

Change-Id: I55c67c46f8f3fa9073bef0dfaab4577ed1d47eb4
2013-07-30 13:56:59 -07:00
Glenn Kasten
7e6e7e0a54 Add audio tag to systrace
Change-Id: I4a558c43e4ccd81a4ed94684c5fad6b3c486bd14
2013-07-30 13:56:59 -07:00
Andy Stadler
90dd9e188e Add System Tracing capability to Sync Manager
See also: Change-Id: Ia8bc01adbba345a568405b0ac8ade96e56b40cc1

Change-Id: I2678974cf85464fbc09072b06f647a0787e6e23f
2013-07-30 13:56:59 -07:00
Dianne Hackborn
265743abde Add traces for window manager and activity manager.
Change-Id: I6677ca64164f234efc7856ddd173ad6989b4f59e
2013-07-30 13:56:59 -07:00
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
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
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
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
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
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
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
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
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
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
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
Jeff Brown
ea45b01f9b Use libcorkscrew for stack unwinding.
Change-Id: Iee1ee5a2018ab8cfc1ce12ec2a124809245eaa02
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