• Home
  • History
  • Annotate
  • only in /frameworks/base/tools/layoutlib/bridge/src/com/android/
History log of /frameworks/base/tools/layoutlib/bridge/src/com/android/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
01825b7aa3c864426c78c08c2f6004a8362c2b47 19-Feb-2014 Deepanshu Gupta <deepanshu@google.com> Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]

For these font families, text was always rendered as italic. This
changeset fixes the issue.

Bug: http://b.android.com/57221
Change-Id: Ic8a299bd1e555f5bb914cd3d2fe72917ec7f471a
(cherry picked from commit e327212adde1136807bbdf052e8cc3861f8a6aba)
ayoutlib/bridge/impl/FontLoader.java
35d56c0d67537e56fafebd8edf790026644fe8de 21-Jan-2014 Deepanshu Gupta <deepanshu@google.com> Optimize layout rendering in layoutlib

The height of a layout should be zero if it is assigned a layout_weight.
This way, the layout is measured only once and prevents spurious errors.

Bug: https://code.google.com/p/android/issues/detail?id=58398
Change-Id: If49a7480e5eb82cb86780e00f2f5b65ee053fc2a
ayoutlib/bridge/impl/RenderSessionImpl.java
d0581d271e814670d81a6550aa7b1e86864d5710 12-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Fix NPE in layoutlib. DO NOT MERGE

Change-Id: I36623304d83b344ea078044001577b8005a63c02
ayoutlib/bridge/impl/RenderAction.java
f4800bc3b122828d61a34caecbf782eee170ae59 08-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Fix text size in Fake Action Bar

The density multiplier was being applied twice to the title text in
the fake action bar.

Bug: 11436018
Change-Id: Id74c11037cb43d01f6cd79126623c84edfc37aaf
ayoutlib/bridge/bars/CustomBar.java
738ffdc9da55db3127146df1b3fcb15b5163a335 16-Oct-2013 Marco Nelissen <marcone@google.com> Add a method to set a list of uids for a wake lock

Cherrypicked from master.

b/9464621

Change-Id: Ia6a9d36d55129ae87d3ec070fbf10dc02f4b6cb4
ayoutlib/bridge/android/BridgePowerManager.java
6c3a638dd852634097447ca7fea9210539529110 18-Oct-2013 Deepanshu Gupta <deepanshu@google.com> Merge "Fix layoutlib for KK" into klp-dev
38d097b6d1102760cf25eee3d39cb687b8f7cf80 17-Oct-2013 Deepanshu Gupta <deepanshu@google.com> am 92a80b18: am 9b827a7d: am ec555902: Merge "Layoutlib: Update the wifi icon in the status bar." into jb-mr2-dev

* commit '92a80b1830082d109be4902c357424535305130d':
Layoutlib: Update the wifi icon in the status bar.
39e75835399f4d979cf82069dae2bd1ec496fb81 17-Oct-2013 Deepanshu Gupta <deepanshu@google.com> Fix layoutlib for KK

Fix a NPE, update the native methods for NinePatch and update an ICU
method to return the right value as required by DatePicker widget.

Bug: 11140701
Change-Id: Id92fc5359acf6dde1bcdbc781aaf637fdb6eecbf
ayoutlib/bridge/android/view/WindowManagerImpl.java
ayoutlib/bridge/impl/RenderAction.java
9cb5f5b5233f2331748d108d71f4b685762f32a7 13-Oct-2013 Deepanshu Gupta <deepanshu@google.com> Layoutlib: Update the wifi icon in the status bar.

Issue: https://code.google.com/p/android/issues/detail?id=60993

Change-Id: Ia43ed40b42c79f67dcd5809b827d4fecbc823c25
ayoutlib/bridge/bars/StatusBar.java
7e6f2ee4d22bc40c5aa1f01a6bacb91a34cab3c0 03-Oct-2013 Marco Nelissen <marcone@google.com> Fix layoutlib build

Change-Id: Ica9f506ae06311d9bcd98bc11e64a8699d4f88cb
ayoutlib/bridge/android/BridgePowerManager.java
79a1a7c367214e86d1ea18fe07bc4d2d5bc00f76 14-Sep-2013 Deepanshu Gupta <deepanshu@google.com> am 31207780: am 0ecfe381: am 54d88f76: Fix ClassCastException when rendering ListView

* commit '31207780338b97e396927701ca0da7a61d6d44b2':
Fix ClassCastException when rendering ListView
95d785346b4dae808a2d8f77356175e55a572d96 11-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix issue #10688644: Java crash in com.android.phone:

java.lang.SecurityException: Operation not allowed

There was a situation I wasn't taking into account -- components
declared by the system has a special ability to run in the processes
of other uids. This means that if that code loaded into another
process tries to do anything needing an app op verification, it will
fail, because it will say it is calling as the system package name but
it is not actually coming from the system uid.

To fix this, we add a new Context.getOpPackageName() to go along-side
getBasePackageName(). This is a special call for use by all app ops
verification, which will be initialized with either the base package
name, the actual package name, or now the default package name of the
process if we are creating a context for system code being loaded into
a non-system process.

I had to update all of the code doing app ops checks to switch to this
method to get the calling package name.

Also improve the security exception throw to have a more descriptive
error message.

Change-Id: Ic04f77b3938585b02fccabbc12d2f0dc62b9ef25
ayoutlib/bridge/android/BridgeContext.java
54d88f7678387a6eb871ec2dccd36af4ff35b1fe 11-Sep-2013 Deepanshu Gupta <deepanshu@google.com> Fix ClassCastException when rendering ListView

Bug: b.android.com/59300
Change-Id: Ia350adb3308daa8170bff755302760790163c811
ayoutlib/bridge/impl/binding/AdapterHelper.java
ayoutlib/bridge/impl/binding/AdapterItem.java
ayoutlib/bridge/impl/binding/BaseAdapter.java
ayoutlib/bridge/impl/binding/FakeAdapter.java
ayoutlib/bridge/impl/binding/FakeExpandableAdapter.java
01f8c0e27756599b2395514e27bd3b238326f220 08-Sep-2013 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Ifeac5d09a654ee1183ae26519c8b44f560afd636
ayoutlib/bridge/android/BridgeContentProvider.java
0851945a72e10e1d31aafa459f7e69cdf7087bee 05-Sep-2013 Deepanshu Gupta <deepanshu@google.com> am b50de495: am dd4efc22: am 3a762d8b: Merge "Fix text rendering" into jb-mr2-dev

* commit 'b50de4951aaea6d6f01432dc17b7c5de778a2e71':
Fix text rendering
b654556213513885ff5be05d4d2808e34d50233e 05-Sep-2013 Deepanshu Gupta <deepanshu@google.com> am 97c88368: am c78d173b: am 68411471: Merge "Fix layout rendering for RTL locales" into jb-mr2-dev

* commit '97c88368e0036665507c8cd84c71d26953784c85':
Fix layout rendering for RTL locales
0d9c922c9614147d1277cb36cfb7296774415d15 12-Jul-2013 Deepanshu Gupta <deepanshu@google.com> Fix text rendering

There are still some errors
1. Little vertical clippping for extra tall glyphs.
2. Breaking into scripts isn't perfect which results in incorrect layout
of text.

Change-Id: I54de3c05eca5e8affb1135c120eea24c3afe8a47
ayoutlib/bridge/impl/FontLoader.java
88db0ee2afbae38b53a0527506f0890914a7f115 20-Jun-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: I1ed0d516ab64120a0abca413ba678036661508f8
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/impl/RenderAction.java
ayoutlib/bridge/impl/RenderSessionImpl.java
98d6212327d1c483894b642d5e24c3aac9fca9cf 24-Aug-2013 Jeff Sharkey <jsharkey@android.com> Merge "Add CancellationSignal support to file operations." into klp-dev
bd3b902567b09379e1b62c60b3319ad82102efad 21-Aug-2013 Jeff Sharkey <jsharkey@android.com> Add CancellationSignal support to file operations.

Since ContentProvider file operations can end up doing substantial
network I/O before returning the file, allow clients to cancel their
file requests with CancellationSignal.

Ideally this would only be needed for openFile(), but ContentResolver
heavily relies on openAssetFile() and openTypedAssetFile() for common
cases.

Also improve documentation to mention reliable ParcelFileDescriptors
and encourage developers to move away from "rw" combination modes,
since they restrict provider flexibility. Mention more about places
where pipes or socket pairs could be returned.

Improve DocumentsContract documentation.

Bug: 10329944
Change-Id: I49b2825ea433eb051624c4da3b77612fe3ffc99c
ayoutlib/bridge/android/BridgeContentProvider.java
9e104087978553f43fcb7767ff2ee265dbd15d2c 23-Aug-2013 satok <satok@google.com> DO NOT MERGE. Fix test breakage

Change-Id: I0b2b7ce4b9f50910b4795cb480aa86a662b16f7d
ayoutlib/bridge/android/BridgeIInputMethodManager.java
b9be11c370712cfc4d54aef9202e61092b96960d 12-Aug-2013 Jeff Sharkey <jsharkey@android.com> Bring along BridgeContext for the ride.

Change-Id: Ic11c0df447c82be3922d529f18a290cfdfec6b05
ayoutlib/bridge/android/BridgeContext.java
b3c21ac7c661022534135bf688a75ec35fe3a8f2 07-Aug-2013 Satoshi Kataoka <satok@google.com> Reduce the transaction fee of getEnabledInputMethodSubtypeList

Bug: 8467480
Change-Id: If18cce8fbe567df51f29adcdcedff3f743460b8b
ayoutlib/bridge/android/BridgeIInputMethodManager.java
903709d738a92de467e22f3923d2a7e4e92e9148 19-Jul-2013 Deepanshu Gupta <deepanshu@google.com> am 388f85eb: am a2f41b23: am bf8be2ee: Merge "Add orientation to configuration for layoutlib." into jb-mr2-dev

* commit '388f85eb451bd0b61c8f48b500de5db6bca941f1':
Add orientation to configuration for layoutlib.
d97d60c0fa4613a47d591d45736299702be1cc7a 13-Jul-2013 Deepanshu Gupta <deepanshu@google.com> Add orientation to configuration for layoutlib.

Update the configuration with the device orientation before rendering.

Change-Id: Icd40901204fd13f90b18353e53a15e25e5b2176c
ayoutlib/bridge/impl/RenderAction.java
144a6ae7e6e751388cd322bac70d6bbd950468d5 24-Jun-2013 Craig Mautner <cmautner@google.com> Fix build.

Change-Id: Icdfc6bcbe8603cf9bd3f8982a595336c0407e7d6
ayoutlib/bridge/android/BridgeContext.java
80f00c1f2375796dab09bc4ed5b7631c62f7e158 13-Jun-2013 John Spurlock <jspurlock@google.com> Remove concept of system bar from window manager.

It was already hardcoded to false, this change removes the dead code.

Change-Id: I5e543344e60f69cb9882a70ba29f7c09404ad9fc
ayoutlib/bridge/impl/RenderSessionImpl.java
3d05476b1049bc35727a5432de7af99dd8e0a8c2 24-May-2013 Deepanshu Gupta <deepanshu@google.com> am fc691f9d: am 417e512b: Merge "Add missing native methods." into jb-mr2-dev

* commit 'fc691f9df0392a661c4d1708c905f82d50c17f27':
Add missing native methods.
279c00e8e0abb20f7e10577c77937c058da080bf 24-May-2013 Deepanshu Gupta <deepanshu@google.com> Add missing native methods.

Change-Id: I7b34e2ec0164520efc658053a80f307791a992b1
ayoutlib/bridge/Bridge.java
19849d3c9a9def039f25323f95f98902e3feac60 21-May-2013 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I3dc503a3cd30276ac10582db44732d96b68230ee
ayoutlib/bridge/android/BridgePowerManager.java
f9e989d5f09e72f5c9a59d713521f37d3fdd93dd 05-Apr-2013 Jeff Brown <jeffbrown@google.com> Queues, queues, queues and input.

Redesigned how ViewRootImpl delivers input events to views,
the IME and to native activities to fix several issues.

The prior change to make IME input event delegation use
InputChannels failed to take into account that InputMethodManager
is a singleton attached to the main looper whereas UI may be
attached to any looper. Consequently interactions with the
InputChannel might occur on the wrong thread. Fixed this
problem by checking the current thread and posting input
events or callbacks to the correct looper when necessary.

NativeActivity has also been broken for a while because the
default event handling logic for joysticks and touch navigation
was unable to dispatch events back into the native activity.
In particular, this meant that DPad synthesis from touch navigation
would not work in any native activity. The plan is to fix
this problem by passing all events through ViewRootImpl as usual
then forwarding them to native activity as needed. This should
greatly simplify IME pre-dispatch and system key handling
and make everything more robust overall.

Fixed issues related to when input events are synthesized.
In particular, added a more robust mechanism to ensure that
synthetic events are canceled appropriately when we discover
that events are no longer being resynthesized (because the
application or IME is handling or dropping them).

The new design is structured as a pipeline with a chain of
responsibility consisting of InputStage objects. Each InputStage
is responsible for some part of handling each input event
such as dispatching to the view hierarchy or to the IME.
As a stage processes an input event, it has the option of
finishing the event, forwarding the event to the next stage
or handling the event asynchronously. Some queueing logic
takes care to ensure that events are forwarded downstream in
the correct order even if they are handled out of order
by a given stage.

Cleaned up the InputMethodManager singleton initialization logic
to make it clearer that it must be attached to the main looper.
We don't actually need to pass this looper around.

Deleted the LatencyTimer class since no one uses it and we have
better ways of measuring latency these days using systrace.

Added a hidden helper to Looper to determine whether the current
thread is the indicated Looper thread.

Note: NativeActivity's IME dispatch is broken by this patch.
This will be fixed later in another patch.

Bug: 8473020
Change-Id: Iac2a1277545195a7a0137bbbdf04514c29165c60
ayoutlib/bridge/impl/RenderAction.java
4ec6cc51087f310acf6f933ae2b69f1520b78453 05-Mar-2013 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Iaa70b05a3cfd372518ec35aa8bcea2f9d78b8292
ayoutlib/bridge/android/BridgeWindowSession.java
c4aad01cbbb69c916ef323693e1fd0560b0eccba 23-Feb-2013 Dianne Hackborn <hackbod@google.com> Formalize overscan metrics.

The window manager now maintains and reports a new formal
"overscan insets" for each window, much like the existing
content and visible insets. This is used to correctly
position the various UI elements in the various combination
of layout options. In particular, this allows us to have
an activity that is using fitSystemWindows to have the content
of its UI extend out to the visible content part of the screen
while still positioning its fixed UI elements inside the
standard content rect (and the entire window extending all
the way into the overscan area to fill the screen as desired).

Okay, maybe that is not written so clearly. Well, it made
my head hurt too, so suffer!

The key thing is that windows now need to know about three
rectangles: the overall rectangle of the window, the rectangle
inside of the overscan area, and the rectangle inside of the
content area. The FLAG_LAYOUT_IN_OVERSCAN option controls
whether the second rectangle is pushed out to fill the entire
overscan area.

Also did some improvements to debug dumping in the window
manager.

Change-Id: Ib2368c4aff5709d00662c799507c37b6826929fd
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/android/BridgeWindowSession.java
ef04a9b7e1dee38f191a8f70be89a1542ccbe367 21-Feb-2013 Jim Miller <jaggies@google.com> Fix the build.

Change-Id: If53878937fe1ca01ad8db9f9d201d0f9aaaec81b
ayoutlib/bridge/android/BridgeContext.java
961321fe4ed4431a6362d729d9e4ea26bdecde61 06-Feb-2013 Dianne Hackborn <hackbod@google.com> App ops: add op for writing settings.

Also fix a build.

And fix a bug that I think was introduced in the multi-user work
that removed the permission check for writing to settings...!

Change-Id: I5945682faa789ffc78fd3546c0df7d03693f106d
ayoutlib/bridge/android/BridgeContext.java
d8e1dbb6bc1fbaf4f2e38c3ba92ced94270deaac 18-Jan-2013 Dianne Hackborn <hackbod@google.com> Rework ParceledListSlice to be much easier to use.

Take advantage of this to return better information about
packages filtered by permissions -- include the permissions
they have in the requested array.

Also fix issue #8026793 (Contact picture shows default pic
while searching for a contact in qsb) by using the base
package name of the Context when reporting the app name
of an operation. Otherwise you could make a resource-only
context for another application and do calls through that
and get reported as the wrong app.

