History log of /frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
10bb1371dca38b5b59f083ee963f7987da6511f2 05-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Add preferences rendering.

NO_SQ: Depends on updating layoutlib-api-prebuilt.jar
Change-Id: Iae93ab74c478e6f2158e1528467bec9ee2d7ee9b
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
17a6170c62e6f74f2881623a9c16f0b6fea54721 21-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Fix AnalogClock rendering

1. Change calls to java.lang.System.log* since they don't exist on the
host.
2. Clean up method rewrite mechanism in ReplaceMethodCallsAdapter.
3. Stub out creation of uninitialized GregorianCalendar.
4. Memory map the time zone data base file and provide a custom
implementation of BufferIterator for use by ZoneInfoDB
5. Delete unused Time_Delegate

Also fixed a comment in BridgeAssetManager and an error message in
FontFamily_Delegate.

Bug: http://b.android.com/79160
Change-Id: Iae5ef65678f0e6c7c5af520c45bd15980ce3fa55
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
9fa48b09ad06c39be0923d5ca64b81f6b0eee993 30-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Fix BridgeContext.get*ResourceValue()

getFrameworkResourceValue() and getProjectResourceValue() never really
returned the defValue passed to them, instead creating a new id for
non-existent resources. We now checks for the existence of the resources
before trying to obtain the id.

Change-Id: Ie3103ba32af6186651a5f77c27d1efc33dc2bcc7
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
b69ec7708b61535355d278ac0ea8f9a61540d1fb 20-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Check Bridge init before disposing.

In some cases ADT may dispose the Bridge even before init is called on
it. This caused an NPE. Fixed this by checking for the initialization
before disposing resources.

Bug: http://b.android.com/77726
Change-Id: I741d6ea3595a3b7cb816abd0417f23aecca6370e
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
86eb8b4e29b1ad889fc814bae723d4d6e491f53f 31-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Add testing framework to LayoutLib.

This change adds an end to end test which loads the framework resources
and a test app and ensures that no exceptions or warnings are thrown.

The change also adds project configuration for intelliJ.

Change-Id: I7b67c0f1a2af2dac95df7f3231cab537b9826d7d
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
c8e2d0a4f88539f44da405597ede529ceb6339f6 31-May-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Add capability to simulate old versions

Let the IDE know that we can simulate older versions of platform.

Change-Id: Idec6d24296dd0ae04a2d808c14604629e265d458
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
baef8c1ffe5c900fb0da9512654bf249b5fc9269 20-May-2014 Deepanshu Gupta <deepanshu@google.com> Layoutlib fixes for L [DO NOT MERGE]

This adds the new delegates that were missing. This starts the work on
changes related to Minikin Fonts.

There are some changes related to TypedArray that still need to be
fixed.

Change-Id: Ic2397b64aa3f1f48926e849b14689c47d9ee7f8c
(cherry picked from commit 7ca3612094270183243938e79337c84effea7ad0)
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
14bf0cef7eeed572a67c29a328581afac4decc20 12-Dec-2013 Deepanshu Gupta <deepanshu@google.com> Action bar rendering in layoutlib

This also makes a couple of changes to the framework:
1. ShareActionProvider - Use edit mode to execute activity chooser code.
2. WindowDecorActionBar - add a new constructor for use by layoutlib.

This also relies on some changes to the plugin to pass the correct params.

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
8930cb4f37ff0fbde65f7afd4bbe06ab77677f78 05-Sep-2013 Deepanshu Gupta <deepanshu@google.com> Fix layout rendering for RTL locales

This changeset adds the framework resources for RTL locales and mirrors
the layout if the application is RTL aware.
Use ICU to check the character orientation of the locale - right to left
or left to right. Set the layout direction on the top level layout
accordingly. Also, load the RTL resources for Nav Bar when the locale is
RTL.

Change-Id: Icbb57ee2ac7c6d8dfc34c2f04dce34d820b9b1ed
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
282e181b58cf72b6ca770dc7ca5f91f135444502 24-Jan-2014 Adam Lesinski <adamlesinski@google.com> Revert "Move frameworks/base/tools/ to frameworks/tools/"

