• 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 >>>)
0f5caab5762d9ace8e7d87e29296bcb8fdfe9b4b 22-Jun-2016 Adam Lesinski <adamlesinski@google.com> Fix build due to missing abstract method impl

getDisplay() was added to Context, which needs to be implemented
for BridgeContext.

Bug:28388969
Change-Id: I7b0ffcbbe252403e35f08d3fa40d6b0e4dbf0daa
ayoutlib/bridge/android/BridgeContext.java
790e5f6c1cab43fb377d86d3c9189a509b28b217 24-May-2016 Diego Perez <diegoperez@google.com> Workaround to display menus for AppCompat themes

Layoutlib currently does not implement menus for the support Toolbar.
When it detects that an AppCompat theme is being used, it will try to
use by default the support Toolbar which breaks the display of menus.
This works around the problem by forcing layoutlib
to use the framework toolbar in menu previews (regular activities
won't display the menu if they use AppCompat).

Bug: http://b.android.com/210946
Change-Id: Ic1d162c6d74119ef42895776c3bc3851a9549120
ayoutlib/bridge/impl/Layout.java
833bdcedceee60a873694a77587393abfc830eb5 16-May-2016 Yohei Yukawa <yukawa@google.com> Make IMS#clearInsetOfPreviousIme() reliable.

This is a follow-up to my previous CL [1] for Bug 15922840 so that we
can clear the following variables in a more reliable way.
- PhoneWindowManager#mLastInputMethodWindow
- PhoneWindowManager#mLastInputMethodTargetWindow

The idea behind CL [2] is that when InputMethodManagerService (IMMS) is
switching from an IME to another IME, IMMS can send a signal to
WindowManagerService (WMS) to remember the current IME's inset so that
the system can continue using it to reduce jank until the new inset is
specified by the next IME. As summarized in Bug 28781358, however, if
the next IME does not show the window after the IME switch, WMS (or
PhoneWindowManager to be precise) keeps using the previous IME's inset
unexpectedly until the new IME shows its window. All we have seen in
Bug 15922840 and Bug 26663589 fall into this category.

The idea of this CL is just adding a hidden API to InputMethodManager so
that InputMethodService#clearInsetOfPreviousIme() can surely terminate
the IME transition state managed in PhoneWindowManager, rather than
relying on a hack of calling SoftInputWindow#show() and
SoftInputWindow#hide(), which actually does not work for Bug 26663589.

[1]: Ib04967f39b2529251e4835c42e9f99dba2cf43f2
2977eb7b6ce82309a1bb1ba4ab698f503cb0388a
[2]: I5723f627ce323b0d12bd7b93f5b35fc4d342b50c
792faa2c16d319e874a1d633f964a78266d5f3f2

Note that addressing all the corner cases in [2] still requires lots of
non-trivial change. Hence this CL focuses only on Bug 26663589 (and
the case we handled in Bug 15922840).

Bug: 26663589
Change-Id: Ib567daa009c1139858dccadcfc6a04465ebecf36
ayoutlib/bridge/android/BridgeIInputMethodManager.java
5ca21e4ceca42be633031809b8ee43fd8688389b 10-May-2016 Diego Perez <diegoperez@google.com> Fix VectorDrawable_Delegate and DrawerLayout

Modify the nDraw call that has been changed in the framework to return
an int with the number of pixels allocated.
Modify the animation initialization render call to use the actual
measured size (instead of 0,0) so the DrawerLayout is setup
correctly.

Change-Id: I198de05206382c6489056f7c3d9a1d328864321c
ayoutlib/bridge/android/graphics/NopCanvas.java
ayoutlib/bridge/impl/RenderSessionImpl.java
77bdfb512f963701082c5c78e9a9db00b167fcb6 03-May-2016 Robert Carr <racarr@google.com> Prepare to replace windows across recreate().

When the activity locally recreates itself, nothing
on the server side is able to prepare preserving windows,
or replacing windows. The activity was trying to defer
removing the old window, but it was just waiting
until the new one was created, not until it was drawn,
thus resulting in a flicker. It's easy to backpack on the
existing replacement infrastructure.

Bug: 28221875
Change-Id: I55fc4ca78e9e11809473fedd8b30b6a6350cf852
ayoutlib/bridge/android/BridgeWindowSession.java
4c5e7a740a632829b48b2324f80a43ab94ac7551 29-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Add namespace before attr name in defPropMap" into nyc-dev
a43c4fa09ff758400c17c3533b77d783e713a115 27-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Add namespace before attr name in defPropMap

Change-Id: I36d094fb69d5f5ce0aebde04960ffcd19c27a2eb
ayoutlib/bridge/android/BridgeContext.java
5a91b615232374084a45752d7c09c25265e263ed 22-Apr-2016 Svetoslav Ganov <svetoslavganov@google.com> Merge "Disallow disable of the system shared libs." into nyc-dev
39e540caffca2584aa6c4cb74ce42dceb24a93f7 12-Apr-2016 Diego Perez <diegoperez@google.com> Separate measure so it can only run inflate if needed

This allows to only do inflate + measure and not to render.

Change-Id: I4be08513728b656f699e9115e14cf618d95b538a
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/RenderSessionImpl.java
e70464e11694712d62092ac3a623c32fe6d5e8a5 14-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Return complete properties map instead of per view" into nyc-dev
eaf1853b98d7bf2c3d693ad702050968ef0a404c 14-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Return complete properties map instead of per view

Change-Id: Ib7c71606d1bf43bbaa80f5601a8508d7aa49d953
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/PropertiesMap.java
ayoutlib/bridge/impl/RenderAction.java
ayoutlib/bridge/impl/RenderSessionImpl.java
a9c2500a6863dabdd786f17a25ce0bf3683109a2 14-Apr-2016 Svetoslav Ganov <svetoslavganov@google.com> Disallow disable of the system shared libs.

bug:28173410

Change-Id: If731f2d90312a083bb940f83431ba3eccf213947
ayoutlib/bridge/android/BridgePackageManager.java
49a54366c11ed5ac887e6f897aa6ee5e4b86489c 13-Apr-2016 Diego Perez <diegoperez@google.com> Merge "Synchronize access to the main looper" into nyc-dev
0a6a6dbe9107a3e31d74293f853b46ae0e5b9e7b 13-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added api to delete cache files for a given user" into nyc-dev
78c9eb8947538f63d2e06684663d400991dfff8f 13-Apr-2016 Suprabh Shukla <suprabh@google.com> Added api to delete cache files for a given user

Added an api to delete application cache files for a specific user. This
allows settings to clear cache files for work profile apps as well.

Bug: b/25338468
Change-Id: I52d4944a7a03b6d63ad44dd6bb868aec62815eab
ayoutlib/bridge/android/BridgePackageManager.java
79c59fe4a8544bdda5c56efecf9c2bc72f2f0e4e 12-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Add post resolve property values

Change-Id: Ia86b7dfc479cc5313cce36b6b3066fbb1d00c292
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/PropertiesMap.java
ayoutlib/bridge/impl/RenderAction.java
ayoutlib/bridge/impl/RenderSessionImpl.java
8d25697bf01faaf3a6bb8f9f3a0619437cacc22e 12-Apr-2016 Diego Perez <diegoperez@google.com> Synchronize access to the main looper

Change-Id: I4b9375d07c4191393c04f8b40905e63742b3baad
ayoutlib/bridge/Bridge.java
8cdf61a02e4652d53560c9758b8b15e76c50bfd7 07-Apr-2016 Diego Perez <diegoperez@google.com> Fix NPE when runnin testActivity

Change-Id: I7ac81cb286b8d5593ae7f5fedb99bfd0fda791c5
ayoutlib/bridge/android/BridgeContext.java
39f1311b545f1f8732ee3a8b565018dcd0da7323 06-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Clear ThreadLocal storage from Choreographer" into nyc-dev
61ccc9198ab09363edbf500d7669dbcfafc5fa28 06-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Clear ThreadLocal storage from Choreographer

Change-Id: I5abb5c68a635e7808b0a036ba4d9971cd0139aa3
ayoutlib/bridge/impl/RenderSessionImpl.java
bad02b0ec9fb977f588db405a878ade9535bf240 06-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Add properties from textAppearance to property map" into nyc-dev
91253ed04696ecd57636472dd8ac74660f65c5c2 05-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Add properties from textAppearance to property map

The default property map is used to get the list of XML properties that
a view queried. For things like textAppearance, these are additional
attributes that the TextView queries, but wasn't added to the property
map. Add them too.

Change-Id: I1e03fbeced224866de1dcc51b93d5aa5d5886ade
ayoutlib/bridge/android/BridgeContext.java
2605f91f705fbf51800c6fde8ee8cd5f199447b4 04-Apr-2016 Diego Perez <diegoperez@google.com> Separate inflate from render step

Up until now, createSession will always do a first render. With the new
embedded layoutlib we might want to actually call objects from the
inflated view before doing a render or even do it between renders.
This allows to avoid the first initial render unless needed.

This CL also fixes a bug that would only happen when multiple render
calls are issued. When scrolling, use scrollTo since we likely want
absolute positions, not relative.

Change-Id: I4b1d8388d7218a8de33e25cd546fd965fcb07dc7
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/RenderParamsFlags.java
ayoutlib/bridge/impl/RenderSessionImpl.java
fc970ab65ad8c860dd0654d59b70bbe271f95784 26-Feb-2016 Diego Perez <diegoperez@google.com> Implement VirtualRefBasePtr native methods

The VirtualRefBasePtr is used to track the usage of native objects from
the java side by reference counting. Implementing the class delegate to
make sure we dispose the objects correctly.

Change-Id: I3dd4717944b0dbe79f30e49b3083bf65c6e5276d
nternal/util/VirtualRefBasePtr_Delegate.java
ayoutlib/bridge/impl/DelegateManager.java
0b10c335c72cb610e71432a61f315e7670b9af41 29-Mar-2016 Robert Carr <racarr@google.com> Ensure we change SurfaceView size from UI thread.

We need to change the SurfaceView size from the UI thread
so that we can appropriately deliver the SurfaceChanged
callback. We also need to not preserve geometry
in this case, as if we don't update the surface
and layout size together we could get scaling. This still has
some potential for holes, as transactions are not synced with
the parent renderer, but we have other methods to avoid
these in the case of resizing. This fixes the remaining
issues with content sizing and surface view "out of sync".

Bug: 27780983
Bug: 27687126
Bug: 27676101

Change-Id: Idd7864f00e5cf7a4eb32dd66c0b389292a788069
ayoutlib/bridge/android/BridgeWindowSession.java
83b9db029b6fe02761e1c8e50eb8dce6f4d37d0f 28-Mar-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Fix menu popup rendering" into nyc-dev
97c0679b1a4e650191203d1a03159b3dec67252e 28-Mar-2016 Deepanshu Gupta <deepanshu@google.com> Fix menu popup rendering

Change-Id: I3394866d72af7fd1762ac477529a4a1bc473b7dc
ayoutlib/bridge/bars/FrameworkActionBarWrapper.java
ceb1ab1d2a71c6d4e0cccf110a198ff83cb97e5a 24-Mar-2016 Deepanshu Gupta <deepanshu@google.com> Add tests for getResource*Name()

Change-Id: I02170b2b68c76f817aa0771a5333abf2aee456c0
ayoutlib/bridge/impl/RenderAction.java
618ca261f370c257723a3c7a5871bb6f6b4d7f3a 19-Mar-2016 Deepanshu Gupta <deepanshu@google.com> Support getResource*Name() methods for Resources

The following methods are now supported:
getResourceEntryName
getResourcePackageName
getResourceTypeName
getResourceName

Bug: http://b.android.com/181872
Change-Id: If06b5e0687ab6f8cb20ab77f339870dd08a84ce1
ayoutlib/bridge/util/DynamicIdMap.java
fcd7e80b21cc9db6be00e37371401ea1d0938796 10-Mar-2016 Clara Bayarri <clarabayarri@google.com> Keyboard Shortcuts: plumb deviceId through

Bug: 27673736
Change-Id: Ie72807aa8c2bfd142b081a6a915e101c16d31473
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/android/view/WindowManagerImpl.java
6136273888c42faad74dce19ec49904a55affc15 22-Mar-2016 Chong Zhang <chz@google.com> Don't change geometry in relayout if preserve geometry is requested

This causes scaling to be applied in the relayout window since the
requested size won't match the window size. Apply the requested size
in repositionChild instead.

bug: 27676101
Change-Id: I03beee2b9fe118a6be329b5fd1338d54e48d9a22
ayoutlib/bridge/android/BridgeWindowSession.java
cd6e47e4455cec8daa4570ac8073d93bd567d139 21-Mar-2016 Deepanshu Gupta <deepanshu@google.com> Add guard around getXmlFileParser() call

Prevents the need to update the LayoutLib API level.

Bug: http://b.android.com/202942
Change-Id: I507239148ab8d6d45406624dba569c8b7197f979
ayoutlib/bridge/android/RenderParamsFlags.java
ayoutlib/bridge/impl/ResourceHelper.java
38735b00267b55219a77317ec3ce5ca60c5edd06 21-Mar-2016 Diego Perez <diegoperez@google.com> Merge "Account for parent scroll position" into nyc-dev
1064d35307cff0601a22c8401cb72f628883489d 19-Mar-2016 Yohei Yukawa <yukawa@google.com> Merge "Tell IMS about missing InputConnection methods." into nyc-dev
4f29d45ad44cc2e754000848e07b950e519e0b89 18-Mar-2016 Tony Mantler <nicoya@google.com> Merge "Fix build" into nyc-dev
86b66c5ef6f2170c1da74beba550b82a858ea09a 18-Mar-2016 Tony Mantler <nicoya@google.com> Fix build

Change-Id: I590db57366a40aa011ee02e6e34e64cd2e7d1115
ayoutlib/bridge/android/BridgePowerManager.java
d15459197f71f8cc940e2b057b399117df282f2c 04-Mar-2016 Diego Perez <diegoperez@google.com> Account for parent scroll position

When calculating the ViewInfo bounding box, account for the parent
scroll position.
Also make renderAndVerify return a RenderResult to verify some data
about the result layout.

Change-Id: I965e393c49b5030c80083daf5e058fa31400ce93
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/RenderSessionImpl.java
8a372a0a280127743ce9a7ce4b6198c7a02d2a4f 16-Mar-2016 Jeff Sharkey <jsharkey@android.com> Refactoring FBE APIs based on council feedback.

Mostly consists of removing the word "encryption" from most APIs,
since we can't actually make promises about the data being encrypted.

Bug: 27531029
Change-Id: Iace9d7c4e64716abf86ed11847c40f3947e1d625
ayoutlib/bridge/android/BridgeContext.java
bbb3ff2b2a29d42771a9ce2fe2d6f576cff62617 09-Jul-2015 Sudheer Shanka <sudheersai@google.com> Flush package restriction changes for a user.

Change-Id: I7c4481f820b6b368487d00de6c783e64cec99f4b
ayoutlib/bridge/android/BridgePackageManager.java
19a80a1e807acd00bec999eaac7812da6ffce954 15-Mar-2016 Yohei Yukawa <yukawa@google.com> Tell IMS about missing InputConnection methods.

Summary:
This CL introduces a unified mechanism to deal with the situation
where the application directly implements InputConnection but some of
methods are not implemented. Note that there should be zero overhead
when the application extends BaseInputConnection or
InputConnectionWrapper.

Background:
When ever we add a new method to InputConnection, there has been a
risk that existing applications that directly implement
InputConnection can get java.lang.AbstractMethodError exception at
runtime, because older SDKs do not require the application developer
to implement the methods that are newly added in later SDKs. Because
of this we strongly discouraged developers to directly implement
InputConnection interface, and encouraged them to subclass
BaseInputConnection or InputConnectionWrapper instead. That said, as
requested in Bug 26945674, there is a certain demand to be able to
implement InputConnection without depending on BaseInputConnection.
The goal of this CL is to provide a reliable and sustainable solution
to above missing method scenario in InputConnection.

One of the reasons why dealing with missing InputConnection methods is
so difficult is that what InputMethodService receives to communicate
with the target application is actually a proxy class
com.android.internal.view.InputConnectionWrapper
that runs in the IME process and immediately returns true for most of
methods in InputConnection such as #commitText() and
#finishComposingText(). Because of this asynchronous nature, it is
too late to change the actual return value that the IME receives when
the application receives those one-way asynchronous IPC calls.

Solution:
To handle those cases, this CL checks the availability of
InputConnection methods that did not exist in the initial release
before the target application calls startInput(), and let the
application to send its availability bits to IMMS so that
InputConnectionWrapper running in the IME process can be initialized
with such availability bits. Note that we do know that
BaseInputConnection and its subclasses support all the InputConnection
methods, hence for most of applications we can just assume that all
the methods are available without reflection.

With such availability bits, InputConnectionWrapper is now able to
gracefully return failure code to the IME because the availability of
those methods is immutable, except for a tricky case where the
application relies on a proxy object that dynamically changes the
dispatch target.

Here is the list of APIs that we start checking the availability in
this CL.
[API Level 9+]
- InputConnection#getSelectedText(int)
- InputConnection#setComposingRegion(int, int)
[API Level 11+]
- InputConnection#commitCorrection(CorrectionInfo)
[API Level 21+]
- InputConnection#requestCursorUpdates(int)}
[API Level 24+]
- InputConnection#deleteSurroundingTextInCodePoints(int, int)
- InputConnection#getHandler()

Ideas alternatively considered: Default methods in InputConnection
We once considered having default methods in InputConnection but
abandoned this idea because it does not directly solve the problem
about how to tell the that the API does not take effect.
Also having default methods would make it difficult for application
developers to be aware of newly added methods in InputConnection.

Bug: 27407234
Bug: 27642734
Bug: 27650039
Change-Id: I3c58fadd924fad72cb984f0c23d3099fd0295c64
ayoutlib/bridge/android/BridgeIInputMethodManager.java
f1c6e0bd7bb2f7683207048978af4fb87ee3f7c1 08-Mar-2016 Siva Velusamy <vsiva@google.com> BridgeContext: Fix typo in attr name (toLeft -> toLeftOf)
am: af0f3bda17

* commit 'af0f3bda17ee3de4ad3560c9a675527b20e2af5f':
BridgeContext: Fix typo in attr name (toLeft -> toLeftOf)
af0f3bda17ee3de4ad3560c9a675527b20e2af5f 08-Mar-2016 Siva Velusamy <vsiva@google.com> BridgeContext: Fix typo in attr name (toLeft -> toLeftOf)

Change-Id: I214ddf066bd69d56275477712419745cf781cee3
ayoutlib/bridge/android/BridgeContext.java
7ba6dc0fcc66c96383aabd8db40adf1bac66ce7f 07-Mar-2016 Xavier Ducrohet <xav@google.com> Merge "Change BridgeResources to Resources_Delegate" into nyc-dev
5b5b1c0c5debd7a90c086f36cbafa688c857a673 07-Mar-2016 Xavier Ducrohet <xav@google.com> Merge "Animated vector drawable support" into nyc-dev
566b303365078fac9a454f1595add19e02631db3 01-Mar-2016 Diego Perez <diegoperez@google.com> Add support for GradientColor in layoutlib

Change-Id: Ia9a55a9e00d7ddb5263f3dbe46b5da8dde457526
ayoutlib/bridge/impl/ResourceHelper.java
e05f1c4684fcc7e3f6a429ff01b210aa19f75304 04-Mar-2016 Deepanshu Gupta <deepanshu@google.com> Change BridgeResources to Resources_Delegate

This is a very hacky fix to make layoutlib work with the latest support
lib. Inject a couple of fields in android.content.res.Resources to
allow using most of the earlier code as is.

Bug: 27403642
Bug: http://b.android.com/201934
Change-Id: Ia96a1b4642a1907a77d9ca7a2392f78809b92e38
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/util/NinePatchInputStream.java
9b137e27d34efb89024543ffd2def2b37307aa0c 04-Mar-2016 Deepanshu Gupta <deepanshu@google.com> Change BridgeResources to Resources_Delegate [DO NOT MERGE]

Do not merge because the resource implementation has changed in N and
the change is no longer valid there.

This is a very hacky fix to make layoutlib work with the latest support
lib. Inject a couple of fields in android.content.res.Resources to
allow using most of the earlier code as is.

Bug: 27403642
Bug: http://b.android.com/201934
Change-Id: I186cad32b1b4de64164fbad937d989e0110c6976
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/util/NinePatchInputStream.java
8a9a824cd5641d214906a20a2a9372e62e9f3fb8 03-Mar-2016 Diego Perez <diegoperez@google.com> Animated vector drawable support

Change-Id: Iefd41d95503bb4f3b26020a519636a63d3da799b
nternal/view/animation/NativeInterpolatorFactoryHelper_Delegate.java
a38b7c180df47f88904ad6a11fda605235f6c91c 03-Mar-2016 Diego Perez <diegoperez@google.com> Merge "Implement native methods in VectorDrawable" into nyc-dev
66ae66a7f74ee835807a141a216afbb254664510 19-Feb-2016 Vadim Tryshev <vadimt@google.com> Adding getManagedUserBadgedDrawableForDensity() to PackageManager.

It allows badging an image regardless of of the user (no
user id parameter). The styling for managed users is applied.

This is useful for new cases where the existing functions
wouldn't badge the icon, but we need it.

Bug: 25192539
Change-Id: I2fd2f226f626fb2e6cda1cfe072013350e12b41c
ayoutlib/bridge/android/BridgePackageManager.java
5d1013cf13e59b7f8dc8f16b5811cb29982e0ef3 23-Feb-2016 Diego Perez <diegoperez@google.com> Implement native methods in VectorDrawable

Most of the VectorDrawable implementation has been moved to native code.
This CL implements most of the required functionality that existed in
Marshmallow.

Change-Id: I009bcd5c166f2bfa0795d2718fabab4a549eba9f
ayoutlib/bridge/impl/RenderSessionImpl.java
a67932374dbbfbe4c6440d223fc7922b313dd957 24-Feb-2016 Todd Kennedy <toddke@google.com> Revert "Revert "Remove deprecated methods / classes""

This reverts commit 5cbeb5902633646fbc0a1be252081e77aaaee7b4.

Change-Id: Id96010364d65e6131221ebbcc8ce5889a2da256c
ayoutlib/bridge/android/BridgePackageManager.java
fe01ea05dd196acaf95a61e169f6b75654ae0875 24-Feb-2016 Todd Kennedy <toddke@google.com> Merge "Revert "Remove deprecated methods / classes"" into nyc-dev
5cbeb5902633646fbc0a1be252081e77aaaee7b4 24-Feb-2016 Todd Kennedy <toddke@google.com> Revert "Remove deprecated methods / classes"

This reverts commit 9706c01f9b92cee64bb84782138735225c8588e0.

Change-Id: I14c53ab140220e48f6728b1173ea58760bbeb7f9
ayoutlib/bridge/android/BridgePackageManager.java
ca67844e0c6b564970b8d329009c0d110888a3fc 24-Feb-2016 Todd Kennedy <toddke@google.com> Merge "Remove deprecated methods / classes" into nyc-dev
c87e2b46fb949f1ba5d72b842bad443b36fd9abc 24-Feb-2016 Jorim Jaggi <jjaggi@google.com> Fix build

Change-Id: Id21200a8239908c18379d67639c090ccfd3772f2
ayoutlib/bridge/android/BridgeWindow.java
5cf733f89b4016aecc3b96e2a72e98b2a571aeb8 23-Feb-2016 Yohei Yukawa <yukawa@google.com> Fix build breakage.

This follows up to my previous CL [1], which forgot to update
BridgeIInputMethodManager.java (again!).

[1] I56934f18e30d90fcdf77bcbb0c35a92a5feb1b82
05c25f8a3a033816ac25aa5cd7db5b1ab495bc3f

Bug: 25373872
Change-Id: I0643069fd0b677115c89c340b7a23f1d12bd7988
ayoutlib/bridge/android/BridgeIInputMethodManager.java
f5650cf3a3a1a8d6ced9fc7b0f399689c9adc1b8 01-Feb-2016 Diego Perez <diegoperez@google.com> Fix Canvas memory leak

Every RenderSession would call the AttachInfo.setAttachInfo but wouldn't
issue a View.dispatchDetachedFromWindow.
This caused some Canvas to be slowly leaked in the DelegateManager in
every session.

Change-Id: Iec418a86f5c5e55c2a2860ef945268c51c0e8173
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/RenderSessionImpl.java
b75a0426d8c2339f2d552f96cc4dfcd86deb3447 01-Feb-2016 Diego Perez <diegoperez@google.com> DO NOT MERGE: Fix Canvas memory leak

Every RenderSession would call the AttachInfo.setAttachInfo but wouldn't
issue a View.dispatchDetachedFromWindow.
This caused some Canvas to be slowly leaked in the DelegateManager in
every session.

Change-Id: Ib0392303e6d00a4fe5494ae484f28135b1fe6b28
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/RenderSessionImpl.java
4f2103631a44303257e3adbe89fa2a6854841bbb 19-Feb-2016 Diego Perez <diegoperez@google.com> Merge "Revert "Fix Canvas memory leak"" into mnc-ub-dev
am: 44f92b00d1

* commit '44f92b00d1a060773625de5884fc86e7218e2dd5':
Revert "Fix Canvas memory leak"
44f92b00d1a060773625de5884fc86e7218e2dd5 19-Feb-2016 Diego Perez <diegoperez@google.com> Merge "Revert "Fix Canvas memory leak"" into mnc-ub-dev
cf935728897e9f208e250d3bb57296c84cfa0ef9 19-Feb-2016 Diego Perez <diegoperez@google.com> Revert "Fix Canvas memory leak"

This reverts commit e82bd72b6e7ab3135d3b28fc2c2694d08af45c3d.

Change-Id: Ie9ef25b17d5f725d5054c039992a8cd2912868a6
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/RenderSessionImpl.java
1d3c41e563c30d85d5524df598f4bd6e6a226362 19-Feb-2016 Diego Perez <diegoperez@google.com> Merge "Fix Canvas memory leak" into mnc-ub-dev
am: bad0e07ee9

* commit 'bad0e07ee9163d6b0f0bf73ad591ff6e453199ef':
Fix Canvas memory leak
bad0e07ee9163d6b0f0bf73ad591ff6e453199ef 19-Feb-2016 Diego Perez <diegoperez@google.com> Merge "Fix Canvas memory leak" into mnc-ub-dev
e82bd72b6e7ab3135d3b28fc2c2694d08af45c3d 01-Feb-2016 Diego Perez <diegoperez@google.com> Fix Canvas memory leak

Every RenderSession would call the AttachInfo.setAttachInfo but wouldn't
issue a View.dispatchDetachedFromWindow.
This caused some Canvas to be slowly leaked in the DelegateManager in
every session.

Change-Id: I0322767e5fffc6053ce1be852dd8ca904dfaa137
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/RenderSessionImpl.java
2c1ba9a961d4f96c26df260ee437655ad9e7c03e 17-Feb-2016 Jeff Sharkey <jsharkey@android.com> Make BackupManager encryption aware.

Backup requires both CE and DE storage to be available, so delay
spinning up the backup system until the user is unlocked, since
that's when CE storage becomes available. Note that devices without
FBE immediately transition USER_SYSTEM into the unlocked state,
since their CE is always available.

Offer to backup and restore files under both CE and DE. Since DE
is effectively the same as CE, most logic is simply duplicated for
now, but it could be simplified in the future. Since system apps
can force their default storage location to DE, we always build
explicit CE and DE paths.

Add getDataDir() to give clean access to the top-level private data
directory, but disclaim that apps shouldn't create files there.

Bug: 26279618
Change-Id: Ic34a4b330223725db93b1d0f5c9dffc88002c61f
ayoutlib/bridge/android/BridgeContext.java
491523d52cd8368ef9a92e95fb3e9332bf86a996 07-Oct-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib fixes for N

Moves LayoutLib to Java 8 - YAY!
Fix delegates

Change-Id: I098996e43e330e995d33f12df1c16355bbc02f0f
ayoutlib/bridge/impl/binding/AdapterHelper.java
aa9c9fb29e0630f252fb60e1972d333bbc54d70d 17-Feb-2016 Diego Perez <diegoperez@google.com> Replace SimpleDateFormat implementation

This will process all the classes and replace all the uses of
java.text.DateFormat and java.text.SimpleDateFormat with the
android.icu.text. package implementations. The original ones do not
match the Android platform behaviour.

Change-Id: Id55f103c21117a8d6403bf2124b6c1a0e1fb2f71
ayoutlib/bridge/impl/RenderAction.java
eb84b1843a3f6805c6109c1d9d023550229a3fc5 26-Jan-2016 Andrei Stingaceanu <stg@google.com> Suspend packages - one call for multiple packages

Refactor setPackageSuspended into setPackagesSuspended. The rationale
is that the consumers of this API are likely to want to remove
multiple packages at once. Rather than calling the API N times, call
it just once.

The good part is that we already have the broadcast intent for
suspended packages take an array so only one broadcast. Less stress
on the system.

Another good part is that (right now) we only have one consumer of
this API and it will be easy to make changes once this CL goes in.

As a shell command, for consistency only allowed one package at
a time.

Bug: 22776761
Change-Id: Ic8b8cf64d0a288ea3a282bb7b72f9d663b3b0049
ayoutlib/bridge/android/BridgePackageManager.java
5ae4e73ef0747c2d08a901f1a76d8fb8ee64a53a 17-Feb-2016 Andrei Stingaceanu <stg@google.com> Merge "Suspend packages - new API for retrieving the suspended status" into nyc-dev
9706c01f9b92cee64bb84782138735225c8588e0 13-Feb-2016 Todd Kennedy <toddke@google.com> Remove deprecated methods / classes

Now that we've moved the majority of system components to the
PackageInstaller, we can remove the majority of the "installPackage"
methods and the VerificationParams/ContainerEncryptionParams
classes. There are still some lingering references to the two
installPackage() methods left [both internal and external; play
is using these methods via reflection].

Bug: 24542768
Change-Id: Ib65323d842d9f0e7fed60e37e6b5f103c94c859b
ayoutlib/bridge/android/BridgePackageManager.java
355b232d7998cfc9b29d42a0356390e25191bcbd 12-Feb-2016 Andrei Stingaceanu <stg@google.com> Suspend packages - new API for retrieving the suspended status

Instead of always rebuilding the full ApplicationInfo for a
package when callers are only interested in the suspended status
add a new fast API in Packagemanager (which only checks the
suspended user setting for the requested package and returns
a boolean) and change the appropriate caller code too.

Bug: 26794775
Bug: 22776761
Change-Id: Ide8428ef734479360d5a8a75fd8e0ed8ddf2da7a
ayoutlib/bridge/android/BridgePackageManager.java
115d2c189a46f535778d9dd0923f703ff2f888fe 16-Feb-2016 Jeff Sharkey <jsharkey@android.com> Add feature versions for devices and apps.

We're starting to see more instances of device features that will
increment separately from the SDK API level, such as camera HAL,
GPU capabilities, Bluetooth, and other hardware standards.

This change adds the ability for device features to specify a
version, which is defined to be backwards compatible. That is, apps
requesting an older version of a feature must continue working on
devices with a newer version of that same feature.

When a version is undefined, we assume the default version "0".

Bug: 27162500
Change-Id: If890bf3f3dbb715e8feb80e7059a0d65618482ea
ayoutlib/bridge/android/BridgePackageManager.java
989b58a633ed6f2192a172855525d86477452884 10-Feb-2016 Vladislav Kaznacheev <kaznacheev@google.com> Update pointer icon when View.setPointerIcon is called

Currently the updated pointer icon is only displayed after
the next mouse move.

Bug:27107871
Change-Id: Ieed57b07fe44699735179cf57968a9bb08981396
ayoutlib/bridge/android/BridgeWindowSession.java
8c6d8a7ef9ef057833e36efa074138d06a8f01ca 10-Feb-2016 Svet Ganov <svetoslavganov@google.com> Fix build

Change-Id: I7c0601f873e37c7ebf71068ba81366704672bd70
ayoutlib/bridge/android/BridgePackageManager.java
08df538482f00611133a0b3aba64e8fed663afc3 01-Feb-2016 Deepanshu Gupta <deepanshu@google.com> Remove obsolete try catch am: ebdcc80ac2
am: 29e8071d2e

* commit '29e8071d2e9f3a8171624fd63b849f5c14360b21':
Remove obsolete try catch
ebdcc80ac26ae51ba27d9469a501a6242256aa50 01-Feb-2016 Deepanshu Gupta <deepanshu@google.com> Remove obsolete try catch

The try catch was to prevent crashing on preview releases of Android
Studio. We don't support them anymore.

Change-Id: I8e33cae98117c0034aea1b56903b623fcb64435e
ayoutlib/bridge/impl/RenderAction.java
35871f2c2bb114806b4e3f109960b7f863d7885c 30-Jan-2016 Jeff Sharkey <jsharkey@android.com> Offer to migrate databases and SharedPreferences.

Databases and SharedPreferences often involve multiple files under
the hood, so developers wanting to migrate them between different
storage contexts should ask us to make sure all relevant files are
migrated correctly.

This makes a best-effort attempt to recover from battery pulls
during migration, while still trying to alert developers to
conflicting files.

Bug: 26668510, 25860525
Change-Id: I9ffa3e8cb6191dfd4237b9466a081d6d77df3ba0
ayoutlib/bridge/android/BridgeContext.java
a4a58efe8203d63a9a6bf78b0fa9f2992b25871b 27-Jan-2016 Jorim Jaggi <jjaggi@google.com> Fix app staying in drag resizing when undocking

When dismissing the docked stack, the fullscreen stack stayed in drag
resize mode because it got a relayout, but because the bounds didn't
change (it switches to the fullscreen layout a bit earlier) it never
called WM.relayoutWindow, so it stayed in drag resize mode indefinitely.

To fix this, introduce forceRelayout in Window.resized(), which makes
sure the client always calls relayoutWindow. Set this to true whenever
drag resizing is changing.

For some very weird reason this also broke that home button was not
responding anymore.

Bug: 26806532
Change-Id: I4b39c1c419a166aa7093c31226f2a4915f642328
ayoutlib/bridge/android/BridgeWindow.java
2260a618424b1cbdb1a051e613bd9e24a25d8436 26-Jan-2016 Ian Pedowitz <ijpedowitz@google.com> Fix build and reorder methods to match ec6a447c86b03f5896fdb717de530c8abf8887f9

Change-Id: I39ee2864eda489bf0e485ea96d30e56b29500865
ayoutlib/bridge/android/BridgeWindow.java
0a66b6bc9226c170f1a522f81aca04cf03fd41a2 26-Jan-2016 Filip Gruszczynski <gruszczy@google.com> Fix build.

Change-Id: I68d6fade1b2a44a3542182914e0cd5853f4f0a81
ayoutlib/bridge/android/BridgeWindow.java
c8680438c0481b9c1e2b0bc856f900057ea14ba2 23-Jan-2016 Vladislav Kaznacheev <kaznacheev@google.com> Merge "Change mouse pointer when drag and drop is active"
ba761124e624ffed2681a9e171cd3f7d8c6ed59e 22-Jan-2016 Vladislav Kaznacheev <kaznacheev@google.com> Change mouse pointer when drag and drop is active

Mouse pointer is set to STYLE_GRAB when the drag has started and
reset to STYLE_DEFAULT when the drag has ended.

Resetting the pointer shape to the one defined by an underlying
view will be handled in a separate patch.

Bug: 24415739
Change-Id: I8df0a08c5701a34a48f10ec6b43c2cf2e6362d61
ayoutlib/bridge/android/BridgeWindowSession.java
e797745d757ef8eda5e36c33fec3ca74c0f4ec99 22-Jan-2016 Selim Cinek <cinek@google.com> Fix build by adding missing method

Change-Id: I4309225f9c799237857ce4c8f7ae2f8667d0b8be
ayoutlib/bridge/android/BridgePackageManager.java
0102a8a8e957c38e8fe40e6cd184339ea9f38906 19-Jan-2016 Rob Carr <racarr@google.com> Merge "Replace SurfaceViews across resize trigerred relaunches."
23fa16b759f023ea18ab9f84e89df50d4b449dfd 13-Jan-2016 Robert Carr <racarr@google.com> Replace SurfaceViews across resize trigerred relaunches.

In resize modes where we are preserving the main application
window, we need to tell the WindowManager to prepare to replace
the child surfaces, or they will dissapear across relaunches.

Bug: 26070641
Change-Id: I864168688dc320e9280e651f9c5df614f52bc96c
ayoutlib/bridge/android/BridgeWindowSession.java
365bd8f9b12e1c3d7314e165894980f1c1314112 19-Jan-2016 Diego Perez <diegoperez@google.com> New path interpolation to paint vector drawables am: b9c48d8f49
am: 6952063e71

* commit '6952063e7166599f5300427019ca845bbaafa660':
New path interpolation to paint vector drawables
b9c48d8f49d35e2682c7205a9d8d5fcc25d7c736 18-Dec-2015 Diego Perez <diegoperez@google.com> New path interpolation to paint vector drawables

Before this CL, PathMeasure_Delegate would use Path_Delegate.approximate
to get a path segment to draw. Path_Delegate.approximate uses a
flattening iterator to do the path approximation.
Unfortunately, because we do not control the stroke mode while painting,
in some cases the approximation would draw unwanted artifacts caused by
the rough approximation and the use of wrong miter values.
This CL does a much better calculation of the path and interpolates the
segments of the curves instead of replacing them with line segments.

This also fixes an issue with the calculation of empty paths.

Bug: http://b.android.com/187256

Change-Id: I450f7aa4c3d9efcbf902a40c3b4d6d388546893f
ayoutlib/bridge/util/CachedPathIteratorFactory.java
0da43029fd73129e39e8d00d17cd7423d99f9634 16-Jan-2016 Jorim Jaggi <jjaggi@google.com> Fix build

Change-Id: I6d4bebf90c11a4a00d259aac34bb9459d973da9b
ayoutlib/bridge/android/BridgeWindowSession.java
15cc7bba8d04c7ced6fa41bafc9810f0b55bbe12 15-Jan-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Fix custom font rendering" into mnc-ub-dev am: f5984d5fce
am: 14df39f9e5

* commit '14df39f9e5855caef8d272fb136abe17b225d971':
Fix custom font rendering
4da12f19a62ff72cbdc31825a6338d196d3c4846 15-Jan-2016 Deepanshu Gupta <deepanshu@google.com> Merge "Minor fix to wrong error message"
8b4a6981fdd7849a57de2f56203cfd81e9eb6e99 15-Jan-2016 Tor Norbye <tnorbye@google.com> Minor fix to wrong error message

Change-Id: I3d34c90d37d35d0649a6ef8a73ca0d9320f975dd
ayoutlib/bridge/impl/binding/AdapterHelper.java
2ea852541fd7c7af14b6919c5c2f57584b896d2b 14-Jan-2016 Deepanshu Gupta <deepanshu@google.com> Fix custom font rendering

The context was using the wrong asset manager.

Bug: http://b.android.com/198897
Change-Id: Id58473a4539ed93a9f338c730686128c7089fc92
ayoutlib/bridge/android/BridgeContext.java
b2d135694f5a2979e7acef48255a6ea10f749dd2 14-Jan-2016 Wale Ogunwale <ogunwale@google.com> Fix build breakage.

Bug: 22405482
Change-Id: I8fc522885801e9735544ec3820c8fdd4a4368d71
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/android/view/WindowManagerImpl.java
cd65448ccd13c4c2d0fe9e9623fec3a898ab9372 09-Jan-2016 Jeff Sharkey <jsharkey@android.com> Even more PackageManager caller triage.

Finish moving all UID/GID callers to single AIDL method that requires
callers to provide flags.

Triage AppWidgets and PrintServices, which currently can only live on
internal storage; we should revisit that later.

Fix two bugs where we'd drop pending install sessions and persisted
Uri grants for apps installed on external storage.

Bug: 26471205
Change-Id: I66fdfc737fda0042050d81ff8839de55c2b4effd
ayoutlib/bridge/android/BridgePackageManager.java
8588bc1ef1f020bbe4a24d46874f675708149a57 07-Jan-2016 Jeff Sharkey <jsharkey@android.com> Add flags to requests for package UID/GIDs.

This gives callers the ability to request details for missing
packages. Also add annotations for userId and appId variables and
start tagging their usage.

Change-Id: I63d5d7f870ac4b7ebae501e0ba4f40e08b14f3f6
ayoutlib/bridge/android/BridgePackageManager.java
e06b4d1d9f718b9fe02980fea794a36831a16db2 06-Jan-2016 Jeff Sharkey <jsharkey@android.com> Consistent naming for PackageManager methods.

When hidden PackageManager methods take a userId argument, they
should be named explicitly with the "AsUser" suffix. This fixes
several lagging examples so that we can pave the way to safely
start passing flags to new methods without scary overloading.

Also fix spacing issues in various logging statements.

Change-Id: I1e42f7f66427410275df713bea04f6e0445fba28
ayoutlib/bridge/android/BridgePackageManager.java
4f6d400b0fa4c94e0f785a7b15ffb30126e6759d 05-Jan-2016 Alex Klyubin <klyubin@google.com> Merge "No need to pass digest of AndroidManifest.xml around."
a65ebea1ad62526633933205929a65a6e90f1f9f 05-Jan-2016 Jerome Gaillard <jgaillard@google.com> Create new Navigation Bar for the Theme Editor Preview am: 3b90b74cf9
am: 968ee5368b

* commit '968ee5368b7d626e7ac64b0befd212a04e9533cf':
Create new Navigation Bar for the Theme Editor Preview
31ffb442414bd9cf6c0225799d7d0c5409f3769d 21-Dec-2015 Alex Klyubin <klyubin@google.com> No need to pass digest of AndroidManifest.xml around.

When an APK is being installed, the full path to the file is
occasionally passed between processes. To detect changes to the file
during these handovers, the digest of the AndroidManifest.xml entry
could be passed around as well.

This security feature is no longer used and is no longer needed. APKs
should be installed using the modern Package Installer API
(android.content.pm.PackageInstaller).

Bug: 24542768
Change-Id: I2762634c85448e7adcd47ffc9a5294c021e127bd
ayoutlib/bridge/android/BridgePackageManager.java
3b90b74cf96c88267e20a410b639b68de84c3323 18-Dec-2015 Jerome Gaillard <jgaillard@google.com> Create new Navigation Bar for the Theme Editor Preview

The standard navigation bar was not working well in the Theme Editor preview
when in a wide configuration. The bar then did not fit entirely inside the display.
So we created a new Navigation Bar to use in the Theme Editor preview, that fixes
the size problem.

Bug: http://b.android.com/198179
Change-Id: Ifb1fa7b8f399f17392934de89078696337eca3e1
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/ThemePreviewNavigationBar.java
1e2839188fb49575b86646d3aadb355c81ef9cc5 26-Nov-2015 Andrei Stingaceanu <stg@google.com> Wire call to suspend a package

Adds APIs in DevicePolicyManager and PackageManager for allowing
a device admin to suspend a package. PackageManagerService sets
or unsets a new PackageUserState 'suspended' setting. Terminal
command to suspend/unsuspend has been added via
PackageManagerShellCommand (as root).

Next steps:
* use the new 'suspended' setting for denying access to start app
(probably in ActivityStackSupervisor)
* broadcast a PACKAGE_(UN)SUSPENDED intent for launchers to pick up
* remove app from recents (go further and kill it if it is running)
* erase existing notifications for this app

Bug: 22776576
Change-Id: I718b3498f6a53cc0c6fdfb6d15031e53ddca4353
ayoutlib/bridge/android/BridgePackageManager.java
48748c5d5b84920c95156ef711ccffe852b6b7ff 11-Dec-2015 Jerome Gaillard <jgaillard@google.com> Use RenderDrawable to render mipmaps am: 4b0fe7f14b
am: e298bcf755

* commit 'e298bcf7552d95475ab3ca9195e12bc14768fdb5':
Use RenderDrawable to render mipmaps
4b0fe7f14bb36769ef30c59c407bd6ed5b3d5cf7 11-Dec-2015 Jerome Gaillard <jgaillard@google.com> Use RenderDrawable to render mipmaps

Bug: http://b.android.com/179714
Change-Id: If05e71b33ee3a95590eb892f4fffbff4cfca1867
ayoutlib/bridge/impl/RenderDrawable.java
0c6cc308cfd26ae102a1a3deb258e675da2c1eb0 10-Dec-2015 Dianne Hackborn <hackbod@google.com> Merge "Add new target SDK filtering feature to BroadcastOptions."
e0e413e2b17a0164e15c77f4ab51b3166f9111d2 10-Dec-2015 Dianne Hackborn <hackbod@google.com> Add new target SDK filtering feature to BroadcastOptions.

You can now control the range of target SDKs that receivers
will be need to have in order to receive your broadcast.

Use this for CONNECTIVITY_ACTION to not allow N+ applications
to receive these broadcasts through their manifest.

Also tweak the broadcast debug output code to now include the
disposition of each receiver in the list. This is becoming
important as skipping receivers is becoming a more common
thing to have happen.

Change-Id: I251daf68575c07cbb447536286ab4e68b7015148
ayoutlib/bridge/android/BridgeContext.java
98cb23dccfb65ddd2802c49d8714979f7dbae1df 09-Dec-2015 Jeff Sharkey <jsharkey@google.com> Merge "Slight API renaming, better behavior."
e13529a4adb60e5a18c2e36ce6c5bf8f2d1db78f 09-Dec-2015 Jeff Sharkey <jsharkey@android.com> Slight API renaming, better behavior.

Rename APIs to reflect that they're storage-related. Also move
credential-storage APIs to be system API.

Return a null Context when device-encrypted storage isn't
supported. This is the easiest way to keep legacy apps working when
upgrading from M to N.

Reduce strictness of path checking so we don't crash when working
with special packages like "android".

Bug: 22358539, 26104027
Change-Id: I38c24fc003488186210a6ae3b64270f86e1efe56
ayoutlib/bridge/android/BridgeContext.java
103d61b9f79de4d7b907227a7925e809e3e183c2 08-Dec-2015 Jeff Sharkey <jsharkey@google.com> Merge "Shift around encryption public APIs."
7a30a30ebece75f4a73fa604d4c7721d28eecc16 08-Dec-2015 Jeff Sharkey <jsharkey@android.com> Shift around encryption public APIs.

There are far too many Context APIs with special directory paths
to replicate device-encryption versions of them all. Instead, add
methods to clone a Context that explicitly stores its data in either
credential- or device-encrypted storage.

Methods to test the behavior of a given Context.

Bug: 22358539
Change-Id: I6a6290a9b282605ce9a1f82742fc2c4c50536754
ayoutlib/bridge/android/BridgeContext.java
2acf063da08dfff69f184c9a6a90a7a5fe60d818 25-Nov-2015 Svet Ganov <svetoslavganov@google.com> Ephemeral cookie API

Add APIs for an ephemeral app to set a cookie which is a small
peice of data cached longer than the app itself. This is useful
for avoiding the user to login every time they use the ephemeral
app. The cookie is stored after an ephemeral app is uninstalled.
Normal apps or ephemeral apps upgraded to full apps can also use
these APIs with the difference that once they are uninstalled
the cookie is deleted.

The cookie size defaults to 16KB and is configurable by a global
settings which can be adjusted via gservices. Also eviction policy
is time based with a default of one month and is configurable by
a global setting which can be adjusted via gservices. If the cert
of the app cahnges (when ephemeral is installed, uninstalled and
installed again) the cooke is wiped to prevent data leaks.

This cahange also adds an API for apps to know whether they run in
an ephemeral mode since it this mode some APIs will not be available.
Another API exposed by this change is private for the system and
exposes all ephemeral apps - installed and uninstalled. Only the
system can call this API. When an ephemeral app is uninstalled the
system stores its name, icon, and permissions. When the app is
reinstalled or a full version is installed the permissions are
propagated.

Change-Id: Id4a73a7750bfbabda0bfcb9bf9018d2062e94367
ayoutlib/bridge/android/BridgePackageManager.java
6a6cdafaec56fcd793214678c7fcc52f0b860cfc 08-Dec-2015 Jeff Sharkey <jsharkey@android.com> APIs to obtain SharedPreferences paths.

Needed for apps that want to migrate SharedPreferences from CE to DE
storage. Note that a device will only ever enter a CE mode with a
factory reset, so apps should only be using these APIs when they
want to migrate files to a consistent location on non-FBE devices
for simplicity.

Bug: 25503089
Change-Id: Ic846215da1617d116a048e036415ac7ad523b770
ayoutlib/bridge/android/BridgeContext.java
7c4420bd04f8f56f6044f88e34616d8c5d96c7e9 02-Dec-2015 Deepanshu Gupta <deepanshu@google.com> Revert "Revert "Add support for Choreographer animations""

This reverts commit 8390b2ac85765e768d4b685077a96e6395d208b4.

The build break should now be fixed by
cbb1ba7f493116882b79578ec68646366f29cde4

Change-Id: I9bf21cc6dbdb5d515a665384dc6dfa464c3e6e2e
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/RenderSessionImpl.java
8390b2ac85765e768d4b685077a96e6395d208b4 02-Dec-2015 Diego Perez <diegoperez@google.com> Revert "Add support for Choreographer animations"

This reverts commit 29ed07524ce0fc2e5950f5340d306247145d0efa.
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/RenderSessionImpl.java
2ee825f507bec9c01667787ce11ddb5d8786d863 02-Dec-2015 Diego Perez <diegoperez@google.com> resolve merge conflicts of 956cad8870 to master.

Change-Id: Iebad149b2768bcd7a52ee2c7c8c260a9279d1742
29ed07524ce0fc2e5950f5340d306247145d0efa 14-Oct-2015 Diego Perez <diegoperez@google.com> Add support for Choreographer animations

First step to add support for Choreographer based animations. The
Choreographer_Delegate avoid using a handler so the animation callbacks
can be called on-demand (by using doFrame). This allows things like
frame by frame animation or selecting a specific frame, and doesn't need
a separate thread to run.

The CL also changes the System and SystemClock implementations to allow
to set specific times. Because animations heavily rely on the system
time, this allows controlling it. It can also be useful to ensure that
the rendering produces a deterministic result when using controls like
the Calendar widget.

Change-Id: Iff221d2698a82075cafbb60f341be01741f7aa13
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/RenderSessionImpl.java
8fc29cf1052fd951a3a0828b65506db30df89ece 01-Dec-2015 Jeff Sharkey <jsharkey@android.com> API to create SharedPreferences from File.

Needed to support storage of SharedPreferences on both credential-
encrypted and device-encrypted storage paths.

Bug: 22358539
Change-Id: I576b696951b2a9de817d5be63d31b06f7e166a19
ayoutlib/bridge/android/BridgeContext.java
c428d4742d51440012c08174630b5ae28c20c15f 25-Nov-2015 Yohei Yukawa <yukawa@google.com> Fix build breakage in BridgeIInputMethodManager.

This is a follow up CL for 35d3f37bd51268cc99d81a3f537ac364d178e851 [1],
which changed some method signatures of IInputMethodManager.

[1]: Ia1fe120af7d71495c5f3a4fc0ec6390efb8240ca

We need to update BridgeIInputMethodManager.java every time when we
change IInputMethodManager.

Bug: 25373872
Change-Id: I126dc4234f921039a9d29010ea411a0a7d2ef6c6
ayoutlib/bridge/android/BridgeIInputMethodManager.java
82063913ae6d3b158cb0c599141e473b691363a8 20-Nov-2015 Vladislav Kaznacheev <kaznacheev@google.com> Implement View.cancelDragAndDrop

View.cancelDragAndDrop cancels a drag operation initiated by
View.startDragAndDrop.

It has to be called on a View in the same window (under the
same ViewRootImpl) that the view which started the drag.

Bug: 24415683
Change-Id: If9a265fd8cc4d26b207d582d0d02d5c9ae78eba1
ayoutlib/bridge/android/BridgeWindowSession.java
4a13b870929e1461fba626559db69226ccbeac89 19-Nov-2015 Vladislav Kaznacheev <kaznacheev@google.com> Revert "Fix broken build"

This reverts commit 88d753291c834c41ad6c9229082146be72cf8014.

Revert required because the base class change
has been reverted in http://ag/816441

Change-Id: Iee8a8272bda0a92aed8ae46af8439910d8f1ecdc
ayoutlib/bridge/android/BridgeWindowSession.java
88d753291c834c41ad6c9229082146be72cf8014 18-Nov-2015 Vladislav Kaznacheev <kaznacheev@google.com> Fix broken build

Followup to ag/808050

Change-Id: I9912eae6a8c09b90685e19b3a9080b2d557c857b
ayoutlib/bridge/android/BridgeWindowSession.java
ae03bc0be3357b4a11861f211d2c1d3a3a4e52d8 18-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Revert "LayoutLib: Fix true transparency in status bar." am: 4ea74d2960
am: 377cc4887d

* commit '377cc4887d3557377f63bfe9d179623985c9484e':
Revert "LayoutLib: Fix true transparency in status bar."
71daca031e5ecf65969479f8b416c43394187926 18-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Merge "AppCompatActionBar: use findClass to test presence" into mnc-ub-dev am: 42a893b50b
am: dd97829cf2

* commit 'dd97829cf2b8599058f0410ea45bc84cd86e839b':
AppCompatActionBar: use findClass to test presence
377cc4887d3557377f63bfe9d179623985c9484e 17-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Revert "LayoutLib: Fix true transparency in status bar."
am: 4ea74d2960

* commit '4ea74d2960688db6aa13452765dd5f2d07a40189':
Revert "LayoutLib: Fix true transparency in status bar."
dd97829cf2b8599058f0410ea45bc84cd86e839b 17-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Merge "AppCompatActionBar: use findClass to test presence" into mnc-ub-dev
am: 42a893b50b

* commit '42a893b50b2763d7a2a3da4006c9433afaf86cfd':
AppCompatActionBar: use findClass to test presence
4ea74d2960688db6aa13452765dd5f2d07a40189 17-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Revert "LayoutLib: Fix true transparency in status bar."

This reverts commit 4eb298a941c3f465944b63f1a06518e911681c89.

Even though this is techinically closer to what the framework does, the
fix is not complete. As a result, it looks worse when using AppCompat
themes. Revert the change for the release.

Change-Id: I67c1002ea17dee7234d78e2d13aab876467bd70f
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
99b54b364b6d4e0689933393a9b584e542fc2c54 17-Nov-2015 Deepanshu Gupta <deepanshu@google.com> AppCompatActionBar: use findClass to test presence

To test the presence of WindowDecorActionBar class, use findClass()
instead of loadClass() which logs warnings.

Change-Id: Ice8a5a6badd764c7f75b5a64a07c48f0a7cfef98
ayoutlib/bridge/bars/AppCompatActionBar.java
efc90e4f60af2058670d6e287184a33e63e6f7c5 17-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Merge "WindowDecorActionBar name change fix." into mnc-ub-dev am: 62302bd72a am: 80bd5e6fd7 am: 9f275ec3fd
am: d00380a560

* commit 'd00380a560dff6a2237086f2f4c96313785ce93f':
WindowDecorActionBar name change fix.
ce400cd75e1e1a90c0b4da4de90d7314fd21dca8 17-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Merge "WindowDecorActionBar name change fix." into mnc-ub-dev
am: 62302bd72a

* commit '62302bd72aaa6b0f934257447e8dcd636799180e':
WindowDecorActionBar name change fix.
2b0551175d57ce0f063566eea7670442b8b624fc 17-Nov-2015 Deepanshu Gupta <deepanshu@google.com> WindowDecorActionBar name change fix.

In change id I7582e242c7564c32feeb044fc9eff6bfb5c56536,
WindowDecorActionBar's package name was changed. This breaks layoutlib.
Fix the issue by checking both package names when loading the class.

Change-Id: I5723a97f0f164d61c56061fef6cff18e3cdafaee
ayoutlib/bridge/bars/AppCompatActionBar.java
b39ca7fa47de1a8211cf810d531da73a15754b15 13-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Improve error reporting on Exceptions in fw views. am: d30c141a2d
am: e0c9dd1b4f

* commit 'e0c9dd1b4fbeb2667a58686ab8a71e5cfd070e49':
Improve error reporting on Exceptions in fw views.
e0c9dd1b4fbeb2667a58686ab8a71e5cfd070e49 12-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Improve error reporting on Exceptions in fw views.
am: d30c141a2d

* commit 'd30c141a2dee881fd83e1415a50161def1acf227':
Improve error reporting on Exceptions in fw views.
d30c141a2dee881fd83e1415a50161def1acf227 21-Oct-2015 Deepanshu Gupta <deepanshu@google.com> Improve error reporting on Exceptions in fw views.

When there's an exception during the inflation of a framework view (for
example invalid attributes), report the exception correctly. The earlier
behaviour assumed the exception to be a ClassNotFoundException and tried
to load it from the user's project. This is not longer the case.