Change-Id: I5e0488bf773acea5a3d22f245641828e1a106fb8
ayoutlib/bridge/android/BridgeContext.java
35654b61e8fe7bc85afcb076ddbb590d51c5865f 15-Jan-2013 Dianne Hackborn <hackbod@google.com> More work on App Ops service.

Implemented reading and writing state to retain information
across boots, API to retrieve state from it, improved location
manager interaction to monitor both coarse and fine access
and only note operations when location data is being delivered
back to app (not when it is just registering to get the data at
some time in the future).

Also implement tracking of read/write ops on contacts and the
call log. This involved tweaking the content provider protocol
to pass over the name of the calling package, and some
infrastructure in the ContentProvider transport to note incoming
calls with the app ops service. The contacts provider and call
log provider turn this on for themselves.

This also implements some of the mechanics of being able to ignore
incoming provider calls... all that is left are some new APIs for
the real content provider implementation to be involved with
providing the correct behavior for query() (return an empty
cursor with the right columns) and insert() (need to figure out
what URI to return).

Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
ayoutlib/bridge/android/BridgeContentProvider.java
c48b0b940d632b9862ff6aa32665e37fe9e50845 18-Oct-2012 Xavier Ducrohet <xav@android.com> Layoutlib: Read and close XML files as soon as possible.

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.

Change-Id: Iabe27989dc616ec9e7de88e52b1ec3af9f007f7c
ayoutlib/bridge/impl/ParserFactory.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/FakeActionBar.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/PhoneSystemBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/bars/TabletSystemBar.java
ayoutlib/bridge/bars/TitleBar.java
ayoutlib/bridge/impl/RenderAction.java
ayoutlib/bridge/impl/RenderDrawable.java
ayoutlib/bridge/impl/RenderSessionImpl.java
6dfd0b39a63559999a769f93d5cdb48abe675344 15-Oct-2012 Xavier Ducrohet <xav@android.com> Fix SDK layout rendering in Eclipse.

Change-Id: I0e9e85632012c0929b987ee9d0ccf7c25eece322
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeWindowManager.java
ayoutlib/bridge/android/view/WindowManagerImpl.java
ayoutlib/bridge/impl/RenderSessionImpl.java
33877e15b8bfc50bd874027689a4794aa93b923d 07-Oct-2012 Craig Mautner <cmautner@google.com> Merge "Adds showWhenLocked attribute to Activities." into jb-mr1-dev
5962b12bedc4a1d0354816c1cd6b06ba04f6d807 05-Oct-2012 Craig Mautner <cmautner@google.com> Adds showWhenLocked attribute to Activities.

The new attribute allows an Activity such as the alarm to appear
on all users screens.

Bug: 7213805 fixed.
Change-Id: If7866b13d88c04af07debc69e0e875d0adc6050a
ayoutlib/bridge/android/BridgeWindowManager.java
c38c9be031ddad5cf551b55458889f11e01dc5b2 04-Oct-2012 Jeff Brown <jeffbrown@google.com> Coordinate screen on with the window manager.

Bug: 7267457
Change-Id: Ic2c322253639e1f0b2e4e72a7b145025d0240f93
ayoutlib/bridge/android/BridgeWindowManager.java
f752202bee88e31ce765483ba2efa6999ae9c9ad 04-Oct-2012 Adam Cohen <adamcohen@google.com> Plumbing to allow keyguard to be shown with user switcher (issue 7175023)

-> Also reduced calls to lockNow, and moved this call in ActivityManagerService

Change-Id: I9ba34ca902f7c0f71fa4ec302104688ca8d11f55
ayoutlib/bridge/android/BridgeWindowManager.java
c428aae6429c3fd5e2037c3793af399d9f6e23bf 04-Oct-2012 Dianne Hackborn <hackbod@google.com> Fix issue #7267494, issue #7212347

7267494 Calendar is not syncing
Check for whether a content provider is dead before returning
it. This is kind-of a band-aid, but probably the right thing
to do; I'm just not sure exactly the full details of why this
problem is happening. Hopefully this "fixes" it, though I don't
have a way to repro to tell.

7212347 System power off dialog is only visible to user 0
Make it visible. Also turn on some battery debugging stuff and
clean it up so we can just keep it.

Change-Id: I5add25bf2a763c8dfe1df23bc5c753a9ea5d157a
ayoutlib/bridge/android/BridgePowerManager.java
1e3b98d47df596d0c4eadbdf60143709f8465b28 01-Oct-2012 Jeff Brown <jeffbrown@google.com> New internal API to eliminate poke locks.

Added a new WindowManager.LayoutParams inputFeatures flag
to disable automatic user activity behavior when an input
event is sent to a window.

Added a new WindowManager.LayoutParams field userActivityTimeout.

Bug: 7165399
Change-Id: I204eafa37ef26aacc2c52a1ba1ecce1eebb0e0d9
ayoutlib/bridge/android/BridgePowerManager.java
edce6a797878792de2b0bde4360f3171b9e9d9d2 01-Oct-2012 Jeff Brown <jeffbrown@google.com> Remove clearUserActivityTimeout().

This function is not implemented and not needed.

Bug: 7165399
Change-Id: Ib1c50fabad6292ccf670404ba70aeb1242c4614d
ayoutlib/bridge/android/BridgePowerManager.java
120664816a9bf325b618d8dd40febae2e3636ec8 29-Sep-2012 Jeff Brown <jeffbrown@google.com> Get rid of preventScreenOn().

Bug: 7165399
Change-Id: I1968265ecd74fff4d85efd2ca03b1983425ea518
ayoutlib/bridge/android/BridgePowerManager.java
62c82e4d92cc0b856059f905d81885f7808a0e7d 26-Sep-2012 Jeff Brown <jeffbrown@google.com> Make DreamManagerService more robust.

Clearly isolated the DreamManagerService and DreamController
responsibilities. DreamManagerService contains just enough logic to
manage the global synchronous behaviors. All of the asynchronous
behaviors are in DreamController.

Added a new PowerManager function called nap() to request the device
to start napping. If it is a good time to nap, then the
PowerManagerService will call startDream() on the DreamManagerService
to start dreaming.

Fixed a possible multi-user issue by explicitly tracking for
which user a dream service is being started and stopping dreams
when the current user changes. The user id is also passed to
bindService() to ensure that the dream has the right environment.

Fix interactions with docks and the UI mode manager. It is
important that we always send the ACTION_DOCK_EVENT broadcast
to the system so that it can configure audio routing and the like.
When docked, the UI mode manager starts a dock app if there is
one, otherwise it starts a dream.

This change resolves issues with dreams started for reasons other
than a user activity timeout.

Bug: 7204211
Change-Id: I3193cc8190982c0836319176fa2e9c4dcad9c01f
ayoutlib/bridge/android/BridgePowerManager.java
6d51571835737c7502a2e111ee9dc2527ebad984 21-Sep-2012 Jeff Sharkey <jsharkey@android.com> Allow acquiring ContentProviders across users.

Otherwise services like SystemUI will always open content://-style
Uris as USER_OWNER. Surfaces through createPackageContextAsUser()
which points all ContentResolver operations towards a given user.

Start using in RemoteViews, so that Notifications correctly resolve
image Uris to the sending user. Also add user support for "content"
shell tool.

Bug: 7202982
Change-Id: I8cb7fb8a812e825bb0b5833799dba87055ff8699
ayoutlib/bridge/android/BridgeContext.java
9d9ece3c1e16001b63244459cdf4b428f4272d2e 11-Sep-2012 Dianne Hackborn <hackbod@google.com> Animations for user switching.

The window manager now has a facility to provide a full-screen
animation, which the activity manager uses every time a user
switch happens.

The current animation is just a simple dumb slide until we get
a design from UX.

Also some cleanup: moved the portrait task animations to the
default config so we always have an animation for them, and finally
got the java symbol stuff out of public.xml.

Change-Id: I726f77422b2ef5f2d98f961f8da003e045f0ebe8
ayoutlib/bridge/android/BridgeWindowManager.java
4b15ab66a064ba4fae3bb1ff474d8b5fc38e5490 07-Sep-2012 Svetoslav Ganov <svetoslavganov@google.com> Fixing the build

Change-Id: I123b128f5d9e50653d8d4ed73ea07920b370b0fb
ayoutlib/bridge/android/BridgeWindowManager.java
1cf70bbf96930662cab0e699d70b62865766ff52 06-Aug-2012 Svetoslav Ganov <svetoslavganov@google.com> Screen magnification - feature - framework.

This change is the initial check in of the screen magnification
feature. This feature enables magnification of the screen via
global gestures (assuming it has been enabled from settings)
to allow a low vision user to efficiently use an Android device.

Interaction model:

1. Triple tap toggles permanent screen magnification which is magnifying
the area around the location of the triple tap. One can think of the
location of the triple tap as the center of the magnified viewport.
For example, a triple tap when not magnified would magnify the screen
and leave it in a magnified state. A triple tapping when magnified would
clear magnification and leave the screen in a not magnified state.

2. Triple tap and hold would magnify the screen if not magnified and enable
viewport dragging mode until the finger goes up. One can think of this
mode as a way to move the magnified viewport since the area around the
moving finger will be magnified to fit the screen. For example, if the
screen was not magnified and the user triple taps and holds the screen
would magnify and the viewport will follow the user's finger. When the
finger goes up the screen will clear zoom out. If the same user interaction
is performed when the screen is magnified, the viewport movement will
be the same but when the finger goes up the screen will stay magnified.
In other words, the initial magnified state is sticky.

3. Pinching with any number of additional fingers when viewport dragging
is enabled, i.e. the user triple tapped and holds, would adjust the
magnification scale which will become the current default magnification
scale. The next time the user magnifies the same magnification scale
would be used.

4. When in a permanent magnified state the user can use two or more fingers
to pan the viewport. Note that in this mode the content is panned as
opposed to the viewport dragging mode in which the viewport is moved.

5. When in a permanent magnified state the user can use three or more
fingers to change the magnification scale which will become the current
default magnification scale. The next time the user magnifies the same
magnification scale would be used.

6. The magnification scale will be persisted in settings and in the cloud.

Note: Since two fingers are used to pan the content in a permanently magnified
state no other two finger gestures in touch exploration or applications
will work unless the uses zooms out to normal state where all gestures
works as expected. This is an intentional tradeoff to allow efficient
panning since in a permanently magnified state this would be the dominant
action to be performed.

Design:

1. The window manager exposes APIs for setting accessibility transformation
which is a scale and offsets for X and Y axis. The window manager queries
the window policy for which windows will not be magnified. For example,
the IME windows and the navigation bar are not magnified including windows
that are attached to them.

2. The accessibility features such a screen magnification and touch
exploration are now impemented as a sequence of transformations on the
event stream. The accessibility manager service may request each
of these features or both. The behavior of the features is not changed
based on the fact that another one is enabled.

3. The screen magnifier keeps a viewport of the content that is magnified
which is surrounded by a glow in a magnified state. Interactions outside
of the viewport are delegated directly to the application without
interpretation. For example, a triple tap on the letter 'a' of the IME
would type three letters instead of toggling magnified state. The viewport
is updated on screen rotation and on window transitions. For example,
when the IME pops up the viewport shrinks.

4. The glow around the viewport is implemented as a special type of window
that does not take input focus, cannot be touched, is laid out in the
screen coordiates with width and height matching these of the screen.
When the magnified region changes the root view of the window draws the
hightlight but the size of the window does not change - unless a rotation
happens. All changes in the viewport size or showing or hiding it are
animated.

5. The viewport is encapsulated in a class that knows how to show,
hide, and resize the viewport - potentially animating that.
This class uses the new animation framework for animations.

6. The magnification is handled by a magnification controller that
keeps track of the current trnasformation to be applied to the screen
content and the desired such. If these two are not the same it is
responsibility of the magnification controller to reconcile them by
potentially animating the transition from one to the other.

7. A dipslay content observer wathces for winodw transitions, screen
rotations, and when a rectange on the screen has been reqeusted. This
class is responsible for handling interesting state changes such
as changing the viewport bounds on IME pop up or screen rotation,
panning the content to make a requested rectangle visible on the
screen, etc.

8. To implement viewport updates the window manger was updated with APIs
to watch for window transitions and when a rectangle has been requested
on the screen. These APIs are protected by a signature level permission.
Also a parcelable and poolable window info class has been added with
APIs for getting the window info given the window token. This enables
getting some useful information about a window. There APIs are also
signature protected.

bug:6795382

Change-Id: Iec93da8bf6376beebbd4f5167ab7723dc7d9bd00
ayoutlib/bridge/android/BridgeWindowManager.java
ayoutlib/bridge/android/BridgeWindowSession.java
20e809870d8ac1e5b848f2daf51b2272ef89bdfc 01-Sep-2012 Dianne Hackborn <hackbod@google.com> Add registering for explicit users.

New API to register as an explicit user, which allows you to
also select ALL to see broadcasts for all users.

New BroadcastReceiver API to find out which user the broadcast
was sent to.

Use this in app widget service to handle per-user package broadcasts
and boot completed broadcasts correctly.

Change-Id: Ibbe28993bd4aa93900c79e412026c27863019eb8
ayoutlib/bridge/android/BridgeContext.java
a492c3a7b2c18426fd0cb4d017eacbc368195dc5 24-Aug-2012 Jeff Brown <jeffbrown@google.com> Initial draft of high-level multi-display APIs.

This patch introduces the ability to create a Context that
is bound to a Display. The context gets its configuration and
metrics from that display and is able to provide a WindowManager
that is bound to the display.

To make it easier to use, we also add a new kind of Dialog
called a Presentation. Presentation takes care of setting
up the context as needed and watches for significant changes
in the display configuration. If the display is removed,
then the presentation simply dismisses itself.

Change-Id: Idc54b4ec84b1ff91505cfb78910cf8cd09696d7d
ayoutlib/bridge/android/BridgeContext.java
5ac72a29593ab9a20337a2225df52bdf4754be02 30-Aug-2012 Dianne Hackborn <hackbod@google.com> Improve multi-user broadcasts.

You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
ayoutlib/bridge/android/BridgeContext.java
7767eac3232ba2fb9828766813cdb481d6a97584 24-Aug-2012 Dianne Hackborn <hackbod@google.com> Keep track of whether an app is installed for each user.

This add a new per-user state for an app, indicating whether
it is installed for that user.

All system apps are always installed for all users (we still
use disable to "uninstall" them).

Now when you call into the package manager to install an app,
it will only install the app for that user unless you supply
a flag saying to install for all users. Only being installed
for the user is just the normal install state, but all other
users have marked in their state for that app that it is not
installed.

When you call the package manager APIs for information about
apps, uninstalled apps are treated as really being not visible
(somewhat more-so than disabled apps), unless you use the
GET_UNINSTALLED_PACKAGES flag.

If another user calls to install an app that is already installed,
just not for them, then the normal install process takes place
but in addition that user's installed state is toggled on.

The package manager will not send PACKAGE_ADDED, PACKAGE_REMOVED,
PACKAGE_REPLACED etc broadcasts to users who don't have a package
installed or not being involved in a change in the install state.
There are a few things that are not quite right with this -- for
example if you go through a full install (with a new apk) of an
app for one user who doesn't have it already installed, you will
still get the PACKAGED_REPLACED messages even though this is
technically the first install for your user. I'm not sure how
much of an issue this is.

When you call the existing API to uninstall an app, this toggles
the installed state of the app for that user to be off. Only if
that is the last user user that has the app uinstalled will it
actually be removed from the device. Again there is a new flag
you can pass in to force the app to be uninstalled for all users.

Also fixed issues with cleaning external storage of apps, which
was not dealing with multiple users. We now keep track of cleaning
each user for each package.

Change-Id: I00e66452b149defc08c5e0183fa673f532465ed5
ayoutlib/bridge/android/BridgeContext.java
98365d7663cbd82979a5700faf0050220b01084d 20-Aug-2012 Jeff Brown <jeffbrown@google.com> Refactor for multi-display support.

Split WindowManagerImpl into two parts, the WindowManager
interface implementation remains where it is but the global
communications with the window manager are now handled by
the WindowManagerGlobal class. This change greatly simplifies
the challenge of having separate WindowManager instances
for each Context.

Removed WindowManagerImpl.getDefault(). This represents the
bulk of this change. Most of the usages of this method were
either to perform global functions (now handled by WindowManagerGlobal)
or to obtain the default display (now handled by DisplayManager).

Explicitly associate each new window with a display and make
the Display object available to the View hierarchy.

Add stubs for some new display manager API features.

