450 Commits

Author SHA1 Message Date
Xavier Ducrohet
fcc93e734b am 135b5ba5: Layoutlib: Read and close XML files as soon as possible. do not merge.
* commit '135b5ba52431b147d51a81b807784009cd0510dd':
  Layoutlib: Read and close XML files as soon as possible. do not merge.
2012-10-18 17:48:57 -07:00
Xavier Ducrohet
135b5ba524 Layoutlib: Read and close XML files as soon as possible. do not merge.
Because passing an InputStream to KXML does not close the
stream after the file has been parsed, the files are staying
locked on windows until the gc and finalizers are run.

This change preload the XML files and close their stream,
and then pass the content in a stream to the parser.

(cherry picked from commit c48b0b940d632b9862ff6aa32665e37fe9e50845)

Change-Id: I1b225454c166026c1aab6290c55ac8279e8862d5
2012-10-18 15:48:10 -07:00
Xavier Ducrohet
64b3de296c am 434cd38f: Update layoutlib for jb mr1. do not merge.
* commit '434cd38f96a4a87220a8218901622f31e567354a':
  Update layoutlib for jb mr1. do not merge.
2012-10-18 12:23:28 -07:00
Xavier Ducrohet
434cd38f96 Update layoutlib for jb mr1. do not merge.
Status bar displayed on all devices.
Update logic for displaying nav bar to whether or not
device has soft button.

Update navigation buttons to new look.
Remove battery and signal from navigation bar.

(cherry picked from commit 891b703f7b1e0e396d16477cc66a286da7161b49)

Change-Id: Id7cc9ad4255d2c4d2e6461a565dfe2cc17e12e75
2012-10-18 11:15:39 -07:00
Xavier Ducrohet
54059cd38d am 15c15eaa: Merge "Replace LruCache implementation for layoutlib. do not merge." into jb-dev
* commit '15c15eaac51c0c375d18fb70cd1bd066d87b034e':
  Replace LruCache implementation for layoutlib. do not merge.
2012-07-10 18:38:21 -07:00
Xavier Ducrohet
54a18ef7ad Replace LruCache implementation for layoutlib. do not merge.
The android version depends on a custom version of LinkedHashMap
which is not present on desktop VMs. This new implementation is done
in a way that minimizes the difference between the two.

Also some minor fixes.

(cherry picked from commit 01b6c755dbcf24e71192dc44757e2eea2a426091)

Change-Id: Idc7bca820e472e281a3024a5b610fd55606cf428
2012-07-10 12:51:30 -07:00
Xavier Ducrohet
58a8d8d2d4 am 0e302bc8: Merge "Disable debug output in SDK layoutlib." into jb-dev
* commit '0e302bc884fa4b25eb391d625f2fb0eddc25d9b7':
  Disable debug output in SDK layoutlib.
2012-06-19 18:06:37 -07:00
Xavier Ducrohet
4d7f301f94 Disable debug output in SDK layoutlib.
Bug: 6697442

Change-Id: I9741761342ea220c158aa124089430b0db80bf7e
2012-06-19 18:02:21 -07:00
Raphael Moll
bce1011dd2 resolved conflicts for merge of 8cf489c1 to jb-dev-plus-aosp
Change-Id: I06608e3c122b8f321429d457c51aa2213dd238b4
2012-06-14 14:14:45 -07:00
Raphael Moll
4306096a43 Layoutlib Create: Find dependencies.
Usage: layoutlib_create --list-deps /path/to/layoutlib.jar

Prints:
- all classes found in the Jar and the types they use (the dependencies).
- all the dependencies missing from the Jar and what uses them.

Change-Id: I8b2674df127e1494feed7a653282e88e4d2f5494
2012-06-13 15:44:54 -07:00
Dianne Hackborn
fcd738240a am dd251cab: Merge "Fix build." into jb-dev
* commit 'dd251cab5b6e5b590cc0aeae8be8f885a7794e72':
  Fix build.
2012-06-04 11:09:00 -07:00
Dianne Hackborn
bb47cf66ec Fix build.
Change-Id: I41415fed99d98406bc033289428bde59475c2917
2012-06-04 10:51:17 -07:00
Dianne Hackborn
f3b4c93e0d am ae5811c7: Merge "Fix (mostly) issue #5109947: Race condition between retrieving a..." into jb-dev
* commit 'ae5811c71405878b09eace395ec2b28e54eeb427':
  Fix (mostly) issue #5109947: Race condition between retrieving a...