This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
9f6a119c8aa276432ece4fe2118bd8a3c9b1067e 28-Aug-2013 Mike Lockwood <lockwood@google.com> Move frameworks/base/tools/ to frameworks/tools/

Change-Id: I3ffafdab27cc4aca256c3a5806b630795b75d5c8
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
279c00e8e0abb20f7e10577c77937c058da080bf 24-May-2013 Deepanshu Gupta <deepanshu@google.com> Add missing native methods.

Change-Id: I7b34e2ec0164520efc658053a80f307791a992b1
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
891b703f7b1e0e396d16477cc66a286da7161b49 17-Oct-2012 Xavier Ducrohet <xav@android.com> Update layoutlib for jb mr1.

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.

Change-Id: I8241d71269a17126218a3062ba727e379a8e6c25
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
4d7f301f94b9d2dda0ef109e9991ad2d77442f75 20-Jun-2012 Xavier Ducrohet <xav@android.com> Disable debug output in SDK layoutlib.

Bug: 6697442

Change-Id: I9741761342ea220c158aa124089430b0db80bf7e
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
a421f6c0ba8c354e2a81830e6402654bbf732780 22-Feb-2012 Xavier Ducrohet <xav@android.com> 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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
c3f979f6fecb8b46e9315fddb2a1f344bf1f1447 21-Feb-2012 Xavier Ducrohet <xav@android.com> Make sure resource references are resolved.

XmlPullAttribute can query for attributes and return them in a given
format. We need to make sure they are first resolved before
trying to convert them to int/float/boolean/...

Change-Id: I2aaced022a0382e501978c396e49d6191d53bdc8
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
7f9f99ea11051614a7727dfb9f9578b518e76e3c 11-Aug-2011 Xavier Ducrohet <xav@android.com> Make some methods/fields package private so that layoutlib can access them.

Change-Id: I4aeadfbaf8a4f6a459fa19937c21ac23d9e5fb64
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
fb93ce9684120a36862b5b5e67b1865a652907e9 04-Jun-2011 Xavier Ducrohet <xav@android.com> Import the Layoutlib from hc-mr1.

This is squash commit of all the missing patches.

Change-Id: Ie081c46a173290646deddbde503a720d50c4400f
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
05b7b69c6c5d418e18db644feed1ec2ca83291cc 17-May-2011 Xavier Ducrohet <xav@android.com> LayoutLib: support the new baseline/margin query API.

Change-Id: I856489df655960820b8eaa4c6179515a5c069b00
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
2fae858db55fc6984ef923a6226b9408c37c72cb 29-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: implement data binding for most AdapterView

Change-Id: I27be96ed2c37573eb22cfbb391d96b6137b3df8c
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
adaa12cd9e421edf34e36de8cfacc3e3c334bb64 08-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: fix Capabilities and getDimensionPixelSize

Commented out a Capability that is not in ADT 10.

BridgeTypedArray.getDimensionPixelSize shouldn't call
getDimension since most of the code is duplicated, and
it prevents use from properly detecting malformed attribute
values.

Change-Id: I005b17061590dc0668729af16e896fad815f1973
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
10df650f0d4bdf086dae9ac29fafd8a1ded06c23 17-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: add support for layout_only render.

Change-Id: I1cd791cf9560156c1ac488f8e454240c84e29cc6
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
4dd2299d5766bf14479578772a0946c5399a0158 07-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Update to latest API fix.

Change-Id: I5147010e4f16a5c2ea0b98709c42f7ecd9412ff6
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
fd18f573280bbbcc549b35b548580a562bd960e2 05-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: add implementation of Bridge.renderDrawable()

Change-Id: Ic4d96488fd1a2e5b7d24353bebc8fdb24262c1d1
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
1126422ee1f532d8582a4e3b56dbfe505c15e775 05-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: update to the new API.