Also, update the MockView class to a FrameLayout with a single TextView.
This means that the MockView is a ViewGroup and will not choke when
someone attempts to add a View to it (although, the view will be
silently dropped).

Change-Id: Ice003817ceb627ebfbbbb245ab6be10f9141e728
ayoutlib/bridge/MockView.java
64aadd08491172e90f6d6512d8affc9a4cfa04cc 06-Nov-2015 Robert Carr <racarr@google.com> Clarify geometry management for SurfaceView

In the hardware accelerated case, RenderThread needs
to be the authority of information on the geometry of
the SurfaceView (this will occur via moving the
repositionWindow call to RenderThread). In order
to support this we have to enable calling relayoutWindow
without geometry (so that it will not fight with
repositionWindow). Add such a mode to relayoutWindow
and use it from SurfaceView. Add size to repositionChild
while we are here.

Bug: 22802885
Change-Id: Ie45132c22f34cc6ecfe2446912b30bd1df414406
ayoutlib/bridge/android/BridgeWindowSession.java
94d0b64d4fed8377be2374eb7d31aa270a9c9aff 07-Nov-2015 Jeff Sharkey <jsharkey@google.com> Merge "Initial file-based encryption public APIs."
15447798a38d2b5acb1998731340255f4203f294 06-Nov-2015 Jeff Sharkey <jsharkey@android.com> Initial file-based encryption public APIs.

Define two explicit directories where device-encrypted and
credential-encrypted data will be stored. Third-party apps only
need access to the device-encrypted directory, so that's the only
API exposed for now.

General cleanup in how ApplicationInfo details are derived.

Bug: 22358539
Change-Id: If0a0108721a4aa1c3052b4912e08604bbf24e1ae
ayoutlib/bridge/android/BridgeContext.java
1a2f3ab485f8f3abfdeb10cf9cbe640bdfc1233f 06-Nov-2015 Jorim Jaggi <jjaggi@google.com> Fix build

Change-Id: Ie716bbec49920af459ceddf8e51387ccf5946a7f
ayoutlib/bridge/android/BridgeWindow.java
2b23bc32cc17082edb41c99f3d97e208ce521bec 05-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Fix Switch colors" into mnc-ub-dev am: 71093465ab
am: ceb2b54909

* commit 'ceb2b549095b5f9a70baef6a0a847b453735f97a':
Fix Switch colors
ceb2b549095b5f9a70baef6a0a847b453735f97a 05-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Fix Switch colors" into mnc-ub-dev
am: 71093465ab

* commit '71093465abbdf887c705b40fb0cb8a2919894c4b':
Fix Switch colors
c9b8f95c99688c71184d90f53dcf90e52816d02f 05-Nov-2015 Deepanshu Gupta <deepanshu@google.com> Fix Switch colors

The conversion of the PorterDuff mode from int to enum was incorrect
resulting in the wrong PorterDuff Mode being used.

Change-Id: I7607d505b6e4382e6101869971154f6a77db279c
ayoutlib/bridge/impl/PorterDuffUtility.java
96eb6d3e571591feb5d5481558c65ae00f17d68e 04-Nov-2015 Diego Perez <diegoperez@google.com> Merge "Remove auto-boxing during the inflate" into mnc-ub-dev am: 1c442aca0a
am: 7cdbfaf459

* commit '7cdbfaf459ede7ede430188ed4b1a990ba762144':
Remove auto-boxing during the inflate
7cdbfaf459ede7ede430188ed4b1a990ba762144 04-Nov-2015 Diego Perez <diegoperez@google.com> Merge "Remove auto-boxing during the inflate" into mnc-ub-dev
am: 1c442aca0a

* commit '1c442aca0a1b054e3aa0a40ba89c08b39099be2f':
Remove auto-boxing during the inflate
91fa3ba4cc8acd4caeeb88f90ce39198b5fea414 03-Nov-2015 Diego Perez <diegoperez@google.com> Remove auto-boxing during the inflate

Change-Id: I3f9ba5d78363f878fa0c58ca8cbf736bd43fe1c0
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/bars/CustomBar.java
faa09f531f3a6fcd6518057315a52fdd0ffd3cba 03-Nov-2015 Brian Carlstrom <bdc@google.com> Fix layoutlib-tests build by adding dummy implementation of IWindowSession.repositionChild to BridgeWindowSession

Change-Id: I9c3a609c76716b35595b82a33f32883d4f46c517
ayoutlib/bridge/android/BridgeWindowSession.java
a79795a89293094aa1278104ec6099bd428db38a 20-Oct-2015 Deepanshu Gupta <deepanshu@google.com> Fix build

Change-Id: I0e85f40955bfbf25e917f27c210c2f6f24d885a0
ayoutlib/bridge/android/BridgePowerManager.java
c08b0e0dd3e3befa57d497f7560d577651194c7e 13-Oct-2015 Dianne Hackborn <hackbod@google.com> Merge "Revert "Fix build.""
0b128232d22cd15c6100734b4d859499f82afb22 13-Oct-2015 Dianne Hackborn <hackbod@google.com> Revert "Fix build."

This reverts commit 7a9687f1d7693907189fc315d640c1ad770ab88d.

Change-Id: I5b2f68a4e2b4c399d87c18adc223500b0e1bfcc7
ayoutlib/bridge/android/BridgeContext.java
98f16c6d1aff6ac9d32fcec7fcb397bac075e7a0 13-Oct-2015 Dianne Hackborn <hackbod@google.com> Merge "Fix build."
7a9687f1d7693907189fc315d640c1ad770ab88d 13-Oct-2015 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Iade965d86ce5f53cf476468423db47c8e6a602b2
ayoutlib/bridge/android/BridgeContext.java
e8a04cd5a68a5e5aa78a4f40b3269c86cc3f152f 13-Oct-2015 Ian Pedowitz <ijpedowitz@google.com> Fix Build

Mimicking what was done for bdbd2d9c1878432eca6933e06c980663e2579d85

Change-Id: I5aef245b7a426edaa90e7e237acd4608b431c073
ayoutlib/bridge/android/BridgeContext.java
9c450411058ab9af71932c756fb0f478b3988f1b 01-Oct-2015 Chet Haase <chet@google.com> Enable activity rendering during window animations

A change was made back in ICS that prevents the view hierarchy from rendering
during window animations. Specifically, it allows the hierarchy to render once (to draw
the results of its first layout), but further drawing is suppressed at the
ViewRoot/performTraversals level until the window animation is complete.

This change was introduced to avoid jank problems that were resulting from
thrashing the GPU by issuing drawing commands from multiple processes simultaneously,
and limited the number of rendering processes to mainly the system server (and
possibly the System UI), which allowed window animations to be much smoother.

This fix contributed to another source of jank, however, in which applications
which attempt to animate when they first appear will not render any frames of
animations until the window animation is done, resulting is a snapping to the resulting
state once the window animations are complete.

Meanwhile, hardware has gotten faster and GPUs have gotten better, and it is time to
revisit this logic. This change disables the earlier fix and allows view hierarchies
to draw normally, regardless of whether window animations are taking place.

Issue #22232939 Remove flag that prevents drawing during window animations

Change-Id: I4c960180771ff09a7088abd77b437586e835a991
ayoutlib/bridge/android/BridgeWindow.java
0cdfc4d273061dcc7e10a8cd403ea08a536e5063 01-Oct-2015 Deepanshu Gupta <deepanshu@google.com> am 21af84d3: am 7a9f771f: Merge "Don\'t break error string (easier grepping)" into mnc-ub-dev

* commit '21af84d3e4bf82e9dd8b5087b60630f29668bda3':
Don't break error string (easier grepping)
21af84d3e4bf82e9dd8b5087b60630f29668bda3 01-Oct-2015 Deepanshu Gupta <deepanshu@google.com> am 7a9f771f: Merge "Don\'t break error string (easier grepping)" into mnc-ub-dev

* commit '7a9f771fe010c697c6a9fb143f0a26778d440c8c':
Don't break error string (easier grepping)
1bd276f6f7ddce7959dc2e9e6f480d9be1e26fef 30-Sep-2015 Deepanshu Gupta <deepanshu@google.com> Don't break error string (easier grepping)

Change-Id: If52097ba90481644707dd0323ec63ca3ddf0986b
ayoutlib/bridge/impl/LayoutParserWrapper.java
cd4b26c8a9fb629efc8d2e7b907537c549eeef72 30-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am 3dde4493: am 4e27221d: Merge "Support databinding in listitem layouts." into mnc-ub-dev

* commit '3dde44935df567f840de2600a3e408f9ba7c7b1f':
Support databinding in listitem layouts.
3dde44935df567f840de2600a3e408f9ba7c7b1f 30-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am 4e27221d: Merge "Support databinding in listitem layouts." into mnc-ub-dev

* commit '4e27221d49151ba91af59029659e666fa756b645':
Support databinding in listitem layouts.
e91096c03dda225240b1487f019bf3d082854587 29-Sep-2015 Deepanshu Gupta <deepanshu@google.com> Support databinding in listitem layouts.

Add a wrapper around the PullParser to support stripping out databinding
parts.

Bug: http://b.android.com/187428
Change-Id: I88080d8f4108cb5ae27a137ad20c5dd7d516f3ea
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/LayoutParserWrapper.java
ayoutlib/bridge/impl/ParserFactory.java
9a80e53b27cd1ca00364a30a0ad153c83000b9d2 23-Sep-2015 Nicolas Prevot <nprevot@google.com> Add more methods that take a userId to PackageManager.

Add methods installPackageAsUser and installExistingPackageAsUser
and deletePackageAsUser and getPackageInfoAsUser.

BUG:23516394
Change-Id: I15e30d2ec45ab18c7f8c0ac02cfc617c50fedb44
ayoutlib/bridge/android/BridgePackageManager.java
184427444b335dc2fd67a8df4147c6d8a18dbf4d 22-Sep-2015 Diego Perez <diegoperez@google.com> am 36152328: am 0e766de7: Avoid calling scrollBy(0,0) on render

* commit '361523281c88a7e453e0eef961ed7f16a55785a5':
Avoid calling scrollBy(0,0) on render
361523281c88a7e453e0eef961ed7f16a55785a5 22-Sep-2015 Diego Perez <diegoperez@google.com> am 0e766de7: Avoid calling scrollBy(0,0) on render

* commit '0e766de7c52d7e375e04676c93a872cb2d6eea63':
Avoid calling scrollBy(0,0) on render
0e766de7c52d7e375e04676c93a872cb2d6eea63 22-Sep-2015 Diego Perez <diegoperez@google.com> Avoid calling scrollBy(0,0) on render

Usually scrollBy(0, 0) won't have any effect but when called on the
NumberPicker but, in some cases, it seems to cause an endless loop.
When called from layoutlib, this will hold the read lock causing all
operations trying to acquire the write lock to block forever.

Bug: http://b.android.com/182506
Change-Id: Ib25427d3f32d804d1c481d979795eee71fbdbc6d
ayoutlib/bridge/impl/RenderSessionImpl.java
173b6c2d1abce67ce802802621eaef43023b24fd 13-Sep-2015 Chong Zhang <chz@google.com> Fix build break with startMovingTask API

Change-Id: I4dc44ca04c75a9dfed079338e4906d317f50a1e3
ayoutlib/bridge/android/BridgeWindowSession.java
8e89b31a62fb9ec5ad33908c5e8e9c7ab2fd949f 10-Sep-2015 Chong Zhang <chz@google.com> Move window moving and resizing handling to WindowManager

- add a startMoving API to initiate a window move from app, once
the move starts WindowManager will take over the event handling.

- detect touch events along window's outside border and start
a resize if necessary

Change-Id: Ic7e8baba34e0aa27a43173e044ffb46e93e219e0
ayoutlib/bridge/android/BridgeWindowSession.java
44c75820b4ecdd454a9c4446bb7e3608dcd88ba0 03-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am b3382661: am ee1eed7e: am 7209945f: am 0e150a8b: am 0c5fd7e3: am eb541727: am dd21212f: am eb26f5ce: LayoutLib: Fix typedArray caching.

* commit 'b3382661eb3af61815812bd762ac1fcc2f5d9ef5':
LayoutLib: Fix typedArray caching.
b3382661eb3af61815812bd762ac1fcc2f5d9ef5 03-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am ee1eed7e: am 7209945f: am 0e150a8b: am 0c5fd7e3: am eb541727: am dd21212f: am eb26f5ce: LayoutLib: Fix typedArray caching.

* commit 'ee1eed7e711228008dc91a7da800be6527539e87':
LayoutLib: Fix typedArray caching.
ee1eed7e711228008dc91a7da800be6527539e87 02-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am 7209945f: am 0e150a8b: am 0c5fd7e3: am eb541727: am dd21212f: am eb26f5ce: LayoutLib: Fix typedArray caching.

* commit '7209945fd38d22078b2fd208abe0aa976c311dde':
LayoutLib: Fix typedArray caching.
0c5fd7e3791f0b1a3a3b1c1ebe34f568155ba11f 02-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am eb541727: am dd21212f: am eb26f5ce: LayoutLib: Fix typedArray caching.

* commit 'eb54172719db60740a0b8dde6380db54d4006159':
LayoutLib: Fix typedArray caching.
eb54172719db60740a0b8dde6380db54d4006159 02-Sep-2015 Deepanshu Gupta <deepanshu@google.com> am dd21212f: am eb26f5ce: LayoutLib: Fix typedArray caching.

* commit 'dd21212fa1a9c907d5d2f80f3de2413f6c14da7a':
LayoutLib: Fix typedArray caching.
eb26f5cecd5366b29b3cb746a7edaf3769f40480 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Fix typedArray caching.