2012-05-29 15:53:38 -07:00
Dianne Hackborn
6ae8d18218 Fix (mostly) issue #5109947: Race condition between retrieving a...
...content provider and updating its oom adj

This introduces the concept of an "unstable" reference on a content
provider.  When holding such a reference (and no normal stable ref),
the content provider dying will not cause the client process to be
killed.

This is used in ContentResolver.query(), .openAssetFileDescriptor(),
and .openTypedAssetFileDescriptor() to first access the provider
with an unstable reference, and if at the point of calling into the
provider we find it is dead then acquiring a new stable reference
and doing the operation again.  Thus if the provider process dies
at any point until we get the result back, our own process will not
be killed and we can safely retry the operation.

Arguably there is still the potential for a race -- if somehow the
provider is killed way late by the OOM killer after the query or
open has returned -- but this should now be *extremely* unlikely.
We also continue to have the issue with the other calls, but these
are much less critical, and the same model can't be used there (we
wouldn't want to execute two insert operations for example).

The implementation of this required some significant changes to the
underlying plumbing of content providers, now keeping track of the
two different reference counts, and managing them appropriately.  To
facilitate this, the activity manager now has a formal connection
object for a client reference on a content provider, which hands to
the application when opening the provider.

These changes have allowed a lot of the code to be cleaned up and
subtle issues closed.  For example, when a process is crashing, we
now have a much better idea of the state of content provider clients
(olding a stable ref, unstable ref, or waiting for it to launch), so
that we can correctly handle each of these.

The client side code is also a fair amount cleaner, though in the
future there is more than should be done.  In particular, the two
ProviderClientRecord and ProviderRefCount classes should be combined
into one, part of which is exposed to the ContentResolver internal
API as a reference on a content provider with methods for updating
reference counts and such.  Some day we'll do that.

Change-Id: I87b10d1b67573ab899e09ca428f1b556fd669c8c
2012-05-29 13:33:09 -07:00
Jean-Baptiste Queru
38e34874a8 am 2a9b85d7: am c0f17383: Merge "Move kxml2 to prebuilts/misc"
* commit '2a9b85d7ccdd3b8e6be90454cdcb4be3b032cd64':
  Move kxml2 to prebuilts/misc
2012-05-18 16:33:10 -07:00
Dianne Hackborn
4286d6d115 Fix build.
Change-Id: I53263d509559c70100cd78ad49f225f0dafd8891
2012-05-13 16:03:39 -07:00
Dianne Hackborn
85afd1b6f8 Implement new window cropping.
The window manager now performs the crop internally, evaluating
it every animation from, to be able to update it along with
the surface position.

Change-Id: I960a2161b9defb6fba4840fa35aee4e411c39b32
2012-05-13 13:31:06 -07:00
Michael Jurka
421dceb0a4 Merge "Making transition out of recents look better" into jb-dev 2012-05-10 10:35:19 -07:00
Michael Jurka
21385cd83d Making transition out of recents look better
- Fading out recents first, then scaling up app
thumbnail
- Fade Recents out over 130ms
- Delay the window animation for 200ms first,
then animate for 200ms (previously we didn't delay
and then animated for 300ms)

Bug: 6390075

Change-Id: Ia8c753bf7ee03d2acef6eb2772b28d88fe10a682
2012-05-09 20:25:28 -07:00
Dianne Hackborn
652b6d1e59 Add infrastructure for accessing "unstable" content providers.
We have an API and some stuff that purports to this, but no real
implementation yet.

Change-Id: I93555440014a50fdf79fa3f65318d90fb82265b4
2012-05-09 18:18:40 -07:00
Xavier Ducrohet
f18c68b83f Add missing native method to Canvas_Delegate.
Change-Id: I86288c942004e5489eacc43ba5e112cf56f94487
2012-05-08 17:14:18 -07:00
Jeff Brown
a7771df369 Move CancellationSignal to android.os package.
Bug: 6427830
Change-Id: I39451bb1e1d4a8d976ed1c671234f0c8c61658dd
2012-05-07 20:06:46 -07:00
Jean-Baptiste Queru
bda124453d Move kxml2 to prebuilts/misc
Change-Id: Ie4b45d2073f26d8313843f9860cf658e288c850b
2012-04-30 17:35:26 -07:00
Dianne Hackborn
5c58de3a52 Add system insets to windows.
This will be used to determine which parts of a window a completely
hidden by system UI elements (status bar, nav bar, system bar) so
that they can be clipped out from rendering.