Change-Id: Ice028933cd2270c81c3d17f7bef7c5a9d14bd802
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
bbbb8326020368958a3f1d248878329e9d6b10c0 28-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: render system/title/action bars.

Also a few generic fixes in the layoutlib itself to support
this.

Change-Id: Ie3f24c9056bd3cc72f39f8a4f2c0861be15bff55
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
b353495192ba1acce94b8ab8aeeffe3c9a3bcfac 28-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: update with Pair API.

Change-Id: Iba945153f7544872ea84e3311584223aea740e2e
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
35ea7cd4c0c89122fda0b57af20061645082ffb9 28-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Update with the new resource map APIs.

Change-Id: I30d83c2bb4569513f4f5e22670cffe938706f105
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
5a82d8c58bf91c357c37a82b9f5e5c26f676d847 27-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: properly erase the bitmap when rendering a new session.

This fix the issue where going from a full theme to a dialog theme
would show the dialog on top of the previous rendering.

Change-Id: Ib52b9719f44b04969423547b9de8d039f90b6f46
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
7d7016e72431ad7ee595d857a19231c69efeb6de 26-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: return ViewInfo for all merged items + Build init.

android.os.Build is now initialized from the build properties
parsed from the SDK build.prop file.

Change-Id: If16953215ca90fb0beacb51bf405b89a5c8a34fa
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
51a7e5447de94791c464cda5cc6ebbf616d73c80 15-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: update logs to use new data bundle

Also change some resource.resolve tags to resource.format

Change-Id: I3f0b0d2eb69a5ec98375e4014a3bb1bfceb8c855
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
918aaa5717fce6081557c82ce1c439b6922737d5 13-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Use the new log tag constants from LayoutLog

Change-Id: I29dd578ae16405358d3673caf13528be393f0967
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
56222cfbe9973c518f7e8c9113c614de80b5a4b2 13-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: use tags in logs.

Change-Id: Ib85272249d285ecef409bf063903bcd91514a424
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
85de0087fc6a65a66d3994f0b8dd3fecd9db2526 12-Jan-2011 Xavier Ducrohet <xav@android.com> Merge "LayoutLib: misc fix." into honeycomb
639e1bd35231a8f71e7acc95fedaf13ace9b65a9 12-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: misc fix.

Change-Id: I0e2eff376d8f8e7682c28ef771b886d5fab5ff65
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
6c740cf71e5ce5ba7c8493c545c3a57c57ac7024 11-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Improve error reporting.

Change-Id: I37cad7e2efb959202960c57b271c55c759867139
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
479101a9b4142d21d42351684bc9bc65ec3471be 09-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Fix moveChild animation.

Only support animation for view move inside
the same layout.

Also fix animation thread to property support multiple
animation running at once.

Change-Id: I45cad84e7b9f3a4f281c956d32934eb74e807afb
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
46a329244db12b6f7afc3c9a6409d420241a1058 08-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: finish Typeface and unload them in dispose.

Change-Id: I3a48f84678f62d669d303fc73b041bb3fe5f333b
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
29c288da5260ac221b941e69b960aa2127cbdef0 03-Jan-2011 Xavier Ducrohet <xav@android.com> Cherry-pick 9b53dd9d60a01ddb1307177c296c7b4fd6114753 from master

Change-Id: I670872542feb62c47fe693eb183b19e2eef2b20d
LayoutLib: use new API with log in init method.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
19a021038f2f4683dddef651543d7298f5bd7218 16-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Update layoutlib with revised API.

Change-Id: I78929df621f48e85d9cbefe1f5590f9ce99bbaff
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
f890fab5a6715548e520a6f010a3bfe7607ce56e 20-Dec-2010 Patrick Dubroy <dubroy@google.com> Ensure bitmaps aren't freed while referenced from a display list

Also removes the reference queue finalizers. They aren't necessary
anymore now that Bitmaps are allocated in the heap.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
ffb42f6c5043de226f02318a1311669d35a90711 10-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Adapt to new LayoutLib