The typedArray depends on the current context (more specifically, the
themes set on the context). The fact was ignored in the caching of the
typedArray and caused the android:theme attribute to be ignored in
certain cases.

Change-Id: If095580919474f12c0eb4e1f8fb7f076cf3c4ed0
ayoutlib/bridge/android/BridgeContext.java
c81612250136b60e37674d88785265f99440e402 28-Aug-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Revert "LayoutLib: Switch SimpleDateFormat to icu.""
d9600c986dac7e133280ea812dd809532ab90d76 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 7eb81868: am b1ad4a15: LayoutLib: Fix true transparency in status bar. [DO NOT MERGE]

* commit '7eb81868c338fc78139592ac81845c080f53b1c5':
LayoutLib: Fix true transparency in status bar. [DO NOT MERGE]
728fc73130908157770decc593d6e3131e1efd80 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am c43506fc: am 8c674fda: Fix layout mirroring. [DO NOT MERGE]

* commit 'c43506fc2dbe3fea6885e74ac8c67b91a0a644ff':
Fix layout mirroring. [DO NOT MERGE]
37ae8f4ef8921e8810c0a42fc11f3b45a72ffc03 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 918e62f1: am 7aa36129: Fix typo: s/FullScreen/Fullscreen/ in LayoutLib. [DO NOT MERGE]

* commit '918e62f1cb7e5802cfb7435dd606380fa5d3a278':
Fix typo: s/FullScreen/Fullscreen/ in LayoutLib. [DO NOT MERGE]
21f66a6b9feb449f837f94c65595d67b4b91bf33 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 5078ad32: am 6b1b651f: Fix imports. [DO NOT MERGE]

* commit '5078ad325b0da36fe798df1df428d12732548217':
Fix imports. [DO NOT MERGE]
de8da2793df3b3cb05215fa5dd02542548a54b9f 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am e54dbc4a: am 3ba16c1d: LayoutLib: fix layout when nav bar is absent. [DO NOT MERGE]

* commit 'e54dbc4ac74d110c4121932a22d04447a0e15b65':
LayoutLib: fix layout when nav bar is absent. [DO NOT MERGE]
963cac18adefa1e60a827183b95b4e61a23929d3 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 147c0506: am 55a36337: LayoutLib: Fix Status/Navigation Bar color. [DO NOT MERGE]

* commit '147c0506d5425633f0d45e1489262d4e27a35921':
LayoutLib: Fix Status/Navigation Bar color. [DO NOT MERGE]
76111ecbbde11e0cdddbb76530cf865f8846603e 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am e093bbf3: am d861fd81: Set support flag for custom layouts for RecyclerView. [DO NOT MERGE]

* commit 'e093bbf3997de7d2dddc2122c1349f734478f09f':
Set support flag for custom layouts for RecyclerView. [DO NOT MERGE]
c5bd6146f73a24008414d5bb8c07550e2c7f66ed 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 8a50ecea: am 82fae621: LayoutLib: translucent sys ui bars [DO NOT MERGE]

* commit '8a50ecea2ea0218377f7af8b4334b4ee4d386ef7':
LayoutLib: translucent sys ui bars [DO NOT MERGE]
6dcfe1e2b42f4c20860a34e47359cb559ae8c8f1 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am d4be80d9: am 9068539a: Update nav bar icons. [DO NOT MERGE]

* commit 'd4be80d9962cdf5d68dccd3291ed1cabb76b6df2':
Update nav bar icons. [DO NOT MERGE]
5eaa09ff9e4cbf71fd8ca312029987c0c3d43f9e 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am d1dde055: am e5afc311: Move the layout code out of RenderSessionImpl. [DO NOT MERGE]

* commit 'd1dde055060d63f8981ba51aeb75ab8a459db9b4':
Move the layout code out of RenderSessionImpl. [DO NOT MERGE]
1f2c15ca8e976f3378c9e4cf63b55de3484bb2cc 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 87f5fd6b: am c989950d: CalendarView rendering: use R.styleable to find attr. [DO NOT MERGE]

* commit '87f5fd6bf2c0d72fd37fb923b4d38225caa55d55':
CalendarView rendering: use R.styleable to find attr. [DO NOT MERGE]
36e164e095ab4a7f6d8a631a6c209f2e6ced41cb 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am e3eecca9: am b2fdaca9: Add tools:openDrawer to open a DrawerLayout. [DO NOT MERGE]

* commit 'e3eecca924e7c7961c54eb37336767c995c936e7':
Add tools:openDrawer to open a DrawerLayout. [DO NOT MERGE]
13cd7660813d52f5538a088612c3098d13484b12 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am b4060700: am a14ec6f4: Change tools:list_item to listitem. [DO NOT MERGE]

* commit 'b406070040d1370b6ef6154cba3965c4ab016d66':
Change tools:list_item to listitem. [DO NOT MERGE]
a556d7566b09e4743f859f3ca0878f2084448cfc 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 8bfc5a9d: am b1e21330: Implement tools:list_item for RecyclerView. [DO NOT MERGE]

* commit '8bfc5a9d14000a436e54350099bd460f55418f27':
Implement tools:list_item for RecyclerView. [DO NOT MERGE]
413d41aac4d573ad4f0270c0fefd94ef4e864225 26-Aug-2015 Jens Ole Lauridsen <jlauridsen@google.com> am 67b73b60: am cd4d5b3f: Support AppBar from Material Design. [DO NOT MERGE]

* commit '67b73b60bf9c9f433ed282abdc3691ee0cc6dda0':
Support AppBar from Material Design. [DO NOT MERGE]
c5c2ea04780ddf77c37618f7ed37d575a5cd0744 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 9a13b1e7: am db67caa6: Add missing resolveResValue call. [DO NOT MERGE]

* commit '9a13b1e7502734fbe54d6f0e1c386f5382dfa662':
Add missing resolveResValue call. [DO NOT MERGE]
7911c8b97d1c11de96e5fe3495d5e3cb979d0f9f 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 15e549a8: am 4f5e6c63: Skip warnings for some unresolved references. [DO NOT MERGE]

* commit '15e549a81f59daf016f29c6ed6f1aa3d5f65d41c':
Skip warnings for some unresolved references. [DO NOT MERGE]
13670bc6dea025bfd9b35c604547fe2b0bd2047a 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 669e4969: am 3e875dbb: Fix import order. [DO NOT MERGE]

* commit '669e4969a7245cf9d1febc5d4e67a0f2063e87fb':
Fix import order. [DO NOT MERGE]
6dc8bab993c55d239bc42822eb9a8003f7803dfd 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am c0fd1316: am e5fa12ad: Fix ParserFactory not initialized error. [DO NOT MERGE]

* commit 'c0fd131642f21eabec570147cf9f4116c900e8a0':
Fix ParserFactory not initialized error. [DO NOT MERGE]
bf7907bfc855478c16650e77a7a8a72370c6f35f 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 6b836cd0: am a287b842: Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]

* commit '6b836cd06b1a2ebe5d31336486bb1b54e42439df':
Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]
bd343c1fbf05087094e1dbf40048137e3a3e08fa 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am b32e44ff: am a5ffed0b: LayoutLib: Change nullity annotations. [DO NOT MERGE]

* commit 'b32e44ff0c5fd410720bb28c87bc9cea83556edf':
LayoutLib: Change nullity annotations. [DO NOT MERGE]
9b1ac26921b9c7aaf3c43c8094d81cfabc5cc085 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 1754824c: am c96ef952: Add documentation about hack in commit: f8ea750455 [DO NOT MERGE]

* commit '1754824c2835d6f3a17c4a2c0ab668991797fcf9':
Add documentation about hack in commit: f8ea750455 [DO NOT MERGE]
6b7f9ae6f56375b1bd84f31206cac179e09b8146 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 678f0ea2: am b318ff54: Make DatePicker rendering not fail (style search fix). [DO NOT MERGE]

* commit '678f0ea2ba47f06387670e9f75b13637a6446899':
Make DatePicker rendering not fail (style search fix). [DO NOT MERGE]
aae9c9309ca5155124f740b10a40c68b09ed0ce6 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 2f50403f: am afedbc47: Make Context.getClassLoader() work. [DO NOT MERGE]

* commit '2f50403fe0a8a035757b047af00c7520fadb9015':
Make Context.getClassLoader() work. [DO NOT MERGE]
8df6131ac103ac58ab03f6aae01e136df3c6a7b1 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 50e1406a: am f6b08547: Show better error message for color attr not found. [DO NOT MERGE]

* commit '50e1406a4ad668179a9a3d28c58d68c0eee44237':
Show better error message for color attr not found. [DO NOT MERGE]
b44f7fda759394b6447f19c0b3c9a3fdf8f9cd95 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 0a07bb95: am aa729889: Don\'t keep LayoutlibCallback reference. [DO NOT MERGE]

* commit '0a07bb95a1dd94c3457860a934d3ee546919cff2':
Don't keep LayoutlibCallback reference. [DO NOT MERGE]
78d77bc379f42dfe020cf0719ceae14174cf1c33 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am bbbdc2ad: am 5c90c4f4: Remove kxml dependency [DO NOT MERGE]

* commit 'bbbdc2ad8939c28828a8441c0b24812c53a9eb66':
Remove kxml dependency [DO NOT MERGE]
3a6567a86e33071871ed950006ae286750727b0e 26-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 4eb298a9: LayoutLib: Fix true transparency in status bar.

* commit '4eb298a941c3f465944b63f1a06518e911681c89':
LayoutLib: Fix true transparency in status bar.
4eb298a941c3f465944b63f1a06518e911681c89 22-Aug-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Fix true transparency in status bar.

Change-Id: Ieedf23cde9ab3e36c77501d30cc7e808e66a4782
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
b1ad4a155957160de9c4ad5c5beb39ce00ef6799 22-Aug-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Fix true transparency in status bar. [DO NOT MERGE]

Change-Id: Ieedf23cde9ab3e36c77501d30cc7e808e66a4782
(cherry picked from commit f9662c006c650c9f61f19a5e1ea4a76640eb85ca)
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
8c674fda8939c2d30f85e0341b70d9f3edd04d6c 04-Aug-2015 Deepanshu Gupta <deepanshu@google.com> Fix layout mirroring. [DO NOT MERGE]

Change-Id: I7db398aa2d11dac1210e84922138f78f0c23bb9b
(cherry picked from commit a9090705efcc44f015486944e5aeb926173a7968)
ayoutlib/bridge/impl/Layout.java
7aa36129403de74c485f286d290787e38565ddae 31-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Fix typo: s/FullScreen/Fullscreen/ in LayoutLib. [DO NOT MERGE]

Change-Id: Ia8d223ae01f08df945ab05615b07075b98a54a32
(cherry picked from commit 5a8f33f1b09b0311f1bbd1ec6b90db706edb5219)
ayoutlib/bridge/impl/Layout.java
6b1b651fedc421265d328f1b74512e62ac8a2e13 27-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Fix imports. [DO NOT MERGE]

Also remove null checks on return value of ReflectionUtils.getMethod()
as the method always return non null.

Change-Id: Ib476302c2cf0504a0f54db4e795955ad10e5df3f
(cherry picked from commit 671b7f9b99316f7224c1213d6923d449a2de9b62)
ayoutlib/bridge/android/support/DesignLibUtil.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
ayoutlib/bridge/impl/Layout.java
3ba16c1d9d53d520543e1bd363236453101096ec 29-Jul-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: fix layout when nav bar is absent. [DO NOT MERGE]

Change-Id: I0d3ee6fd5a4656156a630d3b298533ea13eb8415
(cherry picked from commit 6e8d8ad2b7cffed751b2a382ac7b761954767188)
ayoutlib/bridge/impl/Layout.java
55a363376b4d877870650a5a4b757d286f571345 27-Jul-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Fix Status/Navigation Bar color. [DO NOT MERGE]

