Commit Graph

396 Commits

Author SHA1 Message Date
Dianne Hackborn
45e0acb41a Modify native ALooper to take an explicit ident.
The ALooper API now uses an explicit "identifier" for the integer
that is returned rather than implicitly using the fd.  This allows
the APIs that had the fd to be a little more sane.

Change-Id: I8507f535ad484c0bdc4a1bd016d87bb09acd7ff0
2010-09-07 15:46:55 -07:00
Dianne Hackborn
1cce37b477 am 05dff838: am 11bbe200: Hopefully fix the build.
Merge commit '05dff838946abb01caa3c3172cf0f367964a0b6d'

* commit '05dff838946abb01caa3c3172cf0f367964a0b6d':
  Hopefully fix the build.
2010-09-07 14:48:28 -07:00
Dianne Hackborn
3d2bca9abd am b8bcfed5: am f703b77c: Merge "Add system property to turn off scheduling groups." into gingerbread
Merge commit 'b8bcfed5524a37ee51e3f1129f1df91bc4a59cb4'

* commit 'b8bcfed5524a37ee51e3f1129f1df91bc4a59cb4':
  Add system property to turn off scheduling groups.
2010-09-07 14:47:51 -07:00
Dianne Hackborn
bb39b9f17b Hopefully fix the build.
Change-Id: Id8cd92c0895c9939e1386ef488bd1309a3be3568
2010-09-07 12:32:19 -07:00
Dianne Hackborn
7b0d45c346 Add system property to turn off scheduling groups.
Do this:

adb shell setprop debug.sys.noschedgroups 1

Change-Id: I6e06a74205fd45ee1526ce71fe33944465d39984
2010-09-07 11:19:11 -07:00
Kenny Root
757a86752f am 8d5250c6: am 2e246549: Merge "Add better debug output for ResourceType errors" into gingerbread
Merge commit '8d5250c601504da7a7fde3a3fd7b1c51335becdf'

* commit '8d5250c601504da7a7fde3a3fd7b1c51335becdf':
  Add better debug output for ResourceType errors
2010-09-02 15:53:26 -07:00
Kenny Root
45162448b3 Add better debug output for ResourceType errors
An error code is returned as -ESOMETHING, but the debug code was
printing out 0x%08x for these codes making -74 print out as 0xffffffb5
which is kind of silly.

Change-Id: I7d77fb3da2e146845949f121404f662b47288e61
2010-09-02 14:58:47 -07:00
Kenny Root
b940c7e901 am 8e724905: am ad6731b0: Merge "Add debugging to ZipFileRO" into gingerbread
Merge commit '8e724905261bf4913bac75adc64fb08ed5ba8b7d'

* commit '8e724905261bf4913bac75adc64fb08ed5ba8b7d':
  Add debugging to ZipFileRO
2010-08-27 16:18:44 -07:00
Kenny Root
e0573a4ad6 Add debugging to ZipFileRO
Some assets are failing to read from ZIP files. This adds a bit more
debugging to figure out what's going on.

Change-Id: Id90e10546c54c85069a34478fbc28bc2523bda5d
2010-08-27 12:47:34 -07:00
Kenny Root
8d7fcccef6 am b90b9d54: am 6be23712: Merge "Free created FileMap when uncompressing files" into gingerbread
Merge commit 'b90b9d54eb6bbc3a4045ff0bf46d3366822e835e'

* commit 'b90b9d54eb6bbc3a4045ff0bf46d3366822e835e':
  Free created FileMap when uncompressing files
2010-08-24 09:02:28 -07:00
Kenny Root
24b2aee9ca am 821afa9a: am 54d41379: Merge "Add OBB flags to support overlays" into gingerbread
Merge commit '821afa9aec8d3a4ffd2e72ce797d8097eaf13973'

* commit '821afa9aec8d3a4ffd2e72ce797d8097eaf13973':
  Add OBB flags to support overlays
2010-08-21 09:41:12 -07:00
Kenny Root
cd9ce313dd Free created FileMap when uncompressing files
Change-Id: Ice22c4ecb7c129b74bf60cd66ae79e110b017a4a
2010-08-19 18:39:58 -07:00
Kenny Root
28e9b9f243 Add OBB flags to support overlays
* Add flags field in OBB footer to support overlays.

* Remove unused 'crypto' and 'filesystem' fields in obbtool (could
  later be supported in the "flags" field of the OBB footer).

* Add notes to document OBB classes before shipping.

Change-Id: I386b43c32c5edef55210acb5d3322639c08010ba
2010-08-18 09:34:58 -07:00
Kenny Root
8264321e31 am 80328ba0: am 8ea71511: Merge "Initial tool for OBB manipulation" into gingerbread
Merge commit '80328ba09606bd0825d7d4c9a4f213d1de09e53a'

* commit '80328ba09606bd0825d7d4c9a4f213d1de09e53a':
  Initial tool for OBB manipulation
2010-08-11 14:15:20 -07:00
Kenny Root
1dfd9f8a97 Initial tool for OBB manipulation
Add "obbtool" host command for adding, removing, and querying Opaque
Binary Blob (OBB) information from a file.

Change-Id: Id2ac41e687ad2a500c362616d6738a8ae7e8f5c3
2010-08-11 11:24:41 -07:00
Dianne Hackborn
f09b0ae832 am 679ac09a: am a5ae50cd: Merge "More native work." into gingerbread
Merge commit '679ac09a5c22175354f3a04b28456b323839530e'

* commit '679ac09a5c22175354f3a04b28456b323839530e':
  More native work.
2010-08-11 00:50:56 -07:00
Dianne Hackborn
c3ef3ae552 More native work.
Implement save/restore of state, and add native APIs for
configuration information.

Change-Id: I2a3ddc2ba605db58d7c8b2b31b9215fb323f90b5
2010-08-11 00:29:59 -07:00
Kenny Root
404b6473e9 am d7ce227b: am 818490ab: Fix String8::operator+
Merge commit 'd7ce227bcb854f048124bbc487eba844c6599142'

* commit 'd7ce227bcb854f048124bbc487eba844c6599142':
  Fix String8::operator+
2010-08-06 19:04:09 -07:00
Kenny Root
aa966638b9 Fix String8::operator+
The LHS was ignored when using:
  String8 + String8
  String8 + (const char*)

Add unit tests for above.

Bug: 2898473
Change-Id: Ic8fe7be668b665c36aaaa3fc3c3ffdfff0fbba25
2010-08-06 09:00:10 -07:00
Kenny Root
8c16a393c9 am aec3e36f: am 2d817f75: Free scanBuf in ZipFileRO
Merge commit 'aec3e36fd4f8cdcc53110bbcd7f0afa20bf315d4'

* commit 'aec3e36fd4f8cdcc53110bbcd7f0afa20bf315d4':
  Free scanBuf in ZipFileRO
2010-08-05 12:07:48 -07:00
Kenny Root
8f20e5e540 Free scanBuf in ZipFileRO
In the success case, the 65kB scanBuf was not freed!

Also, get rid of annoying complaints about ssize_t from printf in error
cases.

Change-Id: If154ac19bf47637f898b4ec8c8e27c9a073a7b81
2010-08-04 16:53:56 -07:00
Christopher Tate
8aea3f3b94 am 06abd0a6: am 571180c4: Merge "Attempt to fix the SDK build" into gingerbread
Merge commit '06abd0a6a833beda1c0e68aed44912d145745a42'

* commit '06abd0a6a833beda1c0e68aed44912d145745a42':
  Attempt to fix the SDK build
2010-07-29 14:04:07 -07:00
Christopher Tate
6c6a3fbd9d Attempt to fix the SDK build
On the assumption that the local min() function declaration is in
conflict with some 'min' #define floating around, rename the local
function to min_of().