API now uses ResourceValue instead of IResourceValue
Capabilities renamed Capability

Change-Id: Ia5d2b6c8d536e020a1f5496fb2285f67fc4346c4
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
168677c9e2f8438ec5687e3c6b0e41b986c5b230 06-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Fix logging.

- Use the new logging API
- remove log object reference everywhere but in Bridge
- all logging code accesses Bridge.getLog()
- prepareScene sets the current scene log object in Bridge.

Change-Id: Ib0517ccd6454c4baf218b6baa978a126f91671e7
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
e1179ea065392485a6e3bf1e28a1242179cd48b0 03-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Animation support in insert/move/removeChild actions.

Also update to use the new SceneResult API.

Change-Id: Iaac6df0c250fbefc8758310c37e0cf47cae6875d
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
01811aa86279af1b341a4fff344d66c0ebdd63da 03-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Create new layoutparams when moving a child

Change-Id: Ie2183490e8d26ef194030a9d87fe7745f24f1d83
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
3c78f2de353df3e287444dd9f9fbab3bd4456217 03-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Update to use the new moveChild API.

Also, return supported capabilities.

Change-Id: I824120d50f2865a667dc6c81d455ae19321966b6
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
c8aec064f9f304c88f61c8c1aa3d60521b92177a 02-Dec-2010 Xavier Ducrohet <xav@android.com> Layoutlib: update with new add/movechild API.

Change-Id: I33e3a07cd7db7fe996d1f52b84b4b3bf21065a51
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
9eb6d412af6859b6c0bb969c76bbfc48eec8fd4b 01-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Reuse canvas when possible.

Also moved the prepare/cleanupThread methods to Bridge
as they are not really specific to the scene anymore.

Change-Id: I7b93821913ce4d2fcbe3d8be489be6533ff87e57
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
c14e7dd8ba15f517a5402ad802377b1d60784416 02-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: implement insert/move/removeChild.

Change-Id: I1c05ff4dc80e5ee4ea67d322acaf9c94276f84e1
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
2eea6fab1cbb0a5c8f913491c2d622c904759893 24-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: Animation support.

New locking mechanims to prevent concurrent renderings.

There's now a thread specific prepareThread() method (only
prepares the looper) and its associated cleanupThread().

For the rendering itself, acquire must be called before doing
any type of Android specific work on the scene (inflate or rendering)
After instantiation, init() must be called, which also acts as acquire.

Added a lot of checks to make sure method aren't called without
acquire or if scenes try to be rendered while acquire was called
from the same thread but on another scene.

Animation implementation:
- Handler delegate to use our own queue (since the animation runs
through handler messages). This uses a callback to process
the message. This callback is per-thread and only used in
animation threads.
- SystemClock delegate to provide clock implementation.
- AnimationThread to handle playing the animation and calling back
to the animation listener.

Change-Id: Ia39aba7ed476759df1da3200e413fe3e92590d15
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
2d56b273ef6e2984a4e8914fb67772b173d0a154 23-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: use default nine patch classes.

Move away from using our own implementation of NinePatchDrawable.
Now use native delegate for a few methods of NinePatch.

The byte[] used to describe the 9-patch chunk is entirely controlled
by the delegate. Therefore, while the default version (JNI) use the
array as a representation of a C struct, this version uses the array
as a serialized version of NinePatchChunk.

A cache mechanism using SoftReferences allows us to not deserialize
the array every time rendering needs to access the chunk itself.

The Bridge-level cache mechanism for bitmaps and nine-patches as
changed. Since the new nine-patches doesn't hold the bitmap
data anymore (it's stored in a normal Android bitmap which
is cached itself through the cache), then the nine-patch cache
has been changed to only contain the nine patch chunk.

Also initialize the canvas with the display metrics to prepare
for correct scaling when density of the assets don't match the target
density.

Still to come: actual density support in the 9-patch drawing code.