Change-Id: I2c6c6ac67dbdfeed82d2c089ef806fb483165bd9
2012-04-30 12:11:43 -07:00
Dianne Hackborn
79c6346100 Merge "When a window is first shown only draw once while animating." into jb-dev 2012-04-27 17:42:48 -07:00
Jeff Brown
96ff709fe2 Work around build break in layoutlib.
Bug: 6413563
Change-Id: Ia7101fba87f3784fd8159c75e4289f642913d099
2012-04-27 17:18:06 -07:00
Dianne Hackborn
12d3a94397 When a window is first shown only draw once while animating.
On some hardware allocating a new graphics buffer is quite
expensive, which blocks updates to the UI.  This can cause
glitches when performing window animations.

To reduce these glitches, the view hierarchy will now only
allow itself to be drawn once if its window is being shown
while the window manager is animating, not resuming draws
until it is told that the animation is done.

Change-Id: Ie15192f6fddbd0931b022a72c76ddd55ca266d84
2012-04-27 15:21:44 -07:00
Xavier Ducrohet
cb092e2b7f Fix Paint_Delegate with missing native method.
Change-Id: I39638dcb323fdd1ec3cb58dcad05757145d09026
2012-04-23 17:41:37 -07:00
Dianne Hackborn
68c33ca7ce Add new API to find smallest/largest screen size.
Change-Id: I790801fceaf84ee2e3b1c9d32828285ad3231d0e
2012-04-19 14:55:13 -07:00
Dianne Hackborn
eabfb3a36e Add new scale-up window manager animation.
Like zoom thumbnail, but without the thumbnail.

Change-Id: I9486dd204398b87c9e70ff0d05d03f4a22449cd6
2012-04-16 17:32:50 -07:00
Jeff Brown
ac14351e16 Move some APIs from window manager to input manager.
Simplified input injection API down to just one call.

Removed all input state reading API.  It was only used by the
window manager policy and required a permission that applications
could not obtain.  READ_INPUT_STATE is now unused and deprecated.

Change-Id: I41278141586ddee9468cae0fb59ff0dced6cbc00
2012-04-05 19:33:11 -07:00
Dianne Hackborn
5459c43b83 Merge "Clean up status bar, system bar, navigation bar management." 2012-04-05 11:47:02 -07:00
Dianne Hackborn
f87d19621d Clean up status bar, system bar, navigation bar management.
The status bar and navigation bar are two completely separate
elements, with their own semantics.  The system bar now classifies
itself as a navigation bar, since that is really how it behaves.

This required rewriting the HDMI resizing code, so that it is
all done by PhoneWindowManager since that is what is responsible
for the size of the navigation bar (and thus now system bar).  This
actually gets rid of a fair amount of code, and means we can also
do the same thing for a pure navigation bar.

Likewise the system bar now has the navigation bar ability to be
hidden when requested by system UI flags.  To get the behavior
we want on Xoom, we only allow the nav bar to be hidden when it
will help provide a better aspect ratio for showing widescreen
videos.

Finally the nav/system bar now animates when hidden and shown.

Change-Id: Ie927154b68376a0b61802f99171ff56b8da92e7a
2012-04-04 16:00:45 -07:00
Amith Yamasani
ec4a50428d Embed layout padding in nine patch images
- Added a new custom PNG chunk that carries the layout padding ints.
- Extract the padding ticks from .9.png images and store in the chunk.
- Load the padding information at runtime into Bitmap and NinePatchDrawable.

- The new chunk is ordered first so that it doesn't cause a problem in older
  versions of the platform.

Bug: 6087201

Change-Id: I5de46167a1d44b3ec21065b0c165e594b1dc8399
2012-04-04 12:05:59 -07:00
Xavier Ducrohet
fbd0509f47 Merge "Add Delegate for ViewRootImpl#isInTouchMode to prevent IPC call in Eclipse." 2012-03-23 16:29:50 -07:00
Xavier Ducrohet
22f700a1b8 Add Delegate for ViewRootImpl#isInTouchMode to prevent IPC call in Eclipse.
Also fix some new/removed method from BitmapFactory.

