summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Check Bridge init before disposing." into lmp-devDeepanshu Gupta2014-10-224-37/+23
|\
| * Check Bridge init before disposing.Deepanshu Gupta2014-10-204-37/+23
| | | | | | | | | | | | | | | | | | 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
* | AAPT: Fix path for final generated resources on WindowsAdam Lesinski2014-10-201-1/+4
| | | | | | | | Change-Id: Id11ac79b281b51747c73f90406ebd60023c54f92
* | AAPT: Fix an issue where a resource name was incorrectly derived on WindowsAdam Lesinski2014-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | Calling String8::getLeaf() will assume the system's file path separator, however the source string was already converted to a unix path. getLeaf() would therefore not find any occurence of '\' and would return the full path. Bug:18036805 Change-Id: Ic2bfac0cc553406740204a296327e266b05c0eff
* | Merge "Added a daemon mode to aapt to receive streams of commands from ↵Jerome Dochez2014-10-104-0/+40
|\ \ | |/ |/| | | gradle." into lmp-dev
| * Added a daemon mode to aapt to receive streams of commands from gradle.Jerome Dochez2014-10-024-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When crunching png, we used to spawn a separate aapt process from java which is slow and resource intensive. Introduced a daemon mode to appt which when invoked with -m parameter will listen from commands on stdin and give report of command execution on stdout. One one command is supported so far : s f1 f2 This command perform a single png crunch, f1 pointing to the input png file to crunch, and f2 pointing to the path for the resulting crunced file. Expected output from the command is "Done" or "Error". Change-Id: Iaf1d865e8d5ee5d36abe39dea6443715865a98d3
* | am 4f133894: Exclude KXmlParser from LayoutLib.Deepanshu Gupta2014-10-085-22/+125
|\ \ | | | | | | | | | | | | * commit '4f133894a6e98d8d30557ea42cec92cfb21fa5c9': Exclude KXmlParser from LayoutLib.
| * | Exclude KXmlParser from LayoutLib.Deepanshu Gupta2014-10-085-22/+125
| | | | | | | | | | | | | | | | | | The class was incorrectly being included in the LayoutLib. Change-Id: I3c86662efa068019fe9165f2fc49a00d0a1b7f2d
| * | LayoutLib: Use ICU's line break algo. [DO NOT MERGE]Deepanshu Gupta2014-10-082-0/+56
| | | | | | | | | | | | | | | Change-Id: I7e5b0ab7423a72f5a4b0e1163d0a537f0b03ba07 (cherry picked from commit 760f6394d0f65fbb5365186e8e068d53c506b653)
| * | Resource resolution bug fix. [DO NOT MERGE]Deepanshu Gupta2014-10-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix a bug where "?attr/foo" in framework resources wasn't resolved properly. Change-Id: I9a56974f526774fde79685f668f01021136d68f1 (cherry picked from commit 19c7842082d831ad432abe906f4c37c6ed08e414)
| * | Fix Tests after cherry picks. [DO NOT MERGE]Deepanshu Gupta2014-10-012-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Update intelliJ copyright profile [DO NOT MERGE]Deepanshu Gupta2014-10-011-1/+1
| | | | | | | | | | | | | | | Change-Id: Ib9386b686cb24e1f187d0b636b59b4b13d59bbcd (cherry picked from commit 91fa62ac67a5e294124b5bfb70b35addc7687c34)
| * | Build layoutlib create tests as part of sdk build. [DO NOT MERGE]Deepanshu Gupta2014-10-011-0/+3
| | | | | | | | | | | | | | | | | | | | | LayoutLib Create tests are now built whenever LayoutLib create is built. Change-Id: Id215e8690e435019579dba1734090a0d585f37e1 (cherry picked from commit 4efe6264f1251fa200427f54ea6f5dd4c4d03665)
| * | Add layoutlib tests to DIST_DIR [DO NOT MERGE]Deepanshu Gupta2014-10-012-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Build layoutlib_create tests. [DO NOT MERGE]Deepanshu Gupta2014-10-011-0/+32
| | | | | | | | | | | | | | | Change-Id: Ia13a090f8ec29b2b2a107825b6a13d7db77e6d61 (cherry picked from commit 2294f939bc79ce902a40db37def64cc28394d56b)
| * | Remove ANDROID_BUILD_TOP from intelliJ path variables. [DO NOT MERGE]Deepanshu Gupta2014-10-0113-23/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Get filename from File faster [DO NOT MERGE]Deepanshu Gupta2014-10-011-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Add testing framework to LayoutLib. [DO NOT MERGE]Deepanshu Gupta2014-10-0165-26/+1965
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Add tests to the layoutlib eclipse project. [DO NOT MERGE]Deepanshu Gupta2014-10-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | Fix error when using list as actionBarNavMode. [DO NOT MERGE]Deepanshu Gupta2014-09-251-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Merge "Resolve color xml attributes properly. [DO NOT MERGE]" into ↵Deepanshu Gupta2014-09-041-0/+4
| |\ \ | | | | | | | | | | | | klp-modular-dev
| | * | Resolve color xml attributes properly. [DO NOT MERGE]Deepanshu Gupta2014-08-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Color attributes were not being converted to int properly. The conversion to int was a simple string to int using base 16. This change resolves the colors as per #RGB, #ARGB, #RRGGBB or #AARRGGBB format depending on the length of the attribute. All values that begin with '#' are treated as colors. Bug: http://b.android.com/73845 Change-Id: I8ad089b821af1e290b9b95771b50213fe2fdd784 (cherry picked from commit 81564dfe60020fa977d39d168f682e9d61825660)
| * | | Fix "@null" resource values in LayoutLib. [DO NOT MERGE]Deepanshu Gupta2014-08-261-2/+3
| |/ / | | | | | | | | | | | | | | | Bug: http://b.android.com/74072 Change-Id: Ib84906d86772ac3df2407e71ad2167797bec4542 (cherry picked from commit c9cd725f1013bed27e6f6594b176c10a6a4c0f16)
* | | Merge "AAPT: Gate v21 resource synthesizing logging behind -v flag" into lmp-devAdam Lesinski2014-10-031-20/+26
|\ \ \
| * | | AAPT: Gate v21 resource synthesizing logging behind -v flagAdam Lesinski2014-10-031-20/+26
| | |/ | |/| | | | | | | | | | | | | | | | This is verbose information and should be hidden behind the -v flag. Bug:17822471 Change-Id: I36e2c6beb54669a31cde73416427477a80ded8a6
* | | Merge "Minor style changes." into lmp-devDeepanshu Gupta2014-10-031-3/+3
|\ \ \ | |/ / |/| |
| * | Minor style changes.Deepanshu Gupta2014-10-021-3/+3
| | | | | | | | | | | | | | | | | | Addressing code review comments on previous change: 171804201dd Change-Id: I2c9e0ce35e755c23d8292749828d15a87109d6dc
* | | Merge "Always resolve enum when resolving resources." into lmp-devDeepanshu Gupta2014-10-022-202/+110
|\ \ \ | |/ /
| * | Always resolve enum when resolving resources.Deepanshu Gupta2014-09-292-202/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | include direct.h for _mkdirAndrew Hsieh2014-09-302-0/+4
|/ / | | | | | | | | | | | | | | | | Bug: 14416410 The new mingw-w64 toolchain x86_64-w64-mingw32-4.8 no longer declares _mkdir in io.h. Change-Id: I624b52d2f35db54a7f28df09f997fc883b0f0557
* | Update time in layout previewDeepanshu Gupta2014-09-291-2/+1
| | | | | | | | Change-Id: Ic32a9cb1f20b472c6898a5f370d8578c011a09bf
* | AAPT: Fix issue with synthesized resource not actually showing upAdam Lesinski2014-09-242-1/+19
| | | | | | | | | | | | | | | | | | | | 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
* | Merge "AAPT: Continuation of public/private attribute fix" into lmp-devAdam Lesinski2014-09-229-36/+316
|\ \
| * | AAPT: Continuation of public/private attribute fixAdam Lesinski2014-09-229-36/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Fix backwards compat problem with AAPT public attrs" into lmp-devAdam Lesinski2014-09-193-3/+225
|\ \ \ | |/ /
| * | Fix backwards compat problem with AAPT public attrsAdam Lesinski2014-09-183-3/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Build LayoutLib tests with Java 6" into lmp-devDeepanshu Gupta2014-09-161-1/+1
|\ \ \ | |/ / |/| |
| * | Build LayoutLib tests with Java 6Deepanshu Gupta2014-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Build the layoutlib tests with Java 6, so that we can test LayoutLib on Java 6 also. Change-Id: I8ab344af29c880dafdc195d8b061a1d08e724e26
* | | Saver: PowerManager call to set low power mode.John Spurlock2014-09-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | Merge "Don't use reflection when generating the onResourcesLoaded callback." ↵Marcin Kosiba2014-09-112-104/+73
|\ \ \ | | | | | | | | | | | | into lmp-dev
| * | | Don't use reflection when generating the onResourcesLoaded callback.Marcin Kosiba2014-09-112-104/+73
| | | | | | | | | | | | | | | | | | | | BUG: 17466240 Change-Id: I74608f3d8b3617281639a9d387face97e15fb616
* | | | Merge "LayoutLib: support font weights." into lmp-devDeepanshu Gupta2014-09-113-60/+166
|\ \ \ \ | | |/ / | |/| |
| * | | LayoutLib: support font weights.Deepanshu Gupta2014-09-103-60/+166
| | | | | | | | | | | | | | | | | | | | | | | | Also fixes a shader delegate method. Change-Id: I86be80ab55d04760084d5bf39235f2ee4de7be23
* | | | Merge "Fix build." into lmp-devDianne Hackborn2014-09-101-0/+5
|\ \ \ \
| * | | | Fix build.Dianne Hackborn2014-09-091-0/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: I92eabc35168acfe58641917179be0d90a14f2f11
* | | | | Merge "AAPT: Don't crash on illegal symbol name" into lmp-devAdam Lesinski2014-09-091-2/+6
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | AAPT: Don't crash on illegal symbol nameAdam Lesinski2014-09-091-2/+6
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Build layoutlib create tests as part of sdk build.Deepanshu Gupta2014-09-081-0/+3
| |/ / |/| | | | | | | | | | | | | | LayoutLib Create tests are now built whenever LayoutLib create is built. Change-Id: Id215e8690e435019579dba1734090a0d585f37e1
* | | Merge "Update IntelliJ project file for IntelliJ 14" into lmp-devDeepanshu Gupta2014-09-091-1/+1
|\ \ \
| * | | Update IntelliJ project file for IntelliJ 14Deepanshu Gupta2014-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | IntelliJ keeps reordering the options this way each time the project is opened. Change-Id: I0e19b5b0a858b3fa9a1134b883ed5180c4ef146e