Change-Id: I62aa27f213c6093cc78805de611cf4aa75f0eef2
2010-07-29 13:42:45 -07:00
Chris Tate
2c8c2713c1 am 4dc8ead1: am 7b40518e: Merge "Change unistd.h to stddef.h to be correct" into gingerbread
Merge commit '4dc8ead1b4e63165c0a9e65adfbe46159758947a'

* commit '4dc8ead1b4e63165c0a9e65adfbe46159758947a':
  Change unistd.h to stddef.h to be correct
2010-07-28 18:18:28 -07:00
Kenny Root
0832a31d54 Change unistd.h to stddef.h to be correct
size_t should be defined through inclusion of stddef.h instead of unistd.h

Change-Id: Ieaadacfca1e1c44c2533ea95f73fc060c1519b52
2010-07-28 16:46:12 -07:00
Kenny Root
e8642c0e59 am 47cf709a: am 8c5d9430: Merge "Add unistd.h for size_t typedef to fix sim-eng" into gingerbread
Merge commit '47cf709aa3c07d2573340187edb5e11ea75824b1'

* commit '47cf709aa3c07d2573340187edb5e11ea75824b1':
  Add unistd.h for size_t typedef to fix sim-eng
2010-07-28 16:41:36 -07:00
Kenny Root
937cd1b707 Add unistd.h for size_t typedef to fix sim-eng
Change-Id: Ida4f1742547f39539b601f13182c722aa7cf863e
2010-07-28 16:31:24 -07:00
Christopher Tate
01d1669b89 am 1de9f490: am bae6fe24: Merge "Support streaming of compressed assets > 1 megabyte" into gingerbread
Merge commit '1de9f490b5c3f293b3748be3d4ccf3f78cdf460b'

* commit '1de9f490b5c3f293b3748be3d4ccf3f78cdf460b':
  Support streaming of compressed assets > 1 megabyte
2010-07-28 15:41:30 -07:00
Christopher Tate
a45a8008c6 Support streaming of compressed assets > 1 megabyte
Compressed assets larger than one megabyte are now decompressed on demand
rather than being decompressed in their entirety and held in memory.  Reading
the data in order is relatively efficient, as is seeking forward in the stream.
Seeking backwards is supported, but requires reprocessing the compressed data
from the beginning, so is very inefficient.

In addition, the size limit on compressed assets has been eliminated.

Change-Id: I6e68247957e6c53e7e8ba70d12764695f1723bad
2010-07-28 15:33:28 -07:00
Jeff Brown
cfa6d98278 resolved conflicts for merge of f7adbe10 to master
Change-Id: I898a5e53b180adaee2337c0c0b9896c799d056e7
2010-07-16 10:06:33 -07:00
Jeff Brown
0a128e3cbe Fix bug with phantom input windows.
Add dumpsys integration for the native input dispatcher.
Add some InputDevice API stubs.
Add an appendFormat helper method to String8 for printf style
string formatting mainly for debugging purposes.
Use generic ArrayList<WindowState> everywhere in WindowManagerService
to eliminate unnecessary casts all over.

Change-Id: I9d1e3bd90eb7222d10620200477f11b7bfd25e44
2010-07-16 00:02:48 -07:00
Jeff Brown
a903001e3c am d1313da5: am eb6e0df1: Don\'t build framework tests for simulator target.
Merge commit 'd1313da5999e06be16e52527cfba443f66b333a1'

* commit 'd1313da5999e06be16e52527cfba443f66b333a1':
  Don't build framework tests for simulator target.
2010-07-15 10:24:10 -07:00
Jeff Brown
a50ee3ecb3 Don't build framework tests for simulator target.
Change-Id: I70f29c7eb307e4f3ec5702f4eb9d97b4342e2f36
2010-07-14 22:55:02 -07:00
Jeff Brown
94eed383c9 am 89ee578b: am fd035829: Add initial gamepad support.
Merge commit '89ee578b7053d27a50922f82feb94bf6054b330c'

* commit '89ee578b7053d27a50922f82feb94bf6054b330c':
  Add initial gamepad support.
2010-07-13 17:48:56 -07:00
Jeff Brown
8575a87b0d Add initial gamepad support.
Change-Id: I0439648f6eb5405f200e4223c915eb3a418b32b9
2010-07-13 17:04:57 -07:00
Kenny Root
d441a0ca24 am ceb8465e: am 87bb1857: Merge changes I2337051b,I19b426cb into gingerbread
Merge commit 'ceb8465e974ba5fa971ffe1b5b74e94a1bd53f97'

* commit 'ceb8465e974ba5fa971ffe1b5b74e94a1bd53f97':
  Tweak ObbFile class
  Allow things that can install packages to set Obb paths
2010-07-12 11:22:45 -07:00
Kenny Root
9baa2c7a44 Merge changes I2337051b,I19b426cb into gingerbread
* changes:
  Tweak ObbFile class
  Allow things that can install packages to set Obb paths
2010-07-12 11:18:34 -07:00
Kenny Root
fa59afb863 Tweak ObbFile class
* Move error messages around to clarify the errors.

* Add extra error check when reading a file.

* Seek to the end of a file when writing the signature so the users of
  the API don't have to remember to do it.

Change-Id: I2337051b9f9fa8147c5900237deec790dcd92436
2010-07-12 09:11:24 -07:00
Dianne Hackborn
895b3d0bdd am 49159f07: am 74bf59b4: Merge "Add new glue code for writing native apps." into gingerbread
Merge commit '49159f0748c704e53a7bd754f26113d9ab844a97'

* commit '49159f0748c704e53a7bd754f26113d9ab844a97':
  Add new glue code for writing native apps.
2010-07-08 19:10:17 -07:00
Kenny Root
8d3ee58899 am d481cdd4: am c9535de8: Merge "Add OBB file helper class" into gingerbread
Merge commit 'd481cdd4c0305f8afd857fe3ec3fbf189b744370'

* commit 'd481cdd4c0305f8afd857fe3ec3fbf189b744370':
  Add OBB file helper class
2010-07-08 19:08:57 -07:00
Dianne Hackborn
3c5d125ed7 Add new glue code for writing native apps.
This factors out the boiler-plate code from the sample
app to a common glue code that can be used for everyone
writing this style of app: a dedicated app thread that
takes care of waiting for events and processing them.

As part of doing this, ALooper has a new facility to allow
registration of fds that cause ALooper_pollOnce() to return
the fd that has data, allowing the app to drive the loop
without callbacks.  Hopefully this makes some people feel better. :)

Also do some other cleanup of the ALooper API, plus some
actual documentation.

Change-Id: Ic53bd56bdf627e3ba28a3c093faa06a92be522b8
2010-07-08 11:06:59 -07:00
Kenny Root
b94a9a668f Add OBB file helper class
ObbFile is a binary blob that will be used in packaging large files
with smaller APKs.

Change-Id: Ib1594346cfa2f49113de6565af77c24efbd89d63
2010-07-07 09:57:50 -07:00
Dianne Hackborn
747f65e77a am e24901d3: am 68267415: Add new native Looper API.
Merge commit 'e24901d3adb28fff72821d4e8e2ccc25b2184550'

* commit 'e24901d3adb28fff72821d4e8e2ccc25b2184550':
  Add new native Looper API.
2010-07-07 09:14:57 -07:00
Dianne Hackborn
efa1085066 Add new native Looper API.
This allows us to avoid exposing the file descriptor of
the event queue; instead, you attach an event queue to
a looper.  This will also should allow native apps to be
written without the need for a separate thread, by attaching
the event queue to the main thread's looper and scheduling
their own messages there.

Change-Id: I38489282635895ae2cbfacb88599c1b1cad9b239
2010-07-02 18:57:02 -07:00
Jeff Brown
e780fc9d96 am 42bb545a: am 5c225b16: Even more native input dispatch work in progress.
Merge commit '42bb545a54d89f0ddbb230d7a01ea4210c0f6c00'