If the color value for status bar or navigation bar is declared directly
in the theme (i.e. doesn't reference a color resource via @color/foo),
the ResourceType for the attribute is not assigned by the IDE. LayoutLib
used to ignore resources that were not of type color. This change fixes
the issue by also checking the resources without a type.

Change-Id: I94735ec225415282db06ab9db5c3233ad89c052f
(cherry picked from commit e3f9834ebd8a6e4ee155c8e4c9456dfc98e8b832)
ayoutlib/bridge/bars/CustomBar.java
d861fd81f7a2e62a31c4f2c7aed66fceb475d0c8 24-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Set support flag for custom layouts for RecyclerView. [DO NOT MERGE]

Change-Id: I3a0349c0482ae45e226b2016a0f24707c85edff4
(cherry picked from commit f7712d3524309c365b68f93497771084e6b5a66b)
ayoutlib/bridge/Bridge.java
82fae621533f9d8fc92f5a8d330ebe94a67ff07d 23-Jul-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: translucent sys ui bars [DO NOT MERGE]

Change-Id: I9c294329fc78418c505a5115bc9c07da29595af2
(cherry picked from commit fc8f4aad7395eca11f6d9b82eb266b1f4ee5041b)
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/impl/Layout.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
9068539a48e13a7d32342e46db32b6f5fa3d531e 14-May-2015 Deepanshu Gupta <deepanshu@google.com> Update nav bar icons. [DO NOT MERGE]

- Add a script to copy the icons from the original source.
- Update layout used for the navigation bar to be closer to the original
layout.
- Update test image with the latest rendering.
- Add a nexus 5 landscape device config to help with testing.

Change-Id: I0b6674955e0970a6a8cce148b1b7aa61e1752ccd
(cherry picked from commit 139d6ff12d395a888624113fdd2521861b47d761)
ayoutlib/bridge/bars/NavigationBar.java
e5afc3117be394fdd92496b39e9bad248972902a 22-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Move the layout code out of RenderSessionImpl. [DO NOT MERGE]

Also, switch to using a RelativeLayout from a LinearLayout. The change
will help in future when enabling transparent status and nav bar.

Change-Id: Ie4db5d28313f1c5ef775603788598a56409f92c7
(cherry picked from commit b1484862e2367d87d3ccbd0fd0a6d2598ed5918a)
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/bars/AppCompatActionBar.java
ayoutlib/bridge/bars/BridgeActionBar.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/FrameworkActionBar.java
ayoutlib/bridge/bars/FrameworkActionBarWrapper.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/bars/TitleBar.java
ayoutlib/bridge/impl/Layout.java
ayoutlib/bridge/impl/RenderSessionImpl.java
c989950dbf18dc294aebfff47c86bfd0349377a0 17-Jul-2015 Deepanshu Gupta <deepanshu@google.com> CalendarView rendering: use R.styleable to find attr. [DO NOT MERGE]

Not all attr are added to R.attr. This results in some attr not being
found and hence a broken rendering. Fix the issue by adding all attr
referenced in R.styleable to the map of attr before adding any remaining
values from R.attr.

Change-Id: I1ebf8a394b9e1edbf7490e011833d20a00d38317
(cherry picked from commit e8018480dbefc896bd26e5eedfdde802ce3731a7)
ayoutlib/bridge/Bridge.java
b2fdaca9590f808fda08e055edbf6fca8030d7d3 11-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Add tools:openDrawer to open a DrawerLayout. [DO NOT MERGE]

Store a list of drawer layouts with tools:openDrawer encountered and
call openDrawer on them during the post-inflation processing.

Change-Id: Idee299a9af1bb106509a03bb2e8424c372b93dc5
(cherry picked from commit ccbc11770397888cf7780925bb4c7cf1d2f2f80e)
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/android/support/DrawerLayoutUtil.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/util/ReflectionUtils.java
a14ec6f450eaff09b6800fc40616a00cf4899df8 08-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Change tools:list_item to listitem. [DO NOT MERGE]

The listitem is already in use for ListView. Reuse the same attribute
for RecyclerView rather than creating a new one.

Change-Id: I82aabe7d04fbe3e61645bc427a81c14c454d03c5
(cherry picked from commit 111dc04a28f0181bf429e5ded9024d3fdff7be50)
ayoutlib/bridge/BridgeConstants.java
b1e21330f82ec0940658b16dfe7e14e8da8c5d33 07-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Implement tools:list_item for RecyclerView. [DO NOT MERGE]

It's now possible to use tools:list_item attribute for RecyclerView to
point to a default layout, rather than always using a TextView.

Change-Id: I5d522b2f0ca38b420fddfcb0f73a26d95707da79
(cherry picked from commit 61f23e9bf7d784e7a52168196758c4f6c6853e77)
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/util/ReflectionUtils.java
cd4d5b3f38186f845e00454b4b95bec77c3ac8fd 05-Jun-2015 Jens Ole Lauridsen <jlauridsen@google.com> Support AppBar from Material Design. [DO NOT MERGE]

This CL is a start for making the design able to render the AppBar.
We are still missing support for: system menu and the app icon.

Change-Id: I19600f8ee1e7e6492186a0b7ae7fb38c82e15c02
(cherry picked from commit 4dfe4d43ce5634f059a3ba669e3cac4551c3a3ee)
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/support/DesignLibUtil.java
ayoutlib/bridge/impl/RenderSessionImpl.java
db67caa60c6050e7a46d1b90ccb6847a5b8ec661 30-Jun-2015 Deepanshu Gupta <deepanshu@google.com> Add missing resolveResValue call. [DO NOT MERGE]

Bug: http://b.android.com/178504
Change-Id: I7dde8094cf762893e4f7ea0d3de87a281c9602cd
(cherry picked from commit 5d1eaf4a197130f561b16c4ed083cf016b20ab92)
ayoutlib/bridge/android/BridgeContext.java
4f5e6c631522649796413c63695ae45b8759eba8 27-May-2015 Deepanshu Gupta <deepanshu@google.com> Skip warnings for some unresolved references. [DO NOT MERGE]

Some applications rename the newer RTL attributes to the older
attributes in order to target RTL locales, but not need to include two
attributes everywhere it's needed. For example, iosched renames
paddingStart to paddingLeft (among other attributes) for API 17 and
above. This leads to hundreds of warnings about missing attributes.
This change suppresses such warnings.

Also, skip adding unresolved attributes to the typed array. This is more
in line with the actual implementation on device, and prevents
unexpected warnings/errors/crashes later.

Change-Id: Iee616fa6295aa9731ede0cf9dcd6dd2bd1fe8f20
(cherry picked from commit b3e872be9e634c8d1f34d07778ea753880bbf2d9)
ayoutlib/bridge/android/BridgeContext.java
3e875dbb38c812e3684193fdefa04433c84541db 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix import order. [DO NOT MERGE]

Change-Id: I50bfbf4011290683a1c6adb94e0b6fa301dcc75b
(cherry picked from commit b9b8aef94e5bad8f5f03f686a2d3d8a09c045a7b)
ayoutlib/bridge/android/BridgeContext.java
e5fa12ad781c1759e0ff94dbc649be0e14844306 30-May-2015 Deepanshu Gupta <deepanshu@google.com> Fix ParserFactory not initialized error. [DO NOT MERGE]

Bug: http://b.android.com/175129
Change-Id: I2111673767e0f62ee910560022b559a177d55abd
(cherry picked from commit 996458b76c944f78eee26d7bd8cb4d39303b9119)
ayoutlib/bridge/impl/RenderAction.java
a287b8428ac6d9073f84f9b2f47ba5fc73939f10 28-May-2015 Deepanshu Gupta <deepanshu@google.com> Fix NPE in BridgeContext.obtainStyledAttributes() [DO NOT MERGE]

Replace direct member access with getter that checks for nullness.

Change-Id: I4a56a0ee903ae7d8c89b91d74b128302e1965586
(cherry picked from commit d758e042ce08c46712db3db2d63fc84795028dfe)
ayoutlib/bridge/android/BridgeContext.java
a5ffed0b69ac41d65aacc6ee586688a22226f64b 22-May-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Change nullity annotations. [DO NOT MERGE]

Switch from using tools nullity annotations (com.android.annotations)
to android framework annotations (android.annotation).

A new sdk-common prebuilt is required for LayoutLib tests. The new
sdk-common requires an updated tools-common. The updated tools-common
doesn't have nullity annotations. So, instead of adding the annotation
dependency, just reuse the platform ones. This also paves the way to
include other platform annotations like IdRes etc.

Change-Id: I87b8f767d3681d914abe7d1329e26a87f49f50a7
(cherry picked from commit 476e582d2ffdf25102d4c55f8c242baa3d21d37f)
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
ayoutlib/bridge/bars/AppCompatActionBar.java
ayoutlib/bridge/bars/BridgeActionBar.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/FrameworkActionBar.java
ayoutlib/bridge/bars/FrameworkActionBarWrapper.java
ayoutlib/bridge/impl/DelegateManager.java
ayoutlib/bridge/impl/ParserFactory.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/util/DynamicIdMap.java
ayoutlib/bridge/util/ReflectionUtils.java
c96ef95285e935034377dee30f3b8a0329f6c3a2 21-May-2015 Deepanshu Gupta <deepanshu@google.com> Add documentation about hack in commit: f8ea750455 [DO NOT MERGE]

Change-Id: I9ce871a67fb67e02e0c4df1eb5c3261ea52a914b
(cherry picked from commit 6330971ed293a2777bbdab09288f90ea4b2d0255)
ayoutlib/bridge/android/BridgeContext.java
b318ff54fcd17e7aadd1b0251c34cba348898704 24-Aug-2015 Deepanshu Gupta <deepanshu@google.com> Make DatePicker rendering not fail (style search fix). [DO NOT MERGE]

Only cherry picked for the style not found fix.

Change-Id: Ied2b71de5b32bcb640bf4ec445e8a39509f800e9
(cherry picked from commit d5b82845450beac2d3c7db9cd80e9fc34d43a297)
ayoutlib/bridge/android/BridgeContext.java
afedbc47b3c8f3fa9955496e6ceb7f5702dd90a3 19-May-2015 Deepanshu Gupta <deepanshu@google.com> Make Context.getClassLoader() work. [DO NOT MERGE]

Context.getClassLoader() is used by the LayoutInflater and can be used
by custom views. However, when called from the LayoutInflater, this
needs to return only the Framework classes. This is so that the IDE gets
a chance to instantiate the custom views, which helps in better error
reporting and better fallback in case of exceptions, like MockView.

To workaround this need of the same method returning different results
based on where it's called from, the method call in LayoutInflater is
renamed to getFrameworkClassLoader() and the new method is injected in
Context. The implementation of getFrameworkClassLoader() maintains the
existing behaviour of getClassLoader().

Context.getClassLoader() is now modified to return classes from both
Framework and the app namespace.

Also, update the list of packages to search for Framework views.

Change-Id: I1a6be4aa1fc5c1c5520b5440a348a52f10b6eb3b
(cherry picked from commit f8ea750455eec81e4e6d877b3e18e29a86d4ec95)
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/RenderAction.java
f6b08547458b9219da1717a79363f778bfc57dd0 18-May-2015 Deepanshu Gupta <deepanshu@google.com> Show better error message for color attr not found. [DO NOT MERGE]

Change-Id: I1ca32989522d30fec336eb607ee81f9e5cb5f48f
(cherry picked from commit 5f1bf496948fb6383ae17e5467a26a00489d7564)
ayoutlib/bridge/impl/ResourceHelper.java
aa72988955789be6e790c344daba3ef17abfcd98 15-May-2015 Deepanshu Gupta <deepanshu@google.com> Don't keep LayoutlibCallback reference. [DO NOT MERGE]

Switch to the newer API that enables keeping a reference only to the
ParserFactory which is a much leaner object as compared to
LayoutlibCallback.

Conflicts:
tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParserTest.java

Change-Id: I9b7afd93226db23786a00b2951cbf5ae5b8f3e5f
(cherry picked from commit f2d408b51debadca830eefbf8131185ac55ce699)
ayoutlib/bridge/impl/ParserFactory.java
ayoutlib/bridge/impl/RenderAction.java
5c90c4f459c2a7213a197f7ee98ad71e85af31bc 09-May-2015 Deepanshu Gupta <deepanshu@google.com> Remove kxml dependency [DO NOT MERGE]

Create XmlPullParser using callback provided by the client. This enables
clients to choose which XmlPullParser implementation they want.

Change-Id: I9ad97a4777820cdbe5c8fc3716f74ddec9065c70
(cherry picked from commit 78af25584633462e4ab8cf9bafe10f43e7cb2d83)
ayoutlib/bridge/impl/ParserFactory.java
ayoutlib/bridge/impl/RenderAction.java
e56287edcd564f2dfa57c0a9f6fe829f20c22377 11-Aug-2015 Diego Perez <diegoperez@google.com> am 62db64f4: am 83ec22a8: am af8c19e7: am 7d85b543: Merge "Make DelegateManager thread safe" into mnc-dev

* commit '62db64f4f3bf93ee25cc54b74f906e74db2dbf1c':
Make DelegateManager thread safe
7d85b5435d01f8d4856a718d655e30fb5a703560 11-Aug-2015 Diego Perez <diegoperez@google.com> Merge "Make DelegateManager thread safe" into mnc-dev
847b0d3ad22a47e0bca3d8bc8168fea7a0ba2f80 07-Aug-2015 Deepanshu Gupta <deepanshu@google.com> Revert "LayoutLib: Switch SimpleDateFormat to icu."

This reverts commit b556decf75b2b084e1aed54ac7fa23a141eedb7f.

This is no longer needed as the SimpleDateFormat has been switched in
the framework. Also, the revert leaves the change to intellij inspection
profiles as is, because that change was independent of the main issue.

Change-Id: I6f4d7d9ddc10262b087ad6a2604fa50562fac043
ayoutlib/bridge/impl/RenderAction.java
511e48728a4b8f8736fcb2ea28dd1ab7cc699972 06-Aug-2015 Diego Perez <diegoperez@google.com> Make DelegateManager thread safe

We have been seeing crashes on the Theme editor related to an assertion
on getDelegate when the object does not exist
(http://b.android.com/181951).
When debugging, the crash was happening without seeing a previous call
to removeJavaReference. This seems to completely remove that crash.
Since the DelegateManager can be called at least from two threads
(main thread and the finalizer), it should be thread safe.

Bug: http://b.android.com/181951
Change-Id: I1b28f863ff198f8592f170a98f9de391b2ac3ea2
ayoutlib/bridge/impl/DelegateManager.java
3a133801776fd51342cf1f0896bb7aff34ad6c60 07-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am c344ac57: am fbdf2032: am cfe5778d: am 8f26616d: Merge "LayoutLib: Switch SimpleDateFormat to icu." into mnc-dev

* commit 'c344ac576f79b5ba7940007b712fb79a220ab4b0':
LayoutLib: Switch SimpleDateFormat to icu.
7fe85fa70b22c70a9a9eb90664f0aa4442cacdbe 07-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 63790291: am 2081769f: am 618d96da: am 385ce0a3: Merge "Replace Locale.getDefault with custom impl." into mnc-dev

* commit '63790291a4c385d3e92680af816f4fe32d6535ef':
Replace Locale.getDefault with custom impl.
b556decf75b2b084e1aed54ac7fa23a141eedb7f 07-Aug-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Switch SimpleDateFormat to icu.

Use ICU's implementation of SimpleDateFormat in LayoutLib. The format
patterns used are not supported by java.text.SimpleDateFormat.

The change required adding a mechanism for promoting visibility of
fields in the framework in the create tool.
TODO: Add additional tests in the create tool for this new
functionality.

Change-Id: Id0f4be41f9731c42a28919c32cc5ef271a656982
ayoutlib/bridge/impl/RenderAction.java
82c7fdb1f6346862de373c95c618e370f81d8df6 05-Aug-2015 Deepanshu Gupta <deepanshu@google.com> Replace Locale.getDefault with custom impl.

In LayoutLib the default locale should always be the locale set the
rendering params. This change replaces all calls to Locale.getDefault in
the framework with calls to AndroidLocale.getDefault() which tries to
find the locale from the current context, but falls back to the original
call.

Change-Id: I496b35dcfc17fd61fedee21c7495541ab870b1fc
ayoutlib/bridge/android/AndroidLocale.java
ayoutlib/bridge/impl/RenderAction.java
f22a58d1de4612b9555f25d1091a791dd81e4382 06-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am 0889fd29: am 0e0d254c: am c34288be: am 2c1a22d9: Merge changes I85106f37,I7db398aa into mnc-dev

* commit '0889fd295974ce589ccd0e7a44932012ede577db':
Make getInt in BridgeTypedArray accept empty String.
Fix layout mirroring.
a9090705efcc44f015486944e5aeb926173a7968 04-Aug-2015 Deepanshu Gupta <deepanshu@google.com> Fix layout mirroring.

Change-Id: I7db398aa2d11dac1210e84922138f78f0c23bb9b
ayoutlib/bridge/impl/Layout.java
529be16e61c0380ac4a42d2125381dd3aaf0a3ba 04-Aug-2015 Diego Perez <diegoperez@google.com> am daacad45: am 616ae85e: am 126973d4: am 405eceb2: Merge "Restore session params "no decoration" flag" into mnc-dev

* commit 'daacad45fd19d35b2b8f8bce9c4cd19d4f735200':
Restore session params "no decoration" flag
534d9485f2fad985791e947a7b8ba7dff92268c6 04-Aug-2015 Deepanshu Gupta <deepanshu@google.com> am e92b2645: am 33bdfe75: am df776b76: am d985e3b6: Merge changes Ib5f53f3b,I7debf3ee,Ic494ee7f,Ia8d223ae,Iff7dbbf6 into mnc-dev

* commit 'e92b2645b234a7e3555a26aacb964706509269df':
Revert to using AppTheme for LayoutLib tests.
Fix Matrix_Delegate.native_getValues()
Update test image for upated nav icons.
Fix typo: s/FullScreen/Fullscreen/ in LayoutLib.
Fix bugs introduced in 78aa664.
405eceb20a3f3e7a22d922fc2d0fb8283be337fa 03-Aug-2015 Diego Perez <diegoperez@google.com> Merge "Restore session params "no decoration" flag" into mnc-dev
82e780743046e620b724c28023b580e0e624bb15 03-Aug-2015 Yusuke Sato <yusukes@google.com> am b98e2353: am 158560ad: Merge "Distinguish user-requested shutdown from power-related ones"

* commit 'b98e235364c2b221521f622c546733b2862e4677':
Distinguish user-requested shutdown from power-related ones
71a85575d41d08e1fcde5cd5c996e948b368a1ff 03-Aug-2015 Diego Perez <diegoperez@google.com> Restore session params "no decoration" flag

This seems to have removed from a previous version and the theme editor
relies on it to remove the decoration around the preview.

Change-Id: Ifab99e9c1689bfe44ca593e8c66c24e57c3e8c4c
ayoutlib/bridge/impl/Layout.java
5a8f33f1b09b0311f1bbd1ec6b90db706edb5219 31-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Fix typo: s/FullScreen/Fullscreen/ in LayoutLib.

Change-Id: Ia8d223ae01f08df945ab05615b07075b98a54a32
ayoutlib/bridge/impl/Layout.java
e5d926deb211d82f2602134c901c201dd3cd72db 31-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I9c6b6cd354039ff2914837cfe97a783564ded66f
ayoutlib/bridge/bars/Config.java
705ffd1efe529bb291e90fa06e92c8090ee98627 22-Jul-2015 Yusuke Sato <yusukes@google.com> Distinguish user-requested shutdown from power-related ones

With this patch, when the user requested shutdown,
PowerManagerService sets sys.powerctl is set to
"shutdown,userrequested", and init runs fsck on shutdown.

When shutdown is triggered due to a low power state etc.,
the service sets the property to "shutdown,", and init
immediately shuts down the system without running the
command.

This is a follow-up CL for http://r.android.com/158525.

Bug: 21853106
Change-Id: Iae72990130fe9aa479c802f77301438190dbbfb3
ayoutlib/bridge/android/BridgePowerManager.java
7676e403bd65435eb3d2f34e7e0174fd37f6e818 30-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Merge changes I4c215676,Ib476302c,I0aede288,I9241dec7,Ibe7167a6, ... into mnc-dev

* changes:
Update status bar time.
Fix imports.
Add MockView constructor used by LayoutInflater.
Poor implementation of Path.approximate()
Include EpicenterTranslateClipReveal in LayoutLib
Fix theme namespace in tests.
LayoutLib: fix layout when nav bar is absent.
LayoutLib: Fix Status/Navigation Bar color.
36e3fa55b6537d32d36e215cd5af9bcda82f7f1d 30-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Update status bar time.

Copy the value from the demo mode (commit 33b60bb45f)

Change-Id: I4c215676e7ae26a68aa370e99db005226d8a05d9
ayoutlib/bridge/bars/Config.java
671b7f9b99316f7224c1213d6923d449a2de9b62 27-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Fix imports.

Also remove null checks on return value of ReflectionUtils.getMethod()
as the method always return non null.

Change-Id: Ib476302c2cf0504a0f54db4e795955ad10e5df3f
ayoutlib/bridge/android/support/DesignLibUtil.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
ayoutlib/bridge/impl/Layout.java
9bf4b6f8c0a0d28402894b7a9660e8aced47545b 30-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Add MockView constructor used by LayoutInflater.

Change-Id: I0aede28866c1b87fb66c8a416c5026a9b2cb04fe
ayoutlib/bridge/MockView.java
f1b7f20bb839c96e8254ccb65398135f10fd45d9 29-Jul-2015 Svet Ganov <svetoslavganov@google.com> Remove dependencies on the package installer's package name

bug:22700053

Change-Id: I8540eb8577fbec84e1a67e31e1c31ba654c828a4
ayoutlib/bridge/android/BridgePackageManager.java
6e8d8ad2b7cffed751b2a382ac7b761954767188 29-Jul-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: fix layout when nav bar is absent.

Change-Id: I0d3ee6fd5a4656156a630d3b298533ea13eb8415
ayoutlib/bridge/impl/Layout.java
e3f9834ebd8a6e4ee155c8e4c9456dfc98e8b832 27-Jul-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Fix Status/Navigation Bar color.

If the color value for status bar or navigation bar is declared directly
in the theme (i.e. doesn't reference a color resource via @color/foo),
the ResourceType for the attribute is not assigned by the IDE. LayoutLib
used to ignore resources that were not of type color. This change fixes
the issue by also checking the resources without a type.

Change-Id: I94735ec225415282db06ab9db5c3233ad89c052f
ayoutlib/bridge/bars/CustomBar.java
f199ac84f39ee92f314f5c8740b13a21a14fada9 24-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Set support flag for custom layouts for RecyclerView." into mnc-dev
f7712d3524309c365b68f93497771084e6b5a66b 24-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Set support flag for custom layouts for RecyclerView.

Change-Id: I3a0349c0482ae45e226b2016a0f24707c85edff4
ayoutlib/bridge/Bridge.java
49fcfdd4ba6b9e19139b0650542d573cf493dc5b 24-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Merge changes I9c294329,Ie4db5d28 into mnc-dev

* changes:
LayoutLib: translucent sys ui bars
Move the layout code out of RenderSessionImpl.
f33c0f8516768b0259c750fdb14946f5a9b68647 24-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Merge "CalendarView rendering: use R.styleable to find attr." into mnc-dev
fc8f4aad7395eca11f6d9b82eb266b1f4ee5041b 23-Jul-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: translucent sys ui bars

Change-Id: I9c294329fc78418c505a5115bc9c07da29595af2
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/impl/Layout.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
b1484862e2367d87d3ccbd0fd0a6d2598ed5918a 22-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Move the layout code out of RenderSessionImpl.

Also, switch to using a RelativeLayout from a LinearLayout. The change
will help in future when enabling transparent status and nav bar.

Change-Id: Ie4db5d28313f1c5ef775603788598a56409f92c7
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/bars/AppCompatActionBar.java
ayoutlib/bridge/bars/BridgeActionBar.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/FrameworkActionBar.java
ayoutlib/bridge/bars/FrameworkActionBarWrapper.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/bars/TitleBar.java
ayoutlib/bridge/impl/Layout.java
ayoutlib/bridge/impl/RenderSessionImpl.java
e8018480dbefc896bd26e5eedfdde802ce3731a7 17-Jul-2015 Deepanshu Gupta <deepanshu@google.com> CalendarView rendering: use R.styleable to find attr.

Not all attr are added to R.attr. This results in some attr not being
found and hence a broken rendering. Fix the issue by adding all attr
referenced in R.styleable to the map of attr before adding any remaining
values from R.attr.

Change-Id: I1ebf8a394b9e1edbf7490e011833d20a00d38317
ayoutlib/bridge/Bridge.java
b9935889b1be2aac4a47d1acbf7547a832edf9f3 21-Jul-2015 Diego Perez <diegoperez@google.com> resolved conflicts for merge of 112d8a36 to mnc-dev

Change-Id: Ic9511a57db8a96f54dba0704800789a8602b9dd2
112d8a364126ecf8cf53f6e75a6af051cc47a860 21-Jul-2015 Diego Perez <diegoperez@google.com> am d6f2a9ef: am 7720eb18: Merge "Render to measured size when using expand mode" into lmp-mr1-dev

* commit 'd6f2a9efbb0e0525f6cf970fd9c9b9b7082b19f9':
Render to measured size when using expand mode
7720eb18c1c2fe06e8f4b2f6e2936a4072494da8 21-Jul-2015 Diego Perez <diegoperez@google.com> Merge "Render to measured size when using expand mode" into lmp-mr1-dev
a6ad75fbe0944f236e27986c23ca75b7db8cdfd8 16-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Add tools:openDrawer to open a DrawerLayout." into mnc-dev
432862667643cf8966a0c727b6772a6bae787da1 16-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Change tools:list_item to listitem." into mnc-dev
ccbc11770397888cf7780925bb4c7cf1d2f2f80e 11-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Add tools:openDrawer to open a DrawerLayout.

Store a list of drawer layouts with tools:openDrawer encountered and
call openDrawer on them during the post-inflation processing.

Change-Id: Idee299a9af1bb106509a03bb2e8424c372b93dc5
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/android/support/DrawerLayoutUtil.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/util/ReflectionUtils.java
111dc04a28f0181bf429e5ded9024d3fdff7be50 08-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Change tools:list_item to listitem.

The listitem is already in use for ListView. Reuse the same attribute
for RecyclerView rather than creating a new one.

Change-Id: I82aabe7d04fbe3e61645bc427a81c14c454d03c5
ayoutlib/bridge/BridgeConstants.java
a503b62b1597ba6f5fcff537cecbe2dad1d088f7 15-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Ib165c32d1d87e971902b4dd7300ccebd65e71a7d
ayoutlib/bridge/android/BridgePowerManager.java
fd854ee58c5d56f84047007ead9f88a767ae956f 14-Jul-2015 Dianne Hackborn <hackbod@google.com> Fix issue #21626564: MMS should be receivied while Dozing

We now place whoever is receiving the MMS on the temporary
whitelist while doing so, so they can get network access to
download it.

There was also an issue that needed to be fixed where we
were no longer updating the list of allowed uids while
dozing based on their proc states... we now do that.

Also did a bit of optimization of the temp white list update
path do the network policy manager, instead of going through
a broadcast we now directly call in to the network policy
manager. This also allows us to have a synchronous version
of updating the list, so we can know the app has network access
before we tell it to do anything.

Finally added battery stats events for things going on and off
the whitelist so we can diagnose the behavior there.

Change-Id: Ic7fe010af680034d9f8cb014bb135b2addef7455
ayoutlib/bridge/android/BridgeContext.java
d4fd8c766da8a70e3359bbc7efbbc79496efe71a 14-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Added sendBroadcastMultiplePermissions method

Added Context.sendBroadcastMultiplePermissions(Intent intent, String[]
receiverPermissions) method, which allows an array of required permissions
to be enforced.

Bug: 21852542
Change-Id: I27c9130e8f004b428452501ebc8a36aabde1f343
ayoutlib/bridge/android/BridgeContext.java
e37520b49da8fc2b7b7501c6dbbe1e6ac984dd9f 15-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Revert "Allow array of required permissions in sendBroadcast"

This reverts commit b4e7283c9afd9fb15ebd63f6ce9b75c9c1af658b.

Change-Id: Ie8390964bda5bdfa869cee8f46584043d8e7c664
ayoutlib/bridge/android/BridgeContext.java
b4e7283c9afd9fb15ebd63f6ce9b75c9c1af658b 14-Jul-2015 Fyodor Kupolov <fkupolov@google.com> Allow array of required permissions in sendBroadcast

Added Context.sendBroadcast(Intent intent, String[] receiverPermissions)
method, which allows an array of required permissions to be enforced.

Bug: 21852542
Change-Id: I3b8ff258fa9f3249c344bb8093b820b24eef00c0
ayoutlib/bridge/android/BridgeContext.java
0236e6b2d614abd11678de4cec4ed67b582541ff 10-Jul-2015 Bart Sears <bsears@google.com> Fix the build.

Correct a typo.

Change-Id: I16131cf7c0ce17fa09dedc67264e8199482cd27e
ayoutlib/bridge/android/BridgePackageManager.java
2bb3842a06af972888b83088a81258b237ee7bd9 10-Jul-2015 Svetoslav <svetoslavganov@google.com> Fix build

Change-Id: I1b56c07aa5b85662f25158156d2c0eff115e9544
ayoutlib/bridge/android/BridgePackageManager.java
490dd90c707de8426a068a90d74ec83c9c11fc83 07-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Add a default PackageManager to BridgeContext.

Needed for EditText.

Change-Id: I6c831467659ce814e86c13e928a2b77c14e1c139
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgePackageManager.java
61f23e9bf7d784e7a52168196758c4f6c6853e77 07-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Implement tools:list_item for RecyclerView.

It's now possible to use tools:list_item attribute for RecyclerView to
point to a default layout, rather than always using a TextView.

Change-Id: I5d522b2f0ca38b420fddfcb0f73a26d95707da79
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/util/ReflectionUtils.java
295ef6be084d1c2f22ef25a87e508c1f5c14ee5a 07-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Add roundess to configuration

Change-Id: Icc85b38dd091fc5aa13092d6abb06ac169f7b0b5
ayoutlib/bridge/impl/RenderAction.java
81f8cd92fa003a8625df1098662d0afa50f07e89 01-Jul-2015 Filip Gruszczynski <gruszczy@google.com> am 3ce79f6c: am 96496e2d: Merge "Build fix after changing IWindowSession." into cw-d-mr1-dev

* commit '3ce79f6c0c3435eca05ea34c5a8b34ac59bcb992':
Build fix after changing IWindowSession.
c77f9c76e4142db8dd76a28ad99b8f0395b82eba 30-Jun-2015 Deepanshu Gupta <deepanshu@google.com> Replace infinite loop with foreach.

A method call exists to find all inner classes. Use it instead of
manually enumerating the possibilities and checking.

Also fix a typo.

Change-Id: I2af678e92ea0c11b53617b247d8cda324391c185
ayoutlib/bridge/bars/AppCompatActionBar.java
7e3b61e73d6971c35acfa0798eb4d8da412ec3af 30-Jun-2015 Filip Gruszczynski <gruszczy@google.com> Build fix after changing IWindowSession.

Change-Id: I339fecb0138e8b8907fc53372b694021f6327260
ayoutlib/bridge/android/BridgeWindowSession.java
5d1eaf4a197130f561b16c4ed083cf016b20ab92 30-Jun-2015 Deepanshu Gupta <deepanshu@google.com> Add missing resolveResValue call.

Bug: http://b.android.com/178504
Change-Id: I7dde8094cf762893e4f7ea0d3de87a281c9602cd
ayoutlib/bridge/android/BridgeContext.java
a750a63d639f6936af456df904fa6b9ba941885e 17-Jun-2015 Dianne Hackborn <hackbod@google.com> Fix issue #21814207 and issue #21814212 (alarm manager)

Issue #21814207: AlarmManager.setAndAllowWhileIdle should also allow wake locks.

Introduce a whole new infrastructure for providing options when
sending broadcasts, much like ActivityOptions. There is a single
option right now, asking the activity manager to apply a tempory
whitelist to each receiver of the broadcast.

Issue #21814212: Need to allow configuration of alarm manager parameters

The various alarm manager timing configurations are not modifiable
through settings, much like DeviceIdleController. Also did a few
tweaks in the existing DeviceIdleController impl.

Change-Id: Ifd01013185acc4de668617b1e46e78e30ebed041
ayoutlib/bridge/android/BridgeContext.java
dc929e28acd32f7adebdc0d5afd3dc7eaa1a09fe 15-Jun-2015 Diego Perez <diegoperez@google.com> am 40a216d9: am df6f63ba: am 2422011d: am b2411c62: am ead59b0d: Merge "Fix GcSnapshot drawInLayer when clipping is used." into lmp-mr1-dev

* commit '40a216d95973bb897ee0d755ef260a616f176798':
Fix GcSnapshot drawInLayer when clipping is used.
df6f63badfe2572284dad8e34f152fd1c24a873e 15-Jun-2015 Diego Perez <diegoperez@google.com> am 2422011d: am b2411c62: am ead59b0d: Merge "Fix GcSnapshot drawInLayer when clipping is used." into lmp-mr1-dev

* commit '2422011d867f4d4516605148641bbeb7d9c2501b':
Fix GcSnapshot drawInLayer when clipping is used.
2422011d867f4d4516605148641bbeb7d9c2501b 15-Jun-2015 Diego Perez <diegoperez@google.com> am b2411c62: am ead59b0d: Merge "Fix GcSnapshot drawInLayer when clipping is used." into lmp-mr1-dev

* commit 'b2411c622cf9124f6af5f70d416adb179f9c88bb':
Fix GcSnapshot drawInLayer when clipping is used.
ead59b0d479c3a911be87261b523255e8e51f76a 15-Jun-2015 Diego Perez <diegoperez@google.com> Merge "Fix GcSnapshot drawInLayer when clipping is used." into lmp-mr1-dev
4dfe4d43ce5634f059a3ba669e3cac4551c3a3ee 05-Jun-2015 Jens Ole Lauridsen <jlauridsen@google.com> Support AppBar from Material Design.

This CL is a start for making the design able to render the AppBar.
We are still missing support for: system menu and the app icon.

Change-Id: I19600f8ee1e7e6492186a0b7ae7fb38c82e15c02
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/support/DesignLibUtil.java
ayoutlib/bridge/impl/RenderSessionImpl.java
4362443cd9a5df6c5cc012881a0aaf96c927b923 02-Jun-2015 Diego Perez <diegoperez@google.com> Render to measured size when using expand mode

When using RenderingMode.V_SCROLL or RenderingMode.H_SCROLL, if the
screen size is smaller than the measured size but as large as the
desired size, the layout will render incorrectly and won't expand.
This changes that to expand to at least the size of the screen.

Added tests for the V_SCROLL and H_SCROLL modes.

Bug: http://b.android.com/174928
Change-Id: I22686903560775e2e4f362af1d7b50c9b985467d
ayoutlib/bridge/impl/RenderSessionImpl.java
b3e872be9e634c8d1f34d07778ea753880bbf2d9 27-May-2015 Deepanshu Gupta <deepanshu@google.com> Skip warnings for some unresolved references.

Some applications rename the newer RTL attributes to the older
attributes in order to target RTL locales, but not need to include two
attributes everywhere it's needed. For example, iosched renames
paddingStart to paddingLeft (among other attributes) for API 17 and
above. This leads to hundreds of warnings about missing attributes.
This change suppresses such warnings.

Also, skip adding unresolved attributes to the typed array. This is more
in line with the actual implementation on device, and prevents
unexpected warnings/errors/crashes later.

Change-Id: Iee616fa6295aa9731ede0cf9dcd6dd2bd1fe8f20
ayoutlib/bridge/android/BridgeContext.java
8825de1751b4362d3a6fce2e402c51e481bb2729 01-Jun-2015 Filip Gruszczynski <gruszczy@google.com> Merge "Revert "Revert "Fix build.""" into mnc-dev
919f93265de94156d2cb32b598b5e08aa8da27c3 01-Jun-2015 Filip Gruszczynski <gruszczy@google.com> Revert "Revert "Fix build.""

This reverts commit 944a6c937cd3576ecae5c3fdd0dcf265329e6bcf.

Change-Id: I7daa255f331a1e39308eb626580aa00c63c5cb3e
ayoutlib/bridge/android/BridgeWindowSession.java
99bcc3eee23ed8bd15bd108d068d6f9f694e4393 01-Jun-2015 Filip Gruszczynski <gruszczy@google.com> Merge "Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""" into mnc-dev
996458b76c944f78eee26d7bd8cb4d39303b9119 30-May-2015 Deepanshu Gupta <deepanshu@google.com> Fix ParserFactory not initialized error.

Bug: http://b.android.com/175129
Change-Id: I2111673767e0f62ee910560022b559a177d55abd
ayoutlib/bridge/impl/RenderAction.java
d758e042ce08c46712db3db2d63fc84795028dfe 28-May-2015 Deepanshu Gupta <deepanshu@google.com> Fix NPE in BridgeContext.obtainStyledAttributes()

Replace direct member access with getter that checks for nullness.

Change-Id: I4a56a0ee903ae7d8c89b91d74b128302e1965586
ayoutlib/bridge/android/BridgeContext.java
2217f61e51ba4b19c56b19297c1e9cf74d7d860f 26-May-2015 Filip Gruszczynski <gruszczy@google.com> Revert "Revert "resolved conflicts for merge of 47249f2a to mnc-dev""

This includes the fix for the broken dialog windows. The outsets will
only be calculated and applied if the window is full screen, since
they don't make much sense otherwise.

This reverts commit 4bb6b751fbbb218e8a298db4aa008472a0aa8d31.

Change-Id: I977a85a78c990c1840784dc0be0dddd5a6d84e6b
ayoutlib/bridge/android/BridgeWindow.java
c801e91528705145bd403333e69ee7c01eb63d35 27-May-2015 Deepanshu Gupta <deepanshu@google.com> Merge "LayoutLib: Change nullity annotations." into mnc-dev
d0acf0627aa5f78cbf5bb189c7097546b86abebc 23-May-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Revert "Fix build."" into mnc-dev
944a6c937cd3576ecae5c3fdd0dcf265329e6bcf 23-May-2015 Deepanshu Gupta <deepanshu@google.com> Revert "Fix build."

This reverts commit 97b3ae1a8766616675ebf2323a97d8adfd41bfdc.

Reverted since 4bb6b751fbbb218e8a298db4aa008472a0aa8d31 reverts
the commit that warranted this change.

Change-Id: I56d0eb8ffba44a673ae357e9543dd18f6c03c54f
ayoutlib/bridge/android/BridgeWindowSession.java
476e582d2ffdf25102d4c55f8c242baa3d21d37f 22-May-2015 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Change nullity annotations.

Switch from using tools nullity annotations (com.android.annotations)
to android framework annotations (android.annotation).

A new sdk-common prebuilt is required for LayoutLib tests. The new
sdk-common requires an updated tools-common. The updated tools-common
doesn't have nullity annotations. So, instead of adding the annotation
dependency, just reuse the platform ones. This also paves the way to
include other platform annotations like IdRes etc.

Change-Id: I87b8f767d3681d914abe7d1329e26a87f49f50a7
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
ayoutlib/bridge/bars/AppCompatActionBar.java
ayoutlib/bridge/bars/BridgeActionBar.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/FrameworkActionBar.java
ayoutlib/bridge/bars/FrameworkActionBarWrapper.java
ayoutlib/bridge/impl/DelegateManager.java
ayoutlib/bridge/impl/ParserFactory.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/util/DynamicIdMap.java
ayoutlib/bridge/util/ReflectionUtils.java
4bb6b751fbbb218e8a298db4aa008472a0aa8d31 23-May-2015 Dianne Hackborn <hackbod@google.com> Revert "resolved conflicts for merge of 47249f2a to mnc-dev"

This reverts commit c7becb7ee78881646251ff4846e63eb6b96bf7ec, reversing
changes made to 8562b08f04c1309cf40db1e749d612b6824f1d12.
ayoutlib/bridge/android/BridgeWindow.java
97b3ae1a8766616675ebf2323a97d8adfd41bfdc 21-May-2015 Filip Gruszczynski <gruszczy@google.com> Fix build.

Cherry picking because automerger is stuck.

Change-Id: I49f669ee8eed53cf2fc30077cf0a066312865733
(cherry picked from commit c1b736a0cdf41ab5863bfe6901e46c95cc396342)
ayoutlib/bridge/android/BridgeWindowSession.java
91e5b0f598f19499e55dcb8f0243b430e3c1ee4f 22-May-2015 Filip Gruszczynski <gruszczy@google.com> Merge "resolved conflicts for merge of 47249f2a to mnc-dev" into mnc-dev
6330971ed293a2777bbdab09288f90ea4b2d0255 21-May-2015 Deepanshu Gupta <deepanshu@google.com> Add documentation about hack in commit: f8ea750455

Change-Id: I9ce871a67fb67e02e0c4df1eb5c3261ea52a914b
ayoutlib/bridge/android/BridgeContext.java
c7becb7ee78881646251ff4846e63eb6b96bf7ec 21-May-2015 Filip Gruszczynski <gruszczy@google.com> resolved conflicts for merge of 47249f2a to mnc-dev

This is a merge of chin support.

Change-Id: I436b751b3c4aaa6b46cfcdb475e02eedfa5a5635
037c9caccdc98bfe9d952e797535611c791787aa 21-May-2015 Filip Gruszczynski <gruszczy@google.com> Merge "Fix build." into cw-d-mr1-dev
c1b736a0cdf41ab5863bfe6901e46c95cc396342 21-May-2015 Filip Gruszczynski <gruszczy@google.com> Fix build.

Change-Id: I49f669ee8eed53cf2fc30077cf0a066312865733
ayoutlib/bridge/android/BridgeWindowSession.java
d5b82845450beac2d3c7db9cd80e9fc34d43a297 21-May-2015 Deepanshu Gupta <deepanshu@google.com> Make DatePicker rendering not fail.

Ensures that having a DatePicker in the layout doesn't crash the
complete rendering. The rendering is still not perfect, but at least it
works.

- Return a non-null window token so that ViewPager thinks that it's
attached to a window and doesn't skip populating the views.
- Fix a style not found issue.

Change-Id: Ied2b71de5b32bcb640bf4ec445e8a39509f800e9
ayoutlib/bridge/android/BridgeContext.java
3e11bf33a6094da92d97702213aa12c67b21c4d1 20-Apr-2015 Filip Gruszczynski <gruszczy@google.com> Support for devices with a chin.

Information about the chin is now part of the config.xml instead of the
theme. It is retrieved by WindowManagerService and passed to the clients
as insets. Clients can adjust their behavior in a way that makes it
invisible to the user, that part of the surface doesn't actually exist.

Bug: 19908853

Change-Id: Iedf57bf3c848201b854f91ffeb3b59187d375c1f
ayoutlib/bridge/android/BridgeWindow.java
1c5bf7f1ddc8c9c9844a1bc1a7e4ce53dcc5d5bd 20-May-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Make Context.getClassLoader() work." into mnc-dev
f8ea750455eec81e4e6d877b3e18e29a86d4ec95 19-May-2015 Deepanshu Gupta <deepanshu@google.com> Make Context.getClassLoader() work.

Context.getClassLoader() is used by the LayoutInflater and can be used
by custom views. However, when called from the LayoutInflater, this
needs to return only the Framework classes. This is so that the IDE gets
a chance to instantiate the custom views, which helps in better error
reporting and better fallback in case of exceptions, like MockView.

To workaround this need of the same method returning different results
based on where it's called from, the method call in LayoutInflater is
renamed to getFrameworkClassLoader() and the new method is injected in
Context. The implementation of getFrameworkClassLoader() maintains the
existing behaviour of getClassLoader().

Context.getClassLoader() is now modified to return classes from both
Framework and the app namespace.

Also, update the list of packages to search for Framework views.

Change-Id: I1a6be4aa1fc5c1c5520b5440a348a52f10b6eb3b
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/RenderAction.java
9354a3ac006001b10c3a3de59737798034794c89 19-May-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Show better error message for color attr not found." into mnc-dev
5f1bf496948fb6383ae17e5467a26a00489d7564 18-May-2015 Deepanshu Gupta <deepanshu@google.com> Show better error message for color attr not found.

Change-Id: I1ca32989522d30fec336eb607ee81f9e5cb5f48f
ayoutlib/bridge/impl/ResourceHelper.java
71dc5ee2244aa409c0426d3583a014e30d6cf07e 18-May-2015 Deepanshu Gupta <deepanshu@google.com> Fix nav bar spacing for tablets.

Change-Id: Ieee2c2174a3041a0f967cc75bbe74d8bf882ced7
ayoutlib/bridge/bars/NavigationBar.java
f2d408b51debadca830eefbf8131185ac55ce699 15-May-2015 Deepanshu Gupta <deepanshu@google.com> Don't keep LayoutlibCallback reference.

Switch to the newer API that enables keeping a reference only to the
ParserFactory which is a much leaner object as compared to
LayoutlibCallback.

Change-Id: I9b7afd93226db23786a00b2951cbf5ae5b8f3e5f
ayoutlib/bridge/impl/ParserFactory.java
ayoutlib/bridge/impl/RenderAction.java
139d6ff12d395a888624113fdd2521861b47d761 14-May-2015 Deepanshu Gupta <deepanshu@google.com> Update nav bar icons.

- Add a script to copy the icons from the original source.
- Update layout used for the navigation bar to be closer to the original
layout.
- Update test image with the latest rendering.
- Add a nexus 5 landscape device config to help with testing.

Change-Id: I0b6674955e0970a6a8cce148b1b7aa61e1752ccd
ayoutlib/bridge/bars/NavigationBar.java
d77b9ed7dcc42efca33b225c4594a30aab9e709c 12-May-2015 Deepanshu Gupta <deepanshu@google.com> Add missing delegates for M preview.

- Remove ICU dependency (use the version bundled with platform).
- Restructure intelliJ project to move dependencies to module.
- Minor fixes to layoutlib tests.

TODO:
- Load ICU data.
- Hyphenator doesn't work.
- High quality line breaker not present.

Change-Id: I965e096e17bfc97ee995a649c3f4f6f64bb4f70d
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/AndroidLocale.java
ayoutlib/bridge/impl/DelegateManager.java
78af25584633462e4ab8cf9bafe10f43e7cb2d83 09-May-2015 Deepanshu Gupta <deepanshu@google.com> Remove kxml dependency.

Create XmlPullParser using callback provided by the client. This enables
clients to choose which XmlPullParser implementation they want.

Change-Id: I9ad97a4777820cdbe5c8fc3716f74ddec9065c70
ayoutlib/bridge/impl/ParserFactory.java
ayoutlib/bridge/impl/RenderAction.java
2bf49b1a9f4898a3bb353a9b902b8e6c1642037a 14-May-2015 Jorim Jaggi <jjaggi@google.com> Fix build

Change-Id: Ia9277c6c983758d301c89312e39b59a2db0b29c4
ayoutlib/bridge/android/BridgeWindow.java
827e0facfefd0c0033dcfb1747b4fa6f80f9e0e2 07-May-2015 Jorim Jaggi <jjaggi@google.com> Make sure the app can draw a frame before unlocking

- The mechanism to stop windows drawing while window animator was
animating was somehow flaky. It relied on the fact that the client
would call relayout() whenever the animating state changed. This is
mostly the case, but not for lockscreen animations. Instead, we now
use a push model, where window manager tells the app that the state
has changed.
- In addition, it only stopped drawing if that window was animating,
but then only resumed drawing after all windows have finished
animating. Now, we do this per window, so we only stop drawing for
windows that are currently animating.
- We resume the top activity now at the very beginning of the
unlocking sequence. This gives the app a chance to draw a frame
before the user sees anything. If it's to slow, then we just use the
outdated framebuffer.

Bug: 19964562
Change-Id: Ifef8abd189a3146d854b81b9b948861e4d38c155
ayoutlib/bridge/android/BridgeWindow.java
14e139179be7daab6ed452105387a3922752c219 07-May-2015 Seigo Nonaka <nona@gogole.com> Retry "Always show auxiliary subtypes from NavBar keyboard icon."

This CL relands I1e50ee42838a1bf64a612da4904aa93458d44ea4, which was
reverted by I3decaf37198e5864a1763a059df4a36ebc70c5a7 due to the build
breakage in 'layoutlib' target, with a proper fix.

Hereafter the original CL description is repeated.

The auxiliary subtypes should be listed if the input method picker is
opened from NavBar keyboard icon. However there is only
IMM#showInputMethodPicker() API to open input method picker and this is
also used from LockScreen or Settings UI. Auxiliary subtypes should not
be listed there(Id7cf5d122). Thus framework shows auxiliary subtypes
based on IMMS#mInputShown and LockScreen state, but it is not a perfect
solution. If a physical keyboard is connected, the soft input may be
gone. As the result, auxiliary subtypes won't be listed even if it is
opened from NavBar keyboard icon.

To fix this issue, this CL introduces IMM#showInputMethodPicker(boolean)
to be able to decide showing auxiliary subtypes by caller.
Note that IMM#showInputMethodPicker(boolean) is still hidden with @hide.
There is no public API change in this CL.

Bug: 20763994
Change-Id: Id156c85535a221235737ea6dcc15a67f1c4b9f71
ayoutlib/bridge/android/BridgeIInputMethodManager.java
70280a20f379e416d9cff20b7c6764844e7c2ff4 07-May-2015 Diego Perez <diegoperez@google.com> am 0fe14486: am 2021c877: am 33e54563: am 4b125836: Merge "Added function to render a drawable in all available states" into lmp-mr1-dev

* commit '0fe14486211e3ade7f29ea76e16211853fe9cd7a':
Added function to render a drawable in all available states
2021c8773150dd47d8781375af94143cb22afd9d 07-May-2015 Diego Perez <diegoperez@google.com> am 33e54563: am 4b125836: Merge "Added function to render a drawable in all available states" into lmp-mr1-dev

* commit '33e54563daa0db610f9dc8b9d4fca8f826ffec73':
Added function to render a drawable in all available states
4b12583653561f69a5780126485380cac187c478 07-May-2015 Diego Perez <diegoperez@google.com> Merge "Added function to render a drawable in all available states" into lmp-mr1-dev
681c7d142a6d25d3215d5f879074cd4359c6f106 05-Mar-2015 Andrew Shulaev <ddrone@google.com> Added function to render a drawable in all available states

This reverts commit 01cdf8b135be3bf67b9386dc929109c3db82c730.

Change-Id: I596855047d78c3c718744ad61432fc45e1239634
(cherry picked from commit 1f158819bc7cf58f97e47fabfaf23b2fb838f2eb)
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/impl/RenderDrawable.java
c000db78d7dabc244e9bda42d33977fc4d259b20 07-May-2015 Diego Perez <diegoperez@google.com> am 9af506fb: am 143eaa81: am 2ea82244: am 263e6dfa: Merge "Make status and navigation bars widgets and usable from layouts" into lmp-mr1-dev

* commit '9af506fb5b5f1c7f36fb439c2b120ad2b0cda602':
Make status and navigation bars widgets and usable from layouts
9207b8567af2ea3913aec6085e8e610a70925e09 07-May-2015 Diego Perez <diegoperez@google.com> am ae4619dd: am df4c977d: am 24e10c0b: am 19dbe50b: Merge "Move StatusBar to use statusBarColor theme attribute" into lmp-mr1-dev

* commit 'ae4619dd7f3d48cae2e9b83681849a77a8201142':
Move StatusBar to use statusBarColor theme attribute
2ab7b460562ca9cf52a5c47a9c61a5cc31fd3a13 07-May-2015 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of a663e012 to mnc-dev

Change-Id: I279cad7db6e9b5e97da3ea3c3bb91e09cabc7076
8ab069f3aed15c7e5de32ff52a3b4710218f9895 22-Apr-2015 Diego Perez <diegoperez@google.com> Fix GcSnapshot drawInLayer when clipping is used.

GcSnapshot only allocates an image for tinting that is the size of the
current clipping area. When drawing to that image, the wrong
coordinate system was used since now we are dealing with only the
clipping rect we need to translate -clipX, -clipY the drawing so it's
painted at 0,0 of the new BufferedImage.

Change-Id: Id8639d5ea9bef36ac07743df332161d6eadc6a81
ayoutlib/bridge/impl/GcSnapshot.java
d7a53dab44babb38acc7cd0cc3067ae95152614d 07-May-2015 Diego Perez <diegoperez@google.com> am 9efcb308: am 21246bd9: am 8e75e307: am 1bc7fb2d: Merge "Fix isThemeAppCompat NPE when using an invalid theme" into lmp-mr1-dev

* commit '9efcb308615c0adaf418d430adabea3d271bcbb4':
Fix isThemeAppCompat NPE when using an invalid theme
dbcedeea2031554d5ebf9b3c09df90374b3273a7 07-May-2015 Deepanshu Gupta <deepanshu@google.com> am b2951490: am b19325be: am 2e3c41a4: am 92e79868: Merge "Fix title bar showing when not required." into lmp-mr1-dev

* commit 'b2951490eabf71e14c8fc5d50397adf869a2a291':
Fix title bar showing when not required.
613aef87cf6a5958ff2fd255348f92f8d3de152e 07-May-2015 Diego Perez <diegoperez@google.com> am 86bff0bb: am 0e20bd8e: Merge changes I60c09f33,Ie0134c2b into lmp-mr1-dev

* commit '86bff0bb63f3667f0b450420514c931b1f4d25d2':
Add new parameter to the render method to allow forcing a measure pass.
Avoid caching mImage on the main render loop and use clipping.
0e20bd8e50724ab264425ba830cdf1beb96f7404 07-May-2015 Diego Perez <diegoperez@google.com> Merge changes I60c09f33,Ie0134c2b into lmp-mr1-dev

* changes:
Add new parameter to the render method to allow forcing a measure pass.
Avoid caching mImage on the main render loop and use clipping.
143eaa81934e47c8acb8338d1a2383eb79b690ef 07-May-2015 Diego Perez <diegoperez@google.com> am 2ea82244: am 263e6dfa: Merge "Make status and navigation bars widgets and usable from layouts" into lmp-mr1-dev

* commit '2ea82244f0b4396444ec891ab664f9ac40c0b55b':
Make status and navigation bars widgets and usable from layouts
df4c977d760ccfcf929c77b100faa5f8f38df158 07-May-2015 Diego Perez <diegoperez@google.com> am 24e10c0b: am 19dbe50b: Merge "Move StatusBar to use statusBarColor theme attribute" into lmp-mr1-dev

* commit '24e10c0bad54bdd3b37f6f7effea8f76b687ce3f':
Move StatusBar to use statusBarColor theme attribute
9abe42324f2252460b003e6fcdb097910e16178a 07-May-2015 Deepanshu Gupta <deepanshu@google.com> am 7e4c1a92: am b4ca896f: Merge "RecyclerView in LayoutLib: better XML attrs." into lmp-mr1-dev

* commit '7e4c1a92b8f3ce02df0a1502be45c450308d81b7':
RecyclerView in LayoutLib: better XML attrs.
21246bd92f54be468496848b659bf47f2522430a 07-May-2015 Diego Perez <diegoperez@google.com> am 8e75e307: am 1bc7fb2d: Merge "Fix isThemeAppCompat NPE when using an invalid theme" into lmp-mr1-dev

* commit '8e75e307373a03dcbc55ce71be5b50f80e0474db':
Fix isThemeAppCompat NPE when using an invalid theme
b19325be074e466c39e86fd4418726a7c305546c 07-May-2015 Deepanshu Gupta <deepanshu@google.com> am 2e3c41a4: am 92e79868: Merge "Fix title bar showing when not required." into lmp-mr1-dev

* commit '2e3c41a4e4fbb811cdafc754708d62cba7c6c1b6':
Fix title bar showing when not required.
263e6dfa6aa3286b71ef908c8b2f06206e747ab1 07-May-2015 Diego Perez <diegoperez@google.com> Merge "Make status and navigation bars widgets and usable from layouts" into lmp-mr1-dev
19dbe50bb534db6fa46f0df47f589a69212e9458 07-May-2015 Diego Perez <diegoperez@google.com> Merge "Move StatusBar to use statusBarColor theme attribute" into lmp-mr1-dev
b4ca896f05eed9d36ac9971810d102a9139502f9 07-May-2015 Deepanshu Gupta <deepanshu@google.com> Merge "RecyclerView in LayoutLib: better XML attrs." into lmp-mr1-dev
1bc7fb2dcc954caac78d3fc02eb98ec30658d4d0 07-May-2015 Diego Perez <diegoperez@google.com> Merge "Fix isThemeAppCompat NPE when using an invalid theme" into lmp-mr1-dev
d0546353a8ce2d9df5b390d0df967c0ee5eb7ca5 30-Apr-2015 Diego Perez <diegoperez@google.com> Move StatusBar to use statusBarColor theme attribute

Change-Id: Ic0d8f4520a6dcb7225a2947cc56dc06a7340d3ba
ayoutlib/bridge/bars/StatusBar.java
8ff8de2cf2ebc136d3dd8d8a8b5e4912e483bb2b 05-Nov-2014 Diego Perez <diegoperez@google.com> Add new parameter to the render method to allow forcing a measure pass.

Change-Id: I60c09f3375fc85c257a449f4372220741e01db54
(cherry picked from commit c13aa0c035cd226d27323bc0e533632ba32f6a84)
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/RenderSessionImpl.java
f3cb4ba213a0fa4d1c184c430a2eaac7e27ccf6f 16-Feb-2015 Diego Perez <diegoperez@google.com> Avoid caching mImage on the main render loop and use clipping.

+ Added a session flag that avoids caching mImage. This is useful when
mImage is just a Graphics2D wrapper that might change at any time.
+ Make GcSnapshot aware of the clipping so it doesn't need to render the
whole area if not needed.

Change-Id: Ie0134c2bc2741b5fa6648313864c851bbac066cf
(cherry picked from commit 2c5e85b303077d2120b428bd4c7e6ecb6970935b)
ayoutlib/bridge/impl/GcSnapshot.java
ayoutlib/bridge/impl/RenderSessionImpl.java
9b39c49bfcf9caf434799976304e492ef4599b86 15-Apr-2015 Diego Perez <diegoperez@google.com> Make status and navigation bars widgets and usable from layouts

This will allow the theme editor to render these components
separately.

Change-Id: I8b2e0e78039b44623152e34f68ffcdfab5aa9885
ayoutlib/bridge/bars/Config.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
6aa5a44d9b65ee608df03df29dad640258548f10 21-Apr-2015 Diego Perez <diegoperez@google.com> Fix isThemeAppCompat NPE when using an invalid theme

When the theme does not longer exists on the Android Studio side,
getDefaultTheme will return null causing isThemeAppCompat to crash.

Change-Id: I5a5c17126dce72e9872522643219b9438666bc04
ayoutlib/bridge/impl/RenderSessionImpl.java
e8b6debd9b1035a8b8da102cfe476b71986b341c 18-Apr-2015 Svet Ganov <svetoslavganov@google.com> Fix build for real

Change-Id: I5742226e9b873cd5a035f11be0e228188e215365
ayoutlib/bridge/android/BridgeContext.java
6762301a10ba1176dc97083bef6785ec169378ff 18-Apr-2015 Svet Ganov <svetoslavganov@google.com> Fix build

Change-Id: If469dce767b492c3fcc1ad8cf7ab1041eb61096f
ayoutlib/bridge/android/BridgeContext.java
2bc2daa74eef01135f717eadfab87538a9bef29f 31-Mar-2015 Deepanshu Gupta <deepanshu@google.com> RecyclerView in LayoutLib: better XML attrs.

- RecyclerView now supports XML attributes natively. Thus, remove the
custom support via tools attribute. Users with older versions of
RecyclerView should update.
- Add Context.getPackageName() support used by RecyclerView.
- Update SessionParamsFlags with the new changes and rename it to
RenderParamsFlags.

The attribute behaves slightly different from the original tools
attribute. For usage, see commit 044b5b61e96 in frameworks/support.

Change-Id: I12073e37a2ba411558ca1d3e30c399e3d9a0b144
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/RenderParamsFlags.java
ayoutlib/bridge/android/SessionParamsFlags.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
ayoutlib/bridge/impl/RenderSessionImpl.java
666748728f40e0638860663eabb7a6c66248ad82 16-Apr-2015 Deepanshu Gupta <deepanshu@google.com> Fix title bar showing when not required.

Bug: http://b.android.com/166383
Change-Id: I5ea051ffdbf9a2d73a83f62d56a0f4006b014348
ayoutlib/bridge/impl/RenderSessionImpl.java
4967201a2c524906b90739c9a549174fb1175a24 16-Apr-2015 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of 186fe7b1 to master

Change-Id: I60886d3e44ae23a11c8f129517df87ee29625ada
1f3c7f3f500bdbfd790c20872961d84ef617f066 16-Apr-2015 Deepanshu Gupta <deepanshu@google.com> am f18ceefc: am cd6e00c6: Merge changes from topic \'layoutlib-api-15\' into lmp-mr1-dev

* commit 'f18ceefcf0d3cc91e74737e0a93f16775e3bf18b':
Update golden image for tests.
Update to using LayoutlibCallback.
Remove implementation of deprecated method.
Add @empty support.
37dbb8b7f3c069196040eed3a03006647db7fa5b 15-Apr-2015 Deepanshu Gupta <deepanshu@google.com> Update to using LayoutlibCallback.

Change-Id: Ia89d418b0d40ca8efef8968a4a2a635616b945ac
nternal/policy/PolicyManager.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
ayoutlib/bridge/bars/AppCompatActionBar.java
ayoutlib/bridge/bars/BridgeActionBar.java
ayoutlib/bridge/impl/RenderAction.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/binding/AdapterHelper.java
ayoutlib/bridge/impl/binding/FakeAdapter.java
ayoutlib/bridge/impl/binding/FakeExpandableAdapter.java
49ce36e1754243eedc124b4f7e68af1b458c821c 15-Apr-2015 Deepanshu Gupta <deepanshu@google.com> Remove implementation of deprecated method.

BridgeResources.getDrawable(int) is not needed anymore, since the super
method is deprecated and it calls the alternative
getDrawable(int, Theme), which we override.

Change-Id: I00c0bfaef6c4167a787bb74990b91cebb951c847
ayoutlib/bridge/impl/RenderSessionImpl.java
5f11a1af572730567d9e35d6792a720585a268c6 25-Mar-2015 Bryce Lee <brycelee@google.com> add correct exception throw declaration to isScreenBrightnessBoosted.

Change-Id: I9b861002d7719ad43643d68f6795df6938bd0fc3
ayoutlib/bridge/android/BridgePowerManager.java
cffef341f957b55c166065f0c4be258279aa8a8c 25-Mar-2015 Bryce Lee <brycelee@google.com> Implement isScreenBrightnessBoosted in BridgePowerManager.

Change-Id: I7da132c7522e5c352e14123f059b900008d94c95
(cherry picked from commit 40a4f4a61fbb2172901eda763bf928ae9b1b5300)
ayoutlib/bridge/android/BridgePowerManager.java
40a4f4a61fbb2172901eda763bf928ae9b1b5300 25-Mar-2015 Bryce Lee <brycelee@google.com> Implement isScreenBrightnessBoosted in BridgePowerManager.

Change-Id: I7da132c7522e5c352e14123f059b900008d94c95
ayoutlib/bridge/android/BridgePowerManager.java
cb580742e364f29bdd78ee5532d1c00279419e48 25-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 659413d6: am 5c03cd8a: am 96a67430: am 2b98abde: am 8f9ebc65: am 3bd5cbb1: Merge "Use right colors for status bar and nav bar." into lmp-dev

* commit '659413d6a2ccd8c8ade06bc3420ca90def3e3be6':
Use right colors for status bar and nav bar.
96a67430c0088168f21b230c64c348a53e672538 25-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 2b98abde: am 8f9ebc65: am 3bd5cbb1: Merge "Use right colors for status bar and nav bar." into lmp-dev

* commit '2b98abde26aa2033562b48d635d6f2ba11c48908':
Use right colors for status bar and nav bar.
2b98abde26aa2033562b48d635d6f2ba11c48908 25-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 8f9ebc65: am 3bd5cbb1: Merge "Use right colors for status bar and nav bar." into lmp-dev

* commit '8f9ebc65939ed3ac2e7fdc135e8513fd8d65daaf':
Use right colors for status bar and nav bar.
8f9ebc65939ed3ac2e7fdc135e8513fd8d65daaf 25-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 3bd5cbb1: Merge "Use right colors for status bar and nav bar." into lmp-dev

* commit '3bd5cbb1f3d837d7799fb4b33b4dda99adbeeeb4':
Use right colors for status bar and nav bar.
e4df25eded03c110e5feca6ba811ae10dd03735c 24-Mar-2015 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: Ib0b9ffb9cbf53df3d76b8de6619d09ba18b4d345
ayoutlib/bridge/android/BridgePowerManager.java
c6d1c345f41cf817bf2c07c97b97107d94296064 26-Feb-2015 Svetoslav <svetoslavganov@google.com> Runtime permissions: per user permission tracking.

Before all permissions were granted at install time at once, so the user
was persented with an all or nothing choice. In the new runtime permissions
model all dangarous permissions (nomal are always granted and signature
one are granted if signatures match) are not granted at install time and
the app can request them as necessary at runtime.

Before, all granted permission to an app were identical for all users as
granting is performed at install time. However, the new runtime model
allows the same app running under two different users to have different
runtime permission grants. This change refactors the permissions book
keeping in the package manager to enable per user permission tracking.

The change also adds the app facing APIs for requesting runtime permissions.

Change-Id: Icbf2fc2ced15c42ca206c335996206bd1a4a4be5
ayoutlib/bridge/android/BridgeContext.java
58ca246c834d7ab45939367367a5932d8e348f41 18-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Use right colors for status bar and nav bar.

Bug: http://b.android.com/81862
Change-Id: Ia10297e83e54c01a50de6cbcac2b7fef48e8d238
ayoutlib/bridge/bars/Config.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/bars/TitleBar.java
74bf54037cdf23759530da0560aede33e6a35c5c 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 199a70f1: am 576801ff: am 842eee9f: am 1f9a26af: am 158c08bc: am ada85905: Fix AppCompat action bar theming.

* commit '199a70f1820c38a9f1db1697ad91c4f5f07d00aa':
Fix AppCompat action bar theming.
a0c3191b74d1119999d94c71de8d916e128ea009 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 0f8c9d1d: am a5be9a7d: am 38467b5f: am 9a00f1c8: am 79f7fce7: am 2e4d9324: Fix NoActionBar themes rendering.

* commit '0f8c9d1df28ed10b1c9013ddd315b306868e349d':
Fix NoActionBar themes rendering.
576801ff82a85c4de19404dfe364eef7184b84e0 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 842eee9f: am 1f9a26af: am 158c08bc: am ada85905: Fix AppCompat action bar theming.

* commit '842eee9f816a2e35bf3c9ce6c14cd5e43684265b':
Fix AppCompat action bar theming.
a5be9a7d2d2cbcd3892fc916c9a944745024881d 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 38467b5f: am 9a00f1c8: am 79f7fce7: am 2e4d9324: Fix NoActionBar themes rendering.

* commit '38467b5fbbc09ad05624454f735d27ada25565c8':
Fix NoActionBar themes rendering.
1f9a26af95abba385b612c734d1d5e32d9e3f363 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 158c08bc: am ada85905: Fix AppCompat action bar theming.

* commit '158c08bcf1cd0bc702748ee2a4cf6aa259c26147':
Fix AppCompat action bar theming.
9a00f1c84b7a7936a12415a08604ac8fb98ec5ea 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 79f7fce7: am 2e4d9324: Fix NoActionBar themes rendering.

* commit '79f7fce7a49e7b7cd414ff5c3fdb5cbaae45c1f1':
Fix NoActionBar themes rendering.
158c08bcf1cd0bc702748ee2a4cf6aa259c26147 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am ada85905: Fix AppCompat action bar theming.

* commit 'ada8590547348b77d8cbd56abdb8fadb3e72c015':
Fix AppCompat action bar theming.
79f7fce7a49e7b7cd414ff5c3fdb5cbaae45c1f1 17-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 2e4d9324: Fix NoActionBar themes rendering.

* commit '2e4d93245764a1c1d7515361ddbb8fc1665f814e':
Fix NoActionBar themes rendering.
ada8590547348b77d8cbd56abdb8fadb3e72c015 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix AppCompat action bar theming.

Use themed context to inflate the action bar when AppCompat is used.
Also fix minor issues exposed as a result.

- Set project callback when LayoutInflater is created by
LayoutInflater.from(context).
- Remove duplication of code to get base context from context wrapper.

Bug: http://b.android.com/159711
Change-Id: I379ba2ba71c0ef547460987c3aa5db521c7de967
nternal/view/menu/BridgeMenuItemImpl.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/bars/AppCompatActionBar.java
ayoutlib/bridge/bars/BridgeActionBar.java
b9b8aef94e5bad8f5f03f686a2d3d8a09c045a7b 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix import order.

Change-Id: I50bfbf4011290683a1c6adb94e0b6fa301dcc75b
ayoutlib/bridge/android/BridgeContext.java
2e4d93245764a1c1d7515361ddbb8fc1665f814e 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix NoActionBar themes rendering.

Also fix some warnings.

Bug: http://b.android.com/159780
Change-Id: I64fd4259b802722af7a271f51d5943018ed11e9e
ayoutlib/bridge/bars/AppCompatActionBar.java
ayoutlib/bridge/bars/BridgeActionBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
28070f43a64069a95f7cb2e5c463bdee41e58294 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am a4277e14: am a4ed5e94: am e770c5e4: am c44430a3: Merge "Tools attribute improvements for RecyclerView LayoutManager." into lmp-mr1-dev

* commit 'a4277e149355c53fde73a4e1ef44aa665af31cf0':
Tools attribute improvements for RecyclerView LayoutManager.
1bbb9e1d5d6c5620cf5da3309159620c74f64cd1 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am fceec0e1: am c7fc094d: am d44af610: am b3cfb334: Merge "Fix rare NPE in BridgeContext." into lmp-mr1-dev

* commit 'fceec0e124a55b25d59f2af5279c70ac045d6771':
Fix rare NPE in BridgeContext.
d88a9bc821a660bd86056e39fe8189d521b0f860 13-Mar-2015 Andreas Gampe <agampe@google.com> resolved conflicts for merge of ef1741d2 to master

Change-Id: I5379d5f756695f5176d92249ac6304bffcf95751
a4ed5e94117a2c6c1734138faed09490245c602f 12-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am e770c5e4: am c44430a3: Merge "Tools attribute improvements for RecyclerView LayoutManager." into lmp-mr1-dev

* commit 'e770c5e45a139d709976f8c1dbb821733968b5a8':
Tools attribute improvements for RecyclerView LayoutManager.
c7fc094d319998572087e983e21c62de9f318139 12-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am d44af610: am b3cfb334: Merge "Fix rare NPE in BridgeContext." into lmp-mr1-dev

* commit 'd44af6108b18f3de05ed3f61d056d9c5b36ff8be':
Fix rare NPE in BridgeContext.
05cba2f8acd88d40e1bb149915fe590d4a21b74d 12-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 338a5a88: am b171be1a: Merge "Add RecyclerView support." into lmp-mr1-dev

* commit '338a5a88fe8ecf8a724fcfaa2888a7c0fe53cb34':
Add RecyclerView support.
0412b317acfb64c9d78edcdfd3a92634e9b62b80 12-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Tools attribute improvements for RecyclerView LayoutManager.

1. Change tools attribute for layout manager from layoutManagerType to
LayoutManager.
2. Support classnames in the tools attribute.

This change doesn't try to supprt arbitrary classnames for now. The
reason for this is that the new layoutlib API is supposed to contain a
new method for inflating custom classes that are not views. This will
allow us to throw better error messages. Without the new API, trying for
different constructors, will result in a error messages being logged.

Change-Id: I3a31359c06b7452bfd973c3e5e54f9038acccfaa
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
85d72c4535003af3b9df77bd6eaa2b33e8a7cba2 11-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix rare NPE in BridgeContext.

Also fixed some deprecation warnings.

Change-Id: I2fa00996dab0b008b9ca07a5382a059e5780529d
ayoutlib/bridge/android/BridgeContext.java
d345f44a87de1088fcd19e021238852bbffbbaec 06-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Add RecyclerView support.

Bug: http://b.android.com/72117
Change-Id: Iba95baff59f1b715f91da25e15acf27bc052d95e
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/android/SessionParamsFlags.java
ayoutlib/bridge/android/support/RecyclerViewUtil.java
ayoutlib/bridge/impl/RenderDrawable.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/util/ReflectionUtils.java
1f158819bc7cf58f97e47fabfaf23b2fb838f2eb 05-Mar-2015 Andrew Shulaev <ddrone@google.com> Added function to render a drawable in all available states

This reverts commit 01cdf8b135be3bf67b9386dc929109c3db82c730.

Change-Id: I596855047d78c3c718744ad61432fc45e1239634
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/RenderParamsFlags.java
ayoutlib/bridge/android/SessionParamsFlags.java
ayoutlib/bridge/impl/RenderDrawable.java
ayoutlib/bridge/impl/RenderSessionImpl.java
01cdf8b135be3bf67b9386dc929109c3db82c730 04-Mar-2015 Andrew Shulaev <ddrone@google.com> Revert "Added function to render a drawable in all available states"

This reverts commit 63483e17de4d2441acaabcee4185b0bb25e1d94c.

Change-Id: I07fced229759e63d4fa4f94b7dac48b3e9342b18
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/RenderParamsFlags.java
ayoutlib/bridge/android/SessionParamsFlags.java
ayoutlib/bridge/impl/RenderDrawable.java
ayoutlib/bridge/impl/RenderSessionImpl.java
63483e17de4d2441acaabcee4185b0bb25e1d94c 04-Mar-2015 Andrew Shulaev <ddrone@google.com> Added function to render a drawable in all available states

Change-Id: I230cc5775a09120efe9c82a4017b001aa510ddff
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/RenderParamsFlags.java
ayoutlib/bridge/android/SessionParamsFlags.java
ayoutlib/bridge/impl/RenderDrawable.java
ayoutlib/bridge/impl/RenderSessionImpl.java
4c74da90dba32e608e956cccb6c150db0540a78b 02-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am c74295db: am bf815f49: am 7b4caab1: am 07d453fa: Merge "Add status bar time for 5.1" into lmp-mr1-dev

* commit 'c74295db3048d964679913f146511ce3ad838089':
Add status bar time for 5.1
bf815f495270b466e53bec20772b41ff4397ac83 02-Mar-2015 Deepanshu Gupta <deepanshu@google.com> am 7b4caab1: am 07d453fa: Merge "Add status bar time for 5.1" into lmp-mr1-dev

* commit '7b4caab1a87b659498d30af194ae511526c503ba':
Add status bar time for 5.1
2045061aac9e8b0f93e426a2cf67cecc813a9020 27-Feb-2015 Deepanshu Gupta <deepanshu@google.com> Add status bar time for 5.1

Change-Id: I9469cdbbc5cbfe5cb99d9c4ee6f4e299246d409f
ayoutlib/bridge/bars/Config.java
6e53931f49f49245deef8622eb8e7dc6ccf04536 25-Feb-2015 Jeff Brown <jeffbrown@google.com> Add Context.getSystemService(Class<?>).

Added an overload of getSystemService() that takes a class instead of a
service name to eliminate the extra cast and provide more type safety.

Cleaned up docs.

Removed the default constructor of BatteryManager which should not have
existed.

Change-Id: I9da46b20641fc83ecd3342560e5b94cb721f289c
ayoutlib/bridge/android/BridgeContext.java
1fb55286438967f82e305a8449c0528a7cd07fce 24-Feb-2015 Chad Jones <chadj@google.com> resolved conflicts for merge of 57bb5f5c to master

Change-Id: Id5dfe7fc919305658312771a031c0764cef5515c
2c5e85b303077d2120b428bd4c7e6ecb6970935b 16-Feb-2015 Diego Perez <diegoperez@google.com> Avoid caching mImage on the main render loop and use clipping.

+ Added a session flag that avoids caching mImage. This is useful when
mImage is just a Graphics2D wrapper that might change at any time.
+ Make GcSnapshot aware of the clipping so it doesn't need to render the
whole area if not needed.

Change-Id: Ie0134c2bc2741b5fa6648313864c851bbac066cf
ayoutlib/bridge/android/SessionParamsFlags.java
ayoutlib/bridge/impl/GcSnapshot.java
ayoutlib/bridge/impl/RenderSessionImpl.java
c2932a1be3e320679034212698aff376d5104dbe 21-Nov-2014 Jeff Brown <jeffbrown@google.com> Hold a wake lock while dozing when display updates are pending.

When the display state is DOZE or DOZE_SUSPEND, assume this means
that the AP may go to sleep at any time so hold a wake lock for
a little while starting when traversals are scheduled to ensure
that the AP remains awake long enough to draw and post the frame
to the display hardware.

This patch is somewhat approximate but should be good enough for
most devices today.

Note that the implementation uses the window manager to ensure that
the window which wants to draw is actually visible before acquiring
the wake lock. There is a cost to this test (a round-trip) which
should not be significant today since we do not expect apps to draw
more than one frame or two while dozing. However, if we wanted to
support animations in general, we might want to optimize it or
eliminate the check altogether (since we can already account for
the app's use of the wake lock).

Another way to implement this functionality might be for the view
hierarchy to listen for the power manager to report that it has entered
a non-interactive power state before deciding to poke draw locks.
This would be somewhat more accurate than watching the display state.
Also, the draw lock timeout logic could be implemented more directly
instead of using an ordinary timed wake lock.

Bug: 18284212
Change-Id: I84b341c678303e8b7481bd1620e634fe82cc4350
ayoutlib/bridge/android/BridgeWindowSession.java
dc630c64be672b9330a272a40cee699e463fd248 18-Feb-2015 Deepanshu Gupta <deepanshu@google.com> am 0a300b89: am ad879adb: Merge "Add Asset management support for fonts." into lmp-dev automerge: 0684991 automerge: c2fa5e2
automerge: 7bf58d0

* commit '7bf58d0c5523a9b76ab1d570acb92514e8fff8ba':
Add Asset management support for fonts.
0a300b897711bfa39e0d30e2fa61664f01fb58d8 17-Feb-2015 Deepanshu Gupta <deepanshu@google.com> am ad879adb: Merge "Add Asset management support for fonts." into lmp-dev
automerge: 0684991

* commit '068499111c173fdd9869e7dbe5b9de857aca1c2d':
Add Asset management support for fonts.
068499111c173fdd9869e7dbe5b9de857aca1c2d 13-Feb-2015 Deepanshu Gupta <deepanshu@google.com> am ad879adb: Merge "Add Asset management support for fonts." into lmp-dev

* commit 'ad879adb65ffa577844738522ab6d7d30aba2ead':
Add Asset management support for fonts.
ad879adb65ffa577844738522ab6d7d30aba2ead 13-Feb-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Add Asset management support for fonts." into lmp-dev
b10e33ff804a831c71be9303146cea892b9aeb5d 04-Feb-2015 Jorim Jaggi <jjaggi@google.com> Split up android.policy into framework.jar and services.jar 1/3

Change-Id: Ifd69f1f3dd308a7e17a1442e2f3950da8b03cec4
nternal/policy/PolicyManager.java
d51834bdfad0cd3142ac464ab3a3b0db14f884c3 28-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Add Asset management support for fonts.

Change-Id: I10ca67dcffe244667d4ae0bda65dbc1aa6691d50
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/RenderAction.java
b4506586dc4374697220408a63b6a5b293cb89f4 31-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 3d5535cf: Merge "Limited AppCompat support" into lmp-dev automerge: 7789447 automerge: 580937f automerge: c053438
automerge: df5a198

* commit 'df5a1987108539c703477adff3749d647ba313c5':
Limited AppCompat support
a925a06a9da181b5293885ff51193e9b23473292 31-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 1d59871e: Merge "Resource resolution fixes." into lmp-dev automerge: 7e683bd automerge: 1575ca6 automerge: 862cdd6
automerge: 6a43990

* commit '6a439908fcc103696dd90bc42494231b54b7a10b':
Resource resolution fixes.
580937fc45bc5ef97e45f1eaf67945a07c5ce41f 31-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 3d5535cf: Merge "Limited AppCompat support" into lmp-dev
automerge: 7789447

* commit '7789447bd97c851b7a09623a417300590e5439d5':
Limited AppCompat support
1575ca6e1a713f9d2e4a9f91bc6943ae10fde083 31-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 1d59871e: Merge "Resource resolution fixes." into lmp-dev
automerge: 7e683bd

* commit '7e683bdaddff77a24a36d420c5782b47795c5ccb':
Resource resolution fixes.
7789447bd97c851b7a09623a417300590e5439d5 31-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 3d5535cf: Merge "Limited AppCompat support" into lmp-dev

* commit '3d5535cfb7755c20619529649b025c4682013b85':
Limited AppCompat support
7e683bdaddff77a24a36d420c5782b47795c5ccb 31-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 1d59871e: Merge "Resource resolution fixes." into lmp-dev

* commit '1d59871e4e8a3a657dab3931d684706c45630a2f':
Resource resolution fixes.
224e931fed1220f175805fdec71a882649270aa7 16-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Limited AppCompat support

Change-Id: I4ac7234c9533b9f47f070335c4cb6ae605d8a89f
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/AppCompatActionBar.java
ayoutlib/bridge/bars/BridgeActionBar.java
ayoutlib/bridge/bars/CustomActionBarWrapper.java
ayoutlib/bridge/bars/FrameworkActionBar.java
ayoutlib/bridge/bars/FrameworkActionBarWrapper.java
ayoutlib/bridge/impl/RenderSessionImpl.java
165be0c70d128f0ece876d54e1c7e95ef04c6960 28-Jan-2015 Craig Mautner <cmautner@google.com> Remove TYPE_UNIVERSE_BACKGROUND from system

An experiment that is over and has been occupying space.

Fixes bug 18088522 item #7

Change-Id: Ib0fcaa24243ed9b0581143e1d5114c1fd2b0aa6e
ayoutlib/bridge/android/BridgeWindowSession.java
b6864ac6cde109be320e18188209eb8420c585f1 16-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Resource resolution fixes.

1. Some dynamic ids weren't created and resulted in ResourceNotFound
exceptions.
2. Prevent NPE if a style attribute (eg. style="?attr/foo"), which
cannot be resolved, is resolved. This effectively, also results in
making it harder to catch misconfigured themes. However, support
library does it, and we don't want to throw errors when the library is
working as intended.

Change-Id: I731d8fb9209eb72b464d235d1072d416e132970b
ayoutlib/bridge/android/BridgeContext.java
c8807ebbd2f9a129372b4142b6db1378dad44127 10-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am f2e04ac7: am c598047d: am ca67a249: am bb600de6: am 74147527: am 8505c387: Special case AppCompat to show action bar. automerge: 8e2dd14
automerge: 2223018

* commit '22230189be8e811881ba24de1cde97f9882a7d45':
Special case AppCompat to show action bar.
f2e04ac7ea1cc2f91ca1562a14c7e0c261f869fe 10-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am c598047d: am ca67a249: am bb600de6: am 74147527: am 8505c387: Special case AppCompat to show action bar.

* commit 'c598047d67f64e690f682d82c0e77989c79ae465':
Special case AppCompat to show action bar.
c598047d67f64e690f682d82c0e77989c79ae465 10-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am ca67a249: am bb600de6: am 74147527: am 8505c387: Special case AppCompat to show action bar.

* commit 'ca67a249293d021808f349fa2e2f799451aeafe8':
Special case AppCompat to show action bar.
ca67a249293d021808f349fa2e2f799451aeafe8 10-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am bb600de6: am 74147527: am 8505c387: Special case AppCompat to show action bar.

* commit 'bb600de6e7c5c7a0a1d4b872d2ee100ccc353213':
Special case AppCompat to show action bar.
bb600de6e7c5c7a0a1d4b872d2ee100ccc353213 10-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 74147527: am 8505c387: Special case AppCompat to show action bar.

* commit '74147527357b9abd9d30b3a2dbd72a5172a35625':
Special case AppCompat to show action bar.
dbd64f7c904287f9e1bf5bb22385aace85274cab 15-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Support Locale.toLanguageTag on Java 6

Change-Id: I255e79e2c288cd24b350b7c26128bbbb0b2cb9a3
(cherry picked from commit 5cd9dde5a2a77c5095f985186d8f03147fd22870)
ayoutlib/bridge/android/AndroidLocale.java
8505c3870a17f41d23329344fe381cd9ff324bd2 09-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Special case AppCompat to show action bar.

Bug: http://b.android.com/78944
Change-Id: I02d68d592d812016744716f99376cfefd519b21b
ayoutlib/bridge/impl/RenderSessionImpl.java
af03e6eafc3cad45d8c12fe2159c73b096baf736 07-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 67cf0bf4: am 84097e39: am b187106c: am e69e4f8b: am f9bb0b5e: Merge "Fix DatePicker rendering." into lmp-dev

* commit '67cf0bf421370c756d93ca52697fbce03e34c09c':
Fix DatePicker rendering.
08de06ddf7ca806161c2403e97634e6076051119 07-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am adcd2241: am c7fe9793: am 48ab6bec: am 8c686ddd: am d20a518c: Merge "Make Preference-cookie map non static." into lmp-dev

* commit 'adcd224135e3c12f483547ffa8bb2cb0250ba923':
Make Preference-cookie map non static.
b79d83d34c564d100332cd06bb312d7621c0177c 07-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am d050df72: am addaeff9: am b88a65df: am cec8e5a1: am f861c0ce: Merge "Fix default initial value for preferences" into lmp-dev

* commit 'd050df7275137f9c57ce79a7b46d51e2d1fb9290':
Fix default initial value for preferences
b95475404e70f4f0c7a8d4a6a452439223ffe297 07-Jan-2015 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of 20db8770 to master

Change-Id: Ifffcf8e2741ec242d940c3ba81244d4df57642fc
b187106c5397072b6ae26061cec847ec9343caee 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am e69e4f8b: am f9bb0b5e: Merge "Fix DatePicker rendering." into lmp-dev

* commit 'e69e4f8b4db142f024e170cf6faabb36095799b7':
Fix DatePicker rendering.
48ab6becea828c0bcaaf79fe930aac31881f59db 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 8c686ddd: am d20a518c: Merge "Make Preference-cookie map non static." into lmp-dev

* commit '8c686ddd540f3a15cdba4893f104c0e8e9af5716':
Make Preference-cookie map non static.
b88a65df73798becc57004b3fc55fdf8c0a83a13 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am cec8e5a1: am f861c0ce: Merge "Fix default initial value for preferences" into lmp-dev

* commit 'cec8e5a10de413c733223b8b1cc11b70c6254647':
Fix default initial value for preferences
2bd01ebfa99815d4fb6b4e77754146a22cf66d03 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 7ed14549: am 7081a114: Merge "Add preferences rendering." into lmp-dev

* commit '7ed145493d3f5bea32c567980f77cc42f613197e':
Add preferences rendering.
e69e4f8b4db142f024e170cf6faabb36095799b7 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am f9bb0b5e: Merge "Fix DatePicker rendering." into lmp-dev

* commit 'f9bb0b5e133b0c364c3f87623f0fdff0fedc5226':
Fix DatePicker rendering.
8c686ddd540f3a15cdba4893f104c0e8e9af5716 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am d20a518c: Merge "Make Preference-cookie map non static." into lmp-dev

* commit 'd20a518c82e5e33d33e3dc5d74bf3c17d807f7d7':
Make Preference-cookie map non static.
cec8e5a10de413c733223b8b1cc11b70c6254647 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am f861c0ce: Merge "Fix default initial value for preferences" into lmp-dev

* commit 'f861c0ce3ff42550f3d5ede837e7bfb3855f5964':
Fix default initial value for preferences
7ed145493d3f5bea32c567980f77cc42f613197e 06-Jan-2015 Deepanshu Gupta <deepanshu@google.com> am 7081a114: Merge "Add preferences rendering." into lmp-dev

* commit '7081a114d4ee190c746f337057b0f84928c162dd':
Add preferences rendering.
e64a5bd2fb54d84d6fd2119ef831df1eba4185ff 29-Dec-2014 Deepanshu Gupta <deepanshu@google.com> Fix DatePicker rendering.

1. Return AccessibilityManager service from context.
2. Don't throw an exception if no style specifited in
obtainStyledAttributes. Specifying no style is valid and it's supposed
to use the default theme in that case.

Bug: http://b.android.com/82712 and http://b.android.com/79218
Change-Id: Iba7097f36996e4d6f1e9db778dc73294f2854c79
ayoutlib/bridge/android/BridgeContext.java
0ff4568ca07c16f2ad4c61872995200115292ecf 08-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Make Preference-cookie map non static.

Moved the map from Preference to View Cookie to BridgeContext. This
means the map need not be static anymore.

NO_SQ: Depends on unsubmitted changes.
Change-Id: I662513def17bd6ec3a2646c3bec9bf4f9f89fc15
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/RenderSessionImpl.java
dfeffd4c0ae165a3f225b818ef8d6f5d1cb89a2c 06-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Fix default initial value for preferences

NO_SQ: Depends on unsubmitted changes.
Change-Id: I061cf71f6167d382e9ef060abeb4d5cff83c4104
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeSharedPreferences.java
10bb1371dca38b5b59f083ee963f7987da6511f2 05-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Add preferences rendering.

NO_SQ: Depends on updating layoutlib-api-prebuilt.jar
Change-Id: Iae93ab74c478e6f2158e1528467bec9ee2d7ee9b
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/SessionParamsFlags.java
ayoutlib/bridge/impl/RenderSessionImpl.java
9eb695f0a3882845534094864821ed1cbfa22614 04-Dec-2014 Deepanshu Gupta <deepanshu@google.com> am 9c403d85: am 43d0e675: am 7e168ad0: am 6cbef4bd: am 03af0c42: Merge "Ensure that RandomAccessFile is not leaked." into lmp-dev

* commit '9c403d8513db5790364e9f5fafca5c6cf896d369':
Ensure that RandomAccessFile is not leaked.
1f4bafef128830907b929ecb4f4685b483bf828e 04-Dec-2014 Deepanshu Gupta <deepanshu@google.com> am 940a1e56: am 52a60ff6: am 302a7cc1: am 4628d51a: am 141c7614: Merge "Fix AnalogClock rendering" into lmp-dev

* commit '940a1e563fd94f912a7322cea8f0a5662b79050f':
Fix AnalogClock rendering
6c8175fcc47f756274da39a06e23a3126fa8acef 04-Dec-2014 Deepanshu Gupta <deepanshu@google.com> am 028df22f: am c16d1448: am b2ded18a: Merge "resolved conflicts for merge of fb30a783 to lmp-mr1-dev" into lmp-mr1-dev

* commit '028df22fd774c8a545dedb03124587b7a19e047b':
Fix typos in previous bugfixes.
7e168ad04a4553c23bca1e9bd427ba6088493908 04-Dec-2014 Deepanshu Gupta <deepanshu@google.com> am 6cbef4bd: am 03af0c42: Merge "Ensure that RandomAccessFile is not leaked." into lmp-dev

* commit '6cbef4bd3e1f16647ab01dc29df9a357d54a85de':
Ensure that RandomAccessFile is not leaked.
302a7cc13a02863ef2e9d9102df761e92150de65 04-Dec-2014 Deepanshu Gupta <deepanshu@google.com> am 4628d51a: am 141c7614: Merge "Fix AnalogClock rendering" into lmp-dev

* commit '4628d51a0d01641ca7fe2cf8403ad551ea6f50ce':
Fix AnalogClock rendering
f708d27fa012d7949a761cb7033b874ba86b353e 04-Dec-2014 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of fb30a783 to lmp-mr1-dev

Change-Id: I91fdb76c748b97376d6469c8d1198a15c4395463
6cbef4bd3e1f16647ab01dc29df9a357d54a85de 03-Dec-2014 Deepanshu Gupta <deepanshu@google.com> am 03af0c42: Merge "Ensure that RandomAccessFile is not leaked." into lmp-dev

* commit '03af0c42d80734c44198b96a99488bb94816ae97':
Ensure that RandomAccessFile is not leaked.
4628d51a0d01641ca7fe2cf8403ad551ea6f50ce 03-Dec-2014 Deepanshu Gupta <deepanshu@google.com> am 141c7614: Merge "Fix AnalogClock rendering" into lmp-dev

* commit '141c7614fdef45d1a95ccb325da762a79412aae2':
Fix AnalogClock rendering
fb30a783d349578948a57d4e61bb7ddc09edb023 03-Dec-2014 Deepanshu Gupta <deepanshu@google.com> am 7e55c292: Merge "Fix typos in previous bugfixes." into lmp-dev

* commit '7e55c29281f8a62154451e87b45d95ec5f97c5ac':
Fix typos in previous bugfixes.
5ceb7f6431f447aa9d4e949578ce5d4b90b8297c 01-Dec-2014 Deepanshu Gupta <deepanshu@google.com> Ensure that RandomAccessFile is not leaked.

This change ensures that RandomAccessFile is always closed. Also, it
changes the BufferIterator implementation to delegate to the byte buffer
directly instead of mainitaining the position itself.

Change-Id: I8f93e80c91a7c35e6a7fb015185b8b11e36b6286
ayoutlib/bridge/libcore/io/BridgeBufferIterator.java
17a6170c62e6f74f2881623a9c16f0b6fea54721 21-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Fix AnalogClock rendering

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

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

Bug: http://b.android.com/79160
Change-Id: Iae5ef65678f0e6c7c5af520c45bd15980ce3fa55
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/libcore/io/BridgeBufferIterator.java
7cfcfba9d31246e48d8eb1448bd784b8f38ec14e 21-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am fbff0191: am 58238d90: am 9ab79551: am 4104abf8: Merge "Fix setTextAppearance for styles with dots." into lmp-dev automerge: ddc83df

* commit 'fbff0191f60722894291529af28f14af7bb967e4':
Fix setTextAppearance for styles with dots.
9ab79551ac9cee85e019d524dae6a5a6b4004cb5 21-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am 4104abf8: Merge "Fix setTextAppearance for styles with dots." into lmp-dev
automerge: ddc83df

* commit 'ddc83dfa8f17db1a8a566c8b92b0fea56dedd00a':
Fix setTextAppearance for styles with dots.
f8c36914250a2274ce20102b350915cd6ffaa6eb 21-Nov-2014 Dianne Hackborn <hackbod@google.com> am 42fec57f: am d9968438: Merge "Fix issue with call backs from media process." into lmp-mr1-dev
automerge: 377d6f0

* commit '377d6f00dc2ab42df501fd12b23e1dab54cea6b7':
Fix issue with call backs from media process.
cb09bc45c58740af953874f9915306d351fc3d9d 18-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Fix typos in previous bugfixes.

The commits 2c9fbdd and 12b6d29 introduced minor bugs. This change fixes
them.
ayoutlib/bridge/android/BridgeContext.java
ddc83dfa8f17db1a8a566c8b92b0fea56dedd00a 20-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am 4104abf8: Merge "Fix setTextAppearance for styles with dots." into lmp-dev

* commit '4104abf875e16ad54c248ce602e573d2144732dd':
Fix setTextAppearance for styles with dots.
ff17024e583b170312d82089fd358d278ce16c9a 19-Nov-2014 Dianne Hackborn <hackbod@google.com> Fix issue with call backs from media process.

All but a few lines of this is for issue #16013164, which allowed
apps to do some operations as the media uid by having it call
back to them to open a file. The problem here is with the tempory
identity stuff in the activity manager, allowing us to make the open
call as the original caller... ideally we should figure out a way
to just get rid of all of that, but the solution here is actually
easier (even though it doesn't look it) -- we now hand a token over
to the openFile() call that it can use when doing permission checks
to say "yes I would like the check to be against whoever is responsible
for the open". This allows us to do the uid remapping for only this
one specific set of permission checks, and nothing else.

Also fix issue #17487348: Isolated services can access system services
they shouldn't be able to. Don't send any system service IBinder objects
down for the first initialization of an isolated process.

Change-Id: I3c70e16e0899d7eef0bae458e83958b41ed2b75e
ayoutlib/bridge/android/BridgeContentProvider.java
ayoutlib/bridge/android/BridgeContext.java
2c9fbdd29c2f68f7e32583d47109c8f446865d88 18-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Fix setTextAppearance for styles with dots.

Bug: http://b.android.com/78842
Change-Id: I65923134b2d3812030e2b7dd8ab96363b0647c1f
ayoutlib/bridge/android/BridgeContext.java
70170261cbd966501a673ba5548dcab823037cfb 12-Nov-2014 Jeff Brown <jeffbrown@google.com> am 32f7a6d8: Merge "Move device admin max screen off timeout to internal interface." into lmp-mr1-dev automerge: c1275e7
automerge: a473878

* commit 'a4738781584d58e133fc4d0f55d9b7ebcb246ff6':
Move device admin max screen off timeout to internal interface.
32f7a6d813d7f936c7aa6a1f3abe2f05022a6cd9 11-Nov-2014 Jeff Brown <jeffbrown@google.com> Merge "Move device admin max screen off timeout to internal interface." into lmp-mr1-dev
4985297bd7452376afa8f3c06490431fc03bf310 11-Nov-2014 Diego Perez <diegoperez@google.com> Merge "Add new parameter to the render method to allow forcing a measure pass."
7d3d5feb31e393c97381f512995d9d799d18304f 10-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am 4c0f0e6c: Merge "Fix setting styles in custom views." into lmp-dev automerge: 5c22a79

* commit '4c0f0e6c852dd933bcfaf95380cca49a46fa3912':
Fix setting styles in custom views.
828db35568459638e09f86be40340d281804858d 10-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am 3cf0640d: Merge "Add primitive shadows support to LayoutLib" into lmp-dev automerge: 97c04ac

* commit '3cf0640d944a0718b9e29a2134a577e72a9432b4':
Add primitive shadows support to LayoutLib
a09dda8162ca48bea0fea0e2804af38e216996d8 10-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am 0e3925df: Merge "Remove needlessly thrown IOException." into lmp-dev automerge: f305d2c

* commit '0e3925dfb3ea4e9185202dd963f03f5ca1df17d0':
Remove needlessly thrown IOException.
4c0f0e6c852dd933bcfaf95380cca49a46fa3912 10-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Fix setting styles in custom views." into lmp-dev
automerge: 5c22a79

* commit '5c22a79baf81727b56a85a194d678c18449b5150':
Fix setting styles in custom views.
3cf0640d944a0718b9e29a2134a577e72a9432b4 10-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Add primitive shadows support to LayoutLib" into lmp-dev
automerge: 97c04ac

* commit '97c04ac7ed4f34ca0cfb75646cc00687fb0954d4':
Add primitive shadows support to LayoutLib
0e3925dfb3ea4e9185202dd963f03f5ca1df17d0 10-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Remove needlessly thrown IOException." into lmp-dev
automerge: f305d2c

* commit 'f305d2c4a80af9e2011824349adc6f133cd8822c':
Remove needlessly thrown IOException.
8657baa06d2efe845cafef571bd9dce627cf5045 10-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Fix setting styles in custom views.

Bug: http://b.android.com/78842
Change-Id: I5d4571d94d96b00419acc258c9e2b519367b689d
ayoutlib/bridge/android/BridgeContext.java
37d7a68de7e353c31a3a4736054cd86f0e002eaf 06-Nov-2014 Adrian Roos <roosa@google.com> Fix inset hinting when adding window

Windows with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS were
getting an incorrect content inset hint, because the
hinting didn't see the adjusted systemUiVisibility.

Also adds hinting for the stable insets.

Bug: 17508238
Change-Id: If9647277feb6811b15665b801accd896c51dbd12
ayoutlib/bridge/android/BridgeWindowSession.java
796e9b7f9910f2ba8133cdb6f137107585b2e5fa 05-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Add primitive shadows support to LayoutLib

The shadows rendered are not the same as rendered by the framework. The
main purpose of the shadows here is let the user know when shadows will
be cast.

Currently rectangular shadows are available in only two intensities. Any
elevation below 10dp uses one shadow and any elevation over 10 dp uses
the other.

Also, even though the code for arbitrary shapes exist, it doesn't quite
work yet. No shadows are visible when that code is run.

Change-Id: Ie8235ffccf1d3809713f5d8f82afde434817d6b2
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/CustomActionBarWrapper.java
5ce1cb240b13db98fbdc21e1ef069b5f9cec8d72 07-Nov-2014 Jeff Brown <jeffbrown@google.com> Move device admin max screen off timeout to internal interface.

The setting was previously exposed in IPowerManager but it
doesn't need to be there.

Bug: 17656076
Change-Id: If3ed0cbe89f67c60aa00376be0c54b1bd9656144
ayoutlib/bridge/android/BridgePowerManager.java
9173c8a2e90a48959dedc9d4aa415482f5014844 04-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Remove needlessly thrown IOException.

Change-Id: If34986367554c98f96f6f9a1088f5e25077a1be1
ayoutlib/bridge/impl/RenderDrawable.java
c13aa0c035cd226d27323bc0e533632ba32f6a84 05-Nov-2014 Diego Perez <diegoperez@google.com> Add new parameter to the render method to allow forcing a measure pass.

Change-Id: I60c09f3375fc85c257a449f4372220741e01db54
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/impl/RenderSessionImpl.java
fef500107ea558bfc210230a3cd8281d7fea6fd5 04-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am 0a2e42d4: Merge "Fix BridgeContext.get*ResourceValue()" into lmp-dev automerge: 9b64954

* commit '0a2e42d4afe9aa81cc41674102dfc999496db845':
Fix BridgeContext.get*ResourceValue()
9a6d8ae25522f88191e8b7d817c1d4e5816b642b 04-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am 33996b98: Merge "Support framework menus in ActionBar" into lmp-dev automerge: c23487a

* commit '33996b98787c4625f9cd4a8e38e6a88458773276':
Support framework menus in ActionBar
5ad076396c43b2d26f9c020f0914623972cadd0e 04-Nov-2014 Deepanshu Gupta <deepanshu@google.com> am cd5f3bab: Merge "Use the right layout for inflating Action Bar." into lmp-dev automerge: 84a89ed

* commit 'cd5f3bab37ef1dc041489f53f565416d295916d9':
Use the right layout for inflating Action Bar.
0a2e42d4afe9aa81cc41674102dfc999496db845 04-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Fix BridgeContext.get*ResourceValue()" into lmp-dev
automerge: 9b64954

* commit '9b64954cb5b30b03abaae0b24132e1b1876f8af1':
Fix BridgeContext.get*ResourceValue()
33996b98787c4625f9cd4a8e38e6a88458773276 04-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Support framework menus in ActionBar" into lmp-dev
automerge: c23487a

* commit 'c23487aa18a9882cb9c8c800c7c44ccb93ce60b9':
Support framework menus in ActionBar
cd5f3bab37ef1dc041489f53f565416d295916d9 04-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Use the right layout for inflating Action Bar." into lmp-dev
automerge: 84a89ed

* commit '84a89ed0f56d4c35cde5a1451a22a6edb59db06a':
Use the right layout for inflating Action Bar.
0ed053ef537daa11659e70c91974cded7c9bddc6 01-Nov-2014 Jeff Brown <jeffbrown@google.com> am e333e674: Add a function to boost screen brightness temporarily.

* commit 'e333e674a758c39885d4d9779a1aad387fb0e6aa':
Add a function to boost screen brightness temporarily.
e333e674a758c39885d4d9779a1aad387fb0e6aa 28-Oct-2014 Jeff Brown <jeffbrown@google.com> Add a function to boost screen brightness temporarily.

When PowerManager.boostScreenBrightness() is called, the screen
brightness is set to maximum for 5 seconds. This action is
also considered to be user activity.

Bug: 17934954
Change-Id: I1cb4a03a60705c6c1c5cc9ff84b1c5dbd2932fcd
ayoutlib/bridge/android/BridgePowerManager.java
159da3dba8811017c683fcee26c795be1948b0c4 30-Oct-2014 Craig Mautner <cmautner@google.com> Merge "Add enter-animation-done callback for system windows" into lmp-mr1-dev
9c79504225f60c72c947220b6aca928f11279e1c 29-Oct-2014 Craig Mautner <cmautner@google.com> Add enter-animation-done callback for system windows

Existing hidden methods allow activities to be notified when their
windows have completed animating in. This change adds that capability
to system windows using a ViewTreeObserver callback since system
windows lack an activity token.

The first subsystem to use this is the UserSwitchingDialog which was
previously using a 250 msec timeout to dismiss the dialog. That
deadline was often missed leaving the user with no dialog on the
screen during the transition.

Fixes bug 16661752.

Change-Id: I70789e0d9c07112f275e76fb82850926305f290d
ayoutlib/bridge/android/BridgeWindow.java
9fa48b09ad06c39be0923d5ca64b81f6b0eee993 30-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Fix BridgeContext.get*ResourceValue()

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

Change-Id: Ie3103ba32af6186651a5f77c27d1efc33dc2bcc7
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/bars/CustomActionBarWrapper.java
ayoutlib/bridge/util/DynamicIdMap.java
df0ebab0f954044c39b171160ab4276dd2391993 30-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Support framework menus in ActionBar

Add support for adding menus in the framework namespace to the ActionBar
preview. If a menu id name begins with the android namespace prefix
(android:) we find the framework menu and render it.

Change-Id: If52910b46154591883af2b2f357e72eea6f84235
ayoutlib/bridge/bars/CustomActionBarWrapper.java
0bffc736e1f260724764d31f7499cbc09471a535 27-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Use the right layout for inflating Action Bar.

The choice of Action Bar layout depends on the theme. This also affects
the widget used to render the Action Bar.

Bug: http://b.android.com/77853
Change-Id: I6219a02853b4cd207a6125a5ed96fa5d16699460
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/CustomActionBarWrapper.java
ayoutlib/bridge/impl/RenderSessionImpl.java
92a52142fd988590aa61aedd54f48e9d249a2f53 29-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Use right theme for drawable inflation." into lmp-dev
4a605c6fa0027ee116beb29fbc9625721f0441f0 28-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Use right theme for drawable inflation.

The theme information was lost when inflating drawables. As a result,
drawables inflated in the ActionBar did not have the right tint.

Change-Id: I13d5c78039e35085ed4902289fcb735bb15d972e
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/impl/ResourceHelper.java
b69ec7708b61535355d278ac0ea8f9a61540d1fb 20-Oct-2014 Deepanshu Gupta <deepanshu@google.com> Check Bridge init before disposing.

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

Bug: http://b.android.com/77726
Change-Id: I741d6ea3595a3b7cb816abd0417f23aecca6370e
ayoutlib/bridge/Bridge.java
409bd3d77491359195b2c247d2863c26ca5a3c98 19-Sep-2014 Deepanshu Gupta <deepanshu@google.com> Resource resolution bug fix. [DO NOT MERGE]

Fix a bug where "?attr/foo" in framework resources wasn't resolved
properly.

Change-Id: I9a56974f526774fde79685f668f01021136d68f1
(cherry picked from commit 19c7842082d831ad432abe906f4c37c6ed08e414)
ayoutlib/bridge/android/BridgeContext.java
b6a37d897aca9d09a09d5c4fa9e60f6f43d6a166 31-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Add testing framework to LayoutLib. [DO NOT MERGE]

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

The change also adds project configuration for intelliJ.

Change-Id: I7b67c0f1a2af2dac95df7f3231cab537b9826d7d
(cherry picked from commit a8e9517470869fa29946ae1fa1ceeb24c7970391)
ayoutlib/bridge/Bridge.java
171804201dd556f8ce7ee7618661a5c8ee71507a 29-Sep-2014 Deepanshu Gupta <deepanshu@google.com> Always resolve enum when resolving resources.

Enums were resolved only for integers and dimensions. This change
resolves enums for all resource types. Well, almost all. For color and
colorStateList, enums are still not referenced.

Bug: http://b.android.com/76091
Change-Id: Ie43bd1b54fb9877655d31773bdf71d9a6a65c473
ayoutlib/bridge/impl/ResourceHelper.java
8d5a15b69160aed1c6239283508b6c113df233fe 27-Sep-2014 Deepanshu Gupta <deepanshu@google.com> Update time in layout preview

Change-Id: Ic32a9cb1f20b472c6898a5f370d8578c011a09bf
ayoutlib/bridge/bars/Config.java
803a59cae71f8b5a76a48c73579ee6d3d34a78f7 26-Sep-2014 Deepanshu Gupta <deepanshu@google.com> Fix error when using list as actionBarNavMode. [DO NOT MERGE]

A bug in the framework leads to the wrong argument being passed to
defStyleRes when obtaining styled attributes. The framework however just
ignores the attribute in such a case. LayoutLib logs an error to help
developers find bugs in their code.

The bug was seen when using list as the actionBarNavMode.

This change ignores the attribute if it detects that it's the framework
bug. Also, we change the error to a warning.

Change-Id: I58e1fe4469de0329a27b577d75c0a59c48d0381b
ayoutlib/bridge/android/BridgeContext.java
c8cbff8bdc6c8e61a177eeb1aa728038e0aa86dd 26-Sep-2014 Deepanshu Gupta <deepanshu@google.com> Fix error when using list as actionBarNavMode. [DO NOT MERGE]

A bug in the framework leads to the wrong argument being passed to
defStyleRes when obtaining styled attributes. The framework however just
ignores the attribute in such a case. LayoutLib logs an error to help
developers find bugs in their code.

The bug was seen when using list as the actionBarNavMode.

This change ignores the attribute if it detects that it's the framework
bug. Also, we change the error to a warning.

Change-Id: I58e1fe4469de0329a27b577d75c0a59c48d0381b
ayoutlib/bridge/android/BridgeContext.java
8d4e6cb06005a2ce994360340a6191f0690db8f4 14-Sep-2014 John Spurlock <jspurlock@google.com> Saver: PowerManager call to set low power mode.

- Add an explicit power manager call to set the low power mode state,
instead of trying manage everything around a single setting.
- When low-power mode is triggered by falling below the configured
threshold, it does not update the setting.
- The "is-enabled" api returns setting || below configured trigger.
- Move the snooze management into the new api call.
- Callers (sysui + settings) updated to use the api instead of the
setting.
- Handles the case where the level does an unpowered leap out of the
low battery level. (Possible if powered in-between while the device
is off)

Bug:17460535
Change-Id: Ic030504c9cad9868a7137abbe837b170da37852b
ayoutlib/bridge/android/BridgePowerManager.java
f5cc3644f6d246138d22f35d00f1ce562cd715d5 10-Sep-2014 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I92eabc35168acfe58641917179be0d90a14f2f11
ayoutlib/bridge/android/BridgeWindowSession.java
1a12b805698c7cba9c2daa78c76c055afbdfa9fc 27-Aug-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Fix warnings in ResourceHelper.

Fix intelliJ warnings in ResourceHelper. Most of them just change
boolean checks "x == false" with "!x".

Change-Id: I278645e2807affd8b3183a4a6f5e4fa2ab7b3d21
ayoutlib/bridge/impl/ResourceHelper.java
458f2a7bbbcc45d12b575fe9f3b2f8e1a20f9b1c 27-Aug-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Allow '+' in float attributes.

Earlier change to fix the invalid conditional check inadvertedly
disallowed '+'.

Change-Id: I75a37926681fe3a496482d6fb75161ac75326109
ayoutlib/bridge/impl/ResourceHelper.java
ca22ba9eafe4193d213c5897f9303d02062effb4 27-Aug-2014 Deepanshu Gupta <deepanshu@google.com> Fix invalid conditional check.

The check was always false. This wasn't really a problem since the regex
check later took care of it. But it's just wrong to leave such mistakes
in the code once they are noticed.

Change-Id: I84270a96141428bf15949ce8c881d2e4a2aa95f6
ayoutlib/bridge/impl/ResourceHelper.java
553a4e91385111f20ddf426f81b3193b9e951762 15-Aug-2014 Deepanshu Gupta <deepanshu@google.com> Add time to status bar and fix wifi icon.

Add vector drawable for wifi icon. Also add time to the status bar.

Change-Id: I01da833087a607e9bb6ff085929e3844990179f8
ayoutlib/bridge/bars/Config.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/bars/TitleBar.java
32faabbe14252397b35516caa9c0d0245bfcc719 16-Aug-2014 Deepanshu Gupta <deepanshu@google.com> Layoutlib: Update wifi and battery icon for KK

Change-Id: Ic5c80e83366bb7672049a6bf726d11cf6717f400
(cherry picked from commit 59eedf528ca29a32b6d7f358f5076929f8fbb164)
ayoutlib/bridge/bars/StatusBar.java
59eedf528ca29a32b6d7f358f5076929f8fbb164 16-Aug-2014 Deepanshu Gupta <deepanshu@google.com> Layoutlib: Update wifi and battery icon for KK

Change-Id: Ic5c80e83366bb7672049a6bf726d11cf6717f400
ayoutlib/bridge/bars/StatusBar.java
84cc05cacd2786261b01d3be2364944c90765801 13-Aug-2014 Deepanshu Gupta <deepanshu@google.com> Add KitKat wifi and battery icons.

This adds wifi and battery icons for Gingerbread and KitKat. This also
improves the icon resolution code by extracting it out in its own class.
The resources are now organized such that each API level resource
directory is used as a backup for all API levels lower than itself.

Change-Id: I937c83638adcc9fa8cd407e0a3023c3abe95530d
ayoutlib/bridge/bars/Config.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/IconLoader.java
ayoutlib/bridge/bars/StatusBar.java
4f6a6c48a4e6b9f6e4ced3d10bb51db5d2c22ead 06-Aug-2014 Svetoslav <svetoslavganov@google.com> Fix build

Change-Id: I96eec52472bec122074b0ec2ee051c1b55eaa8f4
ayoutlib/bridge/android/BridgeContext.java
b80e42f93ff26984c410da0235dd10f463e5722a 31-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Replace more Locale methods.

This change replaces some methods of java.util.Locale. Some of them were
added in 1.7 and some are not present in the Desktop VM.

Change-Id: Ifdf8451bb2acf55e01dce8b5e15c40c8160107cc
ayoutlib/bridge/android/AndroidLocale.java
86eb8b4e29b1ad889fc814bae723d4d6e491f53f 31-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Add testing framework to LayoutLib.

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

The change also adds project configuration for intelliJ.

Change-Id: I7b67c0f1a2af2dac95df7f3231cab537b9826d7d
ayoutlib/bridge/Bridge.java
a9e488a6d2b20ecc91412072a5f39022d7fe6926 18-Jul-2014 Deepanshu Gupta <deepanshu@google.com> am d8d3e87c: am 4627c98d: Merge "Fix style resolution for styles with \'.\' [DO NOT MERGE]" into klp-dev

* commit 'd8d3e87cf339deaf890e4b083d09b074065cd35f':
Fix style resolution for styles with '.' [DO NOT MERGE]
43aab0f419bdc99fa3a6c8e5c5fe4ff3c63ffd01 18-Jul-2014 Deepanshu Gupta <deepanshu@google.com> am cdcebcef: Merge "Fix style resolution for styles with \'.\'" into lmp-preview-dev

* commit 'cdcebcefed9a9bbf6835025d722ae31da1a93c85':
Fix style resolution for styles with '.'
4f8500594f110e9ab36f5daefcec62324abb770a 18-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Fix style resolution for styles with '.'" into lmp-preview-dev
0464ff36189255a97aa117d8051babb214e6a877 16-Jul-2014 Deepanshu Gupta <deepanshu@google.com> am 28114aff: Merge "Use BlendComposite for advanced PorterDuff Modes." into lmp-preview-dev

* commit '28114aff449c56ffa330f4ecbfae1f205e72cce2':
Use BlendComposite for advanced PorterDuff Modes.
4ed745d359ada6986ac15d8718452e5c55f40170 16-Jul-2014 Jeff Sharkey <jsharkey@android.com> Add code cache directory for apps.

This provides a directory where apps can cache compiled or optimized
code generated at runtime. The platform will delete all files in
this location on both app and platform upgrade.

Bug: 16187224
Change-Id: I641b21d841c436247f35ff235317e3a4ba520441
ayoutlib/bridge/android/BridgeContext.java
85d43f01ed0f252df7b5374593792174d50779b7 16-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Use BlendComposite for advanced PorterDuff Modes.

Not all PorterDuff modes are supported by Java's AlphaComposite. Use
BlendComposite for such modes.

Change-Id: I51486a40f09186cf8a87ce1e6a3d1cfcf39fb2d3
ayoutlib/bridge/impl/PorterDuffUtility.java
5cd9dde5a2a77c5095f985186d8f03147fd22870 15-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Support Locale.toLanguageTag on Java 6

Change-Id: I255e79e2c288cd24b350b7c26128bbbb0b2cb9a3
ayoutlib/bridge/android/AndroidLocale.java
65665aac6387d644f0f40c6bdddf558f096b6e6e 15-Jul-2014 Christopher Tate <ctate@google.com> Fix build

BridgeContext didn't show up in the working tree as a build participant.
Tsk tsk.

Change-Id: I2b52d99f319b43c2906a7fb9b25139a3df5b3676
ayoutlib/bridge/android/BridgeContext.java
69684533cded9923e98789694dea4dd36ace9fab 11-Jul-2014 Yohei Yukawa <yukawa@google.com> Fix SDK build breakage

This should have been included in I3c6b69bd9d79b199afe68d838f25effa6

BUG: 15812658
BUG: 16118603
Change-Id: I298206008fc28faa4f6576a77d56251f873f233c
ayoutlib/bridge/android/BridgeIInputMethodManager.java
f2fa79e9b56b71f8aa30e6675255df69f88a173d 10-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Fix style resolution for styles with '.' [DO NOT MERGE]

Bug: b.android.com/72698
Change-Id: I96fb549cf5787d9e8cde2245524a8173471a60ca
ayoutlib/bridge/android/BridgeContext.java
4f8ce228195be123eeb9b5f066a6abc92b8d923a 10-Jul-2014 Deepanshu Gupta <deepanshu@google.com> Fix style resolution for styles with '.'

Bug: b.android.com/72698
Change-Id: I96fb549cf5787d9e8cde2245524a8173471a60ca
ayoutlib/bridge/android/BridgeContext.java
3a57d506e9a3ca621f43482eeff98b44e8dea97d 02-Jul-2014 Deepanshu Gupta <deepanshu@google.com> am 036557b6: Merge "Update system icon resolution in LayoutLib." into lmp-preview-dev

* commit '036557b60df5e5425b3563e99ffb21685160e4ab':
Update system icon resolution in LayoutLib.
9657804afb9eb628fa5485750c43e78458b2d002 02-Jul-2014 Adrian Roos <roosa@google.com> Fix layoutlib breakage due to I681b711f6f40a94c25b7acd3a44eb3539486afab

Change-Id: I141f49718c4d538875a68c00101c098fdd7e967b
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/android/BridgeWindowSession.java
1076be31f1c14f39295cc2ce7a747ee9ad96ee73 27-Jun-2014 Deepanshu Gupta <deepanshu@google.com> Update system icon resolution in LayoutLib.

This fixes some bugs with the resolution of icons for Status Bar and
Navigation Bar by separating the icons into v21 and v11 directories. An
icon is searched in v21 directory by default. For simulating older
platforms, v11 directory is searched first and then v21 is used as a
fallback.

This also adds xxhdpi versions of home, back and recent icons.

Change-Id: Ia6eafc83856eacafc4fb0b13d87793d4aa24f106
ayoutlib/bridge/bars/Config.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/impl/Config.java
ayoutlib/bridge/impl/RenderSessionImpl.java
16af3691f5c99089457a6dd16a90e828c3482f0f 24-Jun-2014 Deepanshu Gupta <deepanshu@google.com> Fix bug to render status bar icons

Change-Id: I653c765105dafb02e30322384ca8e4791ac185d2
ayoutlib/bridge/bars/CustomBar.java
8dcfd4abe898bb2cd7a13edf77d41e4063180652 24-Jun-2014 Deepanshu Gupta <deepanshu@google.com> Resource resolution bug fix.

Fix a bug where "?attr/foo" in framework resources wasn't resolved
properly.

Change-Id: I9a56974f526774fde79685f668f01021136d68f1
ayoutlib/bridge/android/BridgeContext.java
42c7ce02f4023c94b315253754a20c20800be731 23-Jun-2014 Deepanshu Gupta <deepanshu@google.com> Add navigtaion bar icons to simulate older platforms.

LayoutLib can simulate older versions of the platform to a very limited
extent. This change adds the old navigtaion bar icons back and moves the
latest ones to directories suffixed with "-v21". The code handles this
resolution in a very crude way.

This also removes a bunch of unused code and fixes some style warnings.

Change-Id: Ib6e7bfd8dfb34b2ccd87f660ca979eb5ef14bae7
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/bars/TitleBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
d8ef316f1f42ea8e5417ea82bd4e432442cc8c97 24-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am 91977396: Merge "Fix bug to render status bar icons" into lmp-preview-dev

* commit '9197739603eb34df6cbc85c6a7fa0ea359e4776b':
Fix bug to render status bar icons
2b46b7eed71231b6def62c4d30810a6ad56c25e6 24-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am cd4b38ea: Merge "Resource resolution bug fix." into lmp-preview-dev

* commit 'cd4b38ea1d3605e0e62e5ddc70c052e221fef73c':
Resource resolution bug fix.
08b59fcb217d06d10fc67f376ebfa183d8d759db 24-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am 04703acd: Merge "Add navigtaion bar icons to simulate older platforms." into lmp-preview-dev

* commit '04703acdd214cd17aaf5757da75a862fb1797d1e':
Add navigtaion bar icons to simulate older platforms.
3510c58ad6db0ab06f0e63507fbc34205e3b04a6 24-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am e558d180: Merge "LayoutLib: Support PorterDuffColorFilter" into lmp-preview-dev

* commit 'e558d1806b29385aa14ba60f18e103e2c9aeef1b':
LayoutLib: Support PorterDuffColorFilter
e2f83fac78257241be303747be806368264ecf49 24-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am 52abbced: Merge "Fix SurfaceView in LayoutLib." into lmp-preview-dev

* commit '52abbced58ace68f8a91c4d092061d115af3b268':
Fix SurfaceView in LayoutLib.
f2af1f5d8aaff684f8cc6d8e31454c945e190976 22-Jun-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Support PorterDuffColorFilter

Add support for select modes for PorterDuffColorFilter.

Change-Id: Ia7b4a6a92c326be977dd87a70f54c1f8954b546d
ayoutlib/bridge/impl/GcSnapshot.java
ayoutlib/bridge/impl/PorterDuffUtility.java
367a0ce902edbdbea7d63aedd9c98820c00909ae 21-Jun-2014 Deepanshu Gupta <deepanshu@google.com> Fix SurfaceView in LayoutLib.

Added missing constructor.

Change-Id: I3dc8eb510bf4210568d4bb71ad551446d6835ae2
ayoutlib/bridge/MockView.java
9c80488e117d01bfe3f9e8ecf18658cbea9259cf 12-Jun-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib fixes for API 20 [DO NOT MERGE]

Fixes a bunch of issues with delegate method signatures.

Also cherrypicked commit 664d6f1fe4d6dfa742b3e98051f924dbc190f8ca
which is needed in this branch also.

Bug: 15492736
Change-Id: If99ff279b0d0cabe22942da27388ecb4b800c330
ayoutlib/bridge/android/BridgeContext.java
a3874f0ac649a865d6ad7a8a032f57539bd0d0c3 13-Jun-2014 Ji-Hwan Lee <jihwan@google.com> LayoutLib: Fix broken sdk builds

Change-Id: I301b312195eb3e57cb581d015e7c0b0492084b3e
ayoutlib/bridge/android/BridgeWindowSession.java
6370c7f554f140c8fc77fe29c43b075ac3757287 11-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am fe01ace8: Merge "LayoutLib: Support more ContextThemeWrappers" into lmp-preview-dev

* commit 'fe01ace8ac5da2c9716a0eb0cb53fdda823b3910':
LayoutLib: Support more ContextThemeWrappers
b54b78e21554b8450893d4c28e0fe3e9b8c4425e 10-Jun-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Support more ContextThemeWrappers

ContextThemeWrapper may be the base context for another
ContextThemeWrapper. We now extract the base context till we reach the
final context.

Change-Id: I034444a2d1579241543fd24248530b299e72498a
nternal/view/menu/BridgeMenuItemImpl.java
0fcedfd8ea4a613a6669bbe02cb0434c67bdbe01 09-Jun-2014 Yohei Yukawa <yukawa@google.com> Merge "Introduce a sequence number to avoid redundant IPCs"
3d1e8129ebd69db49d80e5d598f608c59b884cdf 06-Jun-2014 Yohei Yukawa <yukawa@google.com> Introduce a sequence number to avoid redundant IPCs

This CL introduces a sequence number to avoid redundant IPCs
between IMM and IMMS. The basic concept is that:
1. IMMS maintains a sequence number for #notifyUserAction.
2. IMMS increases the sequence number whenever the current
IME/subtype is changed.
3. IMMS notifies the new sequence number to IMM.
4. IMM maintains the last sent sequence number and the next
sequence number. IMM should call #notifyUserAction only
once per particular sequence number.
5. IMMS ignores #notifyUserAction if the specified sequence
number is not the expected one.

BUG: 7043015
Change-Id: I19ad8542659bc092b92ee13eb9f1d68ddd4b815a
ayoutlib/bridge/android/BridgeIInputMethodManager.java
34e0888c99e001bc7bc785658725f8ab15f8a00d 06-Jun-2014 Amith Yamasani <yamasani@google.com> am 87590b53: Merge "Add missing abstract method override in BridgePowerManager." into lmp-preview-dev

* commit '87590b5342c5c4b1fb7b1c6037d64cffd1806025':
Add missing abstract method override in BridgePowerManager.
da8738fabdc0fda6a02606d4d678f399e5d50f29 06-Jun-2014 Amith Yamasani <yamasani@google.com> Add missing abstract method override in BridgePowerManager.

Change-Id: I28a24f33f8a598e487ec21861e918a39a8875d43
ayoutlib/bridge/android/BridgePowerManager.java
6c1f78f5d6a3070f1c311ac6cf9c64d896c5526f 06-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am 9a9d96bf: Merge "LayoutLib: Add capability to simulate old versions" into lmp-preview-dev

* commit '9a9d96bf044bd75e0d75e16a6002dc20e5399866':
LayoutLib: Add capability to simulate old versions
0297051162193ef2b7d906409868e404f77e4c31 05-Jun-2014 Yohei Yukawa <yukawa@google.com> Trivial method renaming for notifyTextCommitted

This CL does not change existing behavior but only renames
notifyTextCommitted with notifyUserAction so that we can use
not only text commit but also other actions such as just typing
a character will be used as a trigger to update the IME
rotation order for better IME switching experience.

BUG: 7043015
Change-Id: I7f3e13a7226ef0dceee82b67e8a0d8536f7e9807
ayoutlib/bridge/android/BridgeIInputMethodManager.java
d0ca7b623b873b4159d7d77be1771ab573e22028 05-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am dfc3bc9b: Fix build.

* commit 'dfc3bc9b3cf27a72dfd133ce62f5e791ef74659d':
Fix build.
c8e2d0a4f88539f44da405597ede529ceb6339f6 31-May-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Add capability to simulate old versions

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

Change-Id: Idec6d24296dd0ae04a2d808c14604629e265d458
ayoutlib/bridge/Bridge.java
33dff284df61ed3a2d74839ff4c1f3cb93ab093b 05-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am 4c0d33f2: Merge "Add basic support for simulating older versions." into lmp-preview-dev

* commit '4c0d33f29f295e5ae27ba057fc8cb2270295865a':
Add basic support for simulating older versions.
58ff7de971a8172e40c09c3a8489eb276441e1b6 05-Jun-2014 Deepanshu Gupta <deepanshu@google.com> Fix build.

Change-Id: I877532b5056a035dbd4b0c6c55b5969d6292846a
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
648a309d9badc405bc969bcb4461369bf89fe7ef 05-Jun-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Add basic support for simulating older versions." into lmp-preview-dev
e43dcc1d64b849a878d1994bfdd634e462d16005 05-Jun-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Distinguish between menus in ActionBar and popup." into lmp-preview-dev
9288548527e318f748d0bcbe7e99647a85703ac8 04-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am e478c562: am 905e113f: am 03df93bc: am 5cde33a6: am dcfba78f: am ed5ab0f0: am 022d8a9f: am bad112f2: am c8235b8e: am ffcad247: am 904b89c5: am 295184bc: am 8782a120: resolved conflicts for merge of 61fb5784 to jb-mr1-dev

* commit 'e478c5624d5eeca5adc088d9328582bd5b487963':
Distinguish between menus in ActionBar and popup. [DO NOT MERGE]
905e113f97560dbcf71cab517ab4c1ee4faaa4d3 04-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am 03df93bc: am 5cde33a6: am dcfba78f: am ed5ab0f0: am 022d8a9f: am bad112f2: am c8235b8e: am ffcad247: am 904b89c5: am 295184bc: am 8782a120: resolved conflicts for merge of 61fb5784 to jb-mr1-dev

* commit '03df93bcb854eedc600ef0120fd238ec974c44a1':
Distinguish between menus in ActionBar and popup. [DO NOT MERGE]
5cde33a6ffd6a3be87f6622e67c3d83fb61519cb 04-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am dcfba78f: am ed5ab0f0: am 022d8a9f: am bad112f2: am c8235b8e: am ffcad247: am 904b89c5: am 295184bc: am 8782a120: resolved conflicts for merge of 61fb5784 to jb-mr1-dev

* commit 'dcfba78fbb4dad6792113383b2d32eff7f2c1f88':
Distinguish between menus in ActionBar and popup. [DO NOT MERGE]
022d8a9f4400dc7ec2926b133fc7151d8a5c24a3 04-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am bad112f2: am c8235b8e: am ffcad247: am 904b89c5: am 295184bc: am 8782a120: resolved conflicts for merge of 61fb5784 to jb-mr1-dev

* commit 'bad112f23f09f8839b4b7294439b0fe725cc2034':
Distinguish between menus in ActionBar and popup. [DO NOT MERGE]
14104896770dd26195cd9ccfac8c1604cb95dbc6 04-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am e4aa3138: am a9e82914: Merge branch \'klp-dev\' of https://googleplex-android.googlesource.com/_direct/platform/frameworks/base into klp-dev

* commit 'e4aa31382139ee2e319110fbfff402e0c6315952':
Distinguish between menus in ActionBar and popup. [DO NOT MERGE]
bac0d9ae796920360ee2f2babd8f2c03d4c3c2b8 15-May-2014 Deepanshu Gupta <deepanshu@google.com> Distinguish between menus in ActionBar and popup.

Mark the menus in the ActionBar and the ones in the Overflow popup
separately. This enables the IDE to differentiate between the two and
enable gestures such as double-click to open the menu xml for menus in
the ActionBar and single click for the menus in the Overflow popup.

Change-Id: I7a23f87d34d618a134ffbe3a665be695915d4bae
(cherry picked from commit f542f28a31b38a4e454535a1fea63968811b418c)
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/SystemViewInfo.java
904b89c58465b0d0822478be514572ec752df3e8 04-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am 295184bc: am 8782a120: resolved conflicts for merge of 61fb5784 to jb-mr1-dev

* commit '295184bc71a32a4e9418d34b2adeb0cef4b39781':
Distinguish between menus in ActionBar and popup. [DO NOT MERGE]
8782a12005e90bbd49be579fb8ede3a42a007380 04-Jun-2014 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of 61fb5784 to jb-mr1-dev

Change-Id: I079d5db0d69fd1972e6754cdd1829dfd1645202d
8af310c0c6a0922d2a84600f9abf7877009d12ba 03-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am 8f6a9a65: am 8974a5e6: LayoutLib: Correctly resolve ?attr/foo [DO NOT MERGE]

* commit '8f6a9a658a8a06eb4f11cfff5dca7edf3c7462ad':
LayoutLib: Correctly resolve ?attr/foo [DO NOT MERGE]
5f56ea8d802b3a7ce5ba8992a84dd3b462676e0e 03-Jun-2014 Deepanshu Gupta <deepanshu@google.com> am f48ab8fe: am 3b7c09b4: LayoutLib: Correctly resolve ?attr/foo [DO NOT MERGE]

* commit 'f48ab8feec71419e574a2d2f08a29be87743ef07':
LayoutLib: Correctly resolve ?attr/foo [DO NOT MERGE]
2ee3c1e189819cc6efb4d7de24f1438bdb824087 31-May-2014 Jeff Sharkey <jsharkey@android.com> Per-app media directories on external storage.

This change defines per-app directories on external storage that
will be scanned and included in MediaStore. This gives apps a way
to write content to secondary shared storage in a way that can
easily be surfaced to other apps.

Bug: 14382377
Change-Id: I4cb367c870509e76f0c2c598f01e2f699780030a
ayoutlib/bridge/android/BridgeContext.java
3ff08eb6bf68868d4f4e872fbbf1ecaf521934a9 15-May-2014 Deepanshu Gupta <deepanshu@google.com> Distinguish between menus in ActionBar and popup. [DO NOT MERGE]

Mark the menus in the ActionBar and the ones in the Overflow popup
separately. This enables the IDE to differentiate between the two and
enable gestures such as double-click to open the menu xml for menus in
the ActionBar and single click for the menus in the Overflow popup.

Change-Id: I7a23f87d34d618a134ffbe3a665be695915d4bae
(cherry picked from commit 03c0735017a34bac9ea69600b8cf980775331f0e)
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/SystemViewInfo.java
3b7c09b4336f421c489523c10278ecfbfb0708a7 16-May-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Correctly resolve ?attr/foo [DO NOT MERGE]

?attr/foo in platform files wasn't resolved properly. The IDE checked
the app namespace for the attribute even though it is being referenced
from a platform file.

Change-Id: I7db6dfef5b540d99804c298120578da9d060b886
(cherry picked from commit 08d2007b33838570a96c8df890f0757fa920904c)
ayoutlib/bridge/android/BridgeContext.java
03c0735017a34bac9ea69600b8cf980775331f0e 15-May-2014 Deepanshu Gupta <deepanshu@google.com> Distinguish between menus in ActionBar and popup. [DO NOT MERGE]

Mark the menus in the ActionBar and the ones in the Overflow popup
separately. This enables the IDE to differentiate between the two and
enable gestures such as double-click to open the menu xml for menus in
the ActionBar and single click for the menus in the Overflow popup.

Change-Id: I7a23f87d34d618a134ffbe3a665be695915d4bae
(cherry picked from commit 866d40fc39f7364d95085650244db59f52d4c002)
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/SystemViewInfo.java
08d2007b33838570a96c8df890f0757fa920904c 16-May-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Correctly resolve ?attr/foo [DO NOT MERGE]

?attr/foo in platform files wasn't resolved properly. The IDE checked
the app namespace for the attribute even though it is being referenced
from a platform file.

Change-Id: I7db6dfef5b540d99804c298120578da9d060b886
(cherry picked from commit a0fc1f46264e316449402525fbeb033138ec5f49)
ayoutlib/bridge/android/BridgeContext.java
fe6f30491f8506a4b2ad895a0f3e68de180e4243 30-May-2014 Deepanshu Gupta <deepanshu@google.com> Remove @NonNull attribute [DO NOT MERGE]

The tools prebuilt in this branch doesn't have the annotation.

Change-Id: I852f91c5202ed5f4c393d1226a4fa0b6fa4d63c1
ayoutlib/bridge/bars/ActionBarLayout.java
866d40fc39f7364d95085650244db59f52d4c002 15-May-2014 Deepanshu Gupta <deepanshu@google.com> Distinguish between menus in ActionBar and popup. [DO NOT MERGE]

Mark the menus in the ActionBar and the ones in the Overflow popup
separately. This enables the IDE to differentiate between the two and
enable gestures such as double-click to open the menu xml for menus in
the ActionBar and single click for the menus in the Overflow popup.

Change-Id: I7a23f87d34d618a134ffbe3a665be695915d4bae
(cherry picked from commit 79f45b43db4dfd605d1e7ddd2c71be4ef8285269)
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/SystemViewInfo.java
a0fc1f46264e316449402525fbeb033138ec5f49 16-May-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Correctly resolve ?attr/foo [DO NOT MERGE]

?attr/foo in platform files wasn't resolved properly. The IDE checked
the app namespace for the attribute even though it is being referenced
from a platform file.

Change-Id: I7db6dfef5b540d99804c298120578da9d060b886
(cherry picked from commit 8974a5e6d8408b4cd93f1befb05cc9b654b71e4a)
ayoutlib/bridge/android/BridgeContext.java
79f45b43db4dfd605d1e7ddd2c71be4ef8285269 15-May-2014 Deepanshu Gupta <deepanshu@google.com> Distinguish between menus in ActionBar and popup. [DO NOT MERGE]

Mark the menus in the ActionBar and the ones in the Overflow popup
separately. This enables the IDE to differentiate between the two and
enable gestures such as double-click to open the menu xml for menus in
the ActionBar and single click for the menus in the Overflow popup.

Change-Id: I7a23f87d34d618a134ffbe3a665be695915d4bae
(cherry picked from commit f542f28a31b38a4e454535a1fea63968811b418c)
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/SystemViewInfo.java
8974a5e6d8408b4cd93f1befb05cc9b654b71e4a 16-May-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Correctly resolve ?attr/foo [DO NOT MERGE]

?attr/foo in platform files wasn't resolved properly. The IDE checked
the app namespace for the attribute even though it is being referenced
from a platform file.

Change-Id: I7db6dfef5b540d99804c298120578da9d060b886
(cherry picked from commit e21c7ec8a02922a6bec19436897f9ee02be3d6c2)
ayoutlib/bridge/android/BridgeContext.java
3885220ed562b82d9109bb305c2f9db75853c6ed 15-May-2014 Deepanshu Gupta <deepanshu@google.com> Distinguish between menus in ActionBar and popup.

Mark the menus in the ActionBar and the ones in the Overflow popup
separately. This enables the IDE to differentiate between the two and
enable gestures such as double-click to open the menu xml for menus in
the ActionBar and single click for the menus in the Overflow popup.

Change-Id: I7a23f87d34d618a134ffbe3a665be695915d4bae
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/SystemViewInfo.java
312da405eb82206cdd2581176252241f22d2ad44 29-May-2014 Brian Carlstrom <bdc@google.com> Tracking ActionBarView change 1181f77bdfaa7bf8a8250cdd13c7b7a1d6ee0c44

Change-Id: I29a486557428806f26f900974e74f42f3afa4ad4
ayoutlib/bridge/bars/ActionBarLayout.java
5a734548455e5bcc8a5fd6b3972017086d3c1287 29-May-2014 Deepanshu Gupta <deepanshu@google.com> Add basic support for simulating older versions.

This adds rudimentary support for older versions of layoutlib by
changing the color of the status bar to white for froyo and earlier and
omitting the navigation bar for pre-ICS devices.

The color of the icons in the status bar is not changed yet.

Change-Id: I56a16b206ad357b6f3bc5c3d10701d03551847bc
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/impl/Config.java
ayoutlib/bridge/impl/RenderSessionImpl.java
baef8c1ffe5c900fb0da9512654bf249b5fc9269 20-May-2014 Deepanshu Gupta <deepanshu@google.com> Layoutlib fixes for L [DO NOT MERGE]

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

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

Change-Id: Ic2397b64aa3f1f48926e849b14689c47d9ee7f8c
(cherry picked from commit 7ca3612094270183243938e79337c84effea7ad0)
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/impl/FontLoader.java
e6652217647af133de6981e59abac16a3e908166 21-May-2014 Jeff Brown <jeffbrown@google.com> am c2871696: am 6099fd21: Merge "Fix build." into klp-modular-dev

* commit 'c28716964c4525bf9a291404d7f14e74de23f36f':
Fix build.
61116acdc617f0da4ce3019d9332b289b6a5a0ea 21-May-2014 Jeff Brown <jeffbrown@google.com> Fix build.

Change-Id: I00f040ab16cf8a3b7a995b4626d49e70b97fb294
ayoutlib/bridge/android/BridgePowerManager.java
891e65c5ceff6a7859afab34f75f149b3aefa0c6 16-May-2014 Amith Yamasani <yamasani@google.com> Merge "Variant of sendBroadcast with appOp flag for cross-user."
3cf75729d5a27b8ddd1ea174626dbcf0349a1d07 16-May-2014 Amith Yamasani <yamasani@google.com> Variant of sendBroadcast with appOp flag for cross-user.

Needed for delivering SMS notifications to multiple users.

Change-Id: Ib772292699aba37144621742e6f0ee5c68aadd78
ayoutlib/bridge/android/BridgeContext.java
fba1dd24bf7b56071490ac62428f96d14f682244 16-May-2014 Deepanshu Gupta <deepanshu@google.com> LayoutLib: Correctly resolve ?attr/foo

?attr/foo in platform files wasn't resolved properly. The IDE checked
the app namespace for the attribute even though it is being referenced
from a platform file.

Change-Id: I7db6dfef5b540d99804c298120578da9d060b886
ayoutlib/bridge/android/BridgeContext.java
14edfa8f658066a1d59a890a19218167ad6121a4 14-May-2014 Deepanshu Gupta <deepanshu@google.com> am c1a74400: am 7dfe1fda: am c289ec6b: am 3a559d56: am b5b47565: am 98822f0e: am 6e923e1b: am 90d57721: am 209745a3: am c251147a: am 85ec1445: am f266873c: am 1c55797d: Fix build

* commit 'c1a7440094c94f4369f04f062485c9ea1162a78b':
Fix build
7dfe1fdac6f0306e1e31417d58a1a36d4280d2cc 14-May-2014 Deepanshu Gupta <deepanshu@google.com> am c289ec6b: am 3a559d56: am b5b47565: am 98822f0e: am 6e923e1b: am 90d57721: am 209745a3: am c251147a: am 85ec1445: am f266873c: am 1c55797d: Fix build

* commit 'c289ec6b465648d7d93e6f2dc9ed28822683f7d6':
Fix build
3a559d56a627687d56dc06cc459ef1e7e6b1cd79 14-May-2014 Deepanshu Gupta <deepanshu@google.com> am b5b47565: am 98822f0e: am 6e923e1b: am 90d57721: am 209745a3: am c251147a: am 85ec1445: am f266873c: am 1c55797d: Fix build

* commit 'b5b4756565a5f74c6eb2ca7f90ac839a4289daae':
Fix build
6e923e1b51c87e7b20a98dfc2fff52ca9115c9d4 14-May-2014 Deepanshu Gupta <deepanshu@google.com> am 90d57721: am 209745a3: am c251147a: am 85ec1445: am f266873c: am 1c55797d: Fix build

* commit '90d57721692e45fe6259136296e3cd5b669443fc':
Fix build
85ec144538de6c27b22dff1bd45491a334f626ef 14-May-2014 Deepanshu Gupta <deepanshu@google.com> am f266873c: am 1c55797d: Fix build

* commit 'f266873c8059e78410bf43c83fb8f0fd5bfe3362':
Fix build
40bfb60efa0e92259a417a5cbfd6095759c678b7 14-May-2014 Deepanshu Gupta <deepanshu@google.com> Fix build due to incorrect merges [DO NOT MERGE]

Change-Id: Ib3b4dafeed6ba4c07450d13d9908fb05a1a4542f
ayoutlib/bridge/impl/RenderSessionImpl.java
1c55797d0e786b6594e769c2fa424e1b8386648e 14-May-2014 Deepanshu Gupta <deepanshu@google.com> Fix build

remove a line that shouldn't have been merged into this branch.

The build will still be broken for this branch, but this will fix it for
many branches downstream.

Change-Id: I2f556636640eb823dc2834afae7b536e79b79607
ayoutlib/bridge/impl/RenderSessionImpl.java
e3950823b6126e16158d3c969c2bdd6d914b22dc 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 465a9926: am 21dc46b1: am 569dc64c: am 69ab5946: am fcfb8801: am 18b1525a: am ef24a509: am 900954e3: am 2100476a: am 31a3760a: am 964023c5: am 8bf73eae: am 0ad4f2ce: resolved conflicts for merge of 7377c7be to jb-mr1-dev

* commit '465a99260ea1d868e9aa43d08e63cb85892f188e':
Add Navigation Bar to BridgeWindowManager [DO NOT MERGE]
21dc46b14df9456eede9d4eb7082c85bec732058 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 569dc64c: am 69ab5946: am fcfb8801: am 18b1525a: am ef24a509: am 900954e3: am 2100476a: am 31a3760a: am 964023c5: am 8bf73eae: am 0ad4f2ce: resolved conflicts for merge of 7377c7be to jb-mr1-dev

* commit '569dc64cd6b0bb7bdfec97967b192d2a706e3f81':
Add Navigation Bar to BridgeWindowManager [DO NOT MERGE]
69ab594625e274ed4ca6d4a1dc7f8fb19d44f020 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am fcfb8801: am 18b1525a: am ef24a509: am 900954e3: am 2100476a: am 31a3760a: am 964023c5: am 8bf73eae: am 0ad4f2ce: resolved conflicts for merge of 7377c7be to jb-mr1-dev

* commit 'fcfb8801b27fd40ff27c380b8bad9b9a210effca':
Add Navigation Bar to BridgeWindowManager [DO NOT MERGE]
ef24a5091b63fb512d4ca9eb34df6394c3842d33 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 900954e3: am 2100476a: am 31a3760a: am 964023c5: am 8bf73eae: am 0ad4f2ce: resolved conflicts for merge of 7377c7be to jb-mr1-dev

* commit '900954e3cd135bf43db975961056e7661f26a6c6':
Add Navigation Bar to BridgeWindowManager [DO NOT MERGE]
964023c5dcd0334cdcf624eff26d791d9c9617a8 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 8bf73eae: am 0ad4f2ce: resolved conflicts for merge of 7377c7be to jb-mr1-dev

* commit '8bf73eae6c98532c8a597b885b948b9878555441':
Add Navigation Bar to BridgeWindowManager [DO NOT MERGE]
0ad4f2cedde037c2b09a7f09c5f95f0984267c64 13-May-2014 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of 7377c7be to jb-mr1-dev

Change-Id: I26d2e3478536826608413094e17cd36da43b4e23
5dae7fda38850a5146a6b8a4edbfd9aa96aea484 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 9359dc2e: am 2d3fa7ba: Support actionProviderClass attribute for menus [DO NOT MERGE]

* commit '9359dc2e7d6bc671af3fee0c1dc540dd3685365c':
Support actionProviderClass attribute for menus [DO NOT MERGE]
b6de60e0020dbed906b1d275de17f8c615b2b242 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am df2da3d7: am 7bc363ba: Add special system view cookie to OverflowButton. [DO NOT MERGE]

* commit 'df2da3d7c9f82ff2304f630f4ff9fc2cb3001c6f':
Add special system view cookie to OverflowButton. [DO NOT MERGE]
673d9734c2d9b62ecd41dcac3c730d242952989e 13-May-2014 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of 00d09649 to jb-mr1-dev

Change-Id: Ib3c34a1989d4251c3ac4755c52fe05a81644930a
5280c911d81a7db5ec8854850bef60d8b0951358 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 0df5ae65: am 0f209967: Add view cookies for action bar menus. [DO NOT MERGE]

* commit '0df5ae65a91174c99d1af633b45b3a1a7861cd1c':
Add view cookies for action bar menus. [DO NOT MERGE]
1867f58d6ceebac899b60b029e34f3a1fcabba7f 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 3027b69e: am f7e57949: Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]

* commit '3027b69e154cffc6e286caf90b0f9af01c473c14':
Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
a5461ebfaebf3337a0cf1c752334f23de145a6d1 13-May-2014 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of 6d3c4ab2 to jb-mr1-dev

Change-Id: I5c4634897882deb663f32d8148202d7c9189521d
9053261a5413f401168d25fa4a9749723b232949 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 052e0c58: am 770e40f8: Fix theme/style resolution in Layoutlib [DO NOT MERGE]

* commit '052e0c589e5cf714ca71bc8d7b3ce8b3f6c4cb96':
Fix theme/style resolution in Layoutlib [DO NOT MERGE]
45ca5ba7dc3b70dd39991217894eed114eefb1b8 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 01cdd312: am 669792b3: Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]

* commit '01cdd3123f408dc41a2bd4786f3a943157ab6c69':
Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
8c5c2410ae9df60d9462784370965a0417e06fa4 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 7bb8de58: am a2b34c96: Optimize layout rendering in layoutlib [DO NOT MERGE]

* commit '7bb8de580a451621480913d7839fd7eb784ab689':
Optimize layout rendering in layoutlib [DO NOT MERGE]
94d33cfce1f32af4480f941fdd6c9942bb203d2c 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 82d5bd98: am e5a2347b: Fix NPE in layoutlib. [DO NOT MERGE]

* commit '82d5bd98b77a9955e375b075e262639625c40232':
Fix NPE in layoutlib. [DO NOT MERGE]
d4e6727d02f7507fdfd6cbbabd03d6e922127e4b 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am d5de1bd6: am 30505abe: Fix text size in Fake Action Bar. [DO NOT MERGE]

* commit 'd5de1bd6305dc8885027504996602755b1e79099':
Fix text size in Fake Action Bar. [DO NOT MERGE]
632c9e2dabc44b24f04c3418e4a3540b22db792b 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 065ce2e8: am 5c166c9c: Layoutlib: Update the wifi icon in the status bar. [DO NOT MERGE]

* commit '065ce2e8b3e11ff8bb1699748edbd23d272bc8a6':
Layoutlib: Update the wifi icon in the status bar. [DO NOT MERGE]
f20c9c660edcce0fe90ba5f8464f726dcd51229e 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am 06c4f23d: am 64dc0380: Fix layoutlib [DO NOT MERGE]

* commit '06c4f23d737082717f37f5f3583d9c12f4b64bf2':
Fix layoutlib [DO NOT MERGE]
3990ec3490cc43a2690163f2a973b5ac6c4bdc46 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am cdb87d8d: am a59c27dd: Fix ClassCastException when rendering ListView [DO NOT MERGE]

* commit 'cdb87d8d83e8a76a4cf78d24d5c49ee8548eba1f':
Fix ClassCastException when rendering ListView [DO NOT MERGE]
4d69ca223b268d4ed93baf9d3c354e1df79d55ce 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am edae4e69: am 8a39c3af: Add orientation to configuration for layoutlib. [DO NOT MERGE]

* commit 'edae4e69512a7c9df1076fde70de83e15053a30a':
Add orientation to configuration for layoutlib. [DO NOT MERGE]
5fbb6118b57ff522942de7e73dadd093e9c44f86 13-May-2014 Deepanshu Gupta <deepanshu@google.com> am c014eb68: am 7a5f7265: Merge "Support actionProviderClass attribute for menus [DO NOT MERGE]" into klp-dev

* commit 'c014eb681bd700c24b9513c847cc6ee88c5410d7':
Support actionProviderClass attribute for menus [DO NOT MERGE]
3a115628236ee9051518d4f96840cbb76070cf92 07-May-2014 Deepanshu Gupta <deepanshu@google.com> Add Navigation Bar to BridgeWindowManager [DO NOT MERGE]

Return the right value for presence of software navigation bar in
BridgeWindowManager. This is required to render the overflow menu button
correctly in the Action Bar.

Change-Id: I73de3b299f6a3a113425c436a59e800cd1d6b97f
ayoutlib/bridge/android/BridgeWindowManager.java
ayoutlib/bridge/impl/RenderSessionImpl.java
2d3fa7ba782238afb891db38e29ef7ec755bfdf6 02-May-2014 Deepanshu Gupta <deepanshu@google.com> Support actionProviderClass attribute for menus [DO NOT MERGE]

The change adds support for view cookies for actionProviderClasses (for
example, ShareActionProvider) in the action bar menus.

This also provides a more robust search for the overflowMenuButton.

Change-Id: I316c8b9a69e2e337b41ba0fe4e61af9fe850f750
(cherry picked from commit 099f40a950a14b66005b17657d967ef080569a15)
nternal/view/menu/BridgeMenuItemImpl.java
ayoutlib/bridge/bars/ActionBarLayout.java
7bc363ba72d4cdd9a0b3b1601e432acfc09c0dc0 25-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add special system view cookie to OverflowButton. [DO NOT MERGE]

Add a special view cookie to enable the IDE to identify the overflow
menu button in the Action Bar.

Change-Id: Ida3ed776afb8c9fa8af23b73d4cf6d47eef0ab87
(cherry picked from commit 7c6f6481f46b8244406790604c5f8b3f712c369f)
ayoutlib/bridge/bars/ActionBarLayout.java
85f53c3335daf0e55cec757fd66fe560e0b020ef 23-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Fix style warnings in RenderSessionImpl [DO NOT MERGE]

Change-Id: I9d3cb23e4ea692f737a3e3d6c18cc8de18b66a3c
(cherry-picked from commit 22de7c4c3d44e51aef6937e1b39540703ad01f5c)
ayoutlib/bridge/impl/RenderSessionImpl.java
0f209967bfc4a6f1eec46cc34a39cfe8af9f8af9 18-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add view cookies for action bar menus. [DO NOT MERGE]

The change adds the view cookies for the menus rendered in the action
bar. This enables the IDE to map the menu to the relevant XML Tag in the
menu xml and show the highlighting accordingly.

The change also contains a bugfix where a method wasn't renamed
properly.

Change-Id: Idcfc263a8ebe0a4f25afa3a1eb085fa628fd03ca
(cherry-picked from commit 094fd8ecb6f4b666be6c9e7332679bce28fdc3ca)
nternal/view/menu/BridgeMenuItemImpl.java
nternal/view/menu/MenuBuilder_Delegate.java
ayoutlib/bridge/impl/RenderSessionImpl.java
f7e5794990831df87d4097126f6d24455da50efe 13-Feb-2014 Deepanshu Gupta <deepanshu@google.com> Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]

In addition to the cherrypicked changes, appropriate changes due to
changes to com.android.internal.widget.ActionBarView are made.

The icon used in the Action Bar may not always be the right one due to
the above resolution.

Change-Id: Ib7cc314079099c010f7d53849e204db36c410357
(cherry-picked from commit 56759be8960ea1b5dc8b6de1810a84e2f10e2058)
nternal/view/menu/MenuBuilderAccessor.java
nternal/widget/ActionBarAccessor.java
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/OverflowMenuAdapter.java
ayoutlib/bridge/impl/RenderSessionImpl.java
43b15371f9f1da7d97fe0500eb1536d981097e31 12-Dec-2013 Deepanshu Gupta <deepanshu@google.com> Action bar rendering in layoutlib [DO NOT MERGE]

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

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

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
(cherry-picked from fe38489f6734fefd0a216e9cfe12f8f978ff371f)
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/FakeActionBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/impl/SystemViewInfo.java
770e40f839f059e1e3a15a2b14157c7cbb3b0553 12-Mar-2014 Deepanshu Gupta <deepanshu@google.com> Fix theme/style resolution in Layoutlib [DO NOT MERGE]

Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
(cherry picked from commit 76dccb7f436565136ff5e15b1ca57530940f5642)
ayoutlib/bridge/android/BridgeContext.java
669792b303b99a003bbcbf8d962f5be1debf9b63 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 5be65fda15c6f66067da3cc623811427e9d541e4)
ayoutlib/bridge/impl/FontLoader.java
a2b34c96f1ef24d96854d1e23426dec7774510e8 21-Jan-2014 Deepanshu Gupta <deepanshu@google.com> Optimize layout rendering in layoutlib [DO NOT MERGE]

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
(cherry-picked from 5712b5fc3fec0dc376e84f660f2fe0d1102c0cbb)
ayoutlib/bridge/impl/RenderSessionImpl.java
e5a2347bc6cf1506799136af4c9724275ca0247e 12-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Fix NPE in layoutlib. [DO NOT MERGE]

Change-Id: I36623304d83b344ea078044001577b8005a63c02
(cherry picked from commit 689c0dfe72a57c0555560012cbc6806375e7d4b7)
ayoutlib/bridge/impl/RenderAction.java
30505abeb6cda9d042ec41f2563d561714eac46b 08-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Fix text size in Fake Action Bar. [DO NOT MERGE]

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

Bug: 11436018
Change-Id: Id74c11037cb43d01f6cd79126623c84edfc37aaf
(cherry-picked from 083d1562e00631630b5594462ce4a867a3508d8d)
ayoutlib/bridge/bars/CustomBar.java
5c166c9c04b6ea9d4955830e7ba277be71f17a6f 13-Oct-2013 Deepanshu Gupta <deepanshu@google.com> Layoutlib: Update the wifi icon in the status bar. [DO NOT MERGE]

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

Change-Id: Ia43ed40b42c79f67dcd5809b827d4fecbc823c25
(cherry picked from commit 11ee746dc5e77f4f33aac45ac9e344444223012d)
ayoutlib/bridge/bars/StatusBar.java
64dc0380127047ffcf135b6848c9150aa8dbed85 17-Oct-2013 Deepanshu Gupta <deepanshu@google.com> Fix layoutlib [DO NOT MERGE]

Fix a NPE.

The cherry-pick differs slightly from the original to remove changes not
relevant to the current branch.

Bug: 11140701
Change-Id: Id92fc5359acf6dde1bcdbc781aaf637fdb6eecbf
(cherry-picked from 87be67f91719234cbd381ff0242b5efc8b6aa257)
ayoutlib/bridge/impl/RenderAction.java
a59c27dd6674a31c875b0baa86519caec628ca2d 11-Sep-2013 Deepanshu Gupta <deepanshu@google.com> Fix ClassCastException when rendering ListView [DO NOT MERGE]

Bug: b.android.com/59300
Change-Id: Ia350adb3308daa8170bff755302760790163c811
(cherry picked from commit 7b5d54f05be61a7ab40021644a91c466e2897627)
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
8a39c3afb29f2540b05319042e758dd4d5f73a1e 13-Jul-2013 Deepanshu Gupta <deepanshu@google.com> Add orientation to configuration for layoutlib. [DO NOT MERGE]

Update the configuration with the device orientation before rendering.

Change-Id: Icd40901204fd13f90b18353e53a15e25e5b2176c
(cherry picked from commit d4875e19f5b7c69226783b0a6590831466159f84)
ayoutlib/bridge/impl/RenderAction.java
099f40a950a14b66005b17657d967ef080569a15 02-May-2014 Deepanshu Gupta <deepanshu@google.com> Support actionProviderClass attribute for menus [DO NOT MERGE]

The change adds support for view cookies for actionProviderClasses (for
example, ShareActionProvider) in the action bar menus.

This also provides a more robust search for the overflowMenuButton.

Change-Id: I316c8b9a69e2e337b41ba0fe4e61af9fe850f750
(cherry picked from commit 7f56beb8403b597a676faf12643fef585a31007e)
nternal/view/menu/BridgeMenuItemImpl.java
ayoutlib/bridge/bars/ActionBarLayout.java
60b52ee929c8765c2d99f1b1e35d326e03895ba0 30-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Fix class name for OverflowMenuButton [DO NOT MERGE]

Change-Id: Ie3e709e7aadb2193397df8befef0c55624d7e4e3
(cherry picked from commit f61bd0020642cf0868486d307f2e68c8c02d6102)
ayoutlib/bridge/bars/ActionBarLayout.java
7c6f6481f46b8244406790604c5f8b3f712c369f 25-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add special system view cookie to OverflowButton. [DO NOT MERGE]

Add a special view cookie to enable the IDE to identify the overflow
menu button in the Action Bar.

Change-Id: Ida3ed776afb8c9fa8af23b73d4cf6d47eef0ab87
(cherry picked from commit d558ebdb433af498a87e25673f7dd828a0e7439a)
ayoutlib/bridge/bars/ActionBarLayout.java
22de7c4c3d44e51aef6937e1b39540703ad01f5c 23-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Fix style warnings in RenderSessionImpl [DO NOT MERGE]

Change-Id: I9d3cb23e4ea692f737a3e3d6c18cc8de18b66a3c
(cherry-picked from commit a98121ef5251b5ebdb8c1b0b6780d570844284b2)
ayoutlib/bridge/impl/RenderSessionImpl.java
094fd8ecb6f4b666be6c9e7332679bce28fdc3ca 18-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add view cookies for action bar menus. [DO NOT MERGE]

The change adds the view cookies for the menus rendered in the action
bar. This enables the IDE to map the menu to the relevant XML Tag in the
menu xml and show the highlighting accordingly.

The change also contains a bugfix where a method wasn't renamed
properly.

Change-Id: Idcfc263a8ebe0a4f25afa3a1eb085fa628fd03ca
(cherry-picked from commit 7704837947455909f295b088a3d15a20e107dbd7)
nternal/view/menu/BridgeMenuItemImpl.java
nternal/view/menu/MenuBuilder_Delegate.java
ayoutlib/bridge/impl/RenderSessionImpl.java
7f56beb8403b597a676faf12643fef585a31007e 02-May-2014 Deepanshu Gupta <deepanshu@google.com> Support actionProviderClass attribute for menus [DO NOT MERGE]

The change adds support for view cookies for actionProviderClasses (for
example, ShareActionProvider) in the action bar menus.

This also provides a more robust search for the overflowMenuButton.

Change-Id: I316c8b9a69e2e337b41ba0fe4e61af9fe850f750
(cherry picked from commit 28fa661f79e18fc9fc46bf112edded9c0d07696f)
nternal/view/menu/BridgeMenuItemImpl.java
ayoutlib/bridge/bars/ActionBarLayout.java
f61bd0020642cf0868486d307f2e68c8c02d6102 30-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Fix class name for OverflowMenuButton [DO NOT MERGE]

Change-Id: Ie3e709e7aadb2193397df8befef0c55624d7e4e3
(cherry picked from commit 4b5fa4d318e7efaffdc678e0cb8953ffc78c2b1e)
ayoutlib/bridge/bars/ActionBarLayout.java
d558ebdb433af498a87e25673f7dd828a0e7439a 25-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add special system view cookie to OverflowButton. [DO NOT MERGE]

Add a special view cookie to enable the IDE to identify the overflow
menu button in the Action Bar.

Change-Id: Ida3ed776afb8c9fa8af23b73d4cf6d47eef0ab87
(cherry picked from commit c967d8dc62c429ecf3e27bf3714a953636e75cbf)
ayoutlib/bridge/bars/ActionBarLayout.java
a98121ef5251b5ebdb8c1b0b6780d570844284b2 23-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Fix style warnings in RenderSessionImpl [DO NOT MERGE]

Change-Id: I9d3cb23e4ea692f737a3e3d6c18cc8de18b66a3c
(cherry-picked from commit fbfeb1a90b6f8f3966c60a69d50ce8f608d9d861)
ayoutlib/bridge/impl/RenderSessionImpl.java
7704837947455909f295b088a3d15a20e107dbd7 18-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add view cookies for action bar menus. [DO NOT MERGE]

The change adds the view cookies for the menus rendered in the action
bar. This enables the IDE to map the menu to the relevant XML Tag in the
menu xml and show the highlighting accordingly.

The change also contains a bugfix where a method wasn't renamed
properly.

Change-Id: Idcfc263a8ebe0a4f25afa3a1eb085fa628fd03ca
(cherry-picked from commit 5ba2f230faa355eb9bc1e90f6c48eeeb437f390c)
nternal/view/menu/BridgeMenuItemImpl.java
nternal/view/menu/MenuBuilder_Delegate.java
ayoutlib/bridge/impl/RenderSessionImpl.java
56759be8960ea1b5dc8b6de1810a84e2f10e2058 13-Feb-2014 Deepanshu Gupta <deepanshu@google.com> Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]