Start to split apart the concepts of display id and layer stack.
since they operate at different layers of abstraction.
While it's true that each logical display uniquely corresponds to a
surface flinger layer stack, it is not necessarily the case that
they must use the same ids. Added Display.getLayerStack()
and started using it in places where it was relatively easy to do.

Change-Id: I29ed909114dec86807c4d3a5059c3fa0358bea61
ayoutlib/bridge/android/BridgeContext.java
d2ae85d41ec1651dd1bf4c33fe31833ba5c5cff5 17-Aug-2012 Michael Jurka <mikejurka@google.com> Merge "Adding a thumbnail scale down animation" into jb-mr1-dev
79af1dd54c16cde063152922b42c96d72ae9eca8 17-Aug-2012 Dianne Hackborn <hackbod@google.com> Switch public APIs to use new UserHandle class for identifying users.

Gets rid of "yet another integer" confusion.

Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
ayoutlib/bridge/android/BridgeContext.java
832cb229cd748505c90f74ae8154fc3557d61a73 13-Apr-2012 Michael Jurka <mikejurka@google.com> Adding a thumbnail scale down animation

Recents animation will temporarily look a bit
wrong, but a subsequent change will fix this.
ayoutlib/bridge/android/BridgeWindowManager.java
9630704ed3b265f008a8f64ec60a33cf9dcd3345 28-Jul-2012 Jeff Brown <jeffbrown@google.com> Power manager rewrite.

The major goal of this rewrite is to make it easier to implement
power management policies correctly. According, the new
implementation primarily uses state-based rather than event-based
triggers for applying changes to the current power state.

For example, when an application requests that the proximity
sensor be used to manage the screen state (by way of a wake lock),
the power manager makes note of the fact that the set of
wake locks changed. Then it executes a common update function
that recalculates the entire state, first looking at wake locks,
then considering user activity, and eventually determining whether
the screen should be turned on or off. At this point it may
make a request to a component called the DisplayPowerController
to asynchronously update the display's powe state. Likewise,
DisplayPowerController makes note of the updated power request
and schedules its own update function to figure out what needs
to be changed.

The big benefit of this approach is that it's easy to mutate
multiple properties of the power state simultaneously then
apply their joint effects together all at once. Transitions
between states are detected and resolved by the update in
a consistent manner.

The new power manager service has is implemented as a set of
loosely coupled components. For the most part, information
only flows one way through these components (by issuing a
request to that component) although some components support
sending a message back to indicate when the work has been
completed. For example, the DisplayPowerController posts
a callback runnable asynchronously to tell the PowerManagerService
when the display is ready. An important feature of this
approach is that each component neatly encapsulates its
state and maintains its own invariants. Moreover, we do
not need to worry about deadlocks or awkward mutual exclusion
semantics because most of the requests are asynchronous.

The benefits of this design are especially apparent in
the implementation of the screen on / off and brightness
control animations which are able to take advantage of
framework features like properties, ObjectAnimator
and Choreographer.

The screen on / off animation is now the responsibility
of the power manager (instead of surface flinger). This change
makes it much easier to ensure that the animation is properly
coordinated with other power state changes and eliminates
the cause of race conditions in the older implementation.

The because of the userActivity() function has been changed
so that it never wakes the device from sleep. This change
removes ambiguity around forcing or disabling user activity
for various purposes. To wake the device, use wakeUp().
To put it to sleep, use goToSleep(). Simple.

The power manager service interface and API has been significantly
simplified and consolidated. Also fixed some inconsistencies
related to how the minimum and maximum screen brightness setting
was presented in brightness control widgets and enforced behind
the scenes.

At present the following features are implemented:

- Wake locks.
- User activity.
- Wake up / go to sleep.
- Power state broadcasts.
- Battery stats and event log notifications.
- Dreams.
- Proximity screen off.
- Animated screen on / off transitions.
- Auto-dimming.
- Auto-brightness control for the screen backlight with
different timeouts for ramping up versus ramping down.
- Auto-on when plugged or unplugged.
- Stay on when plugged.
- Device administration maximum user activity timeout.
- Application controlled brightness via window manager.

The following features are not yet implemented:

- Reduced user activity timeout for the key guard.
- Reduced user activity timeout for the phone application.
- Coordinating screen on barriers with the window manager.
- Preventing auto-rotation during power state changes.
- Auto-brightness adjustment setting (feature was disabled
in previous version of the power manager service pending
an improved UI design so leaving it out for now).
- Interpolated brightness control (a proposed new scheme
for more compactly specifying auto-brightness levels
in config.xml).
- Button / keyboard backlight control.
- Change window manager to associated WorkSource with
KEEP_SCREEN_ON_FLAG wake lock instead of talking
directly to the battery stats service.
- Optionally support animating screen brightness when
turning on/off instead of playing electron beam animation
(config_animateScreenLights).

Change-Id: I1d7a52e98f0449f76d70bf421f6a7f245957d1d7
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgePowerManager.java
756220bd1912535840388a6743830d2e59ad4964 15-Aug-2012 Dianne Hackborn <hackbod@google.com> Add API to create new contexts with custom configurations.

This allows you to, say, make a Context whose configuration
is set to a different density than the actual density of the device.

The main API is Context.createConfigurationContext(). There is
also a new API on ContextThemeWrapper that allows you to apply
an override context before its resources are retrieved, which
addresses some feature requests from developers to be able to
customize the context their app is running in.

Change-Id: I88364986660088521e24b567e2fda22fb7042819
ayoutlib/bridge/android/BridgeContext.java
7d19e0242faac8017033dabb872cdf1542fa184c 08-Aug-2012 Dianne Hackborn <hackbod@google.com> More mult-user API work.

- You can now use android:singleUser with receivers and providers.
- New API to send ordered broadcasts as a user.
- New Process.myUserHandle() API.

For now I am trying out "user handle" as the name for the numbers
representing users.

Change-Id: I754c713ab172494bb4251bc7a37a17324a2e235e
ayoutlib/bridge/android/BridgeContext.java
758143ecfedbe08cc6c4fed0ad8ad7a854194ca4 07-Aug-2012 Svetoslav Ganov <svetoslavganov@google.com> Window position not reported if the window is not moved.

1.If a window is shown but never moved the window window
is never notified for its current location. Therefore,
accessibility nodes do not contain correct bounds in
screen coordinates.

bug:6926295

Change-Id: I7df18b095d33ecafffced75aba9e4f4693b0c393
ayoutlib/bridge/android/BridgeWindow.java
b49a065d9904567624a088857ecd1626fad91511 04-Aug-2012 Craig Mautner <cmautner@google.com> Fix build with density methods.

Change-Id: I95c0a4f12db40f200a3a004394763beaef904232
ayoutlib/bridge/android/BridgeWindowManager.java
437a0fbd57662e1d9d260da6f62ff83da2769a7e 02-Aug-2012 Craig Mautner <cmautner@google.com> Merge "Introduce multiple displays with DisplayContent." into jb-mr1-dev
59c009776dae5ccbdfb93d7151ff2065ca049dc3 30-Jul-2012 Craig Mautner <cmautner@google.com> Introduce multiple displays with DisplayContent.

Fix a couple of bugs that turned up.
Remove touch/focus from display. Add iterators for access.
Respond to comments. Remove TODOs, and some deviceId parameters.

Change-Id: Idcdb4f1979aa7b14634d450fd0333d6eff26994d
ayoutlib/bridge/android/BridgeWindowManager.java
908aecc3a63c5520d5b11da14a9383f885b7d126 01-Aug-2012 Dianne Hackborn <hackbod@google.com> Start moving away from DisplayMetrics.DENSITY_DEVICE.

This puts in most of the infrastructure needed to allow us to
switch between different densities at run time. The main remaining
uses of the global are to initialize the Bitmap object (not sure
what to do about that since it doesn't have anything passed in
the constructor to get this information from), and being able to
load drawables if we need a different density than what was preloaded
by zygote.

Change-Id: Ifdbfd6b7a5c59e6aa22e63b95b78d96af3d96848
ayoutlib/bridge/impl/RenderAction.java
39df578acddb739d7608e458533904bf5814c0da 27-Jul-2012 Craig Mautner <cmautner@google.com> Fix build.

Change-Id: I52bbebae38912a4fb71c96174b3d4d8eb6be10c1
ayoutlib/bridge/android/BridgeWindowSession.java
aa871b0ff0fb38112a1693e80e1146cecc5db21d 26-Jul-2012 Jeff Brown <jeffbrown@google.com> Fix build.

Change-Id: Ife2fd58447205407e41ce3d27e28a705b744bede
ayoutlib/bridge/android/BridgeWindowManager.java
fa25bf5382467b1018bd9af7f1cb30a23d7d59f7 24-Jul-2012 Jeff Brown <jeffbrown@google.com> Add display manager skeleton.

The purpose of this change is to remove direct reliance on
SurfaceFlinger for describing the size and characteristics of
displays.

This patch also starts to make a distinction between logical displays
and physical display devices. Currently, the window manager owns
the concept of a logical display whereas the new display
manager owns the concept of a physical display device.

Change-Id: I7e0761f83f033be6c06fd1041280c21500bcabc0
ayoutlib/bridge/android/BridgeWindowManager.java
c9c9a48e7bafae63cb35a9aa69255e80aba83988 16-Jul-2012 Svetoslav Ganov <svetoslavganov@google.com> Removing a workaround for incorrect window position on window move.

1. The window manager was not notifying a window when the latter
has been moved. This was causing incorrect coordinates of the
nodes reported to accessibility services. To workaround that
we have carried the correct window location when making a
call from the accessibility layer into a window. Now the
window manager notifies the window when it is moved and the
workaround is no longer needed. This change takes it out.

2. The left and right in the attach info were not updated properly
after a report that the window has moved.

3. The accessibility manager service was calling directly methods
on the window manager service without going through the interface
of the latter. This leads to unnecessary coupling and in the
long rung increases system complexity and reduces maintability.

bug:6623031

Change-Id: Iacb734b1bf337a47fad02c827ece45bb2f53a79d
ayoutlib/bridge/android/BridgeWindowManager.java
105b78bb310a75dc44e0baa49fe7d20341cc0f15 11-Jul-2012 Craig Mautner <cmautner@google.com> Add missing interface method.

Fix broken build.

Change-Id: I6644df218e11a35330a985bdcb9ace33723330f5
ayoutlib/bridge/android/BridgeWindow.java
01b6c755dbcf24e71192dc44757e2eea2a426091 10-Jul-2012 Xavier Ducrohet <xav@android.com> Replace LruCache implementation for layoutlib.

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.

Change-Id: Ib27b0419f9d0e6ba4d4abb26b2ccd968af59eba8
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
a4b7f2f75e7803193429ec1179fb5e2eb1c6fbda 21-May-2012 Dianne Hackborn <hackbod@google.com> Use two fingers to work some magic...

Change-Id: Ibcb3dbd3d158c22da8277e544d81fb47eadccd49
ayoutlib/bridge/android/BridgeWindowSession.java
4d7f301f94b9d2dda0ef109e9991ad2d77442f75 20-Jun-2012 Xavier Ducrohet <xav@android.com> Disable debug output in SDK layoutlib.

Bug: 6697442

Change-Id: I9741761342ea220c158aa124089430b0db80bf7e
ayoutlib/bridge/Bridge.java
bb47cf66ec72adff895d0e8b94c26f5d438be49a 04-Jun-2012 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I41415fed99d98406bc033289428bde59475c2917
ayoutlib/bridge/android/BridgeWindowManager.java
6ae8d1821822296df0606c9cd1c46708cc21cb58 23-May-2012 Dianne Hackborn <hackbod@google.com> 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
ayoutlib/bridge/android/BridgeContentResolver.java
4286d6d115385391b75db8e6c4e397008ef9b3db 14-May-2012 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I53263d509559c70100cd78ad49f225f0dafd8891
ayoutlib/bridge/android/BridgeWindowSession.java
85afd1b6f871d471fdff1980134676a5f1690525 13-May-2012 Dianne Hackborn <hackbod@google.com> 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
ayoutlib/bridge/android/BridgeWindow.java
421dceb0a4fd8f20349a0de277f82b56e71cb90b 10-May-2012 Michael Jurka <mikejurka@google.com> Merge "Making transition out of recents look better" into jb-dev
21385cd83d7d7938b57a4acbaa236dd4c7804ed4 03-May-2012 Michael Jurka <mikejurka@google.com> 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
ayoutlib/bridge/android/BridgeWindowManager.java
652b6d1e591f6684cda4b93d4712920f287991b4 10-May-2012 Dianne Hackborn <hackbod@google.com> 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
ayoutlib/bridge/android/BridgeContentResolver.java
a7771df3696954f0e279407e8894a916a7cb26cc 08-May-2012 Jeff Brown <jeffbrown@google.com> Move CancellationSignal to android.os package.

Bug: 6427830
Change-Id: I39451bb1e1d4a8d976ed1c671234f0c8c61658dd
ayoutlib/bridge/android/BridgeContentProvider.java
5c58de3a523a384c47b0b1e0f5dd9728a74cd9f7 29-Apr-2012 Dianne Hackborn <hackbod@google.com> 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
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/android/BridgeWindowSession.java
12d3a94397c33fdb773a1eaaaa13cab80bf0c571 27-Apr-2012 Dianne Hackborn <hackbod@google.com> 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
ayoutlib/bridge/android/BridgeWindow.java
68c33ca7ce1f142eb5f1e1f90118aeba4c9db1e3 19-Apr-2012 Dianne Hackborn <hackbod@google.com> Add new API to find smallest/largest screen size.

Change-Id: I790801fceaf84ee2e3b1c9d32828285ad3231d0e
ayoutlib/bridge/android/BridgeWindowManager.java
eabfb3a36e9469c5e219f92b39b7200104319185 17-Apr-2012 Dianne Hackborn <hackbod@google.com> Add new scale-up window manager animation.

Like zoom thumbnail, but without the thumbnail.

Change-Id: I9486dd204398b87c9e70ff0d05d03f4a22449cd6
ayoutlib/bridge/android/BridgeWindowManager.java
ac14351e16e1258f1cb54e2bf772b8be004eb2b8 06-Apr-2012 Jeff Brown <jeffbrown@google.com> 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
ayoutlib/bridge/android/BridgeWindowManager.java
f87d19621dc2a30232bba1f51862a0b671eb9729 04-Apr-2012 Dianne Hackborn <hackbod@google.com> 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
ayoutlib/bridge/android/BridgeWindowManager.java
8078d8c8a282ca81344febe7256f63b1e805e3aa 20-Mar-2012 Dianne Hackborn <hackbod@google.com> 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
ayoutlib/bridge/android/BridgeWindowManager.java
5d701eddcf7f4abd5867ec3bf2091916d5ebbdf1 16-Mar-2012 Xavier Ducrohet <xav@android.com> LayoutLib: Properly support attr ns when used in styles.

Change-Id: I885864588928589d7c9a34b94339917c5be47fa5
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeContext.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
nternal/policy/PolicyManager.java
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgePowerManager.java
ayoutlib/bridge/util/DynamicIdMap.java
a4972e951bf2bdb7afdafee95b3ab0c15b8bacae 14-Mar-2012 Dianne Hackborn <hackbod@google.com> 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
ayoutlib/bridge/android/BridgeContext.java
bb9908b828a8cfd5965553be66faa6af89973697 08-Mar-2012 Romain Guy <romainguy@google.com> 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
ayoutlib/bridge/android/BridgeWindow.java
e0cf12fc4d5c9de464f899522a9e2ca77dbb865a 08-Mar-2012 Romain Guy <romainguy@google.com> Fix the build

Change-Id: Ia86ba9b1c432ab3f8107557e95b12c9eedc4d9f7
ayoutlib/bridge/android/BridgeWindow.java
aeb17f17ffd8d3384dfed223e40010b4abac4cc5 27-Feb-2012 Xavier Ducrohet <xav@android.com> 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.
77fdcbff8b458dd3430b38e60aee1a28ca92a738 25-Feb-2012 Xavier Ducrohet <xav@android.com> 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.
44e63a218cf8fcab9b4418246a512bd0b0c9157b 25-Feb-2012 Xavier Ducrohet <xav@android.com> Support rendering layout that use the new res-auto namespace.

Change-Id: I9b89c965dc8c9458e74c15ab8ff765e16e1b32c2
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/android/BridgeContext.java
cb581bbe2e1fd2a55b70a516fbaac53da0108c28 25-Feb-2012 Dianne Hackborn <hackbod@google.com> resolved conflicts for merge of 34706a4c to master