Change-Id: I606bd8bee6ff1e2c6c9472b4672175bfdaff45de
2012-03-23 16:07:23 -07:00
Dianne Hackborn
8078d8c8a2 Add new thumbnail animation.
Use it for recent tasks switching.

Not perfect yet by far, but something.

Also fix issue #6186758: Twitter crashes after tapping on a tweet on JRM75D

Change-Id: I49bf6c94aafde875ac652dedaf96d6c08cc9e7d2
2012-03-23 14:13:13 -07:00
Xavier Ducrohet
5d701eddcf LayoutLib: Properly support attr ns when used in styles.
Change-Id: I885864588928589d7c9a34b94339917c5be47fa5
2012-03-16 15:14:02 -07:00
Xavier Ducrohet
a421f6c0ba Fix sdk layout rendering in JB.
Since JB, com.android.internal.R does not contain all the resources,
instead only the ones that are accessed through Java.
This means we need to dynamically generate IDs for resources that are
private and only accessed from other XML resources. This is done
through the DynamicIdMap class.

Also add a PolicyManager and a PowerManager since those are now
needed by ViewRootImpl?!?

Change-Id: If2ae8ad79502fa084d852664a44aefd46e01aec6
2012-03-15 16:23:51 -07:00
Dianne Hackborn
a4972e951b Add new "options" argument to all startActivity APIs.
This will be used to allow new features to be requested...  such as,
say, a special kind of animation.  Right now there are no options
defined.

Change-Id: I4eb6f27275cdd4bf186f6da316ab93a2372ad4b7
2012-03-14 12:57:14 -07:00
Romain Guy
bb9908b828 Dispatch screen state change events to Views
Bug #6120957

Using this new callback, views can interrupt and resume their
animations or other periodic tasks based on the current state
of the display.

Change-Id: I398f4abd421e9c5f207107bf1009a7b92cf45daa
2012-03-08 15:05:12 -08:00
Romain Guy
e0cf12fc4d Fix the build
Change-Id: Ia86ba9b1c432ab3f8107557e95b12c9eedc4d9f7
2012-03-08 11:08:31 -08:00
Xavier Ducrohet
aeb17f17ff am 77fdcbff: am f038868d: am 44e63a21: Support rendering layout that use the new res-auto namespace.
* commit '77fdcbff8b458dd3430b38e60aee1a28ca92a738':
  Support rendering layout that use the new res-auto namespace.
2012-02-27 07:51:05 -08:00
Xavier Ducrohet
77fdcbff8b am f038868d: am 44e63a21: Support rendering layout that use the new res-auto namespace.
* commit 'f038868d74af534effceaa8f1d932f9576f4f647':
  Support rendering layout that use the new res-auto namespace.
2012-02-24 19:35:25 -08:00
Xavier Ducrohet
44e63a218c Support rendering layout that use the new res-auto namespace.
Change-Id: I9b89c965dc8c9458e74c15ab8ff765e16e1b32c2
2012-02-24 19:29:31 -08:00
Dianne Hackborn
cb581bbe2e resolved conflicts for merge of 34706a4c to master
Change-Id: I4dd24f3b917aa7e3d2c4b0fae51e951dfcf88ba8
2012-02-24 16:37:35 -08:00
Dianne Hackborn
34706a4c81 am e65a9ab1: am 5786f5cf: Merge "Fix build." into ics-mr1
* commit 'e65a9ab1ea42d1f6190bee844ee666b7910d71ef':
  Fix build.
2012-02-24 16:26:57 -08:00
Dianne Hackborn
b69b2c01b4 Fix build.
Change-Id: Id3262bff0df598ecc81a4346dee9febd3aaa60c9
2012-02-24 16:10:26 -08:00
Xavier Ducrohet
5e6c219477 am f8e737cb: am 22701ec5: am 503247f2: Merge "Make sure resource references are resolved." into ics-mr1
* commit 'f8e737cb61ab86b90ec318591fbcfec40fac63cf':
  Make sure resource references are resolved.
2012-02-23 12:22:40 -08:00
Xavier Ducrohet
f8e737cb61 am 22701ec5: am 503247f2: Merge "Make sure resource references are resolved." into ics-mr1
* commit '22701ec5b11f6138e6298814fff5f09da82df144':
  Make sure resource references are resolved.
2012-02-22 10:52:16 -08:00