In addition to the cherrypicked changes, appropriate changes due to
changes to com.android.internal.widget.ActionBarView are made.

The icon used in the Action Bar may not always be the right one due to
the above resolution.

Change-Id: Ib7cc314079099c010f7d53849e204db36c410357
(cherry-picked from commit 1b87390c9426c4bc9119829e9375d712dfde11c3)
nternal/view/menu/MenuBuilderAccessor.java
nternal/widget/ActionBarAccessor.java
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/OverflowMenuAdapter.java
ayoutlib/bridge/impl/RenderSessionImpl.java
fe38489f6734fefd0a216e9cfe12f8f978ff371f 12-Dec-2013 Deepanshu Gupta <deepanshu@google.com> Action bar rendering in layoutlib [DO NOT MERGE]

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

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

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
(cherry-picked from 20e0695b554e883b095f5223be10b6e1097db49f)
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/FakeActionBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/impl/SystemViewInfo.java
76dccb7f436565136ff5e15b1ca57530940f5642 12-Mar-2014 Deepanshu Gupta <deepanshu@google.com> Fix theme/style resolution in Layoutlib [DO NOT MERGE]

Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
(cherry picked from commit 3c00b28bf60ab01b449e16df045238f4bae4d700)
ayoutlib/bridge/android/BridgeContext.java
5be65fda15c6f66067da3cc623811427e9d541e4 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 5fb41528a6192c41f7e2bb30161cc5af6061d5b8)
ayoutlib/bridge/impl/FontLoader.java
5712b5fc3fec0dc376e84f660f2fe0d1102c0cbb 21-Jan-2014 Deepanshu Gupta <deepanshu@google.com> Optimize layout rendering in layoutlib [DO NOT MERGE]

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
(cherry-picked from 9e5e993c7969ad60ff70cfdcf707247f38a705a1)
ayoutlib/bridge/impl/RenderSessionImpl.java
689c0dfe72a57c0555560012cbc6806375e7d4b7 12-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Fix NPE in layoutlib. [DO NOT MERGE]

