When multiple styles are applied to a theme, we only remembered the last
one. This change fixes the issue.
Change-Id: I46490e882edc3eabe522a641c83366234b5bb25d
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
Fix a bug where "?attr/foo" in framework resources wasn't resolved
properly.
Change-Id: I9a56974f526774fde79685f668f01021136d68f1
(cherry picked from commit 19c7842082d831ad432abe906f4c37c6ed08e414)
1. Updated the intelliJ run configuration for the layoutlib_create tool.
2. Updated the code to search for the platform.dir.
3. Update tests to use AppTheme and Target SDK 19
Change-Id: I6f1cc6ff2a53e4474c746537029c7f89c6dd6dc1
(cherry picked from commit 8592eeafd01370d1a17e34602290becf7f611c75)
LayoutLib Create tests are now built whenever LayoutLib create is built.
Change-Id: Id215e8690e435019579dba1734090a0d585f37e1
(cherry picked from commit 4efe6264f1251fa200427f54ea6f5dd4c4d03665)
Add the layoutlib and layoutlib-create tests to DIST_DIR for sdk
targets. These can be used for continuous testing on the build server.
Change-Id: I747dddcddfd8009937668bec4d75cb99bf63235f
(cherry picked from commit f9c749c9901c459f77ffc6f4fbbc15f4142c6e0a)
The variable is not actually needed and it makes working with different
API levels a lot easier since everything now depends on $PROJECT_DIR$.
This change also makes the tests more robust by improving the way it
tries to find the SDK.
Change-Id: I3502ad4a0ba85fd88b497e47964fddb2a89e520c
(cherry picked from commit 5377695d4ecf3cc6dc1abe59bbfca63f6137b722)
Use the direct call from a File object to get the filename instead of
going through Path which depends on Java 7 making the LayoutLib tests
incompatible with Java 6.
Change-Id: I815895eedbc10245ee09bdb53b11e5548b076aad
(cherry picked from commit 7dbf91fee96790fbeb9858740be1bb375f29ecb5)
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)
Specify the test folder in the layoutlib/bridge eclipse project.
Also add the sourcepath for layoutlib-api-prebuilt.jar
Change-Id: I194ed182618e564388d6df645e2de7f59897fa1e
(cherry picked from commit 36acf8baebc9ab72b3b5fe75d865399ddf7b0132)
Bug: 14416410
The new mingw-w64 toolchain x86_64-w64-mingw32-4.8 no longer
declares _mkdir in io.h.
Change-Id: I624b52d2f35db54a7f28df09f997fc883b0f0557
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
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
AAPT keeps around a few pieces of state that are disjoint, so
simply adding to a collection won't add the resource to the final
flattened output. Instead, we create the resource from the top
and then copy over the values into the newly created resource.
Bug:17647890
Change-Id: I214263e84c18f9370c6e6a5aa53aa2d833fc842d
XML files like layouts are now scanned and checked
for v21 attributes. If those kinds of attributes
are found, then we remove them in the original
version and synthesize a new xml file under the
v21 configuration.
Bug:17520380
Change-Id: Icf984cb96134180a2e35349c1dbf2cef9a8f0bda
AAPT has traditionally assigned resource IDs to public attributes,
and then followed those public definitions with private attributes.
--- PUBLIC ---
| 0x01010234 | attr/color
| 0x01010235 | attr/background
--- PRIVATE ---
| 0x01010236 | attr/secret
| 0x01010237 | attr/shhh
Each release, when attributes are added, they take the place of the private
attributes and the private attributes are shifted down again.
--- PUBLIC ---
| 0x01010234 | attr/color
| 0x01010235 | attr/background
| 0x01010236 | attr/shinyNewAttr
| 0x01010237 | attr/highlyValuedFeature
--- PRIVATE ---
| 0x01010238 | attr/secret
| 0x01010239 | attr/shhh
Platform code may look for private attributes set in a theme. If an app
compiled against a newer version of the platform uses a new public
attribute that happens to have the same ID as the private attribute
the older platform is expecting, then the behavior is undefined.
We get around this by detecting any newly defined attributes (in L),
copy the resource into a -v21 qualified resource, and delete the
attribute from the original resource. This ensures that older platforms
don't see the new attribute, but when running on L+ platforms, the
attribute will be respected.
We still need to address this problem in the platform moving forward,
as this will only help us in the transition from pre L to L.
Bug:17520380
Change-Id: Ia2a985798b50006c21c7c3431d30d9598f27cd91
- 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
We never checked the return value when adding a nested
symbol, which would be NULL if the symbol name was invalid.
External bug: https://code.google.com/p/android/issues/detail?id=75876
Change-Id: I5211f4d4b87897d52f2b6e5907113d31930bb92d
Add the layoutlib and layoutlib-create tests to DIST_DIR for sdk
targets. These can be used for continuous testing on the build server.
Change-Id: I747dddcddfd8009937668bec4d75cb99bf63235f
Ignore deprecation, synchronized, and throws definitions. Look
through full inheritance hierarchy to catch refactored classes like
BaseBundle.
Change-Id: I10ab0b4a0ef64e7508f38d0c223f08711293d643