* commit '42bb545a54d89f0ddbb230d7a01ea4210c0f6c00':
  Even more native input dispatch work in progress.
2010-06-17 13:32:45 -07:00
Jeff Brown
f4a4ec2063 Even more native input dispatch work in progress.
Added more tests.
Fixed a regression in Vector.
Fixed bugs in pointer tracking.
Fixed a starvation issue in PollLoop when setting or removing callbacks.
Fixed a couple of policy nits.

Modified the internal representation of MotionEvent to be more
efficient and more consistent.

Added code to skip/cancel virtual key processing when there are multiple
pointers down.  This helps to better disambiguate virtual key presses
from stray touches (such as cheek presses).

Change-Id: I2a7d2cce0195afb9125b23378baa94fd2fc6671c
2010-06-17 13:27:16 -07:00
Jeff Brown
6f19e9c1c2 am e0e5da0d: am 96e59eb8: Merge "Support for multiple tests" into gingerbread
Merge commit 'e0e5da0d648f4167e2a12ea02f4794f81a057da7'

* commit 'e0e5da0d648f4167e2a12ea02f4794f81a057da7':
  Support for multiple tests
2010-06-14 17:06:56 -07:00
Jeff Brown
f69280ef72 Support for multiple tests
The build system enforces some invariants that were being ignored
before.

Change-Id: Ie7675042af7f961a507386c13b2a0b592b591af8
2010-06-14 15:46:08 -07:00
Jeff Brown
157a2647fc am 4166aec5: am 28a6c8e9: am d890cbf7: Remove PollLoop from host build.
Merge commit '4166aec567b6fa4aa725a20d7c0a6dc5866c9f7b'

* commit '4166aec567b6fa4aa725a20d7c0a6dc5866c9f7b':
  Remove PollLoop from host build.
2010-06-13 20:28:29 -07:00
Jeff Brown
beb2359b9b Remove PollLoop from host build.
We can't build (and we don't need) PollLoop in the SDK on all platforms.

Change-Id: I3b0f327bbb8bc58b9b8630b0161cf360403fea68
2010-06-13 20:21:19 -07:00
Jeff Brown
04c1a8cdec resolved conflicts for merge of 9e660c82 to master
Change-Id: Ic4bd85cbaa5b9a10dcb474a0dad46490bf967e43
2010-06-13 19:16:55 -07:00
Jeff Brown
e839a589bf Native input dispatch rewrite work in progress.
The old dispatch mechanism has been left in place and continues to
be used by default for now.  To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.

Includes part of the new input event NDK API.  Some details TBD.

To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument.  The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points.  The ViewRoot then
provides the InputChannel to the InputQueue.  Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue.  This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.

There can be zero or more targets for any given input event.  Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets).  Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.

End-to-end event dispatch mostly works!

To do: event injection, rate limiting, ANRs, testing, optimization, etc.

Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
2010-06-13 17:42:16 -07:00
Andreas Huber
b3ed29c713 am b9d7b46b: am 8f864513: Merge "Fix String8 to free its memory only after assignment operations based on pointers are finished in case that pointer referred to the string\'s original contents." into kraken 2010-06-10 16:13:18 -07:00
Andreas Huber
a637eb4869 Fix String8 to free its memory only after assignment operations based on pointers are finished in case that pointer referred to the string's original contents.
Change-Id: I6961f3cf10ba3b728579ea63262db750a4cf8577
2010-06-10 11:25:51 -07:00
Kenny Root
c91e0eda56 Add invariant check for stylesString size
It was possible for stylesStrings to claim to start past the end of the
data area thereby making mStringPoolSize larger than the data area.

Change-Id: Ibc4d5b429e3a388516135801c8abc3681daae291
2010-06-08 20:50:37 -07:00
Kenny Root
615f5d64db Range checking for ResTable_map
Correct previous offset change and get ready for safe-iop.

Change-Id: Ib276c726f32b0711a72f47d3263eb21640e5a800
2010-06-08 12:51:49 -07:00
Kenny Root
61c22be593 Improve checking in aapt dump
The aapt dump reading had less error checking than the actual parsing,
so this change brings it more into parity so that bad APKs don't crash
"aapt dump"

Change-Id: Ib30e63e41be5c652645c4aa0de580a87b184529d
2010-06-08 10:28:19 -07:00
Konstantin Lopyrev
bad51959c5 Fix 1684100: Making sure that empty package, type and resource ids are not accepted.
Change-Id: I4c94877e4312e9a5b4d22c8625069ca056c62e40
2010-06-04 14:37:37 -07:00
Kenny Root
d4066a4ac5 ZipUtilsRO rewrite based on Dalvik Zip rewrite
Change the way zip archives are handled.  This is necessary to deal with
very large (~1GB) APK files, for which our current approach of mapping
the entire file falls over.

We now do the classic scavenger hunt for the End Of Central Directory
magic on a buffer of data read from the file, instead of a memory-mapped
section.  We use what we find to create a map that covers the Central
Directory only.

If the caller is interested in unpacking the file contents, we have to
do an additional file read to discover the size of the Local File Header
section so we can skip past it.

This is based on Change I745fb15abb in the dalvik tree. Both
implementations share a common ancestry, but the cost of unifying them
outweighs the benefits of wrapping C calls.

Change-Id: Iddacb50fe913917c2845708a530872d65fdbe620
2010-05-12 05:07:48 -07:00
Dan Egnor
7dd2bb8412 am ca48c88c: am 8a8658a5: Merge "Make static versions of libutils and libbinder." into froyo
Merge commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f' into kraken

* commit 'ca48c88c3d5733c4405a2fc4f7d9bb7fbba3d43f':
  Make static versions of libutils and libbinder.
2010-05-06 17:35:06 -07:00
Dan Egnor
386a332b4f Make static versions of libutils and libbinder.
Fix some small static-initialization-order issues (and a static-
initializers-missing issue) that result from doing so.  The static
libraries don't actually get used for anything real at the moment --
they're used for perf tests of bug 2660235.

Bug: 2660235
Change-Id: Iee2f38f79cc93b395e8d0a5a144ed92461f5ada0
2010-05-06 01:03:31 -07:00
Dianne Hackborn
c93a781c24 New xlarge screen size.
Not complete, only for experimentation at this point.

This includes a reworking of how screen size configurations are matched,
so that if you are on a larger screen we can select configurations for
smaller screens if there aren't any exactly matching the current screen.

The screen size at which we switch to xlarge has been arbitrarily
chosen; the compatibility behavior has not yet been defined.

Change-Id: I1a33b3818eeb51a68fb72397568c39ab040a07f5
2010-04-28 16:51:52 -07:00
Dianne Hackborn
c85e12e075 Revert "fix [2542425] memory leak during video recording"
This reverts commit 544592e14f8d7643238e40ba9879727497900f35.
2010-03-30 21:04:17 -07:00
Mathias Agopian
77e26d6822 fix [2542425] memory leak during video recording
[Sorted|Keyed]Vector<TYPE> would leak their whole storage when resized
from the end and TYPE had trivial dtor and copy operators.

Change-Id: I8555bb1aa0863df72de27d67ae50e20706e90cf5
2010-03-30 19:02:59 -07:00
Mathias Agopian
caeddc7236 fix [2542425] memory leak during video recording
Vector::sort() is using _do_copy() incorrectly; _do_copy() calls the
copy constructor, not the assignment operator, so we need to destroy
the "destination" before copying the item.

Change-Id: Iaeeac808fa5341a7d219edeba4aa63d44f31473c
2010-03-29 13:45:18 -07:00
Dianne Hackborn
82fecb01df Add ability for some manifest attributes to reference resources.
This loosens our restriction on many manifest attributes requiring
literal string values, to allow various ones to use values from
resources.  This is only allowed if the resource value does not change
from configuration changes, and the restriction is still in place
for attributes that are core to security (requesting permissions) or
market operation (used libraries and features etc).