Change-Id: I36623304d83b344ea078044001577b8005a63c02
(cherry picked from commit 80c55109b6351049498df294234dc0a75e75ec44)
ayoutlib/bridge/impl/RenderAction.java
083d1562e00631630b5594462ce4a867a3508d8d 08-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Fix text size in Fake Action Bar. [DO NOT MERGE]

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

Bug: 11436018
Change-Id: Id74c11037cb43d01f6cd79126623c84edfc37aaf
(cherry-picked from 0b7d80765c21dbd9294a0245f92a655fdd61514e)
ayoutlib/bridge/bars/CustomBar.java
11ee746dc5e77f4f33aac45ac9e344444223012d 13-Oct-2013 Deepanshu Gupta <deepanshu@google.com> Layoutlib: Update the wifi icon in the status bar. [DO NOT MERGE]

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

Change-Id: Ia43ed40b42c79f67dcd5809b827d4fecbc823c25
(cherry picked from commit 9cb5f5b5233f2331748d108d71f4b685762f32a7)
ayoutlib/bridge/bars/StatusBar.java
87be67f91719234cbd381ff0242b5efc8b6aa257 17-Oct-2013 Deepanshu Gupta <deepanshu@google.com> Fix layoutlib [DO NOT MERGE]

Fix a NPE.