Change-Id: Ibefcccf4432e1986e8436e0c41a0107741593536
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
755b46d597b8e8a616d53e2a7dfea295dd78d713 19-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: use int[] wrapper to use as map keys.

This fixes the SlidingDrawer that failed to load.

For some reason, in case of the SlidingDrawer, when the constructor
uses android.R.styleable.SlidingDrawer it's the same values but not
the same instance as the array read from android.R through reflection.

So what works for all other widgets, and has worked since the very first
layoutlib isn't working anymore, and we'll now have to use a wrapper
similarly to what we use in ADT in the project callback.

We should probably provide a single int[] wrapper class in layoutlib
API for all to use.

Change-Id: I4d7d038540f8a24541a588696f1059a020b589e5
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
5a09488a158b669577cd8eb557ce4feb62929e75 19-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: Properly dispose of bitmap delegate.

This is done by initializing the android.util.Finalizers that's
reponsible for calling out to the native bitmap destructor.
Also implemented the native bitmap destructor

Also fix Bridge by removing obsolete API methods, and removing
some unneeded synchronized blocks now that the whole rendering
(and scene creation) is protected by a synchronized on the bridge
object anyway.

Change-Id: Ie1792da6db354836542dfc11f457fe4a6d78ddfb
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
071dee288ca726c7c15754c2559403b9cbf950bd 11-Nov-2010 Xavier Ducrohet <xav@android.com> Misc fix in layoutlib bridge + View.isIneditMode as delegate.

Change-Id: Ideab29167e933203da99d4270cebcb777726201f
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
c2e9651bf386a1f7bf7fc706cf5424950570470c 10-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: New bridge implementation using the new API 5.

Since the new API prepare for stateful layoutlib, major
reorganization of the code.

New "android" sub-package for all extended android classes.
Also moved BridgeInflater in here so that all extended classes
are in this package. Only delegates and classes replacing
renamed classes are in their original android.* packages.
Also created full file for the empty implementations of
IWindow and IWindowSession.
New "impl" for the dirty work implementation.
Main package contains the basic implementation of the API.

Most of the code that was in Bridge is now in .impl.LayoutSceneImpl,
with the main init/inflate/render code split into the contrustrutor,
inflate() and render().

Change-Id: Ie15b15e5a1b2388cd6ef82e518345b1fc02ec981
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
7f7752439543db6e13c599bdd10cb10254c24528 05-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: Load fragments

This change does the following:
- Make the bridge context extend Activity instead of Context
so that it can act as a view factory. This is needed because
the Activity is used as factory for Fragment objects.

- Override the default Fragment.instantiate(...) method
through a delegate. This is done to load the Fragment
classes located in the project (similar to custom views).

Change-Id: If62e7c9ff2b7585677077ad825aa1c3591d1b5e0
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
e0c763f54f5848a2513990fe37791b6f60ef7760 05-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: more text drawing.

Change-Id: I32f46d23e746b095be0577a53b61567a868f0b8a
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
9f63ff263b0a97f0fa63e97136c18f6abccbfc68 28-Oct-2010 Xavier Ducrohet <xav@android.com> Layoutlib Canvas and Paint implementation through native delegates

Also fix native delegate generation to put "this" parameter even
for methods that don't have any parameters.

Change-Id: I5dd0c505871370ff7b4cda16de84a5b3ae438f73
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
5e7ed8da0d990cbc55071d16b5db270231ff0c89 28-Oct-2010 Xavier Ducrohet <xav@android.com> Move layoutlib typeface implementation to delegate.

Also move BridgeContentProvider to its own class to make it
less messy in BridgeContentResolver.

Change-Id: Id3462218b500d43d4c9b20b25326ad24e4106fa5
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
d4533f1469990582e4a2dd0898429093fe2690c0 20-Oct-2010 Chris Tate <ctate@google.com> Report drag success/fail in the DRAG_ENDED message

DragEvent.getResult() returns 'true' if the drop was ultimately accepted;
false otherwise. The validity of this datum is only guaranteed when the
DragEvent's action verb is ACTION_DRAG_ENDED.