Change-Id: I4da02f6a5196cb6a7dbcff9ac25403904c42c2c8
2010-03-09 17:18:05 -08:00
Dianne Hackborn
6687fb103d Fix some bugs.
Bug #2376231: Apps lose window focus (and back key causes ANR) if the
lock screen is dismissed while the phone is in landscape mode

This is another case where we weren't recomputing the focused window
after changing the visibility policy.

bug #2479958: Investigate source of "Resources don't contain package
for resource number 0x7f0a0000"

Um, okay, so it turns out there were bugs all over the place where
we would load an XML resource from a another application, but not
use the Resources for that application to retrieve its resources...!
I think the only reason any of this stuff was working at all was
because it typically only cared about retrieving the resource
identifiers of the items (it would look up the values later).

Bug #2401082: Passion ERE26 monkey crash - InputMethodManagerService

Add some null checks.
2010-03-04 11:52:14 -08:00
Dianne Hackborn
8eca036d24 Fix issue #2448075: aapt doesn't fix up activity-alias android:targetActivity links
And related:

- The aapt tool now sets a resource configurations sdk level to match any configs
  that have been set (for example if you specify density your sdk level will be
  at least 4).
- New option to modify the targetPackage attribute of instrumentation.
- Clean up of aapt options help.
- Fix of UI type values to leave 0 for "unspecified".
- Make the UI mode config APIs public.
2010-03-01 20:42:14 -08:00
Ficus Kirkpatrick
dc7caf18da Demote the famous ResourceTypes warning to LOGV.
It is spamming the log bigtime and can be promoted back to LOGW
or worse by whoever decides to actually investigate the bug.

Change-Id: I72d950155378f641ebdfbacabae774f5736a52bc
2010-03-01 16:33:53 -08:00
Kenny Root
9e333ab42c Use UTF-8 strings to avoid duplicate caching, part 1
StringBlock instances containing UTF-8 strings use a cache to convert
into UTF-16, but using that cache and then using a JNI call to NewString
causes the UTF-8 string as well as two copies of the UTF-16 string to
be held in memory. Getting the UTF-8 string directly from the StringPool
eliminates one copy of the UTF-16 string being held in memory.

This is part 1. Part 2 will include ResXMLParser optimizations.

Change-Id: Ibd4509a485db746d59cd4b9501f544877139276c
2010-02-23 10:02:20 -08:00
Mathias Agopian
98e71ddaed remove a dependency of GraphicBuffer (libui) on Parcel (libbinder).
Add a Flattenable interface to libutils which can be used to flatten
an object into bytestream + filedescriptor stream.
Parcel is modified to handle Flattenable. And GraphicBuffer implements
Flattenable.

Except for the overlay classes libui is now independent of libbinder.
2010-02-21 23:27:25 -08:00
Kenny Root
0d88e7a8d7 Totally remove Unicode.cpp and rely on ICU
Unicode.cpp used a packed data table for character data that essentially
duplicated ICU's functionality.

Change-Id: Ia68fe4ac94e89dc68d9a3f45f33f6e648a5500b7
2010-02-12 14:37:42 -08:00
Kenny Root
196e320734 Excise code from Unicode.cpp that was dead
Remove some utility functions for discovering character data
that ICU probably took over a while ago.

Change-Id: I97abe4de2f51eb2bf48679941258bc501184c3dc
2010-02-12 13:01:16 -08:00
Kenny Root
ccb5b89029 Add string resource type inspection
Allows "aapt dump --values resource" to print out whether a string in a
ResStringPool is in UTF-8 or UTF-16 encoding.

Change-Id: I6478884a70a3b46fee862dece6cb33454fc34843
2009-12-10 14:22:08 -08:00
Dianne Hackborn
d0aeccebe2 Maybe really fix windows build. 2009-12-08 19:45:59 -08:00
Dianne Hackborn
c5b138995e Hopefully fix Windows build 2009-12-08 16:38:01 -08:00
Android (Google) Code Review
eb318fd88d Merge change I129483f8 into eclair-mr2
* changes:
  Optional use of UTF-8 strings in resource bundles
2009-12-08 13:41:38 -08:00
Dianne Hackborn
8c6cedc9bc Propagate background scheduling class across processes.
This is a very simply implementation: upon receiving an IPC, if the handling
thread is at a background priority (the driver will have taken care of
propagating this from the calling thread), then stick it in to the background
scheduling group.  Plus an API to turn this off for the process, which is
used by the system process.

This also pulls some of the code for managing scheduling classes out of
the Process JNI wrappers and in to some convenience methods in thread.h.
2009-12-07 19:11:14 -08:00
Kenny Root
92f5984d2c Optional use of UTF-8 strings in resource bundles
Allows the use of UTF-8 for packing resources instead of the
default of UTF-16 for Java. When strings are extracted from the
ResStringPool, they are converted to UTF-16 and the result is
cached for subsequent calls.

When using aapt to package, add in the "-8" switch to pack the
resources using UTF-8. This will result in the value, key, and
type strings as well as the compiled XML string values taking
significantly less space in the final application package in
most scenarios.

Change-Id: I129483f8b3d3b1c5869dced05cb525e494a6c83a
2009-12-07 15:14:15 -08:00
Dianne Hackborn
7b92d7ec36 Debugging for issue #2228381 android.view.InflateException
Binary XML file line #37: Error inflating class <unknown> after adding a secondary account

Now that I have these debug logs, I want to keep them since they will make
debugging these kinds of issues a lot easier in the future.  (Note in this
case there was no problem in the framework.)

Change-Id: If2b0bbeda4706b7c5dc1ba4a5db04b74f40e1543
2009-11-20 14:26:42 -08:00
Christopher Tate
e7e1009636 Turn off most of the backup-related debug logging
The core logging in BackupManagerService and in the Google backup transport are
still enabled at this point.

Change-Id: I10abfa565bbd1097dd3631051b6aca163e4af33a
2009-09-30 17:07:37 -07:00
Doug Zongker
a4f58892d4 fix "pacakge" typo in error log message 2009-09-27 17:03:12 -07:00
Christopher Tate
6e472890ef Clear the device's data from the transport when backup is disabled
Turning off backup in the Settings UI constitutes an opt-out of the whole
mechanism.  For privacy reasons we instruct the backend to wipe all of the data
belonging to this device when the user does this.  If the attempt fails it is
rescheduled in the future based on the transport's requestBackupTime()
suggestion.  If network connectivity changes prompt the transport to indicate a
backup pass is appropriate "now," any pending init operation is processed before
the backup schedule is resumed.

The broadcasts used internally to the backup manager are now fully protected;
third party apps can neither send nor receive them.

(Also a minor logging change; don't log 'appropriate' EOF encountered during
parsing of a backup data stream.)
2009-09-24 11:19:04 -07:00
Dianne Hackborn
cfbb735f84 Fix issue #1862317: Browser does not appear to honor anchors (#es) in links
Also a little improved debugging output of bad resource identifiers.

Change-Id: I054064ef22855608ffd722e4ccf12ce57d1992b2
2009-09-20 12:40:03 -07:00
Mathias Agopian
4de4ebf6a2 use broadcast() instead of signal() when signaling the condition-variable Thread::RequestExitAndWait() is waiting for
we could have several thread waiting on the condition and they all need to wake-up.
also added a debug "mTid" field in the class, which contains the tid of the thread (as opposed to pthread_t), this
is useful when debugging under gdb for instance.
2009-09-09 02:45:26 -07:00
Eric Fischer
75a3d0a215 Make it an error to use a bare apostrophe in aapt, and adjust warnings/errors.
In practice, no one ever writes an apostrophe in an aapt string with the
intent of using it to quote whitespace -- they always mean to include a
literal apostrophe in the string and then are surprised when they find
the apostrophe missing.  Make this an error so that it is discovered
right away instead of waiting until late in QA or after the strings have
already been sent for translation.  (And fix a recently-introduced string
that has exactly this problem.)

