History log of /frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
a43c4fa09ff758400c17c3533b77d783e713a115 27-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Add namespace before attr name in defPropMap

Change-Id: I36d094fb69d5f5ce0aebde04960ffcd19c27a2eb
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
eaf1853b98d7bf2c3d693ad702050968ef0a404c 14-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Return complete properties map instead of per view

Change-Id: Ib7c71606d1bf43bbaa80f5601a8508d7aa49d953
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
79c59fe4a8544bdda5c56efecf9c2bc72f2f0e4e 12-Apr-2016 Deepanshu Gupta <deepanshu@google.com> Add post resolve property values

Change-Id: Ia86b7dfc479cc5313cce36b6b3066fbb1d00c292
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
8cdf61a02e4652d53560c9758b8b15e76c50bfd7 07-Apr-2016 Diego Perez <diegoperez@google.com> Fix NPE when runnin testActivity

Change-Id: I7ac81cb286b8d5593ae7f5fedb99bfd0fda791c5
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
38735b00267b55219a77317ec3ce5ca60c5edd06 21-Mar-2016 Diego Perez <diegoperez@google.com> Merge "Account for parent scroll position" into nyc-dev
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
91fa3ba4cc8acd4caeeb88f90ce39198b5fea414 03-Nov-2015 Diego Perez <diegoperez@google.com> Remove auto-boxing during the inflate

Change-Id: I3f9ba5d78363f878fa0c58ca8cbf736bd43fe1c0
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
e8a04cd5a68a5e5aa78a4f40b3269c86cc3f152f 13-Oct-2015 Ian Pedowitz <ijpedowitz@google.com> Fix Build

Mimicking what was done for bdbd2d9c1878432eca6933e06c980663e2579d85

Change-Id: I5aef245b7a426edaa90e7e237acd4608b431c073
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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.
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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)
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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)
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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)
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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)
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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)
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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)
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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)
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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)
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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)
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
490dd90c707de8426a068a90d74ec83c9c11fc83 07-Jul-2015 Deepanshu Gupta <deepanshu@google.com> Add a default PackageManager to BridgeContext.

Needed for EditText.

Change-Id: I6c831467659ce814e86c13e928a2b77c14e1c139
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
5d1eaf4a197130f561b16c4ed083cf016b20ab92 30-Jun-2015 Deepanshu Gupta <deepanshu@google.com> Add missing resolveResValue call.

Bug: http://b.android.com/178504
Change-Id: I7dde8094cf762893e4f7ea0d3de87a281c9602cd
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
6330971ed293a2777bbdab09288f90ea4b2d0255 21-May-2015 Deepanshu Gupta <deepanshu@google.com> Add documentation about hack in commit: f8ea750455

Change-Id: I9ce871a67fb67e02e0c4df1eb5c3261ea52a914b
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
2ab7b460562ca9cf52a5c47a9c61a5cc31fd3a13 07-May-2015 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of a663e012 to mnc-dev

Change-Id: I279cad7db6e9b5e97da3ea3c3bb91e09cabc7076
e8b6debd9b1035a8b8da102cfe476b71986b341c 18-Apr-2015 Svet Ganov <svetoslavganov@google.com> Fix build for real

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

Change-Id: If469dce767b492c3fcc1ad8cf7ab1041eb61096f
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
4967201a2c524906b90739c9a549174fb1175a24 16-Apr-2015 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of 186fe7b1 to master

Change-Id: I60886d3e44ae23a11c8f129517df87ee29625ada
37dbb8b7f3c069196040eed3a03006647db7fa5b 15-Apr-2015 Deepanshu Gupta <deepanshu@google.com> Update to using LayoutlibCallback.

Change-Id: Ia89d418b0d40ca8efef8968a4a2a635616b945ac
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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.
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.
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
b9b8aef94e5bad8f5f03f686a2d3d8a09c045a7b 13-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix import order.

Change-Id: I50bfbf4011290683a1c6adb94e0b6fa301dcc75b
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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.
85d72c4535003af3b9df77bd6eaa2b33e8a7cba2 11-Mar-2015 Deepanshu Gupta <deepanshu@google.com> Fix rare NPE in BridgeContext.

Also fixed some deprecation warnings.

Change-Id: I2fa00996dab0b008b9ca07a5382a059e5780529d
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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.
ad879adb65ffa577844738522ab6d7d30aba2ead 13-Feb-2015 Deepanshu Gupta <deepanshu@google.com> Merge "Add Asset management support for fonts." into lmp-dev
d51834bdfad0cd3142ac464ab3a3b0db14f884c3 28-Jan-2015 Deepanshu Gupta <deepanshu@google.com> Add Asset management support for fonts.

Change-Id: I10ca67dcffe244667d4ae0bda65dbc1aa6691d50
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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.
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
f708d27fa012d7949a761cb7033b874ba86b353e 04-Dec-2014 Deepanshu Gupta <deepanshu@google.com> resolved conflicts for merge of fb30a783 to lmp-mr1-dev

Change-Id: I91fdb76c748b97376d6469c8d1198a15c4395463
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.
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.
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
8657baa06d2efe845cafef571bd9dce627cf5045 10-Nov-2014 Deepanshu Gupta <deepanshu@google.com> Fix setting styles in custom views.

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

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

Change-Id: Ie3103ba32af6186651a5f77c27d1efc33dc2bcc7
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
4f6a6c48a4e6b9f6e4ced3d10bb51db5d2c22ead 06-Aug-2014 Svetoslav <svetoslavganov@google.com> Fix build