Also fixes the drag-start timeout handling (though the offending app is
not yet officially declared ANR).

Implements bug 3097807

Change-Id: I6908ac628c72ff7d6193d87060d769a559a78d0e
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
a53146c5569f8ff5f7eb55e9ad35d23ddacf2add 07-Sep-2010 Christopher Tate <ctate@google.com> Drag/drop APIs and infrastructure

A View initiates a drag-and-drop operation (hereafter just called a "drag")
by calling its startDrag(ClipData) method. Within the processing of that
call, two callbacks are made into the originating View. The first is to
onMeasureDragThumbnail(). Similarly to the core onMeasure() method, this
callback must respond by calling setDragThumbnailDimension(width, height) to
declare the size of the drag thumbnail image that should be used. Following
this, the View's onDrawDragThumbnail(canvas) method will be invoked to
actually produce the bits of the thumbnail image.

If all goes well, startDrag() will return 'true', and the drag is off and
running. (The other arguments to startDrag() provide reconciliation between
the current finger position and where the thumbnail should be placed on
the screen relative to it.)

Potential receipients of the ClipData behind the drag are notified by a
new dispatch mechanism, roughly parallel to motion event dispatch. The core
routine is the View's onDragEvent(event) callback, with the mechanics of
dispatch itself being routed through dispatchDragEvent(event) -- as in
the case of motion events, the dispatch logic is in ViewGroup, with leaf
View objects not needing to consider the dispatch flow.

Several different event 'actions' are delivered through this dispatch
mechanism:

ACTION_DRAG_STARTED: this event is propagated to every View in every window
(including windows created during the course of a drag). It serves as a
global notification that a drag has started with a payload whose matching
ClipDescription is supplied with the event. A View that is prepared to
consume the data described in this event should return 'true' from their
onDragEvent() method, and ideally will also make some visible on-screen
indication that they are a potential target of the drop.

ACTION_DRAG_ENTERED: this event is sent once when the drag point
enters the View's bounds. It is an opportunity for the View to set up
feedback that they are the one who will see the drop if the finger goes
up now.

ACTION_DRAG_LOCATION: when the drag point is over a given View, that
View will receive a stream of DRAG_LOCATION events, providing an
opportunity for the View to show visual feedback tied to the drag point.

ACTION_DRAG_EXITED: like DRAG_ENTERED, but called when the drag point
leaves the View's bounds. The View should undo any visuals meant to
emphasize their being the hovered-over target.

ACTION_DROP: when the drag ends at a given point, the View under that
point is sent this event, with the full ClipData of the payload.

ACTION_DRAG_ENDED: paralleling the DRAG_STARTED action, this is the global
broadcast that the drag has ended and all Views should return to their
normal visual state. This happens after the DROP event.

Change-Id: Ia8d0fb1516bce8c735d87ffd101af0976d7e84b6
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
46b9ac0ae2162309774a7478cd9d4e578747bfc2 23-Apr-2010 Jeff Brown <jeffbrown@google.com> 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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
694f79b5d1196640d1beb680b7d1fc68e6e77cbd 18-Mar-2010 Dianne Hackborn <hackbod@google.com> Fix issue #2519590: Lock screen stuck in landscape mode

Well, mostly. There is still a problem here where the first time
you show the lock screen it just doesn't draw itself. I assume
this is something breaking in the view hierarchy as it floounders
around removing and adding new views as it is first being shown...
but no idea at this point what is the actual case.

Change-Id: Iba99ae3242931c8673b17b106c86fc99e2c52abe
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
2269d1572e5fcfb725ea55f5764d8c3280d69f6d 25-Feb-2010 Dianne Hackborn <hackbod@google.com> Re-arrange android-common so framework no longer links with it.

This is the framework part, moving classes around so the framework
no longer needs to link to android-common. Makes some APIs public,
others that didn't need to be public are private in the framework,
some small things are copied.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
e36d6e277e49475076b7872d36ea6a5c5b996e9d 18-Feb-2010 Dianne Hackborn <hackbod@google.com> Work on issue #2263557: PMF3000 showing hybrid of portrait and landscape modes