Silence the warning about an empty span in a string, since this seems to
annoy people instead of finding any real problems.

Make the error about having a translated string with no base string into
a warning, since this is a big pain when making changes to an application
that has already had some translations done, and the dead translations
should be removed by a later translation import anyway.
2009-09-01 15:20:30 -07:00
Dianne Hackborn
878d647b5b am b8546001: Merge change 20878 into donut
Merge commit 'b8546001701405a76dad7e6235046e592296fac2'

* commit 'b8546001701405a76dad7e6235046e592296fac2':
  Fix issue #2048263: More debugging information
2009-08-12 12:36:12 -07:00
Dianne Hackborn
e868513287 Fix issue #2048263: More debugging information
We now hopefully do better about generating the anr reports, and include
information about the malloc loaded assets in meminfo.
2009-08-11 18:56:41 -07:00
David 'Digit' Turner
429db150af Fix Win32 libutils to get a working SDK build. 2009-08-01 10:53:29 +02:00
Android (Google) Code Review
ff1dcc2cf9 am 25dff70f: Merge change 9039 into donut
Merge commit '25dff70f153529b87f5ad4a92f4de21e8950b1de'

* commit '25dff70f153529b87f5ad4a92f4de21e8950b1de':
  Fix #2018814: System cannot correctly render assets with "wrap_content" attribute in QVGA
2009-07-30 16:05:27 -07:00
Dianne Hackborn
3945ae5065 Fix #2018814: System cannot correctly render assets with "wrap_content" attribute in QVGA
It turns out we were not returning the density for anything retrieved from a
TypedArray...  which basically means any bitmap references from a layout or style...!!!

This is now fixed.

Also fiddle with the density compatibility mode to turn on smoothing in certain situations,
helping the look of things when they need to scale and we couldn't do the scaling at
load time.
2009-07-29 19:44:01 -07:00
Joe Onorato
c1d7a6ec1e Only restore the bits for wallpapers that aren't built in. 2009-07-29 12:05:36 -07:00
Joe Onorato
1b96719b32 Fix the IOException in wallpaper restore -- the padding isn't required at the end. 2009-07-28 18:30:15 -07:00
Android (Google) Code Review
351b6f926e am 9fc20b0e: Merge change 8126 into donut
Merge commit '9fc20b0e381b5fe00b7049ef357c839cd05a33bf'

* commit '9fc20b0e381b5fe00b7049ef357c839cd05a33bf':
  First pass at reworking screen density/size APIs.
2009-07-21 19:03:53 -07:00
Dianne Hackborn
60cde60e89 First pass at reworking screen density/size APIs.
This changes the names of the directories in aapt, to what you see
in the list of DpiTest resources.  Also adds a new "long" configuration
for wide screens, which the platform sets appropriate, and introduces
a new kind of resizeability for not large but significantly larger
than normal screens which may have compatibility issues.
2009-07-21 18:28:42 -07:00
Android (Google) Code Review
89fbf84539 am aad0fcc9: Merge change 7783 into donut
Merge commit 'aad0fcc9619eb72c18a6afff48ebc9d4011f0f54'

* commit 'aad0fcc9619eb72c18a6afff48ebc9d4011f0f54':
  Add "nodpi" density, and expose a bunch of density-related APIs.
2009-07-19 20:28:49 -07:00
Dianne Hackborn
b3e8103538 Add "nodpi" density, and expose a bunch of density-related APIs.
Also update the DpiTest app to use nodpi images, and try to have a mode
where it turns off compatibility though it's not quite working.
2009-07-17 16:59:08 -07:00
Android (Google) Code Review
9793c45993 am 3e1663a2: Merge change 7536 into donut
Merge commit '3e1663a2539ff0b939193304cfb601f6b134af7d'

* commit '3e1663a2539ff0b939193304cfb601f6b134af7d':
  fix FILE* version of ZipUtils::inflateToBuffer
2009-07-16 17:54:01 -07:00
Doug Zongker
0de50495d6 fix FILE* version of ZipUtils::inflateToBuffer
This can't have ever worked; a successful fread() was returning 1
instead of getSize.
2009-07-16 11:27:13 -07:00
Joe Onorato
66b29ec55e Need to skip the padding after reading.
m_dataEndPos points to the end of the data, not the beginning
of the next entity.
2009-07-15 09:58:07 -07:00
Mathias Agopian
ec0f1f6720 implement Mutex and Condition with pthread instead of calling futex directly.
internally pthread uses futex. the implementation consists of simple inlines
there are no implementation files anymore.
2009-07-13 15:14:23 -07:00
Android (Google) Code Review
a93fbf8ae9 am be91fdbc: Merge change 6665 into donut
Merge commit 'be91fdbc5c4f2de3a2bb574a98fdfeef44d8cdb5'

* commit 'be91fdbc5c4f2de3a2bb574a98fdfeef44d8cdb5':
  Fix resources not being set correctly.
2009-07-09 14:12:52 -07:00
Android (Google) Code Review
25c70c8685 am fe811d8b: Merge change 6603 into donut
Merge commit 'fe811d8bd0da15f14702968a9c7deb02db7eec9f'

* commit 'fe811d8bd0da15f14702968a9c7deb02db7eec9f':
  quick fix; utf8_codepoint_count must be utf8_length
2009-07-09 12:49:07 -07:00
Android (Google) Code Review
1b85080b2a am 8a715b4b: Merge change 5510 into donut
Merge commit '8a715b4b791db4390d12e0ded02280592634a424'

* commit '8a715b4b791db4390d12e0ded02280592634a424':
  Add useful functions to String8, which enables users to convert between UTF-8 and UTF-32
2009-07-09 12:48:56 -07:00
Dianne Hackborn
1f59751c3e Fix resources not being set correctly. 2009-07-09 12:41:06 -07:00
Daisuke Miyakawa
3228a10923 quick fix; utf8_codepoint_count must be utf8_length 2009-07-09 13:05:24 +09:00
Daisuke Miyakawa
9f220247f6 Add useful functions to String8, which enables users to convert between UTF-8 and UTF-32
It will be used in SQL functions in external/sqlite/android.
See https://android-git.corp.google.com/g/Gerrit#change,5511 for example.

Related internal bug id: 1707173
2009-07-09 09:06:13 +09:00
Android (Google) Code Review
1a16ea88ed am 991eec03: Merge change 6252 into donut
Merge commit '991eec03a73f8803d0f8c80b418480ea25293cfb'

* commit '991eec03a73f8803d0f8c80b418480ea25293cfb':
  Don't re-parse the framework resources all the time.
2009-07-06 14:10:36 -07:00
Dianne Hackborn
0f253efba5 Don't re-parse the framework resources all the time.
A small optimization to the resource code, to not re-parse the framework
resources every time we build a new AssetManager.  Instead, you can now
construct a ResTable from a previously created one...  of course, like the
existing code for using the data in-place, you can't delete the original
ResTable until you have deleted the one that has been constructed from it.
2009-07-06 11:12:37 -07:00
Android (Google) Code Review
47a1a39ce9 am 6e1647a2: Merge change 5829 into donut
Merge commit '6e1647a212317f4ee8bcc23948b6621a59172954'

* commit '6e1647a212317f4ee8bcc23948b6621a59172954':
  Fix issue #1673793: Theme styles don't apply.
2009-07-01 22:43:58 -07:00
Dianne Hackborn
e356292467 Fix issue #1673793: Theme styles don't apply.
It turns out this was not a problem in the resource code at all.  Rather,
the system process has a cache of pre-loaded attributes it uses to avoid
continually reloading things as it needs them.  Well it turns out this
cache wasn't flushed after a package was uninstalled or a configuration
changed, so you could re-install an app where you change its style resources
so its theme now points to one that is inconsistent in the cache.