Change-Id: I4dd24f3b917aa7e3d2c4b0fae51e951dfcf88ba8
34706a4c81b82319a79a1b5ffa9084ed92a6e284 25-Feb-2012 Dianne Hackborn <hackbod@google.com> am e65a9ab1: am 5786f5cf: Merge "Fix build." into ics-mr1

* commit 'e65a9ab1ea42d1f6190bee844ee666b7910d71ef':
Fix build.
b69b2c01b4de8a161d6c39e7428ffd25c36eb8cc 25-Feb-2012 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Id3262bff0df598ecc81a4346dee9febd3aaa60c9
ayoutlib/bridge/android/BridgeIInputMethodManager.java
5e6c2194774eb5449889f3a9f984897bf0f06b1c 23-Feb-2012 Xavier Ducrohet <xav@android.com> am f8e737cb: am 22701ec5: am 503247f2: Merge "Make sure resource references are resolved." into ics-mr1

* commit 'f8e737cb61ab86b90ec318591fbcfec40fac63cf':
Make sure resource references are resolved.
f8e737cb61ab86b90ec318591fbcfec40fac63cf 22-Feb-2012 Xavier Ducrohet <xav@android.com> am 22701ec5: am 503247f2: Merge "Make sure resource references are resolved." into ics-mr1

* commit '22701ec5b11f6138e6298814fff5f09da82df144':
Make sure resource references are resolved.
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
ayoutlib/bridge/Bridge.java
688bd47fccf1a1373e6287bc49b5b33fad12b7f3 09-Feb-2012 satok <satok@google.com> Add an api to switch to the next IME and subtype

Bug: 5975302

Change-Id: I48aa4220159c65f456d61a324efcdf0a1ceec91c
ayoutlib/bridge/android/BridgeIInputMethodManager.java
c8a0b8e6bccc604d3670d72cab0691ab6b8302c1 07-Feb-2012 Xavier Ducrohet <xav@android.com> Fix a setBackgroundDrawable in layoutlib.

Change-Id: Id5f3ec8cc6863fa5929743ef4014c331633efce9
ayoutlib/bridge/bars/CustomBar.java
331bb0c393d5e2ea2485102dcddbb8c2d42654d2 06-Feb-2012 Xavier Ducrohet <xav@android.com> Setup ActionBars in layoutlib the same way the platform does it. do not merge.