This is a bunch of reworking of how configuration changes are handled:

- When orientation is changing (for whatever reason), the window manager no
longer tries to pre-emptively compute a new configuration. Instead, it
just determines change is happening and tells the window manager.
- The activity manager is now responsible for giving the window manager the
final configuration it is using. This is both so it knows whem the
activity manager is done with its configuration updates, and so the window
manager can use the "real" configuration.
- When an orientation or other configuration change is happening, freeze the
screen and keep it frozen until the activity manager has given us the
final configuration.
- The window manager can now send new configurations to its clients during
its layout pass, as part of a resize, if it has determined that it has
changed. This allows for a new View.onConfigurationChanged() API for any
view to easily find out when the configuration has changed.
- ViewRoot now also works with the activity thread to make sure the process's
current resources are updated to the new configuration when it receives one
from a window. This ensures that at the time onConfigurationChanged() and
other view callbacks are happening, the correct configuration is in force.
- There is now a sequence number associated with Configuration, which
ActivityThread uses to avoid using stale configurations. This is needed now
that it can receive configurations asynchronously from both the window
manager and activity manager.
- The hack for keeping the locale has been removed, and underlying problem
fixed by having Configuration initialize its locale to "unknown" instead of
a valid default value.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
d4a4729c0cac582a2dcec7c8cfb316b81885a0f0 21-Dec-2009 Tom Taylor <tomtaylor@google.com> Update imports to android-common

Several files were moved to android-common. Update all the references
to import those files from the new location.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
0da2676ea841ff85b373c2960dd2c497dcf4e441 16-Nov-2009 Xavier Ducrohet <xav@android.com> Minor fix for the parent style computation in the layoutlib.

This is an SDK change only.

Change-Id: Iae493184ae76b2e21200dd6bb48795ff74f79ab3
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
bf6956b1d95442e9d9c483894d578fe6b7044cbb 10-Nov-2009 Marco Nelissen <marcone@google.com> Add a way for wallpapers to know the delta between virtual screens.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
7580493b014a2c7ea883cd291255798dc72ebbff 21-Oct-2009 Dianne Hackborn <hackbod@google.com> Implement feature #2117336: Create event communication APIs for live wallpaper

Note: currently only implements an async version (no result), and not yet
actually tested.

Change-Id: Id47ed045a4b0eb309ea8c58daf41a0e03eff1d3a
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
ffa424800d0338b8b894aef2ea1e3e3344cbda7a 24-Sep-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2133206: dialogs/menus should auto-dismiss when screen turns off

Lot of infrastructure for more things to go away when "clear system dialogs"
happens, and now do this when we turn on the lock screen.

Change-Id: I567130296fe47ce82df065ed58ef21b37416ceaf
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
56a92e3ba0d7da310b4c6e09f54dee10f1f395bb 23-Sep-2009 Xavier Ducrohet <xav@android.com> Add density support to layoutlib so that bitmap are scaled if needed.

Change-Id: I00204bb136ccaa44deeafbe0ea8746fea9903341
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
19382ac1a4e4e7c23a1346d299368763f149de9c 12-Sep-2009 Dianne Hackborn <hackbod@google.com> Some optizations to wallpaper drawing/scrolling.

First, fix some issues with the final wallpaper bitmap
we use: ensure it is always 16bpp, and make sure dithering
of its bitmap is turned off. We take of dithering
when loading, to make sure we don't use it when drawing.

Also add new APIs to return the wallpaper with the equivalent
of Launcher's old FastBitmapDrawable. As doing this, also load
the default wallpaper the same way as custom ones, taking care to
resize it as needed at load time.

Finally implement a mechanism for the window manager to wait
for the wallpaper to redraw at its new position before returning
from the application's call to change the offset. This ensures
that the wallpaper better tracks the application. Note that there
is a timeout in this wait that is relatively short, and if it
expires we will run for a while without waiting.