Change-Id: I96eec52472bec122074b0ec2ee051c1b55eaa8f4
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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 '.'
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
14bf0cef7eeed572a67c29a328581afac4decc20 12-Dec-2013 Deepanshu Gupta <deepanshu@google.com> Action bar rendering in layoutlib

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

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

Change-Id: Ia30fef816afd91ec1e439734d56b59b1323bfee2
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
bfec73c2db5a34ced248213edf5519c80727a65f 12-Mar-2014 Deepanshu Gupta <deepanshu@google.com> Fix theme/style resolution in Layoutlib

Change-Id: Icfb91e566666408802dadc0e2070991151b16b9d
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
8732bd893ae507346dad068a33edcc4beb99faed 12-Sep-2013 Kenny Root <kroot@google.com> Add new getOpPackageName for BridgeContext

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

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

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

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

Change-Id: I3ffafdab27cc4aca256c3a5806b630795b75d5c8
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
b9be11c370712cfc4d54aef9202e61092b96960d 12-Aug-2013 Jeff Sharkey <jsharkey@android.com> Bring along BridgeContext for the ride.

Change-Id: Ic11c0df447c82be3922d529f18a290cfdfec6b05
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
144a6ae7e6e751388cd322bac70d6bbd950468d5 24-Jun-2013 Craig Mautner <cmautner@google.com> Fix build.

Change-Id: Icdfc6bcbe8603cf9bd3f8982a595336c0407e7d6
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
ef04a9b7e1dee38f191a8f70be89a1542ccbe367 21-Feb-2013 Jim Miller <jaggies@google.com> Fix the build.

Change-Id: If53878937fe1ca01ad8db9f9d201d0f9aaaec81b
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
6dfd0b39a63559999a769f93d5cdb48abe675344 15-Oct-2012 Xavier Ducrohet <xav@android.com> Fix SDK layout rendering in Eclipse.

Change-Id: I0e9e85632012c0929b987ee9d0ccf7c25eece322
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
5d701eddcf7f4abd5867ec3bf2091916d5ebbdf1 16-Mar-2012 Xavier Ducrohet <xav@android.com> LayoutLib: Properly support attr ns when used in styles.

Change-Id: I885864588928589d7c9a34b94339917c5be47fa5
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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.
44e63a218cf8fcab9b4418246a512bd0b0c9157b 25-Feb-2012 Xavier Ducrohet <xav@android.com> Support rendering layout that use the new res-auto namespace.

Change-Id: I9b89c965dc8c9458e74c15ab8ff765e16e1b32c2
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
8836c55818937ba00f186075eb7efb6462191113 01-Nov-2011 Tor Norbye <tnorbye@google.com> Set theme-tag in render log when failing to find style

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

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

This is squash commit of all the missing patches.

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

Change-Id: I27be96ed2c37573eb22cfbb391d96b6137b3df8c
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
3e87bfa1911de10c3d0692b34eba27f5965710f7 19-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: support defStyleRes in obtainStyledAttributes.

This fix the Spinner rendering.

Change-Id: I20a71d9e07f6c86652a74fba3fc05a027a057ff8
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
33758ef8c98efb669c65eb9404b99ee5df09c6b5 03-Feb-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Fix some rendering issues

Change-Id: I662a39a783de5bc7f3063f46cedaab11c7e6496e
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
345f866bfd09476fd62aa10345a0670cc110b63c 02-Feb-2011 Xavier Ducrohet <xav@android.com> Make TimePicker/DatePicker/CalendarView render in Eclipse.

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

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

Change-Id: I30d83c2bb4569513f4f5e22670cffe938706f105
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
9d0577ec0c285c055da4c910dcb597fdae5bc5e5 18-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: properly configure ApplicationInfo with targetSdkVersion.

Change-Id: I1bfef890206552843d1a7a8d0564741f2a37494f
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
70552fb92dbc5cb5b1d53b20f92f2a64969a50c4 17-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Update to use the new RenderResources API.

Change-Id: Ic64eff3f324c4519da89bab10e6d59f0a9341a04
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
51a7e5447de94791c464cda5cc6ebbf616d73c80 15-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: update logs to use new data bundle

Also change some resource.resolve tags to resource.format

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

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

Change-Id: Ib85272249d285ecef409bf063903bcd91514a424
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
d7cbf3f72c73ba01293f6676453352ef60df3778 12-Jan-2011 Xavier Ducrohet <xav@android.com> LayoutLib: Log error when style can't be found.

Change-Id: I9a88cdac44a2d31c053e7f0c92a14e69bd82ac83
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
19a021038f2f4683dddef651543d7298f5bd7218 16-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Update layoutlib with revised API.

Change-Id: I78929df621f48e85d9cbefe1f5590f9ce99bbaff
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
ffb42f6c5043de226f02318a1311669d35a90711 10-Dec-2010 Xavier Ducrohet <xav@android.com> LayoutLib: Adapt to new LayoutLib

API now uses ResourceValue instead of IResourceValue
Capabilities renamed Capability

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

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

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

Change-Id: Ie2183490e8d26ef194030a9d87fe7745f24f1d83
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.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
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
cf52390eee4c9ae792ef63af1528b2e71b33a04f 12-Nov-2010 Xavier Ducrohet <xav@android.com> Layoutlib: Fill the default prop value map for View objects.

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

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

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

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

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

Change-Id: Ie15b15e5a1b2388cd6ef82e518345b1fc02ec981
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java