This is mostly a problem for developers, where they continually install
new versions of an app where resources have changed.  This could possibly
show up when updating an app on a normal phone, although the problem would
eventually correct itself since this cache uses weak references.

Anyway, the cache is now reworked to be flushed appropriately.

This change also includes an update to aapt to be able to dump the
contents of bags in resources.
2009-06-30 13:27:30 -07:00
Android (Google) Code Review
468edaa46d am d09f86ce: Merge changes 5548,5549 into donut
Merge commit 'd09f86ce175fad6ddbd446363f327dfa0575a1d2'

* commit 'd09f86ce175fad6ddbd446363f327dfa0575a1d2':
  Better (and less) logging from backup.
  Add an extra null terminator.  String8::unlockBuffer is
2009-06-29 16:37:39 -07:00
Android (Google) Code Review
b9c8a73496 am 72eb0aca: Merge change 5483 into donut
Merge commit '72eb0acad5cffc57ce5006f6deab29ee259e461e'

* commit '72eb0acad5cffc57ce5006f6deab29ee259e461e':
  Expand support for different screen sizes.
2009-06-29 16:37:17 -07:00
Android (Google) Code Review
d8c2564bbf Merge changes 5548,5549 into donut
* changes:
  Better (and less) logging from backup.
  Add an extra null terminator.  String8::unlockBuffer is supposed to be doing this, but it's not and I can't figure out why.  This makes BackupHelperDispatcher able to read the keys correctly.
2009-06-26 14:19:59 -07:00
Joe Onorato
6eabaa311f Better (and less) logging from backup. 2009-06-26 17:19:11 -04:00
Dianne Hackborn
21342c5c19 Expand support for different screen sizes.
Applications can now declare that they support small, normal, or
large screens.  Resource selection can also be done based on these
sizes.  By default, pre-Donut apps are false for small and large,
and Donut or later apps are assumed to support all sizes.  In either
case they can use <supports-screens> in their manifest to declare
what they actually support.
2009-06-26 13:37:05 -07:00
Android (Google) Code Review
6ef6895b03 am df65b60c: Merge change 5243 into donut
Merge commit 'df65b60ce33e5a56815864f8f0713e25378fa649'

* commit 'df65b60ce33e5a56815864f8f0713e25378fa649':
  Only report "unknown metadata" once per restore helper
2009-06-24 15:45:20 -07:00
Christopher Tate
3fc010e74e am 54118adb: Put back LOGP -> printf in the backup helper code
Merge commit '54118adb3766fdf73a409102b88d7494bb6889a3'

* commit '54118adb3766fdf73a409102b88d7494bb6889a3':
  Put back LOGP -> printf in the backup helper code
2009-06-24 15:44:40 -07:00
Android (Google) Code Review
5a35e220c5 am 0e034e5a: Merge change 5162 into donut
Merge commit '0e034e5a9a71e5e196baff630dca796a0e3ed3e2'

* commit '0e034e5a9a71e5e196baff630dca796a0e3ed3e2':
  Preserve file access mode when backing up / restoring files
2009-06-24 15:44:37 -07:00
Christopher Tate
bd95c1d3af Only report "unknown metadata" once per restore helper
Also removes the auto-free object, replacing it with direct memory manipulation.
2009-06-24 13:57:29 -07:00
Christopher Tate
6441a76b2e Put back LOGP -> printf in the backup helper code 2009-06-24 11:20:51 -07:00
Christopher Tate
5c2882b25c Preserve file access mode when backing up / restoring files
This change adds a fixed-size metadata block at the head of each file's content
entity.  The block is versioned, and fixed-size on the theory that it might be
nice to be able to recover the content (if not the full metadata) of the files
if we're ever confronted with data backed up some hypothetical future helper
that stored expanded metadata.

The net effect is that now on restore, we assign the same access mode to the
file that it originally had when backed up.

Also, some of the code was failing to properly free transient heap-based buffers
when it encountered errors.  This has been fixed with the addition of a tiny
stack-based object whose job it is to free() its designated pointer from its
destructor.
2009-06-23 17:40:44 -07:00
Christopher Tate
2d1db86e45 am 11b15779: Add file mode to the file-backup saved state blobs
Merge commit '11b157790234d3d2f116ce4c7ed1d3d00fb78bc3'

* commit '11b157790234d3d2f116ce4c7ed1d3d00fb78bc3':
  Add file mode to the file-backup saved state blobs
2009-06-23 13:28:41 -07:00
Christopher Tate
ab2e9e81e1 Add file mode to the file-backup saved state blobs
This change puts the file's access mode into the saved-state blob used by the
file backup helpers.  The tests have been updated for the new blob content
format.

What this change *doesn't* do is actually backup/restore the file mode.  This
change is a prerequisite for that, but mode preservation in backup/restore will
require adding metadata to the backup data stream itself, so will be approached
a bit more carefully.

(Also fixed one outright bug in the test program: ReadEntityData() had been
changed to return a ssize_t union of either a byte-count or a negative number
indicating error, but the test program was still assuming that nonzero == error,
and was spuriously failing.)
2009-06-23 13:07:47 -07:00
Android (Google) Code Review
d056f2d087 am 72be4049: Merge change 4910 into donut
Merge commit '72be40490951d3f9d0ada16fcf5288d0c3306d88'

* commit '72be40490951d3f9d0ada16fcf5288d0c3306d88':
  fix warnings that will show up with GCC 4.4 (in master)
2009-06-22 14:03:17 -07:00
Android (Google) Code Review
cfb991d1f8 Merge change 4910 into donut
* changes:
  fix warnings that will show up with GCC 4.4 (in master)
2009-06-22 14:01:25 -07:00
Android (Google) Code Review
2a84f2e369 am 856dd8a6: Merge change 4952 into donut
Merge commit '856dd8a60a70a5b7dca2bf2114872ce063e2ad60'

* commit '856dd8a60a70a5b7dca2bf2114872ce063e2ad60':
  Helper API cleanup.  Allows multiple helpers to function,
2009-06-22 13:20:31 -07:00
Joe Onorato
9cda3e02c6 Helper API cleanup. Allows multiple helpers to function,
because they'll always go in the same order, and this lets
us not have to write headers to keep them paired.
2009-06-22 13:02:24 -07:00
Mathias Agopian
52ed26a78b fix warnings that will show up with GCC 4.4 (in master) 2009-06-22 02:35:32 -07:00
Android (Google) Code Review
03428fcc8b am 1585bd24: Merge change 4828 into donut
Merge commit '1585bd24c10d16351f89e32dddbfa799f18db6bd'

* commit '1585bd24c10d16351f89e32dddbfa799f18db6bd':
  Report densities in badging, debugging for nine patch bug.
2009-06-19 16:44:07 -07:00
Dianne Hackborn
be1bc0a1f9 Report densities in badging, debugging for nine patch bug.
The aapt tool now reports all available densities like it already did
for locales.  Also this includes more resource data output, which I
was using to examine bug #1867049 (which at this point I am unable to
reproduce).
2009-06-19 15:13:28 -07:00
Android (Google) Code Review
4910dc6256 am 5502f04c: Merge change 4709 into donut
Merge commit '5502f04c1dcf2b1918858bacb99fb0480a711707'

* commit '5502f04c1dcf2b1918858bacb99fb0480a711707':
  backup stuff
2009-06-18 19:04:56 -07:00
Android (Google) Code Review
0388b51341 am 16ce3504: Merge change 4708 into donut
Merge commit '16ce3504c5bf98d95d5c36001f755bb4b15253c9'

* commit '16ce3504c5bf98d95d5c36001f755bb4b15253c9':
  Make RestoreHelper and friends also write out the snapshot state.