Instead of using a simple ImageView for the icon, this uses the platform
layout/action_bar_home which uses a custom class to position and resize
the icon (and also supports the Up icon that we don't yet support).

This ensures that the icon is properly positionned and sized like
on devices.

(cherry picked from commit 7396348dfcfb45b7ad055f4c18cabbe5e8270d26)

Change-Id: Ifd3bc318089b70ba843519523e366e59d434e919
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/FakeActionBar.java
7396348dfcfb45b7ad055f4c18cabbe5e8270d26 06-Feb-2012 Xavier Ducrohet <xav@android.com> Setup ActionBars in layoutlib the same way the platform does it.

Instead of using a simple ImageView for the icon, this uses the platform
layout/action_bar_home which uses a custom class to position and resize
the icon (and also supports the Up icon that we don't yet support).

This ensures that the icon is properly positionned and sized like
on devices.

Change-Id: I57432afa82d257bb043247001320b368045d7f55
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/FakeActionBar.java
ec99f609cc2db862db307f7ba56a2400c58403a0 03-Feb-2012 Jeff Brown <jeffbrown@google.com> Merge "Rename CancellationSignal using preferred spelling."
4c1241df8f8b7fd5ec3dff6c7e0f66271248e76e 03-Feb-2012 Jeff Brown <jeffbrown@google.com> Rename CancellationSignal using preferred spelling.

Bug: 5943637
Change-Id: I12a339f285f4db58e79acb5fd8ec2fc1acda5265
ayoutlib/bridge/android/BridgeContentProvider.java
46d43ccfd8cef75b4315828073c094cf1efb05ff 03-Feb-2012 Xavier Ducrohet <xav@android.com> Make Layoutlib compile on Java 6.

Change-Id: Ic8f0e321c6c218de83664fc01f253a07fa80852c
nternal/textservice/ITextServicesManager_Stub_Delegate.java
ayoutlib/bridge/android/BridgeIInputMethodManager.java
ayoutlib/bridge/android/BridgeLayoutParamsMapAttributes.java
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/android/BridgeWindowManager.java
ayoutlib/bridge/android/BridgeWindowSession.java
ayoutlib/bridge/android/BridgeXmlBlockParser.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/binding/FakeAdapter.java
ayoutlib/bridge/impl/binding/FakeExpandableAdapter.java
75ea64fc54f328d37b115cfb1ded1e45c30380ed 26-Jan-2012 Jeff Brown <jeffbrown@google.com> Implement a cancelation mechanism for queries.

Added new API to enable cancelation of SQLite and content provider
queries by means of a CancelationSignal object. The application
creates a CancelationSignal object and passes it as an argument
to the query. The cancelation signal can then be used to cancel
the query while it is executing.

If the cancelation signal is raised before the query is executed,
then it is immediately terminated.

Change-Id: If2c76e9a7e56ea5e98768b6d4f225f0a1ca61c61
ayoutlib/bridge/android/BridgeContentProvider.java
d3fe9abfb9a6a21a18abde6a98dceb423c04ebef 21-Jan-2012 Jim Miller <jaggies@google.com> am ab9601cd: am 230a7092: Merge "Fix 5863053: Add method to lock screen immediately." into ics-mr1

* commit 'ab9601cdbb95ae94088750eff9a926a572c1a4d6':
Fix 5863053: Add method to lock screen immediately.
93c518e4f8abd98f87cda1712b30a5a86cfa60dd 18-Jan-2012 Jim Miller <jaggies@google.com> Fix 5863053: Add method to lock screen immediately.

This fixes a bug where the device fails to lock when DevicePolicyManagerService
requests the device to be locked and the screen was off because the user hit
the power button.

The change allows DPMS to directly invoke screen lock, bypasssing the screen state.

Change-Id: Iecdda6fc61e9c519119de495be23c69c3b983921
ayoutlib/bridge/android/BridgeWindowManager.java
c0b7f65ae0594e19d1272e5caf2d83638041d19c 29-Nov-2011 Dianne Hackborn <hackbod@google.com> am 496f6e2a: am b54980d1: Merge "Fix issue #5588689: Black camera preview after coming back from gmail" into ics-mr1

* commit '496f6e2ad656c5bb8a277e191554d16abd290b58':
Fix issue #5588689: Black camera preview after coming back from gmail
6d05fd3c795088ac60f86382df5a66d631e8a0cb 19-Nov-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5588689: Black camera preview after coming back from gmail

Make surface management between SurfaceView and the window manager
much more controlled, to ensure that SurfaceView always gets to report
the current surface is destroyed before the window manager actually
destroys it.

Also a small tweak to allow windows that have a wallpaper background
to still have a preview window. This makes launching home after it
has been killed feel much more responsive.

Change-Id: I0d22cf178a499601a770cb1dbadef7487e392d85
ayoutlib/bridge/android/BridgeWindowSession.java
8836c55818937ba00f186075eb7efb6462191113 01-Nov-2011 Tor Norbye <tnorbye@google.com> Set theme-tag in render log when failing to find style

Change-Id: I20461a7113eb25469deca13dca870936bdb33a29
ayoutlib/bridge/android/BridgeContext.java
0c4ccff36930ff4f0292b94ad51e164c9fa060a3 19-Oct-2011 Daniel Sandler <dsandler@android.com> Add hasNavigationBar() to the window manager.

It is no longer sufficient to check the value of
internal.R.bool.config_showNavigationBar to determine if a
navigation bar (separate from the status bar) is shown on a
device, because the emulator needs to be able to override
this value (now possible by setting qemu.hw.mainkeys to "1"
or "0", for navbar or no navbar, respectively).

This logic is now contained in PhoneWindowManager, and any
clients wishing to know whether the system has a software
nav bar should consult the new hasNavigationBar() method.

Bug: 5404945
Change-Id: I119d32a8c84b88b2ef46f63244e7f11dc5de0359
ayoutlib/bridge/android/BridgeWindowManager.java
d2183654e03d589b120467f4e98da1b178ceeadb 09-Oct-2011 Jeff Brown <jeffbrown@google.com> Fix ownership of CursorWindows across processes.
Bug: 5332296

Ensure that there is always an owner for each CursorWindow
and that references to each window are acquired/released
appropriately at all times.

Added synchronization to CursorToBulkCursorAdaptor to
prevent the underlying Cursor and CursorWindow from being
remotely accessed in ways that might violate invariants,
resulting in leaks or other problems.

Ensured that CursorToBulkCursorAdaptor promptly releases
its references to the Cursor and CursorWindow when closed
so they don't stick around longer than they should, even
if the remote end hangs onto the IBulkCursor for some reason.

CursorWindow respects Parcelable.FLAG_WRITE_RETURN_VALUE
as an indication that one reference to the CursorWindow is
being released. Correspondingly, CursorToBulkCursorAdaptor
acquires a reference to the CursorWindow before returning
it to the caller. This change also prevents races from
resulting in the transfer of an invalid CursorWindow over
the wire.

Ensured that BulkCursorToCursorAdaptor promptly releases
its reference to the IBulkCursor when closed and throws
on attempts to access the cursor while closed.

Modified ContentProviderNative to handle both parts of
the wrapping and unwrapping of Cursors into IBulkCursors.
This makes it a lot easier to ensure that the right
things happen on both ends. Also, it turns out that
the only caller of IContentProvider.bulkQuery was
ContentProviderNative itself so there was no need
to support bulkQuery on ContentProviderProxy and it was
just getting in the way.

Implement CloseGuard on CursorWindow.

Change-Id: Ib3c8305d3cc62322f38a06698d404a2989bb6ef9
ayoutlib/bridge/android/BridgeContentProvider.java
85b9edf2da0534bc53d139bb88cda8866d265afe 07-Oct-2011 Dianne Hackborn <hackbod@google.com> Merge "Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself immediately"
9a230e01a1237749a8a19a5de8d46531b0c8ca6a 06-Oct-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5371530: SYSTEMUI_FLAG_HIDE_NAVIGATION reasserts itself immediately

This cleans up how ui flags are managed between the client and window manager.
It still reports the global UI mode state to the callback, but we now only clear
certain flags when the system goes out of a state (currently this just means the
hide nav bar mode), and don't corrupt other flags in the application when the
global state changes.

Also introduces a sequence number between the app and window manager, to avoid
using bad old data coming from the app during these transitions.

Change-Id: I40bbd12d9b7b69fc0ff1c7dc0cb58a933d4dfb23
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/android/BridgeWindowSession.java
2447871b99e6b10a68985f037420eb77cabe4d29 06-Oct-2011 Jeff Brown <jeffbrown@google.com> Fix build.

Change-Id: I7bb00b8ee0da952f3697b23dccf32dde55733b7a
ayoutlib/bridge/android/BridgeWindowManager.java
14094097329b3bdcbf26392141111d74c8b89718 04-Aug-2011 Xavier Ducrohet <xav@android.com> Layoutlib: Typeface support for loading fonts manually.

If the font being loaded is a system font, then we can find the font
file and manually load it.

Change-Id: I95473b1f1b88df64316b77c41ed05d4d09ab61ed
ayoutlib/bridge/impl/FontLoader.java
178006a0e05b41b4c4de93aec30368a9102ca140 05-Oct-2011 Xavier Ducrohet <xav@android.com> Layoutlib now parses system_fonts.xml instead of its own.

Also parse fallback_fonts.
This lets layoutlib automatically use the same fonts as the base
platforms, for instance it now uses the new ICS fonts.

Change-Id: Id6e778dc0e3f2a9112601e0eaf8499a9713ec433
ayoutlib/bridge/impl/FontLoader.java
f1dee199a009fec5e3a5d1469f654098261f8b06 01-Oct-2011 Xavier Ducrohet <xav@android.com> Layoutlib: add support for ITextServicesManager.

This include a fix in layoutlib_create to properly handle
delegating a static method of an inner class (was broken and
only worked on non static method).

Added a few comments here and there to *_Accessor classes so
that it's a bit more obvious what they are for and how they are
used.

Change-Id: Ifc31dd1a006393bb0c08e22b6a17f500dd62e090
nternal/textservice/ITextServicesManager_Stub_Delegate.java
ayoutlib/bridge/android/BridgeContext.java
90c52de28691ca0bbbf7c039ef20f85ce46882cc 23-Sep-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5173952: Opening a Notification From Lock Screen...

...Should Skip Unsecure Lockscreen (ICS)

Also while I am in there, clean up logging of intent objects to include
even less sensitive information, while showing the true Intent in dump
output (since apps can't get to that).

Change-Id: I35fed714645b21e4304ba38a11ebb9c4c963538e
ayoutlib/bridge/android/BridgeWindowManager.java
01a98ddbdfbaf1f0d2bc602537e6e314364902a3 21-Sep-2011 Jeff Brown <jeffbrown@google.com> Handle orientation changes more systematically.
Bug: 4981385

Simplify the orientation changing code path in the
WindowManager. Instead of the policy calling setRotation()
when the sensor determined orientation changes, it calls
updateRotation(), which figures everything out. For the most
part, the rotation actually passed to setRotation() was
more or less ignored and just added confusion, particularly
when handling deferred orientation changes.

Ensure that 180 degree rotations are disallowed even when
the application specifies SCREEN_ORIENTATION_SENSOR_*.
These rotations are only enabled when docked upside-down for
some reason or when the application specifies
SCREEN_ORIENTATION_FULL_SENSOR.

Ensure that special modes like HDMI connected, lid switch,
dock and rotation lock all cause the sensor to be ignored
even when the application asks for sensor-based orientation
changes. The sensor is not relevant in these modes because
some external factor (or the user) is determining the
preferred rotation.

Currently, applications can still override the preferred
rotation even when there are special modes in play that
might say otherwise. We could tweak this so that some
special modes trump application choices completely
(resulting in a letter-boxed application, perhaps).
I tested this sort of tweak (not included in the patch)
and it seems to work fine, including transitions between
applications with varying orientation.

Delete dead code related to animFlags.

Handle pausing/resuming orientation changes more precisely.
Ensure that a deferred orientation change is performed when
a drag completes, even if endDragLw() is not called because the
drag was aborted before the drop happened. We pause
the orientation change in register() and resume in unregister()
because those methods appear to always be called as needed.

Change-Id: If0a31de3d057251e581fdee64819f2b19e676e9a
ayoutlib/bridge/android/BridgeWindowManager.java
ce801c4a1b1137ca2fd51ede6818722793c79ea4 19-Sep-2011 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Ife2b4b207270f8017d3acd80c76eaf1c7a50986d
ayoutlib/bridge/android/BridgeWindowManager.java
ee5e77cafec2eae70890abdcc1646ed39b06eddd 02-Sep-2011 satok <satok@google.com> Make setAdditionalInputMethodSubtypes async

Bug: 5120261
Change-Id: Ic7869cfaa5361531e08d58d7dfa5ba0feab0613e
ayoutlib/bridge/android/BridgeIInputMethodManager.java
29aae6f36e565b8f2a99f2193597b964bb800ee8 19-Aug-2011 Dianne Hackborn <hackbod@google.com> Fix issue #4279860: previous UI flashes before showing lock screen...

...(when turning display on after recently turning it off)

Also clean up when we decide to turn the screen on to improve that
transition. There are still problems here with turning it on
before the wallpaper gets dispayed.

Change-Id: I2bc56c12e5ad75a1ce5a0546f43a845bf0823e66
ayoutlib/bridge/android/BridgeWindowManager.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeAssetManager.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/android/BridgeWindowManager.java
ayoutlib/bridge/android/BridgeXmlBlockParser.java
ayoutlib/bridge/android/BridgeXmlPullAttributes.java
ayoutlib/bridge/bars/PhoneSystemBar.java
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/PlayAnimationThread.java
ayoutlib/bridge/impl/RenderAction.java
ayoutlib/bridge/impl/RenderDrawable.java
ayoutlib/bridge/impl/RenderSessionImpl.java
dfee59afb3e4cdcde38f6338f9360655de76da92 06-Aug-2011 Adam Powell <adamp@google.com> Fix bug 5011824 - New Holo overflow menu for physical menu key devices

The new Holo-style overflow menu now appears from the edge of the screen
where the device's physical menu key can be found. The policy determining
this lives in getPreferredOptionsPanelGravity() in WindowManagerService.

Change-Id: I8851a2265547156591e82044e50b5cfc58d3eefa
ayoutlib/bridge/android/BridgeWindowManager.java
d2f664d42cc29507b01a98622298b69131463825 30-Jul-2011 Xavier Ducrohet <xav@android.com> Misc layoutlib fix in preparation of the access change in framework code.

Change-Id: I873adb7345514be6daa5c4fea4ebabb515f203e2
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/bars/CustomBar.java
bc68a59c024bdb745dac8e2ec7408a9f30595f1a 25-Jul-2011 Jeff Brown <jeffbrown@google.com> Report the external display size to the input reader.

The input reader needs this information so that it knows how to
interpolate touches on an external touch screen.

Changed Display so that it asks the WindowManager what the real
display size is (as opposed to the raw display size). This means
it now takes into the forced display size set by
adb shell am display-size.

Replaced all calls to getRealWidth() / getRealHeight() /
getRealMetrics() in the WindowManager and replaced them with direct
usages of the mCurDisplayWidth / mCurDisplayHeight so that the WM
doesn't end up making a reentrant Binder call into itself.

Fixed the table status bar HeightReceiver so that it updates the
height on all configuration changes since it is possible that the
display size changed independently of an external HDMI display
being plugged / unplugged.

Improved the Display class documentation to make the distinctions
betweeen the various sizes clearer.

Change-Id: I3f75de559d3ebffed532ab46c4ae52c5e7f1da2b
ayoutlib/bridge/android/BridgeWindowManager.java
af64556de0064eeb5a4d4e6d634c3f074f5f40ce 20-Jul-2011 Xavier Ducrohet <xav@android.com> Layoutlib: misc fix + start of AndroidBidi support.

Change-Id: If2ce0b683da8cce01679322d503eed8dd474e521
ayoutlib/bridge/android/BridgeIInputMethodManager.java
91e88122cf28a48fd2e2260da7d3d87dd437227a 18-Jul-2011 satok <satok@google.com> Enable IMEs to set additional subtypes in background

Bug: 4591792

Change-Id: I7e61a576c56d1a3a56001bdf2fd51ad3801add01
ayoutlib/bridge/android/BridgeIInputMethodManager.java
37b3cc3bbe33df61f227bcf253aa67a4be441233 13-Jul-2011 Xavier Ducrohet <xav@android.com> am 9163a4a6: am aa4b1d8b: am d292d2a0: Merge 36a3a392 from mr1.

* commit '9163a4a686fc25fefc77d5b41c24a4538486a48e':
Merge 36a3a392 from mr1.
96131eef3869f2be1300e1620f5c3874b41bb534 12-Jul-2011 Xavier Ducrohet <xav@android.com> LayoutLib: updated fake accessbility manager and ensure there's an InputMethodManager

We had replaced the accessibility Manager but it lacked some new API. Obvisouly
this is fragile and should be fixed, but this works for now.

After fixing this there was another issue with the lack of InputMethodManager.
To fix this I had to create an implementation of IInputMethodManager which
normally comes from a binder object.

I may want to do a similar trick with the accessibility manager later.

Change-Id: I28c6494e333f39072f348d0199124efac93256a5
ayoutlib/bridge/android/BridgeIInputMethodManager.java
ayoutlib/bridge/impl/RenderAction.java
0a49635b171f3ba366b1a7ebf28791c4661829bd 12-Jul-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Delegate for Display and IWindowManager implementation.

This allows ViewConfiguration to be properly implemented which is now
required for the rendering to happen.

Change-Id: I55629689fa8f5f874b43fcac2aa0789ce02d58f4
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeWindowManager.java
ayoutlib/bridge/impl/RenderAction.java
d292d2a03134eaca8b51b6313610b4b78de53c83 08-Jul-2011 Xavier Ducrohet <xav@android.com> Merge 36a3a392 from mr1.

Protect against OOB index in BridgeTypedArray.

Change-Id: I40be1e039f9eb36c182b6522bd50d6ed98e15b5c
ayoutlib/bridge/android/BridgeTypedArray.java
9340ab4a213093bd59c79159011d131c9cd6996f 16-Jun-2011 Xavier Ducrohet <xav@android.com> am 0be8522b: am d1abd94f: am 04ce8111: Bring in more layout lib changes from hc-mr1.

* commit '0be8522b430aca8d90023d7c7e5ef510aa48adc7':
Bring in more layout lib changes from hc-mr1.
04ce81113107d2bfa0b8248b13145b4cf24cb943 10-Jun-2011 Xavier Ducrohet <xav@android.com> Bring in more layout lib changes from hc-mr1.

fe051bb2 : Change the way the layoutlib instantiate its XmlPullParser.

A lot of the init code was duplicated so I made a ParserFactory class.

Also created an extension of the KXmlPullParser to override toString().
This allows easier debugging when dealing with multiple parsers (which
is always the case).

Also added some (disabled) debugging printf to deal with parser stack
as it can be tricky figuring out which parsers are in the stack at
which point.

8969147c : Fix case where the int[] attrs doesn't directly match a styleable.

In the case of the FastScroller the int[] is a custom mix of attr
instead of a int[] that exists as R.styleable.foo.

This makes our reflection based mechanism used to find the styleable
fail, so instead we search for each attribute separately (like
we probably should have done from the beginning).

0c264b35: Fix various cases of getDimension to report error if unit is missing.

if getDimention###() is called for a string that has no unit,
then an error is output through LayoutLog, but the rendering keeps
going by using dp as a default.

0beb7eea: Make (Bridge)TypedArray.getInteger() call out to getInt()

Only getInt() resolved attribute flags/enum and I'm not sure why
there's two to begin with.
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/android/BridgeXmlBlockParser.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/FakeActionBar.java
ayoutlib/bridge/bars/PhoneSystemBar.java
ayoutlib/bridge/bars/TabletSystemBar.java
ayoutlib/bridge/bars/TitleBar.java
ayoutlib/bridge/impl/ParserFactory.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
2dcb6e80b999d93409e66bbd01b94a419c22013c 10-Jun-2011 Xavier Ducrohet <xav@android.com> am 48305f32: am 2e0f7118: am 8ee28811: Merge changes Idbb70f53,I10426a3f into honeycomb-mr2

* commit '48305f327ff3839ddbfa5a6fb42a57150a69480c':
Merge 06942bc4 from hc-mr1.
Merge 988eeeb5 from hc-mr1.
45b662e1bcff23dc59fb3a47bc32c99e63b2ac35 08-Jun-2011 Xavier Ducrohet <xav@android.com> Merge 06942bc4 from hc-mr1.

Layoutlib - use the new getParser callback when possible.

Change-Id: Idbb70f5391addd539afa5c2f5b55c70beefed223
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeResources.java
beb5fb622b71693c21b6fab562a98e7000c64273 08-Jun-2011 Xavier Ducrohet <xav@android.com> Merge 988eeeb5 from hc-mr1.

Support for custom declare-styleable attr with enum/flag in layoutlib.

Change-Id: I10426a3f2c76bed207c03fab7885b4269337a70f
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
f18e311ee5d35db0cae96f0b216a88e5b42604dc 08-Jun-2011 Xavier Ducrohet <xav@android.com> am abc83871: am f6e47999: am 2a6dc7f1: Merge "Import the Layoutlib from hc-mr1." into honeycomb-mr2

* commit 'abc838716816107754ab0479242d03807ce79fc2':
Import the Layoutlib from hc-mr1.
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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/impl/RenderAction.java
ayoutlib/bridge/impl/ResourceHelper.java
9f23e60b20f0419e6ca5ff55db9d6282596e7fe8 19-May-2011 Xavier Ducrohet <xav@android.com> am a13462a9: am 582841e7: am b18e700c: am aa0834e3: Merge "LayoutLib: support the new baseline/margin query API." into honeycomb-mr1

* commit 'a13462a947e634a6893119146a7271369e509586':
LayoutLib: support the new baseline/margin query API.
05b7b69c6c5d418e18db644feed1ec2ca83291cc 17-May-2011 Xavier Ducrohet <xav@android.com> LayoutLib: support the new baseline/margin query API.

Change-Id: I856489df655960820b8eaa4c6179515a5c069b00
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/MockView.java
ayoutlib/bridge/impl/RenderSessionImpl.java
8c2f85d94145a96f53e9041c609e283be7412a0f 14-May-2011 Xavier Ducrohet <xav@android.com> am d0054160: am 6d040a7f: am 738c5e60: am 2fae858d: LayoutLib: implement data binding for most AdapterView

* commit 'd00541603fbbb4e38264e75a2b6abf8705efeb49':
LayoutLib: implement data binding for most AdapterView
2fae858db55fc6984ef923a6226b9408c37c72cb 29-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: implement data binding for most AdapterView

Change-Id: I27be96ed2c37573eb22cfbb391d96b6137b3df8c
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeXmlBlockParser.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/impl/binding/BaseAdapter.java
ayoutlib/bridge/impl/binding/FakeAdapter.java
ayoutlib/bridge/impl/binding/FakeExpandableAdapter.java
515a08b01851a1ab9386f85dee6d9fd7b65ee7ad 07-Apr-2011 Xavier Ducrohet <xav@android.com> Merge 59aad78e from master. do not merge.

LayoutLib: don't render when shader's local matrix is set to 0 scale.

Change-Id: I02c0ddd856026357f468dcc8b81e0520470118de
ayoutlib/bridge/impl/GcSnapshot.java
c5aeac7f157e3cb9e29ab8c126f74e26493501f5 06-Apr-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Fix issue with rendering mode.

When the layout content is embedded inside a decor layout
to emulate system bar (top or bottom) and title bar (or action bar)
then the code computing the full required size based on the RenderingMode
would fail because the decor layout would prevents the content layout to
take as much room as possible.
There is also an issue with the way we know render dialogs as the
dialogs usually as a frame with some padding and the previous measurements
would not take into account the dialog padding when increasing the
screen size.

This fix makes the code measure the size of the content layout in the
normal rendering, and then separately from the root layout with the proper
MeasureSpec to let the content grown. The difference in size is then added
to the screen size.

Bug: http://code.google.com/p/android/issues/detail?id=15892

Change-Id: Ibb9ca2a67c6c450d10d9f9a8050536e094650f8b
ayoutlib/bridge/impl/RenderSessionImpl.java
67450db03eac59c93b2b46c7872ce4d7dca47265 17-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: TypedArray.getDimensionPixelSize can actually return <0

Change-Id: I17853dc242e28f0c59916cad1b2a57beed480a57
ayoutlib/bridge/android/BridgeTypedArray.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeTypedArray.java
6f2fb570642189ec2b6068632c25f02391007bb5 08-Mar-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Fix dimension parsing to handle negative value.

Also make TypedArray.getDimensionPixelSize properly
handle negative values (which are not allowed).

Change-Id: I960fc1c9e8ad97852d4a14e4f0f71a2c2034b4e7
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/impl/ResourceHelper.java
648251710162cdaf7371012a1cbb79b9bc5bc0e4 03-Mar-2011 Dianne Hackborn <hackbod@google.com> Fix issue #3485923: Gmail crash

Allow application to try to recover if a surface OOM error
happens on the client side.

Change-Id: I0308bd99647a35e4bcac448340b7fc6330a828f6
ayoutlib/bridge/android/BridgeWindowSession.java
f0a53435f14d23d9555fc46014352ee6a7baa647 24-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Add debug mode.

Change-Id: If4263c7dba63a063f84e0c6988c270eb6d291ac3
ayoutlib/bridge/impl/DelegateManager.java
ayoutlib/bridge/util/Debug.java
b2c7dd5986344369f02dfe2965b309153b121127 24-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: downsize the SparseArray when possible.

Change-Id: I570b93ab161414b7729f8d2dce8ddadb706f186b
ayoutlib/bridge/util/SparseWeakArray.java
c6083f2c9eadb1f8a502ea9806868f5b0148667e 23-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: misc fixes.

- implement some Paint methods that are needed for 2.x
- fix the phone system bar to display the icons on the right.

Change-Id: I3a938b14ec9a449dbc23a33303a3c8405a5369a8
ayoutlib/bridge/bars/PhoneSystemBar.java
cc4977d0fdaf657907912fd6cc2f9426dc8d2e36 22-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Hold onto delegate references.

When an object is given a delegate to hold onto, keep
the reference to the delegate instead of its native integer.

Also change the way the finalizer works by not explicitely deleting
the delegate. Instead we want the delegate to be deleted when
nothing holds a reference to it. To do this, instead of using
a regular SparseArray, we use a SparseArray of WeakReferences.
Because the main Java object that "owns" the delegate does not
actually holds a reference to the delegate, we fake this by
having the delegate manager hold a reference to delegates for
the main object. This is added/removed as the object is created
and the native finalized is called.

This makes layoutlib behave more like the JNI code where the native
objects are reference counted, and where the Java object can be
deleted but the delegate it owns is kept around (usually because
another type of delegates hold a reference on it.)

To properly handle the WeakReferences, we need to be able to
regularly clear the SparseArray of WeakReference that were
referencing objects that have been GC'ed.
Since the SparseArray is regularly being compacted (actually only
when items are removed), we use a custom SparseWeakArray (started
as a straight copy of SparseArray) that handles the WeakReference
and takes care of compacting the array by removing deleted indices
and WeakReference that returns null. Since our specific use case
doesn't call actually delete() or remove(), the compacting
only happens when the array needs to be resized.

Change-Id: Iacc5c1ff5b21732b8816fda87eb090da12d034e0
ayoutlib/bridge/impl/DelegateManager.java
ayoutlib/bridge/util/SparseWeakArray.java
8cb6fc184dcb9cc6ab0871de5cf430277d15c8c8 23-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Import of SparseArray as SparseWeakArray.

This is a straight copy for easy review of the customization.

Change-Id: I351ec570c3e7a025561939ab05c1ae7eded30b38
ayoutlib/bridge/util/SparseWeakArray.java
1ca584a2bb5c0f0e747c98f2e930cce8b53421a5 19-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: remove assert in resource resolution.

These code paths were valid in case there's a mismatch
between the style/theme/version of Android

Change-Id: I8cb3b2a3f3a1ef5c37ccec0c8ddbb7add69bfbe0
ayoutlib/bridge/android/BridgeTypedArray.java
3e87bfa1911de10c3d0692b34eba27f5965710f7 19-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: support defStyleRes in obtainStyledAttributes.

This fix the Spinner rendering.

Change-Id: I20a71d9e07f6c86652a74fba3fc05a027a057ff8
ayoutlib/bridge/android/BridgeContext.java
f20999965b94bdcc2b1f2c05b587ff405924bc96 19-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: properly handle @null references in more places.

Change-Id: I240298ab79c19ab0e49cb6da19d6b0187493d3b5
ayoutlib/bridge/android/BridgeTypedArray.java
10df650f0d4bdf086dae9ac29fafd8a1ded06c23 17-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: add support for layout_only render.

Change-Id: I1cd791cf9560156c1ac488f8e454240c84e29cc6
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/impl/RenderSessionImpl.java
559358fdf65b1b551312526940cb02ec23bf6d9d 14-Feb-2011 Xavier Ducrohet <xav@android.com> am 1858c95e: am 02d2b5a4: LayoutLib: When possible ensure parsers are popped from the stack.

* commit '1858c95e99f81ac46eea93288cb8866260b3d5d8':
LayoutLib: When possible ensure parsers are popped from the stack.
02d2b5a4031c80bfe1012ce2f4f7b3695762abd9 14-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: When possible ensure parsers are popped from the stack.

Some parser consumers (seems to be mostly resource inflation)
don't use the pull parser up to the END_DOCUMENT tag, making
the parser not pop itself from the parser stack automatically.

This is likely due to the XML resources being very shallow (1-2 levels
max), and the inflater just reading the content that it expects instead
of parsing till the document is done.

This ensures that *some* parsers are pop'ed from the stack when
used. Some other parsers we don't really control and hope the
user will parse till END_DOCUMENT.

Change-Id: Ie1f5762983fed2b2ae97b896218ae12b493e7ad9
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/android/BridgeXmlBlockParser.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
8a80a8555238cc564f445f902aff5231993a8f96 10-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: remove some exceptions.

We need to move away from throwing anything and instead
log errors/warnings.

Change-Id: Ib1af71a90c06e8565fbd0c061ba56f4d19baa3df
ayoutlib/bridge/android/BridgeTypedArray.java
9a4fe29c8d92014d2d9a848e9116b8cc9d0842f9 10-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Annotate the custom delegate methods.

Every method implementing a delegate needed by the
layoutlib_create bytecode modification must now be
annotated with LayoutlibDelegate.

The methods in the original source code that are delegated
are already automatically annotated. Now with the implementations
being annotated we can do bi-directional tests and find not
only missing implementations but also dead obsolete code.

This will be useful when backporting to earlier versions of
Android, or when native (non public) method disappear. In fact,
the new test detected one such method in Shader.

Change-Id: I491708b68ac2736ca5669aa86cd5e930a00f9db3
nternal/util/XmlUtils_Delegate.java
abc33e014d4490dc993d1453e2589f538dbd7bbe 08-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: fix the background of title/action bars.

The bars are supposed to sit on top of the window so
that if they are transparent (which is the default case
for the action bar), the window background shows through.

Fix this using a layout to represent the window content
(all but the system bar) in which the title/action bars
and the layout content sits. This layout receives the
windowBackground drawable.

Change-Id: I8072c5ff52f585fa32acb589d8526e1c13cbcd94
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/PhoneSystemBar.java
ayoutlib/bridge/bars/TabletSystemBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
4dd2299d5766bf14479578772a0946c5399a0158 07-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Update to latest API fix.

Change-Id: I5147010e4f16a5c2ea0b98709c42f7ecd9412ff6
ayoutlib/bridge/Bridge.java
62a99c0b3bca70262ab205a5688ff69cbbbaee78 07-Feb-2011 Xavier Ducrohet <xav@android.com> Merge "LayoutLib: Handle color state list in methods returning an int." into honeycomb
d96a7403cda1a873e640b6e6395ddab4c2f9b9f9 07-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Handle color state list in methods returning an int.

Change-Id: Ia35ea09b992a239873026c7ef1629a01dd2e6cec
ayoutlib/bridge/android/BridgeTypedArray.java
13bdc3355c781dc2614f2810a42d3a9e73f5bed9 06-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: improved rendering for system/title/action bars.

Change-Id: I926531e9ad4a7b98e04e23cac3837794f7c89449
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/PhoneSystemBar.java
ayoutlib/bridge/bars/TabletSystemBar.java
ayoutlib/bridge/impl/ResourceHelper.java
fd18f573280bbbcc549b35b548580a562bd960e2 05-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: add implementation of Bridge.renderDrawable()

Change-Id: Ic4d96488fd1a2e5b7d24353bebc8fdb24262c1d1
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/impl/RenderAction.java
ayoutlib/bridge/impl/RenderDrawable.java
b0d34f9c99cbd43e8238c5952b19d032f02dd168 05-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: split RenderSession's base method into RenderAction.

This will allow us to create RenderDrawable that extends RenderAction.

Change-Id: If9cd350453ceffae4859a925a7b436502b311f9c
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/RenderAction.java
ayoutlib/bridge/impl/RenderSessionImpl.java
1126422ee1f532d8582a4e3b56dbfe505c15e775 05-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: update to the new API.

Change-Id: Ice028933cd2270c81c3d17f7bef7c5a9d14bd802
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/impl/RenderSessionImpl.java
779c906592b67867fee83a6527d474c333a701ff 05-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Replace custom BitmapFactory by a simpler delegate

Change-Id: Ie61a0a5b4426e64bb71a22d76d05efa4c0865e5e
ayoutlib/bridge/android/BridgeResources.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/FakeActionBar.java
ayoutlib/bridge/bars/PhoneSystemBar.java
ayoutlib/bridge/bars/TabletSystemBar.java
ayoutlib/bridge/bars/TitleBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
33758ef8c98efb669c65eb9404b99ee5df09c6b5 03-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Fix some rendering issues

Change-Id: I662a39a783de5bc7f3063f46cedaab11c7e6496e
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/RenderSessionImpl.java
345f866bfd09476fd62aa10345a0670cc110b63c 02-Feb-2011 Xavier Ducrohet <xav@android.com> Make TimePicker/DatePicker/CalendarView render in Eclipse.

Change-Id: Id5313a6f0f53bf45f6eaabc0e10fcf0660eeac08
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/RenderSessionImpl.java
b353495192ba1acce94b8ab8aeeffe3c9a3bcfac 28-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: update with Pair API.

Change-Id: Iba945153f7544872ea84e3311584223aea740e2e
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/android/BridgeXmlPullAttributes.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
35ea7cd4c0c89122fda0b57af20061645082ffb9 28-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Update with the new resource map APIs.

Change-Id: I30d83c2bb4569513f4f5e22670cffe938706f105
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/android/BridgeXmlPullAttributes.java
ayoutlib/bridge/impl/FontLoader.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
16584225125acba18b74920b902c798dfead0328 28-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Properly compute available space to layouts.

Also display placeholders for status/title/action bars depending
on if the app is a tablet and its theme.

Change-Id: I651c1a2e5cfde165e004c11b236e6df056853dec
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
31fd1cf7697ef777b41c7a6a20e37ff5d573d732 27-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: put a default image on the quickcontactbadge.

Change-Id: I64b3f4004801ec03f374460384f9a492e66bfaf0
ayoutlib/bridge/impl/RenderSessionImpl.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/RenderSessionImpl.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/RenderSessionImpl.java
82b9232565bfececdb643a94cecdd1bd1cb5c643 24-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Use special view cookie for include-merge case.

All items directly under the <merge> tag now return the view cookie
of the referencing <include> tag using a special class for
easy differentiation in the calling client.

Change-Id: I7a2a4e642be9564f47e256fd1586012497d34792
ayoutlib/bridge/android/BridgeInflater.java
664644d9e012aa2a28ac96f305b1ce6499ec8806 24-Jan-2011 Joe Onorato <joeo@google.com> visibility ("lights out") API.

1. Views may setSystemUiVisibility() to recommend that
the system chrome (status bar or other UI) show or hide
itself. (This functionality was previously available only
via the FLAG_FULLSCREEN window flag for some SystemUI
implementations.)

2. Views may register a OnSystemUiVisibilityChangedListener
on a view, and find out when the system UI actually
appears or disappears, allowing apps to coordinate the
appearance of their own UI if desired.

Bug: 3241144
Change-Id: Ia1758d94099182d49a1e3688ea2738ae4995b829
ayoutlib/bridge/android/BridgeWindow.java
9d0577ec0c285c055da4c910dcb597fdae5bc5e5 18-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: properly configure ApplicationInfo with targetSdkVersion.

Change-Id: I1bfef890206552843d1a7a8d0564741f2a37494f
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/RenderSessionImpl.java
796992a942f3508a15ee62d34d6c7ec5de045d83 18-Jan-2011 Tor Norbye <tnorbye@google.com> Allow TabHosts to have no children in the tabcontent widget

Replace the code which throws an exception if there are no children in
the FrameLayout that is the tabcontent, with code to add a single
dummy tab.

This makes the TabHost renderable in those scenarios where the real
tabs are added dynamically rather than via XML.

Change-Id: I72442bd7d40eddd875b3507585c1f372fcae3329
ayoutlib/bridge/impl/RenderSessionImpl.java
70552fb92dbc5cb5b1d53b20f92f2a64969a50c4 17-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Update to use the new RenderResources API.

Change-Id: Ic64eff3f324c4519da89bab10e6d59f0a9341a04
de/common/resources/ResourceResolver.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/android/BridgeXmlPullAttributes.java
ayoutlib/bridge/impl/RenderSessionImpl.java
87ab45c0fe4db814a7364fce3b88be3a49507e90 17-Jan-2011 Xavier Ducrohet <xav@android.com> Merge "LayoutLib: extract resource resolution into its own class." into honeycomb
fbf097732137a32930d151f7ba6816a5b870c32a 16-Jan-2011 Jeff Brown <jeffbrown@google.com> Support non-rectangular input regions.

This enables the system bar to carve out a region through which
events will be sent to the IME behind it.

Bug: 3238092
Change-Id: I69b855a8d9b5b3ee525266c0861826e53e5b5028
ayoutlib/bridge/android/BridgeWindowSession.java
d1d6fafc7fc63543b10552dadf202dd6fa40fe6b 16-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: extract resource resolution into its own class.

Next step is to make it a jar that will also live in
ADT.
The version in layoutlib will be through a prebuilt jar
file, like ninepatch.

Also add ninepatch.jar inside the layoutlib.jar file.

Change-Id: I4a0cc9f2dd99709de6408386054c6d4abae7c824
de/common/resources/ResourceResolver.java
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/android/BridgeXmlPullAttributes.java
ayoutlib/bridge/impl/RenderSessionImpl.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/impl/GcSnapshot.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
0831b3fae504e8fa94e6b1cc0d4e6c3fccaef231 15-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Misc fixes.

- Fix resource resolution for framework
resources of type "id" that are dynamically generated
through "@+id/..."

- Proper implementation of setBitmap on a canvas that
already has a bitmap. Transform/clip are kepts but the
existing layers are replaced with the new bitmap

- return a null service for INPUT_METHOD_SERVICE in
Context.getSystemService

Change-Id: I35e46fff50e6492a8995e95427d5f38bc945429d
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/GcSnapshot.java
918aaa5717fce6081557c82ce1c439b6922737d5 13-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Use the new log tag constants from LayoutLog

Change-Id: I29dd578ae16405358d3673caf13528be393f0967
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/impl/GcSnapshot.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
310a4d815b693e358d151b9aa2823c5022993f9b 13-Jan-2011 Xavier Ducrohet <xav@android.com> LAyoutLib: Fix build by adding missing IWindowSession implementation.

Change-Id: I0af178d149b782cac3ae0c36fa5fc03f4dc6118b
ayoutlib/bridge/android/BridgeWindowSession.java
1f1957f50fec4bc8d8716793d22bb23ee7fb4a7f 13-Jan-2011 Xavier Ducrohet <xav@android.com> Merge "LayoutLib: move MockView back into its original package." into honeycomb
66a95e4dbeb1c6d33ceb7c320033041e7f8e2aaa 13-Jan-2011 Xavier Ducrohet <xav@android.com> Merge "LayoutLib: Add getViewParent/getViewIndex on RenderSession." into honeycomb
ee592fe4e60e940599fc1ccf43a98eb80961feb8 13-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: move MockView back into its original package.

This is used by Eclipse when the custom view is not found.
It couldn't find the view in the new package either.

We should probably move this logic of creating a mock view
into the layout library instead.

Change-Id: Ifa1a717cddf7004a7719bb4d0798cd53b43273ea
ayoutlib/bridge/MockView.java
ayoutlib/bridge/android/MockView.java
162ee1ed3d6c8a1e6d9347136e623e3429f6f3f8 13-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Add getViewParent/getViewIndex on RenderSession.

Change-Id: If91aa837b71a7329f53b1c4190332c2296166940
ayoutlib/bridge/BridgeRenderSession.java
cb27d4b2f530033c90432745115b914d8f26c3e7 13-Jan-2011 Xavier Ducrohet <xav@android.com> Merge "LayoutLib: use tags in logs." into honeycomb
56222cfbe9973c518f7e8c9113c614de80b5a4b2 13-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: use tags in logs.

Change-Id: Ib85272249d285ecef409bf063903bcd91514a424
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/GcSnapshot.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
02d2b3ba9ba830a8147db2739613f7bbb2d0fcbf 11-Jan-2011 Christopher Tate <ctate@google.com> API CHANGE: startDrag() now takes "int flags" instead of "boolean localOnly"

There will be, in the future, a flag (View.DRAG_FLAG_GLOBAL) that means
for the drag to be cross-application. For now that flag constant is @hide
and furthermore the server-side implementation strips it, enforcing
local-only drags.

Change-Id: I8db840480ab90e18a5b8ecf29d62b4e6eafd405e
ayoutlib/bridge/android/BridgeWindowSession.java
d7cbf3f72c73ba01293f6676453352ef60df3778 12-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Log error when style can't be found.

Change-Id: I9a88cdac44a2d31c053e7f0c92a14e69bd82ac83
ayoutlib/bridge/android/BridgeContext.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
6c740cf71e5ce5ba7c8493c545c3a57c57ac7024 11-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Improve error reporting.

Change-Id: I37cad7e2efb959202960c57b271c55c759867139
nternal/util/XmlUtils_Delegate.java
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
0de16070935adb8656d646b8c69a362652db7443 11-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: fix XmlUtils.convertValueToInt

It looks like the device implementation of Integer.parseInt
is able to handle converting hexa value > 80000000 while the
desktop VM cannot.

This patch provide a fix for this.

While implementing it and running the TestDegates test I realized
that some delegate methods for Region were mising, so this adds them
too.

Change-Id: Ifee1efd47c8c52adc2f4658ec4fc8bd55adb84b4
nternal/util/XmlUtils_Delegate.java
b3830b8978aa05746912210932e26ebf1836aab5 11-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: only support animator-type animations.

Change-Id: Ia3609fc5d11555190bc323d61a3577144a4692fd
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/impl/RenderSessionImpl.java
eb87b3bb53a8a9e9a246b4b70ea40172e2229c85 11-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: fix some issue with resource resolution.

TypedArray.getResourceId() is not only about id/foo,
it can be any type of resources.

Change-Id: Ia5e147bc078bb349a3fa500a04c596ae44ea34ce
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/impl/RenderSessionImpl.java
419e8296ea76c5f1db1abbaa88b39b538fa42403 10-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: move asserts around.

Change-Id: I6fcfcf2e6fad1d9fa172b9a8c20c72fa2533e7fa
ayoutlib/bridge/android/BridgeTypedArray.java
c77515e59029580caa68ba7602264ebdfd602daf 10-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: display warning when a resource reference fails to resolve.

Also fixed some warnings where a field hid one from a parent class.

Change-Id: I04ed19ebc49ae0bb0abdb0b25bc1c182fa0db440
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeTypedArray.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/RenderSessionImpl.java
46a329244db12b6f7afc3c9a6409d420241a1058 08-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: finish Typeface and unload them in dispose.

Change-Id: I3a48f84678f62d669d303fc73b041bb3fe5f333b
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/impl/RenderSessionImpl.java
7550ec1d8e526c4ae8c0bb08b06e1b6e799eacec 08-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: remove fade in/out transition on moveChild.

Change-Id: I69a70ecb165f19feca55fc30a3f48ebea896daa3
ayoutlib/bridge/impl/RenderSessionImpl.java
d7cc1244d7f0901688545c8535fa531fbb68669a 08-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: fix moveChild again.

Change-Id: Ib69a06e44be1e332f0f43c36c795c86270cb1b71
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/RenderSessionImpl.java
2b9c38ab62abc8d5b2f956e961087f259caf25ff 07-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: fix animated moveChild.

The child can only be added to the new viewgroup
after it's been removed from the previous one, which
is delayed if there's an animation.

Change-Id: I9123a2670d0d17b3eb6f8f89085ebab8ca2b800f
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/RenderSessionImpl.java
a7cac5e0542779cadf0f5ccf71584e4b4425f7a6 07-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: fix clipping issues.

There were two issues:
- Graphics2D.setClip only works on rectangular shapes.
This means doing a setClip on a non rectangular shape should
basically reset the clip and intersect with the new shape.

- the current clip can be null, so the combineShape method
must handle it.

Change-Id: Id2cd7475e991d8b533ff2e8850cc2c27663f9e52
ayoutlib/bridge/impl/GcSnapshot.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.
ayoutlib/bridge/Bridge.java
b44b43b1579486ff7ecd0f7528f17711acdeae98 23-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Support Region through delegates.

also finish supporting some clip operation
on the canvas.

Change-Id: I743b9e52a7aa6e9340506f1c904cc1cfbf3ff81f
ayoutlib/bridge/impl/GcSnapshot.java
d43909c7503e11eb335a452d296a10804bb01fd6 23-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: add support for unsupported drawing modifiers.

DrawFilter, Rasterizer, ColorFilter and MaskFilter
are not supported but we need to provide their
JNI counterparts anyway, to at least display warnings
when they are used.

Also improved the API to query Paint for Shaders
and PathEffects, and clean up some code by
moving asserts into the DelegateManager.

Change-Id: I8942514565d28576d5608c6373bda25d86d42ff2
ayoutlib/bridge/impl/DelegateManager.java
ayoutlib/bridge/impl/GcSnapshot.java
20805343296eef04081fee82fd04547f51225fe3 23-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Fix Canvas layer support with 2+ layers

- When drawing is not clipped to the top layers,
drawing should not happen automatically on all
existing layers. Instead each layer's flags dictate
whether drawing should happen on layers beneath, starting
with the top layer.
- upon restore, the same mechanism is taken. Only blit
a layer into the layer beneath if it was drawn into
using the logic above.

Also fixed:
- saveLayer() does not, in fact, always save matrix
and clip info. The flag dictate this, the same way
it does in save()
- drawing code didn't properly detect the case of drawing
into layers if a save() was called after saveLayer().
Now the code only looks at the layer list which provide
all the needed info (flags mostly), and doesn't rely
on mLocalLayer (which is used during restore only now).
- Properly handle HAS_ALPHA_LAYER_SAVE_FLAG (or lack
thereof) when creating the BufferedImage for the layer.

Change-Id: I2fbbcc0f5d3a3dd208763705bc23e6658fd4e573
ayoutlib/bridge/impl/GcSnapshot.java
b1da1afa7418960b650780250bbd34c81af61aa3 22-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: improve bitmap support.

Change-Id: I703c2bdf51380b54fd5c20b08d3bc74833d9bc6e
ayoutlib/bridge/impl/GcSnapshot.java
d38e776a3cc8cb53945cbebafbe6f6c2e3501fa5 21-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: support for layers.

Layers require that drawing methods potentially
draw in more than one bitmaps.

To handle this this patch offers the following:
- move all drawing methods to use Drawable
- Drawables are now handled by GcSnapshot since
its the one handling the layers
- moved Canvas_Delegate.createCustomGraphics to
GcSnapshot which does not expose the Graphics2D
objects anymore so its draw() methods are the only
way to draw.
- handles creating layers in GcSnapshot.save() and
blitting them in restore()

Other changes:
- Clean up the create/save API in GcSnapshot
- Fixed drawing bitmaps with alpha and other
composite modes.

Change-Id: I1e230087493d044a10de71f4b6d29083e3f3bf64
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/GcSnapshot.java
19a021038f2f4683dddef651543d7298f5bd7218 16-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Update layoutlib with revised API.

Change-Id: I78929df621f48e85d9cbefe1f5590f9ce99bbaff
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeLayoutScene.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/android/BridgeXmlBlockParser.java
ayoutlib/bridge/android/BridgeXmlPullAttributes.java
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/LayoutSceneImpl.java
ayoutlib/bridge/impl/PlayAnimationThread.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.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.
ayoutlib/bridge/Bridge.java
cfdc784b6cdcbbb2bf2ba4d53d9a9eb2c37278a3 15-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: replace the stack of Graphics2D with custom snapshots.

The first step is to allow the canvas to save only the matrix or
the clip. Previously, since the graphics2D were created completely
new on each save, everything was saved.

Also allows to set transform/clip on the Canvas when no bitmap
has been set (and therefore no Graphics2D exists).

This is required by BitmapFactory.

Change-Id: I37eff6dde1ca708d58ba317b40e9b3236f3ef3d0
ayoutlib/bridge/impl/GcSnapshot.java
f1416e4dffb0874f163febfa12f2648eac0c3a77 14-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Misc fix to rendering.

Change-Id: Ia73fab1be3c01e6ce5791973e636e45a0f75ceb6
ayoutlib/bridge/impl/LayoutSceneImpl.java
90c6b7e639921e264ac65699439578bcbdbf583a 14-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Use the new ninepatch API to suppor density.

LayoutLib now compiles against a prebuilt of ninepatch.

Change-Id: I0a1ca60af90933c171ab3aa456b47f0329df2f55
ayoutlib/bridge/impl/ResourceHelper.java
6735cffc1ddd18bdd6a46011e42d89204435361a 11-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: parsed resources were always set as platform res.

I broke this last week when adding the support for
layout params in moveChild.

Change-Id: Iaaf9b9f685ca301638d4037e98428ea0a00279c9
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/impl/LayoutSceneImpl.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/android/BridgeXmlPullAttributes.java
ayoutlib/bridge/impl/LayoutSceneImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/impl/TempResourceValue.java
8d74c978bbf3da4095ef8e40c005a6fdf0637071 07-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: explicitely override PropertyValuesHolder native code.

Change-Id: Ic7dd9efc990d01b20db144117cb11eb130349048
ayoutlib/bridge/impl/LayoutSceneImpl.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/LayoutSceneImpl.java
ayoutlib/bridge/impl/PlayAnimationThread.java
ayoutlib/bridge/impl/ResourceHelper.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/LayoutSceneImpl.java
ayoutlib/bridge/impl/PlayAnimationThread.java
01811aa86279af1b341a4fff344d66c0ebdd63da 03-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Create new layoutparams when moving a child

Change-Id: Ie2183490e8d26ef194030a9d87fe7745f24f1d83
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeLayoutScene.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeLayoutParamsMapAttributes.java
ayoutlib/bridge/android/BridgeXmlBlockParser.java
ayoutlib/bridge/impl/LayoutSceneImpl.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeLayoutScene.java
c8aec064f9f304c88f61c8c1aa3d60521b92177a 02-Dec-2010 Xavier Ducrohet <xav@android.com> Layoutlib: update with new add/movechild API.

Change-Id: I33e3a07cd7db7fe996d1f52b84b4b3bf21065a51
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeLayoutScene.java
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/LayoutSceneImpl.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeLayoutScene.java
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/LayoutSceneImpl.java
c14e7dd8ba15f517a5402ad802377b1d60784416 02-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: implement insert/move/removeChild.

Change-Id: I1c05ff4dc80e5ee4ea67d322acaf9c94276f84e1
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeLayoutScene.java
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/LayoutSceneImpl.java
30c77d689ead610685a5e0bd4078b44eb89360ff 30-Nov-2010 Xavier Ducrohet <xav@android.com> LayoutLib: get AWT image from new image factory.

Change-Id: Ib760af8a77fefac2571b8b4e48b4728e158aab2f
ayoutlib/bridge/impl/LayoutSceneImpl.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeLayoutScene.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/impl/AnimationThread.java
ayoutlib/bridge/impl/LayoutSceneImpl.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/NinePatchDrawable.java
ayoutlib/bridge/impl/LayoutSceneImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
9223b6737c56619c02125ce988bb21fc4fde264b 20-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: support for editing embedded layouts.

When Resources.getLayout(int) is called to return a parser
for an embedded layout, this queries the current parser for
a custom parser (Eclipse will provide one on top of the current
XML model being edited)

Change-Id: Ia9e837358f67daed0a835e1b3f4f50c0516ceee9
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeXmlBlockParser.java
ayoutlib/bridge/impl/Stack.java
fb25cae1916da1caf206ede879f07a4f8b61cfec 19-Nov-2010 Xavier Ducrohet <xav@android.com> LayoutLib: use the new expand API.

Change-Id: I248de70ebe97aa6fb1cbcb5b6572a4a46c5ca1ba
ayoutlib/bridge/impl/LayoutSceneImpl.java
55acd60be3c027c224a74290df7bedc1a80c669f 19-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: support viewkey in include nodes.

When an include tag is parsed, the custom bridge
code never has access to both parsers at the same
time.
The child parser is created out of an in (representing
the layout id), and the code inflating the content of
the include layout doesn't see the parent parser either.

This changeset adds a parser stack in the BridgeContext
in order to allow access to the parent parser when setting
the viewkey. This is only used if the current parser depth
is 1 (top node), as we only want to set the include
node to the top node of the included layout.

Change-Id: I2ac3b72a0c84a269d9019f44f98cbc0b615ab959
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeXmlBlockParser.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
ayoutlib/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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/impl/DelegateManager.java
4d9e32f07c2d7aef47c82449371b0bf362e3647a 18-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: support XML based ColorStateList.

This fixes the rendering of the TabHost in Eclipse.

Change-Id: I333c4d65b18df76871e24a04f0a888ae42ba40ef
ayoutlib/bridge/android/BridgeResources.java
cf52390eee4c9ae792ef63af1528b2e71b33a04f 12-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: Fill the default prop value map for View objects.

Change-Id: I35426ced17a10eb092fac2153276f1202692876f
ayoutlib/bridge/BridgeLayoutScene.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/LayoutSceneImpl.java
135f80dcb4a1fead062714a8f6fdcef288fdddd8 12-Nov-2010 Tor Norbye <tnorbye@google.com> Fix fill color alpha in layoutlib

new Color(int) ignores the upper 8 bits - it creates a color without
an alpha channel. In order to pass in rgba we have to use a different
constructor, new Color(int,true).

(In the layout library API we should also specify that the custom
color, if specified, needs to include an alpha, or in particular add
in 0xFF<<24 if the color is opaque.)

Change-Id: I1c44caed8a5780e61b1c799f3b45bef3eb7bc97b
ayoutlib/bridge/impl/LayoutSceneImpl.java
071dee288ca726c7c15754c2559403b9cbf950bd 11-Nov-2010 Xavier Ducrohet <xav@android.com> Misc fix in layoutlib bridge + View.isIneditMode as delegate.

Change-Id: Ideab29167e933203da99d4270cebcb777726201f
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/impl/TempResourceValue.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeAssetManager.java
ayoutlib/bridge/BridgeContentProvider.java
ayoutlib/bridge/BridgeContentResolver.java
ayoutlib/bridge/BridgeContext.java
ayoutlib/bridge/BridgeLayoutScene.java
ayoutlib/bridge/BridgeResources.java
ayoutlib/bridge/BridgeTypedArray.java
ayoutlib/bridge/BridgeXmlBlockParser.java
ayoutlib/bridge/BridgeXmlPullAttributes.java
ayoutlib/bridge/DelegateManager.java
ayoutlib/bridge/FontLoader.java
ayoutlib/bridge/LayoutResult.java
ayoutlib/bridge/MockView.java
ayoutlib/bridge/NinePatchDrawable.java
ayoutlib/bridge/ResourceHelper.java
ayoutlib/bridge/ResourceValue.java
ayoutlib/bridge/android/BridgeAssetManager.java
ayoutlib/bridge/android/BridgeContentProvider.java
ayoutlib/bridge/android/BridgeContentResolver.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeInflater.java
ayoutlib/bridge/android/BridgeResources.java
ayoutlib/bridge/android/BridgeTypedArray.java
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/android/BridgeWindowSession.java
ayoutlib/bridge/android/BridgeXmlBlockParser.java
ayoutlib/bridge/android/BridgeXmlPullAttributes.java
ayoutlib/bridge/android/MockView.java
ayoutlib/bridge/android/NinePatchDrawable.java
ayoutlib/bridge/impl/DelegateManager.java
ayoutlib/bridge/impl/FontLoader.java
ayoutlib/bridge/impl/LayoutSceneImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/impl/TempResourceValue.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeContext.java
e0c763f54f5848a2513990fe37791b6f60ef7760 05-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: more text drawing.

Change-Id: I32f46d23e746b095be0577a53b61567a868f0b8a
ayoutlib/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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/NinePatchDrawable.java
5de11a18e9151e6bc9b3e81cf31fc43dc63dffbf 30-Oct-2010 Xavier Ducrohet <xav@android.com> Implement the layoutlib Bitmap through a native delegate.

This does not implement all the native methods of the
android.graphics.Bitmap class, only what's needed to draw an
ImageView object. The rest will be implemented after Canvas and
Paint have been moved to the native delegate.

Change-Id: Ia0c3b2cafa03871c298deaef5817a25ac1c35521
ayoutlib/bridge/ResourceHelper.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeContentProvider.java
ayoutlib/bridge/BridgeContentResolver.java
ayoutlib/bridge/FontLoader.java
4c9d691a01ab6741e4b54b69edca7b528603d9fa 27-Oct-2010 Xavier Ducrohet <xav@android.com> am 57f7ccc4: am 63e5d07e: Merge "Fix issue with project resources overriding framework resources." into gingerbread
4f291d33e14e62b3301acc056a82fe206c74835f 22-Oct-2010 Xavier Ducrohet <xav@android.com> Reimplement the native matrix method using the new delegate way.

Instead of renaming the old Matrix class into _Original_Matrix
and have layoutlib provide a full new implementation of Matrix,
we keep the old one by only modifying it to implement the native
methods which calls out to a new Matrix_Delegate class.

The goal is to not have to maintain the java portion in
sync between the framework and the layoutlib version.

Change-Id: I3e1aefffbae45e91b75331c0c6ff2260323deacd
ayoutlib/bridge/DelegateManager.java
c2e28dd74813799aad132673ff9d302657dd04ed 27-Oct-2010 Xavier Ducrohet <xav@android.com> Fix issue with project resources overriding framework resources.

Framework resources loaded through Drawable.createFromXml could
be overriden by project resources if there were loaded through
a state list drawable where the final resource name was used
by a project resource (of the same type).

This ensures that the XML parser knows that it's a framework
resource being parsed and that the resource resolution uses
that information.

Change-Id: I39cf9eba755e55f1604b968637aeecff969a558d
ayoutlib/bridge/BridgeContext.java
ayoutlib/bridge/BridgeXmlPullAttributes.java
ayoutlib/bridge/ResourceHelper.java
d815e3704850a513e8d02ba3b88fa47f41cea9a5 26-Oct-2010 Xavier Ducrohet <xav@android.com> Fix rendering of digitalClock/Gallery in Eclipse editors.

Change-Id: Iedcd3184cd9f34be8d0695a51eda953ac68683ce
ayoutlib/bridge/BridgeContentResolver.java
ayoutlib/bridge/BridgeContext.java
f241c40476b6ff2acf57617d4f90cc8c229f1207 26-Oct-2010 Raphael <raphael@google.com> Revert "Fix rendering of digitalClock/Gallery in Eclipse editors."

This reverts commit 25e96ce7b99f9736a6024d25bd65a83774c7640f.
ayoutlib/bridge/BridgeContentResolver.java
ayoutlib/bridge/BridgeContext.java
68404a0125999ebe0d58c3eb1845b3c9aaf4d51e 26-Oct-2010 Xavier Ducrohet <xav@android.com> am a44a5e02: am 1b6180ec: Merge "Fix rendering of digitalClock/Gallery in Eclipse editors." into gingerbread
25e96ce7b99f9736a6024d25bd65a83774c7640f 26-Oct-2010 Xavier Ducrohet <xav@android.com> Fix rendering of digitalClock/Gallery in Eclipse editors.

Change-Id: I80f4f90b173529632eaf2fbc3bb5471b7ede8216
ayoutlib/bridge/BridgeContentResolver.java
ayoutlib/bridge/BridgeContext.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
ayoutlib/bridge/Bridge.java
79d433dd8772fb20caa947c2b0b20965348954a7 09-Oct-2010 Xavier Ducrohet <xav@android.com> am 556866a2: am 656d2165: Merge "Parser is optional in obtainStyledAttributes." into gingerbread

Merge commit '556866a2ea1f4758a79fe4f207153b71815ed400'

* commit '556866a2ea1f4758a79fe4f207153b71815ed400':
Parser is optional in obtainStyledAttributes.
f8e4c1f57bbb658f53995443b0f175e50a2fc814 05-Oct-2010 Xavier Ducrohet <xav@android.com> Parser is optional in obtainStyledAttributes.

If the parser is null it just means the default style/values are
used.

Change-Id: I5ff3d632fd5dfc5a1ce42796b2fef7b30f9fbf34
ayoutlib/bridge/BridgeContext.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
ayoutlib/bridge/Bridge.java
cca1f0e3476edd09cdd81b075a6b7780a2959b46 27-Sep-2010 Dianne Hackborn <hackbod@google.com> Allow all apps to call ContentResolver.getType().

I can't find the bug number for this, but it is needed for some things
we are doing where the app building an intent may not have access to the
URI in the data field. This is for HC, but doing in GB to avoid introducing
integration issues.

Change-Id: I0cac971854198b18775d2a73deb80f23431bfbe2
ayoutlib/bridge/BridgeContentResolver.java
8313fc7e94e46e5cc09f457a15a771a325b9f74f 27-Sep-2010 Dianne Hackborn <hackbod@google.com> Allow all apps to call ContentResolver.getType().

I can't find the bug number for this, but it is needed for some things
we are doing where the app building an intent may not have access to the
URI in the data field. This is for HC, but doing in GB to avoid introducing
integration issues.

Change-Id: I0cac971854198b18775d2a73deb80f23431bfbe2
ayoutlib/bridge/BridgeContentResolver.java
8e03b7566c42621fda01186b66b019142eb84fbf 14-Jun-2010 Jeff Brown <jeffbrown@google.com> resolved conflicts for merge of 9e660c82 to master

Change-Id: Ic4bd85cbaa5b9a10dcb474a0dad46490bf967e43
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
ayoutlib/bridge/Bridge.java
74f170f9468d3cf6d7d0ef453320141a3e63571b 02-Jun-2010 Vasu Nori <vnori@google.com> new API in Context. on openDatabase, new param DatabaseErrorHandler

add new method openOrCreateDatabase in Context.java to allow
callers specify a DatabaseErrorHandler object to be used when
database corruption occurs.
add new constructor in SQLiteOpenHelper to accept DatabaseErrorHandler
as an additional param to be used when SQLiteDatabase instance is
created.

Change-Id: I912a0202a74510f9ca0206dd8101c4abab9102ae
ayoutlib/bridge/BridgeContext.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
ayoutlib/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.
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeTypedArray.java
bc3323bea64bbeab0edd0df5e344d844a8d89509 24-Feb-2010 Xavier Ducrohet <xav@android.com> Fix the layoutlib to still support fill_parent.

Change-Id: I5e1825f1f853cf9e31b2ee262edce636a030429d
ayoutlib/bridge/BridgeContext.java
ayoutlib/bridge/BridgeTypedArray.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.
ayoutlib/bridge/Bridge.java
99e1cdae99a99170011150d6827bf4c9ee63c075 12-Feb-2010 Xavier Ducrohet <xav@android.com> Fix in layoutlib due to some changes in the frameworks.

Some methods disappear or became abstract in the base class
(breaking @Override)

Change-Id: Id4d298ee84ba008ac97ecaaf90b19003ac09f104
ayoutlib/bridge/BridgeAssetManager.java
ayoutlib/bridge/BridgeContext.java
27b28b3f62bd3b54fa13acd5d035940b9be464f3 09-Feb-2010 Tobias Haamel <haamel@google.com> Introduce special UI modes for night and car usage.

The device mode is now called ui mode. Furthermore is the order of
precedence for the resources now in such a way that the ui mode needs
to be specified after the orientation and before the density.

The ui mode can be set, like it is done for the locale, as follows:

IActivityManager am = ActivityManagerNative.getDefault();
Configuration config = am.getConfiguration();
config.uiMode = Configuration.UI_MODE_TYPE_CAR | Configuration.UI_MODE_NIGHT_ANY;
am.updateConfiguration(config);

To allow users to disable the car mode and set the night mode the IUiModeManager
interface is used.

The automatic night mode switching will be added in a separate change.
ayoutlib/bridge/BridgeAssetManager.java
e83cefcef07f9ac025642c1ffec76b4c7ab39cf2 05-Feb-2010 Dianne Hackborn <hackbod@google.com> New external storage APIs.

This implements the spec for external storage organization, and
properly reflects how the media scanner organizes the files it finds.

Also includes package manager support for removing app private
files from external storage when the application is uninstalled.

For the new APIs and paths, the main place to look is Environment
and Context.
ayoutlib/bridge/BridgeContext.java
6d40ee33f534aa31c5d9c4dbc6049275e3b754c2 12-Jan-2010 Xavier Ducrohet <xav@google.com> am f5a84f8a: am dfe25b0e: Merge "LayoutLib: support for custom styles." into eclair

Merge commit 'f5a84f8a7f91422f698ffbea3fabf77f2f7f77c8'

* commit 'f5a84f8a7f91422f698ffbea3fabf77f2f7f77c8':
LayoutLib: support for custom styles.
9ce3b775f55abd0ceb1d8e96968ce725f1f8bade 11-Jan-2010 Xavier Ducrohet <xav@android.com> LayoutLib: support for custom styles.

Change-Id: Ic6c2ef234589f45db15024261d698066aa6e2f4e
ayoutlib/bridge/BridgeContext.java
2924a51fd04856012b4ac2acdfffc3b7d469f62f 09-Jan-2010 Romain Guy <romainguy@android.com> Fix duplicate constant in layoutbridge.
ayoutlib/bridge/BridgeConstants.java
980a938c1c9a6a5791a8240e5a1e6638ab28dc77 09-Jan-2010 Romain Guy <romainguy@android.com> Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/BridgeResources.java
ayoutlib/bridge/BridgeTypedArray.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.
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeTypedArray.java
9ddb7df88a62a131519264f75f5d6616ee11b6e6 17-Nov-2009 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I70c86738e2894d7f8c51034aea8fda1585a6fcb3
ayoutlib/bridge/BridgeAssetManager.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
ayoutlib/bridge/Bridge.java
bf6956b1d95442e9d9c483894d578fe6b7044cbb 10-Nov-2009 Marco Nelissen <marcone@google.com> Add a way for wallpapers to know the delta between virtual screens.
ayoutlib/bridge/Bridge.java
9a4593ffcce99e9f7b89b165911c2a870c27cc45 09-Nov-2009 Xavier Ducrohet <xav@android.com> Support for fallback fonts in layoutlib.

BUG 2041229

Change-Id: Ib12bcb7f6d8f0e4c2b51871f8129ecf51fa938ee
ayoutlib/bridge/FontLoader.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
ayoutlib/bridge/Bridge.java
f18ccc13a663fe385ecdfbdfd55ef503d48833f5 28-Sep-2009 Xavier Ducrohet <xav@android.com> Fix a warning output.

This was introduced by the dpi work.

Change-Id: I7c7b1596085f70532b8279139c287a2a58f57046
ayoutlib/bridge/BridgeTypedArray.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
ayoutlib/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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeResources.java
ayoutlib/bridge/BridgeTypedArray.java
ayoutlib/bridge/ResourceHelper.java
efa199f016985b0a9d0471e42c803ee9f7941f0e 19-Sep-2009 Dianne Hackborn <hackbod@google.com> Add API to send an ordered sticky broadcast.

Change-Id: Ida7081204e226db0cd07ff618c08e308a909ec0c
ayoutlib/bridge/BridgeContext.java
fa82f22f1d8c4c828bdf9b670006be4f4fec772e 18-Sep-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2093608: Calendar widget takes a few seconds to launch

Avert your eyes!

The key change here is that RemoteViews can now call a Context API to
start its pending intent, which inside of the activity manager we can
use to determine to cancel the timeout delay for external entities
to disrupt the home screen.

Change-Id: If097cf7478cbed7a3c04a304050bd7fd5703d197
ayoutlib/bridge/BridgeContext.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
ayoutlib/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.
ayoutlib/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).
ayoutlib/bridge/Bridge.java
f369b7199f537bba7d8fced8b0f826249d19fdf5 18-Aug-2009 Xavier Ducrohet <xav@android.com> am ad4bc607: Merge change 21772 into donut

Merge commit 'ad4bc607bd236dd9b06df9cf89dc5e14541ff66c' into eclair

* commit 'ad4bc607bd236dd9b06df9cf89dc5e14541ff66c':
Fix Resources#opeRawResource(int, TypedValue) in layoutlib.
72e4bcd3d0da90f6c9550c93e58c12b2903a5ab8 18-Aug-2009 Xavier Ducrohet <xav@android.com> Fix Resources#opeRawResource(int, TypedValue) in layoutlib.
ayoutlib/bridge/BridgeResources.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.
ayoutlib/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.
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeCanvas.java
ayoutlib/bridge/NinePatchDrawable.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
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeConstants.java
1d47a5142682c1f9f9a04fdbe1ec863fd5550c30 14-Aug-2009 Xavier Ducrohet <xav@android.com> am 94ff3f1f: Merge change 21063 into donut

Merge commit '94ff3f1f08805b68c5524b39024968aebcdc83ee' into eclair

* commit '94ff3f1f08805b68c5524b39024968aebcdc83ee':
Fix handling of reference XML file in layout files
314e0226a26cd79b5080dcb76d566fa6f83ff695 14-Aug-2009 Xavier Ducrohet <xav@android.com> am e1b63d22: Merge change 21033 into donut

Merge commit 'e1b63d224a0a68191f087186c470cde317e3fa76' into eclair

* commit 'e1b63d224a0a68191f087186c470cde317e3fa76':
Mock ServiceManager and AccesibilityManager to make the view renders in ADT
08e2a4b56f23ce02f17300438f76ccc1f663f183 13-Aug-2009 Xavier Ducrohet <xav@android.com> Fix handling of reference XML file in layout files

This allows layout that references animation to properly load
in the layout editor in ADT
ayoutlib/bridge/BridgeResources.java
7953e7d89b1d4d7297176fbb6aeea882577df8e6 13-Aug-2009 Xavier Ducrohet <xav@android.com> Mock ServiceManager and AccesibilityManager to make the view renders in ADT

BUG: 2049348
ayoutlib/bridge/BridgeContext.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.
ayoutlib/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.
ayoutlib/bridge/Bridge.java
eba337ad09ba93b31f4e9ec8f99be3ae2811bf89 23-Jul-2009 Xavier Ducrohet <xav@android.com> Reimplement TypedArray.getLayoutDimension(int, int) for the layout bridge.
ayoutlib/bridge/BridgeTypedArray.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.
ayoutlib/bridge/Bridge.java
723738cfaec3dd7b0fe152c872c41bebf94074c4 26-Jun-2009 Dianne Hackborn <hackbod@google.com> 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.
ayoutlib/bridge/BridgeAssetManager.java
63e7155c7d1d0c3f0027400aa09e9a45f648a80d 19-Jun-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 4696 into donut

* changes:
Fix targetSdkVersion, make resize mode a flag, delayed dexopt, easy ApplicationInfo.
5c1e00b14d2ef10ec76abf3e951fa8003a67f558 19-Jun-2009 Dianne Hackborn <hackbod@google.com> Fix targetSdkVersion, make resize mode a flag, delayed dexopt, easy ApplicationInfo.

- Fix a bug where targetSdkVersion could not be set if minSdkVersion. Stupid, stupid.
Also make sure to fail if minSdkVersion is for a code name. Really stupid.

- Change the API for resize compatibility mode to be a bit in the flags field, instead
of a separate boolean.

- Implement delayed dexopting, to avoid the looong full dexopt during boot. This is
only enabled for "eng" builds. When in this mode, the activity manager will make
sure that a dexopt has been done before loading an .apk into a process, and will
try to avoid displaying ANRs if they are due to the dexopt causing some operation
to take longer than it normally would (though I make no guarantees about this
totally working).

- Add API to Context to get the ApplicationInfo for its package, for easy access to
things like targetSdkVersion.
ayoutlib/bridge/BridgeContext.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.
ayoutlib/bridge/Bridge.java
23ecae3bbb60c5af940f3a22170d75eb6ac05b69 11-Jun-2009 Joe Onorato <joeo@android.com> Fix SharedPrefsBackupHelper so it doesn't hard code the paths to the files.

This took quite a bit of refactoring.
ayoutlib/bridge/BridgeContext.java
9189cabb0b6c6c28232fe6f412b7ba7a37352a6a 03-Jun-2009 Mitsuru Oshima <oshima@google.com> * Moved supports-density tag under manifest
* Refactored Compatibility code
* Added CompatibilityInfo class
* Removed getApplicationScale from Context
* Added Resources#getCompatibilityInfo so that RootView can get the compatibility info w/o going through Context
* Expandable support
* Added expandable tag under manifest
* Old application w/o expandable is given the default screen size ([320, 480] x density).
* The non-expandable window is centered.
ayoutlib/bridge/BridgeContext.java
231cc608d06ffc31c24bf8aa8c8275bdd2636581 28-Apr-2009 Dianne Hackborn <hackbod@google.com> Rewrite SyncStorageEngine to use flat files and in-memory data structures.

The previous implementation used a database for storing all of its state, which could cause
a significant amount of IO activity as its tables were updated through the stages of a sync.
This new implementation replaces that in-memory data structures, with hand-written code
for writing them to persistent storage.

There are now 4 files associated with this class, holding various pieces of its state that
should be consistent. These are everything from a main XML file of account information that
must always be retained, to a binary file of per-day statistics that can be thrown away at
any time. Writes of these files as scheduled at various times based on their importance of
the frequency at which they change.

Because the database no longer exists, there needs to be a new explicit interface for
interacting with the sync manager database. This is provided by new APIs on IContentService,
with a hidden method on ContentResolver to retrieve the IContentService so that various
system entities can use it. Other changes in other projects are required to update to the
new API.

The goal here is to have as little an impact on the code and functionality outside of
SyncStorageEngine, though due to the necessary change in API it is still somewhat extensive.
ayoutlib/bridge/BridgeContentResolver.java
8169daed2f7a8731d478b884b1f455c747b88478 29-Apr-2009 Mitsuru Oshima <> AI 147976: Compatibility mode support. Part 2.
* Introduced ApplicationScale (may not be good name. CompatibilityScale? CanvasScale? Pls let me know if you have better idea)
* Changes to RootView / SurfaceView
- Makes the app believe it's running in the supported density/resolution.
- Makes the window manager believe it's running at the right density/resolution.
* Added methods to Rect/Event for scaling up/down.
Known issues:
* certain kind of images (such as nine patch for buttons) seesm to be loaded not by app, thus does not take the scale into account,
which, in turn, is causing layout issue.
* ZoomButton in MapView is rendered in wrong place
* Transparent region on Surface is not correct
* Specifying different densities in one process is not working.
BUG=1770627

Automated import of CL 147976
ayoutlib/bridge/BridgeContext.java
e30661294bc590a11eef678bdf92c1dff75c36f9 16-Apr-2009 Xavier Ducrohet <> AI 146485: am: CL 146411 Fix BridgeCanvas#drawRoundRect
Original author: xav
Merged from: //branches/cupcake/...

Automated import of CL 146485
ayoutlib/bridge/BridgeCanvas.java
105925376f8d0f6b318c9938c7b83ef7fef094da 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
ayoutlib/bridge/BridgeTypedArray.java
4df2423a947bcd3f024cc3d3a1a315a8dc428598 05-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@136594
ayoutlib/bridge/Bridge.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeAssetManager.java
ayoutlib/bridge/BridgeCanvas.java
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/BridgeContentResolver.java
ayoutlib/bridge/BridgeContext.java
ayoutlib/bridge/BridgeResources.java
ayoutlib/bridge/BridgeTypedArray.java
ayoutlib/bridge/BridgeXmlBlockParser.java
ayoutlib/bridge/BridgeXmlPullAttributes.java
ayoutlib/bridge/FontLoader.java
ayoutlib/bridge/LayoutResult.java
ayoutlib/bridge/MockView.java
ayoutlib/bridge/NinePatchDrawable.java
ayoutlib/bridge/ResourceHelper.java
ayoutlib/bridge/ResourceValue.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeAssetManager.java
ayoutlib/bridge/BridgeCanvas.java
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/BridgeContentResolver.java
ayoutlib/bridge/BridgeContext.java
ayoutlib/bridge/BridgeResources.java
ayoutlib/bridge/BridgeTypedArray.java
ayoutlib/bridge/BridgeXmlBlockParser.java
ayoutlib/bridge/BridgeXmlPullAttributes.java
ayoutlib/bridge/FontLoader.java
ayoutlib/bridge/LayoutResult.java
ayoutlib/bridge/MockView.java
ayoutlib/bridge/NinePatchDrawable.java
ayoutlib/bridge/ResourceHelper.java
ayoutlib/bridge/ResourceValue.java
076357b8567458d4b6dfdcf839ef751634cd2bfb 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeContext.java
3dec7d563a2f3e1eb967ce2054a00b6620e3558c 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeContext.java
da996f390e17e16f2dfa60e972e7ebc4f868f37e 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
ayoutlib/bridge/Bridge.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeAssetManager.java
ayoutlib/bridge/BridgeContentResolver.java
ayoutlib/bridge/BridgeContext.java
ayoutlib/bridge/BridgeResources.java
ayoutlib/bridge/MockView.java
b798689749c64baba81f02e10cf2157c747d6b46 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
ayoutlib/bridge/Bridge.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeContext.java
ayoutlib/bridge/BridgeResources.java
ayoutlib/bridge/FontLoader.java
ayoutlib/bridge/LayoutResult.java
ayoutlib/bridge/ResourceHelper.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeAssetManager.java
ayoutlib/bridge/BridgeCanvas.java
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/BridgeContext.java
ayoutlib/bridge/BridgeResources.java
ayoutlib/bridge/BridgeTypedArray.java
ayoutlib/bridge/BridgeXmlBlockParser.java
ayoutlib/bridge/BridgeXmlPullAttributes.java
ayoutlib/bridge/FontLoader.java
ayoutlib/bridge/LayoutResult.java
ayoutlib/bridge/MockView.java
ayoutlib/bridge/NinePatchDrawable.java
ayoutlib/bridge/ResourceHelper.java
ayoutlib/bridge/ResourceValue.java