The cherry-pick differs slightly from the original to remove changes not
relevant to the current branch.

Bug: 11140701
Change-Id: Id92fc5359acf6dde1bcdbc781aaf637fdb6eecbf
(cherry-picked from 28873c1f008f4fe24441923e14f30e55d6f0967a)
ayoutlib/bridge/impl/RenderAction.java
7b5d54f05be61a7ab40021644a91c466e2897627 11-Sep-2013 Deepanshu Gupta <deepanshu@google.com> Fix ClassCastException when rendering ListView [DO NOT MERGE]

Bug: b.android.com/59300
Change-Id: Ia350adb3308daa8170bff755302760790163c811
(cherry picked from commit 54d88f7678387a6eb871ec2dccd36af4ff35b1fe)
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
ce22440d4ca94009a4fb22c3d4f924cfbf422a66 12-Jul-2013 Deepanshu Gupta <deepanshu@google.com> Fix text rendering [DO NOT MERGE]

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
(cherry picked from commit 92a169fa2e1bab7d93089196c33c2de12f9eae82)
ayoutlib/bridge/impl/FontLoader.java
bd9e181b291af34f9d70db42715136f3c16ddbde 20-Jun-2013 Deepanshu Gupta <deepanshu@google.com> Fix layout rendering for RTL locales [DO NOT MERGE]

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
(cherry picked from commit eee0ea7a0b85ea6345eb7b8da5dbf17306c7339c)
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
d4875e19f5b7c69226783b0a6590831466159f84 13-Jul-2013 Deepanshu Gupta <deepanshu@google.com> Add orientation to configuration for layoutlib. [DO NOT MERGE]