2009-06-18 19:04:50 -07:00
Joe Onorato
6bda7fd556 backup stuff 2009-06-18 18:41:11 -07:00
Joe Onorato
da1430be26 Make RestoreHelper and friends also write out the snapshot state. 2009-06-18 18:41:11 -07:00
Android (Google) Code Review
00ea06792b am de72697b: Merge change 4524 into donut
Merge commit 'de72697b771d33738c5f9d6c28087504e0796622'

* commit 'de72697b771d33738c5f9d6c28087504e0796622':
  FileRestoreHelper and RestoreHelperDispatcher work.
2009-06-17 21:49:21 -07:00
Joe Onorato
f509f669cf FileRestoreHelper and RestoreHelperDispatcher work. 2009-06-17 16:20:55 -07:00
Joe Onorato
f757bd0710 am 5f15d151: checkpoint BackupDatAInput / RestoreHelper
Merge commit '5f15d151b5101fadfe6cba1e8f4aa6367e8c603e'

* commit '5f15d151b5101fadfe6cba1e8f4aa6367e8c603e':
  checkpoint BackupDatAInput / RestoreHelper
2009-06-17 15:38:08 -07:00
Joe Onorato
03aa8d7d04 checkpoint BackupDatAInput / RestoreHelper 2009-06-16 18:46:50 -07:00
Christopher Tate
fcb97fcc43 am 2fdd428e: Fix some backup reader/writer issues; make local transport do backup
Merge commit '2fdd428e0f18384160f7c38ce3a2cd9ba7e7b2c2'

* commit '2fdd428e0f18384160f7c38ce3a2cd9ba7e7b2c2':
  Fix some backup reader/writer issues; make local transport do backup
  Fix the jni initializer.
  Add RestoreFileHelper, BackupDataInput, and add java wrappers for the methods on BackupDataOutput.
  Fix bug #1812041: activity manager crash with bad args.
  Journal backup requests so that they won't be lost in a crash
  Fix data connection issues.
2009-06-14 21:13:03 -07:00
Joe Onorato
7bdc440894 Add RestoreFileHelper, BackupDataInput, and add java wrappers for the methods on BackupDataOutput. 2009-06-12 16:21:24 -07:00
Android (Google) Code Review
a08c7b6759 am 78f0f8cb: Merge changes 3953,3954 into donut
Merge commit '78f0f8cb2efe9410127c39201e240f6d438eb53c'

* commit '78f0f8cb2efe9410127c39201e240f6d438eb53c':
  Make the file backup helper not crash if a file you requested
  Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.
2009-06-12 08:26:05 -07:00
Joe Onorato
1a9e19a73e Make the file backup helper not crash if a file you requested
can't be stated.  This means you don't need to know if the files
you are backing up exist or not -- we'll figure it out for you.
2009-06-11 14:51:45 -07:00
Joe Onorato
0ad6120dad Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.
This took quite a bit of refactoring.
2009-06-11 11:29:57 -07:00
Mathias Agopian
4fcd9c7003 get rid of LogSocket which wasn't even implemented (enabled) 2009-06-05 15:11:23 -07:00
Mathias Agopian
7e83f043d9 break dependency on utils/ZipEntry.h and utils/ZipFile.h, get rid of inet_address.h and Socket.h which were not used 2009-06-05 14:56:35 -07:00
Android (Google) Code Review
c5992f071d Merge change 3284
* changes:
  rename string_array.h to StringArray.h and move the implementation from the header file to a new cpp file.
2009-06-05 01:29:08 -07:00
Mathias Agopian
861aa2f0c9 rename string_array.h to StringArray.h and move the implementation from the header file to a new cpp file.
StringArray is used in two places in framework/base and in the Sim. Ideally we should get rid of it and use Vector<String8> instead of creating new code.
2009-06-05 01:26:23 -07:00
Christopher Tate
1ba244fb65 am 0032ce80: Fix back_up_files() error detection when opening/CRCing the file
Merge commit '0032ce80ac127e6bfb25d727162eee4af208dc77'

* commit '0032ce80ac127e6bfb25d727162eee4af208dc77':
  Fix back_up_files() error detection when opening/CRCing the file
2009-06-05 00:29:50 -07:00
Android (Google) Code Review
6d2bc14d24 am 2a318867: Merge change 3203 into donut
Merge commit '2a3188672ab2b65c0ce7c9c598a463e382c47696'

* commit '2a3188672ab2b65c0ce7c9c598a463e382c47696':
  rename a few files to camel-case, add copyright notices
2009-06-04 22:44:18 -07:00
Christopher Tate
173e38d47c Fix back_up_files() error detection when opening/CRCing the file 2009-06-04 17:02:56 -07:00
Mathias Agopian
f446ba9dcb rename a few files to camel-case, add copyright notices 2009-06-04 13:53:57 -07:00
Mathias Agopian
294423e148 get rid of TimerProbe which is never used 2009-06-01 13:55:28 -07:00
Mathias Agopian
1bc9c93faf get rid of sleepForInterval() which didn't seem to be used anywhere in the source tree. Also get rid of ported.h which seem to be used only (possibly) in the sim. moved the implementation there. 2009-05-31 23:45:01 -07:00
Andy McFadden
da416411e0 Sim-only files move, part 2/2.
Move Pipe and executablepath from libutils to the simulator, since nothing
else uses them.
2009-05-27 16:01:39 -07:00
Mathias Agopian
83c0446f27 some work to try to reduce the code size of some native libraries
- make sure that all binder Bn classes define a ctor and dtor in their respective library.
  This avoids duplication of the ctor/dtor in libraries where these objects are instantiated.
  This is also cleaner, should we want these ctor/dtor to do something one day.

- same change as above for some Bp classes and various other non-binder classes

- moved the definition of CHECK_INTERFACE() in IInterface.h instead of having it everywhere.

- improved the CHECK_INTERFACE() macro so it calls a single method in Parcel, instead of inlining its code everywhere

- IBinder::getInterfaceDescriptor() now returns a "const String16&" instead of String16, which saves calls to String16 and ~String16

- implemented a cache for BpBinder::getInterfaceDescriptor(), since this does an IPC. HOWEVER, this method never seems to be called.
  The cache makes BpBinder bigger, so we need to figure out if we need this method at all.
2009-05-26 16:12:20 -07:00
Android (Google) Code Review
0180a05fda am 04561a55: Merge change 2359 into donut
Merge commit '04561a55df693e7bd8d3047ccc4fbef504ac07cf'

* commit '04561a55df693e7bd8d3047ccc4fbef504ac07cf':
  Fix for the simultor build breakage.
2009-05-23 14:07:35 -07:00
Android (Google) Code Review
ca7b80e431 Merge change 2359 into donut
* changes:
  Fix for the simultor build breakage.
2009-05-23 14:05:50 -07:00
Nicolas Catania
b4c4265f9e Fix for the simultor build breakage.
Added missing include sys/time.h for utimes.

Detects when stat64 uses a timespec for the modif and access times
and work around the missing st_*time_nsec.

Apologies for the whitespace changes, emacs removed them automatically.
2009-05-22 15:54:26 -07:00
Android (Google) Code Review
b6333b34a2 Merge change 2351 into donut
* changes:
  Fix a major bug in Bundle when unparcelling from AIDL.
2009-05-22 14:51:22 -07:00
Dianne Hackborn
8af0f82d89 Fix a major bug in Bundle when unparcelling from AIDL.
There was a serious problem in the Bundle(Parcel) and readFromParcel() methods,
where it wasn't doing the copying of the Parcel that Parcel.readBundle() does
and is a basic requirement for it to work correctly.

This re-arranges the code to make all of these functions (hopefully) correct.

Also fix a problem in Parcel where we were not duping fds when copying data from
one Parcel to another.
2009-05-22 13:51:47 -07:00
Marco Nelissen
8f9ede0f6d am 7198030f: This should fix the simulator build.
Merge commit '7198030fce4b54820a65a10d54fae18a1ab5df84'