Change-Id: Ife449437746da85958bd447e0a6cf3d2223b398c
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
ad013fae0db2864ad13631a44d26bacafc36f861 21-Aug-2009 Xavier Ducrohet <xav@android.com> Replace fullHeight support by fullSize (height and width)

This is useful for linearlayout in horizontal mode.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
d604ad1ad442790af53847d24060ecb097106d26 20-Aug-2009 Xavier Ducrohet <xav@android.com> Support full length rendering.

New rendering method in ILayoutBridge to specify whether the rendering
height should be the specified height or if it should be the height
required by the layout (specified height is always the minimum).
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
f7064e18fbafa6091a7e5f604978331135bcf4b6 18-Aug-2009 Xavier Ducrohet <xav@android.com> am ace6a5cf: Merge change 21408 into donut

Merge commit 'ace6a5cfc0d14a909b4b95bdfe16609188125baf' into eclair

* commit 'ace6a5cfc0d14a909b4b95bdfe16609188125baf':
Improved drawing/matrix support in layoutlib
1a8c1599de630ae4199b71cb3eca75d7db9c40d6 18-Aug-2009 Xavier Ducrohet <xav@android.com> am c1c432f5: Merge change 21241 into donut

Merge commit 'c1c432f57b782ed9d8d65be7ea1bee1e1d7d7839' into eclair

* commit 'c1c432f57b782ed9d8d65be7ea1bee1e1d7d7839':
Layoutlib now uses the dimen status_bar_height instead of hard-coded value
8df8b2b405c60cacf7a66c4e2ca078dd3d7ec7bd 18-Aug-2009 Dianne Hackborn <hackbod@google.com> Allow wallpapers to get touch events.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
2473ef5654b2a4b65132a35677c6ddfd481aab2c 15-Aug-2009 Xavier Ducrohet <xav@android.com> Improved drawing/matrix support in layoutlib

- Make the custom Canvas actually replace the original one so that it's used
even by parts of the framework that allocate their own temp Canvas object.
- Better support for Matrix: added support for mapPoint() and mapRect(), and invert()
- Implemented drawBitmap() with a Matrix, and made the paint object not NPE when null.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
09701011bc489f117d88f2c0ed406120eb4562ab 14-Aug-2009 Xavier Ducrohet <xav@android.com> Layoutlib now uses the dimen status_bar_height instead of hard-coded value

BUG: 2053956
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
72c82ab9923025a91bbabb32e56bfea27bfd083b 12-Aug-2009 Dianne Hackborn <hackbod@google.com> Report wallpaper offset to the wallpaper, use this in the image wallpaper.

Wallpapers can now be just the size of the screen, and get told when their
scroll position should change to do the updating on their own.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
c8a0a75e1c61d1ab24bd46a8243041c107e738ac 11-Aug-2009 Dianne Hackborn <hackbod@google.com> Implement support for scrolling a wallpaper.

This currently only works for a wallpaper that is larger than the
screen. Set the scroll position with the new wallpaper API. Right
now only does jump scrolls.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
a53b828635fce8b6b2d3e3377d74d72070056623 17-Jul-2009 Dianne Hackborn <hackbod@google.com> 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.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
83189c985a0e617ba7856343ea8b7080c37396a7 18-Jun-2009 Xavier Ducrohet <xav@android.com> Connect TabHost/TabWidget/FrameLayout in the layout editor.

Basically this does automatically what the developer has to do in his/her
activity so that the TabHost gets tabs that connects the TabWidgets and the
content of the FrameLayout.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
4df2423a947bcd3f024cc3d3a1a315a8dc428598 05-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@136594
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
076357b8567458d4b6dfdcf839ef751634cd2bfb 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
3dec7d563a2f3e1eb967ce2054a00b6620e3558c 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
da996f390e17e16f2dfa60e972e7ebc4f868f37e 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
b798689749c64baba81f02e10cf2157c747d6b46 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java