Update the configuration with the device orientation before rendering.

Change-Id: Icd40901204fd13f90b18353e53a15e25e5b2176c
(cherry picked from commit d97d60c0fa4613a47d591d45736299702be1cc7a)
ayoutlib/bridge/impl/RenderAction.java
d25d33cdebeb5a363b299939017a0cdfa42c7338 02-May-2014 Deepanshu Gupta <deepanshu@google.com> Support actionProviderClass attribute for menus [DO NOT MERGE]

The change adds support for view cookies for actionProviderClasses (for
example, ShareActionProvider) in the action bar menus.

This also provides a more robust search for the overflowMenuButton.

Change-Id: I316c8b9a69e2e337b41ba0fe4e61af9fe850f750
(cherry picked from commit 28fa661f79e18fc9fc46bf112edded9c0d07696f)
nternal/view/menu/BridgeMenuItemImpl.java
ayoutlib/bridge/bars/ActionBarLayout.java
1f5e678c08ca7e0b6734b7856187f1739fb4dbef 02-May-2014 Deepanshu Gupta <deepanshu@google.com> Support actionProviderClass attribute for menus.

The change adds support for view cookies for actionProviderClasses (for
example, ShareActionProvider) in the action bar menus.

This also provides a more robust search for the overflowMenuButton.

Change-Id: I316c8b9a69e2e337b41ba0fe4e61af9fe850f750
nternal/view/menu/BridgeMenuItemImpl.java
ayoutlib/bridge/bars/ActionBarLayout.java
c046c76739b210d912dae38bf945d60b8d69ab11 30-Apr-2014 Deepanshu Gupta <deepanshu@google.com> am c0c96012: am 4b5fa4d3: Fix class name for OverflowMenuButton [DO NOT MERGE]

* commit 'c0c96012c667d1d91d8f6b763df45e566cae0eaf':
Fix class name for OverflowMenuButton [DO NOT MERGE]
4b5fa4d318e7efaffdc678e0cb8953ffc78c2b1e 30-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Fix class name for OverflowMenuButton [DO NOT MERGE]

Change-Id: Ie3e709e7aadb2193397df8befef0c55624d7e4e3
ayoutlib/bridge/bars/ActionBarLayout.java
92bc07534e511b9afa7edaffe867d2674c504d73 30-Apr-2014 Deepanshu Gupta <deepanshu@google.com> am 8c15cd0d: am c967d8dc: Add special system view cookie to OverflowButton. [DO NOT MERGE]

* commit '8c15cd0dc1d04490b82fd7d8da7611ff3219a1f0':
Add special system view cookie to OverflowButton. [DO NOT MERGE]
c967d8dc62c429ecf3e27bf3714a953636e75cbf 25-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add special system view cookie to OverflowButton. [DO NOT MERGE]

Add a special view cookie to enable the IDE to identify the overflow
menu button in the Action Bar.

Change-Id: Ida3ed776afb8c9fa8af23b73d4cf6d47eef0ab87
(cherry picked from commit 674af92fd3a618695448ff88568b03390e90bc66)
ayoutlib/bridge/bars/ActionBarLayout.java
d1084cc02549dc9ee67c879f78ae929095ec19b6 24-May-2013 Deepanshu Gupta <deepanshu@google.com> Add missing native methods. [DO NOT MERGE]

Also contains fixes for native methods specific to the branch.

Change-Id: I7b34e2ec0164520efc658053a80f307791a992b1
(cherry-picked from commit: 279c00e8e0abb20f7e10577c77937c058da080bf)
ayoutlib/bridge/Bridge.java
b5cdfd97a5bbc2c52dec907467362550aff8afc4 13-Feb-2014 Deepanshu Gupta <deepanshu@google.com> Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]

In addition to the cherrypicked changes, appropriate changes due to
changes to com.android.internal.widget.ActionBarView are made.

The icon used in the Action Bar may not always be the right one due to
the above resolution.

Change-Id: Ib7cc314079099c010f7d53849e204db36c410357
(cherry-picked from commit 1b87390c9426c4bc9119829e9375d712dfde11c3)
nternal/view/menu/MenuBuilderAccessor.java
nternal/widget/ActionBarAccessor.java
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/OverflowMenuAdapter.java
ayoutlib/bridge/impl/RenderSessionImpl.java
20e0695b554e883b095f5223be10b6e1097db49f 12-Dec-2013 Deepanshu Gupta <deepanshu@google.com> Action bar rendering in layoutlib [DO NOT MERGE]

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

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

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
(cherry-picked from 4ccc4bd54f85d86818f61d728c6361d2003ddd8e)
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/FakeActionBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/impl/SystemViewInfo.java
3c00b28bf60ab01b449e16df045238f4bae4d700 12-Mar-2014 Deepanshu Gupta <deepanshu@google.com> Fix theme/style resolution in Layoutlib [DO NOT MERGE]

Cherry picked from klp-dev from
Change-Id: If1e7187645f0b0388f7b97d742395efd228b347a which was
cherrypicked from master with the following

Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
(cherry picked from commit f1e7187645f0b0388f7b97d742395efd228b347a)
ayoutlib/bridge/android/BridgeContext.java
674af92fd3a618695448ff88568b03390e90bc66 25-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add special system view cookie to OverflowButton.

Add a special view cookie to enable the IDE to identify the overflow
menu button in the Action Bar.

Change-Id: Ida3ed776afb8c9fa8af23b73d4cf6d47eef0ab87
ayoutlib/bridge/bars/ActionBarLayout.java
7406e4b8102ffd71affd55a9f453c0ecce13a097 24-Apr-2014 Deepanshu Gupta <deepanshu@google.com> am 7947ec71: am b64732d9: Merge "Fix style warnings in RenderSessionImpl [DO NOT MERGE]" into klp-dev

* commit '7947ec715d8b4a0c82135553abb4947b61bf802b':
Fix style warnings in RenderSessionImpl [DO NOT MERGE]
e17ed922001cf70c48969eb7b10ee2e2557b41f9 24-Apr-2014 Deepanshu Gupta <deepanshu@google.com> am 126f4057: am 5ba2f230: Add view cookies for action bar menus. [DO NOT MERGE]

* commit '126f4057a06756fbb1c194b5d9d40f9f922d14ee':
Add view cookies for action bar menus. [DO NOT MERGE]
1ea1b21acd5517d5405bd3338ba24d5a03a8d792 23-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Fix style warnings in RenderSessionImpl [DO NOT MERGE]

Change-Id: I9d3cb23e4ea692f737a3e3d6c18cc8de18b66a3c
(cherry-picked from commit fbfeb1a90b6f8f3966c60a69d50ce8f608d9d861)
ayoutlib/bridge/impl/RenderSessionImpl.java
5ba2f230faa355eb9bc1e90f6c48eeeb437f390c 18-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add view cookies for action bar menus. [DO NOT MERGE]

The change adds the view cookies for the menus rendered in the action
bar. This enables the IDE to map the menu to the relevant XML Tag in the
menu xml and show the highlighting accordingly.

The change also contains a bugfix where a method wasn't renamed
properly.

Change-Id: Idcfc263a8ebe0a4f25afa3a1eb085fa628fd03ca
(cherry-picked from commit 1001961f904bac5294aaf73a47c2497aa764bf7f)
nternal/view/menu/BridgeMenuItemImpl.java
nternal/view/menu/MenuBuilder_Delegate.java
ayoutlib/bridge/impl/RenderSessionImpl.java
fbfeb1a90b6f8f3966c60a69d50ce8f608d9d861 23-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Fix style warnings in RenderSessionImpl

Change-Id: I9d3cb23e4ea692f737a3e3d6c18cc8de18b66a3c
ayoutlib/bridge/impl/RenderSessionImpl.java
1001961f904bac5294aaf73a47c2497aa764bf7f 18-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add view cookies for action bar menus.

The change adds the view cookies for the menus rendered in the action
bar. This enables the IDE to map the menu to the relevant XML Tag in the
menu xml and show the highlighting accordingly.

Change-Id: Idcfc263a8ebe0a4f25afa3a1eb085fa628fd03ca
nternal/view/menu/BridgeMenuItemImpl.java
nternal/view/menu/MenuBuilder_Delegate.java
ayoutlib/bridge/impl/RenderSessionImpl.java
664d6f1fe4d6dfa742b3e98051f924dbc190f8ca 19-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Add DisplayManager service to BridgeContext

ViewRoot now holds a reference to the DisplayManager. The change updates
the BridgeContext to provide the DisplayManager instance.

Change-Id: I4a5f00eda337939c72bad47b0ca6a7403454228d
ayoutlib/bridge/android/BridgeContext.java
ec6676ddf682e22dfb56aa54359c9480dfa661d3 16-Apr-2014 Deepanshu Gupta <deepanshu@google.com> am 86384880: am f1e71876: Fix theme/style resolution in Layoutlib [DO NOT MERGE]

* commit '863848808d005fe1d2fd84a2982adfc02a3fbb9f':
Fix theme/style resolution in Layoutlib [DO NOT MERGE]
e5d0fce7aeb60c44849cd09815ccecda702422ef 16-Apr-2014 Deepanshu Gupta <deepanshu@google.com> am 685b7d41: am 1b87390c: Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]

* commit '685b7d4165c417ce20b1f6c49190eabcfda09940':
Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]
d023360aa03db1a7831a5697d49faa2575e4a9c3 16-Apr-2014 Deepanshu Gupta <deepanshu@google.com> am 484c88c3: am 4ccc4bd5: Action bar rendering in layoutlib [DO NOT MERGE]

* commit '484c88c3655991759dc64276404d0cf7e33b455f':
Action bar rendering in layoutlib [DO NOT MERGE]
b7fd6315328c3a38fd7928f3dbb43f44227eb78b 16-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]" into jb-mr2-dev
f14cbb26edcf0838cee333bf0d6ee686bf6de333 16-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Optimize layout rendering in layoutlib [DO NOT MERGE]" into jb-mr2-dev
f1e7187645f0b0388f7b97d742395efd228b347a 12-Mar-2014 Deepanshu Gupta <deepanshu@google.com> Fix theme/style resolution in Layoutlib [DO NOT MERGE]

Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
(cherry picked from commit bfec73c2db5a34ced248213edf5519c80727a65f)

Conflicts:
core/java/android/content/res/Resources.java
tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
ayoutlib/bridge/android/BridgeContext.java
1b87390c9426c4bc9119829e9375d712dfde11c3 13-Feb-2014 Deepanshu Gupta <deepanshu@google.com> Overflow menu popup for Action Bar in Layoutlib [DO NOT MERGE]

Adds MenuBuilderAccessor in addition to the cherry-picked changes.

Change-Id: Ib7cc314079099c010f7d53849e204db36c410357
(cherry-picked from commit 929eea6bc1824bf98d244550c0984ecf8ea98811)
nternal/view/menu/MenuBuilderAccessor.java
nternal/widget/ActionBarAccessor.java
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/OverflowMenuAdapter.java
ayoutlib/bridge/impl/RenderSessionImpl.java
4ccc4bd54f85d86818f61d728c6361d2003ddd8e 12-Dec-2013 Deepanshu Gupta <deepanshu@google.com> Action bar rendering in layoutlib [DO NOT MERGE]

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

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

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
(cherry-picked from 14bf0cef7eeed572a67c29a328581afac4decc20)
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/FakeActionBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/impl/SystemViewInfo.java
135a9ad4a51c9827fee40e3ff57639349fe7f236 15-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Add overflow menu popup for Action Bar in Layoutlib"
8d95b5009ce5592f55a9487536fa640724dc316b 15-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Action bar rendering in layoutlib"
929eea6bc1824bf98d244550c0984ecf8ea98811 13-Feb-2014 Deepanshu Gupta <deepanshu@google.com> Add overflow menu popup for Action Bar in Layoutlib

Change-Id: Ib7cc314079099c010f7d53849e204db36c410357
nternal/widget/ActionBarAccessor.java
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/OverflowMenuAdapter.java
ayoutlib/bridge/impl/RenderSessionImpl.java
dc800e85138f3ab57303a879b3e1abd109b90247 12-Apr-2014 Jeff Brown <jeffbrown@google.com> am eaa8a6b7: am a5c8d586: Fix build break due to layout lib.

* commit 'eaa8a6b7feb4a520f48654b087223ccaf49b6a2f':
Fix build break due to layout lib.
a5c8d586f6ceff252336f72c6e15efbf4785e794 12-Apr-2014 Jeff Brown <jeffbrown@google.com> Fix build break due to layout lib.

Change-Id: I87b40125adad0a799214f6ebf0dc04ec7903efbf
ayoutlib/bridge/android/BridgeWindow.java
79d88d138c07835d349f7c74f380eaeb7cac8d0b 11-Apr-2014 Narayan Kamath <narayan@google.com> am 73e78c75: am af42a91c: Fix another build breakage.

* commit '73e78c75b770b3af0d48acac9c8565f7b4d035ff':
Fix another build breakage.
af42a91c118941d463b474574bf34bf05822350d 11-Apr-2014 Narayan Kamath <narayan@google.com> Fix another build breakage.

Caused by 037c33eae74bee2774897d969d48947f9abe254f, which
was submitted without a checkbuild.

Change-Id: I0d48f6b941cc98a30904cdfbd7bcb56ed509734e
ayoutlib/bridge/android/BridgePowerManager.java
14bf0cef7eeed572a67c29a328581afac4decc20 12-Dec-2013 Deepanshu Gupta <deepanshu@google.com> Action bar rendering in layoutlib

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

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

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/bars/ActionBarLayout.java
ayoutlib/bridge/bars/FakeActionBar.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/impl/SystemViewInfo.java
ff0bb30752339046586ec7c495c53a7ae2cf29df 08-Apr-2014 Ying Wang <wangying@google.com> Fix sdk build.

Change-Id: I3e620315e082b46ba5fcd4511b9c258bf610ddf5
ayoutlib/bridge/android/BridgeIInputMethodManager.java
e9abc279fd0e1cd3a7c0bfb878c9b5ae22840b9b 08-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Fix theme/style resolution in Layoutlib"
ddf286282d8a30d27184e8304bac6fca03f88b72 05-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Fix sdk build

Change-Id: Ic08b57fdf2a653071a403bcc2c6b239a19363f72
ayoutlib/bridge/android/BridgePowerManager.java
bfec73c2db5a34ced248213edf5519c80727a65f 12-Mar-2014 Deepanshu Gupta <deepanshu@google.com> Fix theme/style resolution in Layoutlib

Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
ayoutlib/bridge/android/BridgeContext.java
b6588c522451f5015c2cbc902d5a72566f979f2b 04-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Fix NPE in layoutlib. [DO NOT MERGE]" into jb-mr2-dev
3bc5b23f8dbb6ecc4eeac4334f94682056d0cb3b 04-Apr-2014 Deepanshu Gupta <deepanshu@google.com> Merge "Fix layoutlib [DO NOT MERGE]" into jb-mr2-dev
5fb41528a6192c41f7e2bb30161cc5af6061d5b8 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 e327212adde1136807bbdf052e8cc3861f8a6aba)
ayoutlib/bridge/impl/FontLoader.java
9e5e993c7969ad60ff70cfdcf707247f38a705a1 21-Jan-2014 Deepanshu Gupta <deepanshu@google.com> Optimize layout rendering in layoutlib [DO NOT MERGE]

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
(cherry-picked from 35d56c0d67537e56fafebd8edf790026644fe8de)
ayoutlib/bridge/impl/RenderSessionImpl.java
80c55109b6351049498df294234dc0a75e75ec44 12-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Fix NPE in layoutlib. [DO NOT MERGE]

Change-Id: I36623304d83b344ea078044001577b8005a63c02
(cherry-picked from d0581d271e814670d81a6550aa7b1e86864d5710)
ayoutlib/bridge/impl/RenderAction.java
28873c1f008f4fe24441923e14f30e55d6f0967a 17-Oct-2013 Deepanshu Gupta <deepanshu@google.com> Fix layoutlib [DO NOT MERGE]

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

The cherry-pick differs slightly from the original to remove changes not
relevant to the current branch.

Bug: 11140701
Change-Id: Id92fc5359acf6dde1bcdbc781aaf637fdb6eecbf
(cherry-picked from 39e75835399f4d979cf82069dae2bd1ec496fb81)
ayoutlib/bridge/impl/RenderAction.java
0b7d80765c21dbd9294a0245f92a655fdd61514e 08-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Fix text size in Fake Action Bar. [DO NOT MERGE]

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

Bug: 11436018
Change-Id: Id74c11037cb43d01f6cd79126623c84edfc37aaf
(cherry-picked from f4800bc3b122828d61a34caecbf782eee170ae59)
ayoutlib/bridge/bars/CustomBar.java
776abc24cdd18610232a50b997cce3cffa74609b 07-Mar-2014 Adam Lesinski <adamlesinski@google.com> Uses VMRuntime.newUnpaddedArray for ideal array sizes

Bug:13028925

Change-Id: I0a9301248b10a339afbdc5e4ffe3310ac4fa1fb7
ayoutlib/bridge/util/SparseWeakArray.java
852472d9aa39eb4591eac43487ac3e0944e1daf6 24-Mar-2014 Dianne Hackborn <hackbod@google.com> Fix build.

Change-Id: I1dd79e932a551bd537d2c71e8fca29a299c9312f
ayoutlib/bridge/android/BridgePowerManager.java
84cd55e8bc67b5dc9e834b4691b710c6f133d493 26-Feb-2014 Jeff Davidson <jpd@google.com> Fix SDK build broken by ag/423985

Change-Id: I85480683531468b7a8a83749d9366f5cc334bd24
ayoutlib/bridge/android/BridgePowerManager.java
ca4b9a77e7d20703287b33b203b2582bd43f7792 20-Feb-2014 Deepanshu Gupta <deepanshu@google.com> am e92c8542: am 01825b7a: Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]

* commit 'e92c8542a5cf1160a1b701b9f176af64ba46d68d':
Fix sans-serif-thin and sans-serif-light fonts in layoutlib. [DO NOT MERGE]
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
e327212adde1136807bbdf052e8cc3861f8a6aba 19-Feb-2014 Deepanshu Gupta <deepanshu@google.com> Fix sans-serif-thin and sans-serif-light fonts in layoutlib.

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

Bug: http://b.android.com/57221
Change-Id: Ic8a299bd1e555f5bb914cd3d2fe72917ec7f471a
ayoutlib/bridge/impl/FontLoader.java
f7994e89e94d55998e63e9ebe74a8f10c05ccb3a 06-Feb-2014 Deepanshu Gupta <deepanshu@google.com> am 6a9cbd5a: am a0023027: am 23de8dc2: am 28e049ef: am 0db6e6a5: Merge "Optimize layout rendering in layoutlib" into klp-dev

* commit '6a9cbd5a2d56782e94b870735df51d32314684d8':
Optimize layout rendering in layoutlib
23de8dc2625d4aeb4dc9085c5865ed571f96261a 06-Feb-2014 Deepanshu Gupta <deepanshu@google.com> am 28e049ef: am 0db6e6a5: Merge "Optimize layout rendering in layoutlib" into klp-dev

* commit '28e049ef73f5d9301a198ac53535442b697b7ef4':
Optimize layout rendering in layoutlib
bd28e2d9d3c2a7e80babd39471d5788843a48d4a 27-Jan-2014 Deepanshu Gupta <deepanshu@google.com> Manual merge of changes from klp-dev

Manually merged the following changes from klp-dev branch and fixed
merge conflicts:
78cfdf31b7c48589ea3a148ec1d6d573235bc06b
d0581d271e814670d81a6550aa7b1e86864d5710
1f92d7fc0ffa72d7db93244c29a1a6575bb4b318
0baec410c29206dc72d9f5afba5d45827e62c00c
24541255c312ee34f9bf17eb5852cdffd4807065

Change-Id: I426729bb90a26746bfff3a0e4a03ea9f37972528
ayoutlib/bridge/impl/RenderAction.java
84151432e7ead6666eb8cf6377bff577b2027694 27-Jan-2014 Narayan Kamath <narayan@google.com> Track 64bit changes to android/graphics.

All pointers are now 64bits wide, so should be
represented as java longs and not ints.

Also changed DelegateManager and SparseWeakArray to
reflect the new world order.

(cherry picked from commit 88a8364c386c694f7ad56662ef89713dbf7c9d63)

Change-Id: Ic2f55dd6235751169c5014f9d2ccf3f544259a87
ayoutlib/bridge/impl/DelegateManager.java
ayoutlib/bridge/util/SparseWeakArray.java
88a8364c386c694f7ad56662ef89713dbf7c9d63 27-Jan-2014 Narayan Kamath <narayan@google.com> Track 64bit changes to android/graphics.

All pointers are now 64bits wide, so should be
represented as java longs and not ints.

Also changed DelegateManager and SparseWeakArray to
reflect the new world order.

Change-Id: Ic32b6b53818dbae9b949f03004c4fb6dae26cdbe
ayoutlib/bridge/impl/DelegateManager.java
ayoutlib/bridge/util/SparseWeakArray.java
d8df6b570f10cec486b2af708e9a393f3012317d 10-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Fix text size in Fake Action Bar

Merge f4800bc from frameworks/base

Issue: 11436018
Change-Id: Id74c11037cb43d01f6cd79126623c84edfc37aaf
ayoutlib/bridge/bars/CustomBar.java
03a057c1af9ca3f125c7924bf0b78da52223d8d3 06-Nov-2013 Deepanshu Gupta <deepanshu@google.com> Manual merge of changes from frameworks/base/tools

Manually merge of following changes:
9cb5f5b5233f2331748d108d71f4b685762f32a7
1cf5df38f4bdafa1beb2674ca548ad6d9650766b
083e3caf66c21f7cc9511db479726c38d90e2d2f
81f74f4bc96ea4266cebe1b785d095558f540800
39e75835399f4d979cf82069dae2bd1ec496fb81
272d1bce798a5fef42cc2ee31f629d00c89f66eb
45f5cd49fa898a59484edfd8e291dbe10df82db2

Change-Id: Ie21ca480ac117e16e28eb554474835b762ccb104
ayoutlib/bridge/android/view/WindowManagerImpl.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/impl/RenderAction.java
6fbaf6cfd8c85984c75ca2ef8c1dc8bde844bb07 21-Oct-2013 Satoshi Kataoka <satok@google.com> Update a test corresponding to I11ed9a767588f808

Change-Id: Ic802c075390f11fa4a5c14b8397a045b2dfec75c
ayoutlib/bridge/android/BridgeIInputMethodManager.java
24e4f21e78ffb7a46db3e03add5df99da3f1c945 19-Oct-2013 Nick Kralevich <nnk@google.com> fix build.

In frameworks/base commit 1125235da15a5655e1fdf3b5f24df48dafccee90,
the IPowerManager interface was updated to add updateWakeLockUids,
but this file was not updated.

Fixed.

Change-Id: I8d5def02b7cadf5a154634bdff18cacb84b718f4
ayoutlib/bridge/android/BridgePowerManager.java
f314dc01210d117959ae2a303d0311cd071ee927 15-Oct-2013 Satoshi Kataoka <satok@google.com> Update tests corresponding to I0e920ee79c526c3ae

Bug: 11035379
Bug: 5137498

Change-Id: Ief2a151bd83b75bf5b07d53b190a61f341541a21
ayoutlib/bridge/android/BridgeIInputMethodManager.java
c363be85de7b6cd67762b0f7fb2392fe421c553e 03-Oct-2013 Marco Nelissen <marcone@google.com> Update fake powermanager to new interface

Change-Id: I6f14498d7002b4720293a1c77f4fbb66869c36fb
ayoutlib/bridge/android/BridgePowerManager.java
e98d2cb65c0915d5278c593d14ff4bdc778557f7 11-Sep-2013 Deepanshu Gupta <deepanshu@google.com> Fix ClassCastException when rendering ListView

Bug: b.android.com/59300
Change-Id: I1e73910cf42de1b02f11cc77f575af9492320a19
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
8732bd893ae507346dad068a33edcc4beb99faed 12-Sep-2013 Kenny Root <kroot@google.com> Add new getOpPackageName for BridgeContext

Change-Id: Ib39b0bd2d1eb794ae4565e54251e4355fa139a14
ayoutlib/bridge/android/BridgeContext.java
f6ee5fa3e2219e6c6ea56c4bdb7b5df528d336c4 09-Sep-2013 Narayan Kamath <narayan@google.com> Fix build, fallout from change 451f6b981a2cd

Change-Id: Id85d06221eccbda786721a05f3f6d9d94c1cbb74
ayoutlib/bridge/android/BridgeContentProvider.java
19acfb8e873a04d42619d222c43eda95d259d0a5 05-Sep-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: Ib7b008b4ab5e689038678825289199aeb4bd815b
ayoutlib/bridge/impl/FontLoader.java
8930cb4f37ff0fbde65f7afd4bbe06ab77677f78 05-Sep-2013 Deepanshu Gupta <deepanshu@google.com> Fix layout rendering for RTL locales

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

Change-Id: Icbb57ee2ac7c6d8dfc34c2f04dce34d820b9b1ed
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
282e181b58cf72b6ca770dc7ca5f91f135444502 24-Jan-2014 Adam Lesinski <adamlesinski@google.com> Revert "Move frameworks/base/tools/ to frameworks/tools/"

This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e.
nternal/policy/PolicyManager.java
nternal/textservice/ITextServicesManager_Stub_Delegate.java
nternal/util/XmlUtils_Delegate.java
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/MockView.java
ayoutlib/bridge/android/BridgeContentProvider.java
ayoutlib/bridge/android/BridgeContentResolver.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeIInputMethodManager.java
ayoutlib/bridge/android/BridgeLayoutParamsMapAttributes.java
ayoutlib/bridge/android/BridgePowerManager.java
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/android/BridgeWindowSession.java
ayoutlib/bridge/android/BridgeXmlBlockParser.java
ayoutlib/bridge/android/view/WindowManagerImpl.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/FakeActionBar.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/bars/TitleBar.java
ayoutlib/bridge/impl/DelegateManager.java
ayoutlib/bridge/impl/FontLoader.java
ayoutlib/bridge/impl/GcSnapshot.java
ayoutlib/bridge/impl/ParserFactory.java
ayoutlib/bridge/impl/PlayAnimationThread.java
ayoutlib/bridge/impl/RenderAction.java
ayoutlib/bridge/impl/RenderDrawable.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/impl/Stack.java
ayoutlib/bridge/impl/binding/BaseAdapter.java
ayoutlib/bridge/impl/binding/FakeAdapter.java
ayoutlib/bridge/impl/binding/FakeExpandableAdapter.java
ayoutlib/bridge/util/Debug.java
ayoutlib/bridge/util/DynamicIdMap.java
ayoutlib/bridge/util/SparseWeakArray.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
9f6a119c8aa276432ece4fe2118bd8a3c9b1067e 28-Aug-2013 Mike Lockwood <lockwood@google.com> Move frameworks/base/tools/ to frameworks/tools/

Change-Id: I3ffafdab27cc4aca256c3a5806b630795b75d5c8
nternal/policy/PolicyManager.java
nternal/textservice/ITextServicesManager_Stub_Delegate.java
nternal/util/XmlUtils_Delegate.java
ayoutlib/bridge/Bridge.java
ayoutlib/bridge/BridgeConstants.java
ayoutlib/bridge/BridgeRenderSession.java
ayoutlib/bridge/MockView.java
ayoutlib/bridge/android/BridgeContentProvider.java
ayoutlib/bridge/android/BridgeContentResolver.java
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/android/BridgeIInputMethodManager.java
ayoutlib/bridge/android/BridgeLayoutParamsMapAttributes.java
ayoutlib/bridge/android/BridgePowerManager.java
ayoutlib/bridge/android/BridgeWindow.java
ayoutlib/bridge/android/BridgeWindowSession.java
ayoutlib/bridge/android/BridgeXmlBlockParser.java
ayoutlib/bridge/android/view/WindowManagerImpl.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/bars/FakeActionBar.java
ayoutlib/bridge/bars/NavigationBar.java
ayoutlib/bridge/bars/StatusBar.java
ayoutlib/bridge/bars/TitleBar.java
ayoutlib/bridge/impl/DelegateManager.java
ayoutlib/bridge/impl/FontLoader.java
ayoutlib/bridge/impl/GcSnapshot.java
ayoutlib/bridge/impl/ParserFactory.java
ayoutlib/bridge/impl/PlayAnimationThread.java
ayoutlib/bridge/impl/RenderAction.java
ayoutlib/bridge/impl/RenderDrawable.java
ayoutlib/bridge/impl/RenderSessionImpl.java
ayoutlib/bridge/impl/ResourceHelper.java
ayoutlib/bridge/impl/Stack.java
ayoutlib/bridge/impl/binding/BaseAdapter.java
ayoutlib/bridge/impl/binding/FakeAdapter.java
ayoutlib/bridge/impl/binding/FakeExpandableAdapter.java
ayoutlib/bridge/util/Debug.java
ayoutlib/bridge/util/DynamicIdMap.java
ayoutlib/bridge/util/SparseWeakArray.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
135b5ba52431b147d51a81b807784009cd0510dd 18-Oct-2012 Xavier Ducrohet <xav@android.com> Layoutlib: Read and close XML files as soon as possible. do not merge.

Because passing an InputStream to KXML does not close the
stream after the file has been parsed, the files are staying
locked on windows until the gc and finalizers are run.

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

(cherry picked from commit c48b0b940d632b9862ff6aa32665e37fe9e50845)

Change-Id: I1b225454c166026c1aab6290c55ac8279e8862d5
ayoutlib/bridge/impl/ParserFactory.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
434cd38f96a4a87220a8218901622f31e567354a 17-Oct-2012 Xavier Ducrohet <xav@android.com> Update layoutlib for jb mr1. do not merge.

Status bar displayed on all devices.
Update logic for displaying nav bar to whether or not
device has soft button.

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

(cherry picked from commit 891b703f7b1e0e396d16477cc66a286da7161b49)

Change-Id: Id7cc9ad4255d2c4d2e6461a565dfe2cc17e12e75
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
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
54a18ef7ad9da65a95f4d383952ae6268f8a4f34 10-Jul-2012 Xavier Ducrohet <xav@android.com> Replace LruCache implementation for layoutlib. do not merge.

The android version depends on a custom version of LinkedHashMap
which is not present on desktop VMs. This new implementation is done
in a way that minimizes the difference between the two.

Also some minor fixes.

(cherry picked from commit 01b6c755dbcf24e71192dc44757e2eea2a426091)

Change-Id: Idc7bca820e472e281a3024a5b610fd55606cf428
ayoutlib/bridge/android/BridgeContext.java
ayoutlib/bridge/bars/CustomBar.java
ayoutlib/bridge/impl/RenderSessionImpl.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