* commit '7198030fce4b54820a65a10d54fae18a1ab5df84':
  This should fix the simulator build.
2009-05-22 12:30:07 -07:00
Marco Nelissen
d95aabc9eb This should fix the simulator build. 2009-05-22 12:25:56 -07:00
Mathias Agopian
53f6f3c799 bring the native_handle stuff back from master_gl 2009-05-20 14:33:23 -07:00
Mathias Agopian
208059f67e checkpoint: split libutils into libutils + libbinder 2009-05-20 12:55:02 -07:00
Android (Google) Code Review
416acf8b32 am e2914615: Merge change 2099 into donut
Merge commit 'e29146158b6048936671decc060d398a68333fc0'

* commit 'e29146158b6048936671decc060d398a68333fc0':
  Hook up the backup data writer, and add a utility to read the backup data files.
2009-05-20 11:58:08 -07:00
Joe Onorato
473b6e2d2d Hook up the backup data writer, and add a utility to read the backup data files. 2009-05-20 11:24:20 -07:00
Android (Google) Code Review
0087559964 am 656a2726: Merge change 1910 into donut
Merge commit '656a2726ad977be194c3b8f4bf4ec3068bf3e1c9'

* commit '656a2726ad977be194c3b8f4bf4ec3068bf3e1c9':
  Update aapt badging for native code, configs, density, etc.
2009-05-18 23:56:07 -07:00
Dianne Hackborn
7a57985962 Update aapt badging for native code, configs, density, etc. 2009-05-18 15:22:00 -07:00
Android (Google) Code Review
5e3877f43f am e85bb9eb: Merge change 1823 into donut
Merge commit 'e85bb9ebcce85b8c7a0e0ccb5116cd25bf684727'

* commit 'e85bb9ebcce85b8c7a0e0ccb5116cd25bf684727':
  Add the backup data file writer C++ class.
2009-05-15 16:25:41 -07:00
Joe Onorato
d502f05c6b Add the backup data file writer C++ class. 2009-05-15 18:20:19 -04:00
Joe Onorato
26a87a8e82 am 4535e405: Implement the C++ class to write the backed up file data.
Merge commit '4535e40544aeb957d44fad75fbe5676effe03689'

* commit '4535e40544aeb957d44fad75fbe5676effe03689':
  Implement the C++ class to write the backed up file data.
2009-05-15 07:55:51 -07:00
Joe Onorato
8d626d6a48 Implement the C++ class to write the backed up file data. 2009-05-15 10:37:10 -04:00
Android (Google) Code Review
1d0ec01729 am aa642c0c: Merge changes 1591,1596 into donut
Merge commit 'aa642c0cc20293137376d44f8221876c121e5be9'

* commit 'aa642c0cc20293137376d44f8221876c121e5be9':
  Get the backup calling through to the file backup helper.
  Fix typos.
  Add a new feature to android.os.Debug to add the ability to inject only specific fields when calling setFieldsOn().
  Fixes #1836075. Adds consistency checks for the View hierarchy. To enable them, you need a debug build and ViewDebug.sConsistencyCheckEnabled set to true in debug.prop. This change also lets you easily enable drawing and layout profiling in ViewRoot by setting ViewRoot.sProfileDrawing, ViewRoot.sProfileLayout and ViewRoot.sShowFps in debug.prop with a debug build.
  Add Intent.ACTION_APP_ERROR
2009-05-14 14:53:27 -07:00
Joe Onorato
c7bbc69ed5 Get the backup calling through to the file backup helper.
This includes some cleanup to make the parameters match
between BackupService.onBackup and FileBackupHelper.performBackup.
2009-05-14 09:39:32 -04:00
Joe Onorato
2a98fb9fb1 fix the sim build. disables the tests for now. 2009-05-08 09:33:19 -07:00
Joe Onorato
081b070f6f fix the sim build. disables the tests for now. 2009-05-06 12:55:46 -04:00
Android (Google) Code Review
a1bc294cf4 am 4488b11: Merge change 1039 into donut
Merge commit '4488b11c51ad8f5b8330279a9405e5a0f8586aa4'

* commit '4488b11c51ad8f5b8330279a9405e5a0f8586aa4':
  Add some C++ code to do raw files for backup
2009-05-06 01:31:32 -07:00
Joe Onorato
0c4863b266 Add some C++ code to do raw files for backup 2009-05-05 13:45:25 -07:00
Android (Google) Code Review
e54a9e05f9 am 9c56513: Merge change 165 into donut
Merge commit '9c5651390056cd9c2f68d5df057739528bd4128b'

* commit '9c5651390056cd9c2f68d5df057739528bd4128b':
  Squashed commit of the following:
2009-04-29 13:11:32 -07:00
Robert Greenwalt
fd392958ea Squashed commit of the following:
commit 012b56fc607cf243cf4b29cb2a5f172bcbe0aecd
Author: Robert Greenwalt <robdroid@android.com>
Date:   Wed Apr 22 14:31:26 2009 -0700

    Additional fixes and tests for density.

commit 91fdc8e187551ae69e0029a4325fb3ad38fe411b
Author: Robert Greenwalt <robdroid@android.com>
Date:   Tue Apr 14 14:39:00 2009 -0700

    Fix runtime resource selection logic.

    Fix isBetterThan so that o or this may be supperior at any stage.
    Used to only handle this-better or tie at each stage, biasing against o.
    Also allows reset of unit test to succeed.  Fixes bug 1709202.
2009-04-22 14:35:11 -07:00
Marco Nelissen
4ab7abd796 Merge branch 'readonly-p4-master' 2009-04-20 12:49:56 -07:00
Marco Nelissen
760b67af39 AI 146964: tabs -> spaces
Automated import of CL 146964
2009-04-20 12:48:39 -07:00
Jean-Baptiste Queru
732ca39b70 Merge commit 'remotes/korg/cupcake' into merge
Conflicts:
	core/java/android/view/animation/TranslateAnimation.java
	core/jni/Android.mk
	core/res/res/values-en-rGB/strings.xml
	libs/audioflinger/AudioFlinger.cpp
	libs/surfaceflinger/LayerScreenshot.cpp
	packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
2009-03-18 11:33:14 -07:00
The Android Open Source Project
bcef13b666 auto import from //branches/cupcake/...@137873 2009-03-11 12:11:56 -07:00
The Android Open Source Project
9adf84a4b6 auto import from //depot/cupcake/@136594 2009-03-05 14:34:35 -08:00
The Android Open Source Project
edbf3b6af7 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
The Android Open Source Project
d5193d9394 auto import from //depot/cupcake/@135843 2009-03-03 18:28:45 -08:00
The Android Open Source Project
43aa2b1cbf auto import from //depot/cupcake/@132589 2009-03-03 14:04:24 -08:00
The Android Open Source Project
0bb03408de auto import from //depot/cupcake/@137055 2009-03-02 22:54:33 -08:00
Rebecca Schultz Zavin
360211f7fe Need to dup file descriptor when reading from the binder for native handles
When reading a native handle that has passed through the binder,
the fds have to be duped to prevent them from getting closed when the binder
object is destructed.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2009-02-13 16:34:38 -08:00
The Android Open Source Project
a6938bab1f auto import from //branches/cupcake/...@130745 2009-02-10 15:44:00 -08:00
The Android Open Source Project
5f78a48bb8 auto import from //branches/cupcake/...@127101 2009-01-20 14:03:58 -08:00
The Android Open Source Project
276293246e auto import from //branches/cupcake/...@125939 2009-01-09 17:51:23 -08:00
The Android Open Source Project
e09fd9e819 Code drop from //branches/cupcake/...@124589 2008-12-17 18:05:43 -08:00
The Android Open Source Project
7c1b96a165 Initial Contribution 2008-10-21 07:00:00 -07:00