aboutsummaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* SDK: Delete projects moved to tools/base or tools/swt.Raphael Moll2013-03-139-371/+0
| | | | Change-Id: Iba15f82cb00d19217382c78d8ff37dda1e97ea59
* SDK prebuilts: reorganize into tools/lib.Raphael Moll2013-03-061-1/+1
| | | | | | This must be submitted with prebuilts/devtools' change I3d985ed0abf. Change-Id: Icab479e0e8a5c126b0fdc213a792187a14a44f21
* Remove source of prebuilts.Raphael Moll2013-02-0627-5103/+0
| | | | | | Sources are now located in tools/base.git. Change-Id: I9cbe1deb98f8c43e90f5fb04b668f664b9850620
* Change more SDK libs to prebuilts.Raphael Moll2013-02-061-17/+8
| | | | | | | | | | | Requires prebuilds/devtools.git I913a29e5f40db99871701461aad6fc38483015d2 To update the prebuilts, you need tools/base.git and the prebuilts/devtools/update_jars.sh script. This is supposed to be an intermediary step as we switch to tools/base. Change-Id: I3dcccfdd9dc243a22a5bfd9db6779d24285db1ac
* Add locale sensitive int and double parsing methodsTor Norbye2013-01-252-0/+162
| | | | | | | | | | Use these to parse ints and doubles/floats from strings rather than Integer.valueOf or Integer.parseInt (and ditto for Float/Double) if the string represents a localized string (e.g. using "," instead of "." in some locales, and so on.) Change-Id: I231cdb79a2d09c776ec7894639dde6adf77afd10
* Add new lint Checks for manifest typos.Keiji Ariyama2013-01-231-0/+1
| | | | | | | | | Check <use-sdk> instead of <uses-sdk> Check <user-permission> instead of <uses-permission> Check <use-feature> instead of <uses-feature> Check <user-library> instead of <uses-library> Change-Id: I60ea44d7d6d8860b8987998a03c128523e8ba082
* Delete ALL the build.gradle from sdk.gitRaphael Moll2013-01-091-60/+0
| | | | Change-Id: Ib923638c305105e84f79a18a79ece48d391129c5
* Fix package renaming for Manifest and BuildConfig classesTor Norbye2012-12-201-1/+7
| | | | | | | | | | Fixes 41685: Rename Package Breaks BuildConfig and Manifest. It also cleans up the refactoring in that it now only adds import R statements to classes that actually contain an R reference. Change-Id: Ia0e2833bc9e25f92be33994047c4527c9e3e9dc1
* Add simple XML dump methodTor Norbye2012-12-074-3/+198
| | | | Change-Id: I46709d9903e3f2daf4165e17f1e4b581cc217315
* Refactor common lib folder structure.Xavier Ducrohet2012-12-0631-55/+14
| | | | | | | | | | Move folders around to match default gradle/maven folder structure. The custom structure confused some IDEs when importing the project as a Gradle project. Change-Id: I4c5b3ba0c145418c3a48fead2edf370864a56dd5
* Findbugs cleanupTor Norbye2012-12-062-3/+2
| | | | | | | Fix a couple of issues found by findbugs, and some test stability fixes. Change-Id: I97390ea606ea25d6a68e5b7f8245e5e689117995
* Add namespace elements from code completion lazilyTor Norbye2012-12-042-14/+65
| | | | | | | | | | | | | | | | | | | | | | | | The XmlUtils.lookupNamespace() method would unconditionally insert a namespace declaration if called with a namespace that is not already declared in the document. This had the negative effect that simply bringing up the code completion dialog on a custom view would immediately insert the app namespace declaration, even if the user didn't select one of the app namespace attributes. Furthermore, this edit would sometimes result in the caret being placed in the wrong place after insertion. This changeset adds a new parameter to the lookupNamespace() method, "create", which lets the caller deliberately decide whether the new namespace element should be created. Second, code completion now only inserts the namespace declaration as part of the completion apply handler, meaning you only get the namespace if you pick one of the custom attributes. It also uses a document position to ensure that the insert and caret positions are preserved properly and take the namespace insertion into account. Change-Id: I21cf678df454b09460139fe35d33ca88b8e91757
* Merge "Add tools:targetApi to control local minSdk (like @TargetApi)"Tor Norbye2012-12-031-0/+1
|\
| * Add tools:targetApi to control local minSdk (like @TargetApi)Tor Norbye2012-11-301-0/+1
| | | | | | | | | | | | | | Also add XML editor quickfix to set the attribute on an API violation. Change-Id: Ife95d73659656e98a6fb1a322354f5fcfcef1888
* | Fix rename type, rename package and move type refactoringsTor Norbye2012-12-031-42/+44
|/ | | | | | | | | | | | | | | | | | | | | | This CL updates the various refactorings to properly handle layout refactoring such that it not only updates custom views, but also updates fragment references, tool:context references etc. It also fixes missing manifest updates (such as replacing the parentActivityName attributes). Most importantly, it also fixes bugs where the wrong elements in the manifest could get updated. There are a lot of diffs in this CL because I basically replaced the old refactoring code (which had a lot of custom text change and document manipulation code) with code based on the new resource refactoring, where there is a single iteration of the XML documents. This also improves the emitted refactoring elements such that it only lists each file once. Also updated the unit tests to check additional scenarios; adding a second activity with the same prefix as the first is what revealed the broken document handling in the old code. Change-Id: I7c5959ca6b046ce3dab566663988cdd0389b0e5b
* Add filterscript suppport.Xavier Ducrohet2012-11-291-0/+4
| | | | Change-Id: Iaefb640f35bdad1dc5d4be8565c2cafdc02e8324
* SDK: Relative AVD root path.Raphael Moll2012-11-291-1/+11
| | | | | | | | | | | | | | | | | | | AVD have a root ini file in .android/avds/name.ini with a "path" absolute path to the avd config directory. This does 2 things: - force the file to use ISO-8859-1 (aka Latin1) encoding. - add a "path.rel" key with a relative path to the .android folder if the avd directory is at its typical location. The loading logic is: - try to use the "path" key if it points to an existing directory (as an absolute path). - otherwise use the "path.rel" key as a path relative to the .android folder if present. SDK Bug: 40498 Change-Id: I2364c2ee69f48816f3e6f6f33c9fa43170e05587
* Add lint check ensuring that buttons in bars are borderlessTor Norbye2012-11-281-0/+2
| | | | Change-Id: Ie99e3e7b75f1ac8cf6447c70afc5901437e2d600
* Add support for specifying default language in res/valuesTor Norbye2012-11-281-0/+1
| | | | | | | | | | | | | | This changeset adds support for a tools:locale attribute in resource files where you can declare which language is actually the default. This is used both by the missing translation detector (such that it won't complain if for example values-en-rUS is intended to supplement res/values/), as well as the typo detector (to allow you to specify which language's dictionary should be used to look for typos in the default resource file.) This addresses 33845: lint is wrong about translation regions Change-Id: Icb16cf11407c333845b56b6d105c99a8661430b0
* Add lint check for making dynamic text views selectableTor Norbye2012-11-161-0/+3
| | | | Change-Id: I9cc31e8b3094f830e785b96b46f384206074703c
* Merge "Update known version names constants"Tor Norbye2012-11-051-1/+1
|\
| * Update known version names constantsTor Norbye2012-11-051-1/+1
| | | | | | | | Change-Id: Ib6b09a1ff85c45b4fc6c407e3404a8a58c6f84ea
* | 21296: Layout editor error when using numColumns attributeTor Norbye2012-11-021-0/+1
|/ | | | Change-Id: I2d2542a1044b3b1d1682b125b45e223aa3d921fa
* Update compiler flags.Tor Norbye2012-10-261-2/+2
| | | | | | | | | | Turns off the ability to use @SuppressWarnings with optional errors is available, but off by default (see Eclipse issue 392875). This turns that off, makes missing enums in switch statements a warning, and synchronizes the settings file to all projects (except tests.) Change-Id: Iad7060523b6ee2cbbca97e0a6ffedb264b185222
* Update maven artifacts and add lint.Xavier Ducrohet2012-10-191-0/+1
| | | | | | | | | Updated the groupId of most artifacts to be more reflective of their sub-projects status in the SDK tools. Added lint artifacts. Change-Id: I900a165647a9b7d3c55b473f63c4ca4469762d7b
* Check for missing layout_width and layout_height attributesTor Norbye2012-10-161-1/+1
| | | | | | | | Also looks at style declarations and attributes on include tags to allow elements to either pick up sizes from styles or from the including context. Change-Id: I91a944805d8a906ff63b5a22f2faa876e7292c19
* Look for missing android namespace prefix in manifest filesTor Norbye2012-10-151-0/+1
| | | | | | | | Extend the missing prefix checker such that it doesn't only look at layout files, but also complains in manifest files, menu files, drawable files, etc. Change-Id: Ifbd7635e3b73d662aa6c7a4e03e4c2894c6fe204
* Misc improvements to the multi-configuration editingTor Norbye2012-10-152-1/+119
| | | | | | | | | | | | | * Fix bug in switching to preview configurations * Don't draw drop shadows for thumbnails in Dialog themes * Move the preview title labels to sit above each preview thumbnail * Make error thumbnails include rendering error messages (and wrap if necessary), plus tweak appearance * Make switch animation show rectangles animating in both directions Change-Id: I0995617fa277b48419a88c5203abf5b1d49af711
* Lint detector for missing menu titlesTor Norbye2012-10-151-0/+2
| | | | | | | As requested in 38022: Lint should warn when menus don't have a title Change-Id: I34688d7733d98ba9fa8cc10202a5470040962117
* 37329: lint checks for conflicting permission definitionTor Norbye2012-10-151-0/+1
| | | | Change-Id: I3b131872cc9938ceb5df271ab10ec60644d44b26
* Check notification and action bar iconsTor Norbye2012-10-051-0/+4
| | | | | | | These icons should not use color (and in the case of notification icons, be white). Change-Id: I32b9422735830a01bb069b90a5ad5a76d7aeb5de
* Fix misc lint bugsTor Norbye2012-10-041-0/+1
| | | | | | | I ran lint over some large projects and manually verified the report; this uncovered a couple of false positives. Change-Id: I006d64a03119c6badc40e33df9ab4079e07dc7c5
* Fix javadoc here and there.Xavier Ducrohet2012-10-022-3/+3
| | | | Change-Id: If02d0b97c294d9821a1c914547782a08b1d256fb
* Update the gradle build files.Xavier Ducrohet2012-10-021-3/+52
| | | | | | | add javadoc and source artifacts as well as POM information to upload to Maven Central. Change-Id: I51701f5a5db5b2ae41ecede115e2b36adf1fa05e
* Fix issue with generation of R classes for libraries.Xavier Ducrohet2012-09-271-0/+2
| | | | | | | | | | | When a clean action happen, the order of compilation of the project isn't dictated by the dependencies between the project. It is therefore important to detect changed in R.txt for each library and recompile the project when that happens. Also fixed a potential NPE when building libraries! Change-Id: I6a87e9c3a4984e5aa6401270cf83eaea74044c9f
* Cache applicable issue lists per scope setTor Norbye2012-09-271-0/+1
| | | | | | | | | | Keep sets of applicable issues for each scope set. This should make incremental lint slightly more efficient. Also add a check that icon file extensions match the actual file format. Change-Id: I4a7f5e19b91aa3613480aa831ec42065528f02d3
* Ensure that themes are always style-prefixedTor Norbye2012-09-251-1/+1
| | | | | | Plus a few other minor tweaks/bug fixes Change-Id: Ic02db9123674ebfbc8977a94d1da4826ec13fb9b
* traceview: Fix check for upper case characters.Siva Velusamy2012-09-241-0/+11
| | | | | | Fixes http://code.google.com/p/android/issues/detail?id=37779 Change-Id: I8c1671d24caed3156b98dcb36d345c0eb1f573d7
* Merge "Add allowBackup lint security check"Tor Norbye2012-09-211-0/+1
|\
| * Add allowBackup lint security checkTor Norbye2012-09-211-0/+1
| | | | | | | | Change-Id: I3b79bef6981d880fe6a545429754e03bd384645c
* | Merge "Move some utility functions from AdtUtils to common"Siva Velusamy2012-09-212-0/+220
|\ \
| * | Move some utility functions from AdtUtils to commonSiva Velusamy2012-09-202-0/+220
| |/ | | | | | | Change-Id: Ia6f5c55e07c7f60712472c8e850b7c4595c46671
* | Merge "Validate user edits in XML files"Tor Norbye2012-09-201-0/+3
|\ \
| * | Validate user edits in XML filesTor Norbye2012-09-201-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Around ADT 15 or so we introduced a bunch of optimizations to run AAPT much less frequently, since with large projects it can take a long time, and end up blocking the UI if you try to save twice. Unfortunately, one side effect of this change is that if you edit only the *value* of an attribute, we will not re-run aapt, which means that if you set the value to a bogus value, you will get no error message until the next time AAPT runs (usually when you try to run). This changeset fixes this. We already have the attribute metadata which aapt uses, so now, when an XML file is changed and saved, we process it with an XML pull parser, and validate all the Android namespace attributes. If any are found to not be correct, then we request a full AAPT process, which will then display errors as appropriate. Change-Id: I374c19648e29c27c6d82616b3ee602cb2343cd3a
* | Merge "37497: Templates should escape string literals in resource files"Tor Norbye2012-09-202-1/+25
|\ \ | |/ |/|
| * 37497: Templates should escape string literals in resource filesTor Norbye2012-09-182-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user enters an activity title like "Android's Tools" in the new template wizard, an invalid strings.xml file is generated, since the apostrophe is not properly escaped. To fix this, there's a new string conversion method in the template engine, "escapeXmlString", which will perform all the necessary conversions. It also adds two other XML escaping functions: one to escape text to be suitable for XML attribute values, and one to be suitable for XML text values. Finally, when verifying this, I discovered that if I inserted ampersands in the MasterDetail template, I ended up with errors in various places there a filename was derived from the input string. To help make this work better, there's also a new "extractLetters" method which pulls all the characters out of a string (effectively stripping whitespace and punctuation). In addition to the above 4 new string conversion methods, the templates have been updated to use them, and the template format documentation updated. Change-Id: I4d4e854ab78d63bc86b8eb0fb9d92246534615e7
* | Generate smaller R classes for libraries.Xavier Ducrohet2012-09-182-0/+6
|/ | | | | | | | | | | | | | | | Using the new --output-text-symbols from aapt the build system now generates the R class for libraries manually based on the symbols exported by the libraries and the final values computed by aapt when using all the resource folders. Because only R.java is concerned, the Manifest class is now included in the library jar file. Also added a new test apps that uses instrumentation to verify the build system. Change-Id: Ic436ea8eb070844e9db8b3b2620fbf665839d40b
* Improvements to stacktrace handler for constructorsTor Norbye2012-09-181-0/+1
| | | | | | | | | | | | | | | | | This changeset improves the SourceRevealer for certain types of stacktraces: (1) Constructors. If your class initializes fields using code, these are logically grouped into the constructor, but the linenumbers do not fit the constructor source range. Before this CL, this would cause the revealer to show the constructor method rather than the field initialization line. (2) Class initializers. If you clicked on a class initializer method, the IDE would throw an NPE. There's now some special handling to deal with these. Change-Id: Ibb3b7dcf13a69018f75fd12648d1f6b5c45625cc
* Add labelFor lint checkTor Norbye2012-09-171-0/+3
| | | | Change-Id: If2b905197d5d81c6f98315a0d48ff37091e8282b
* Support separate layout editors for a single layout resourceTor Norbye2012-09-171-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset changes the "reuse" behavior of the layout editor to no longer reuse the same layout editor when you are switching between alternate layout files for the same layout resource, such as layout/foo.xml and layout-land/foo.xml. This lets you more quickly switch back and forth and inspect differences between the layouts, etc. There is also an option in the Android > Editors panel to turn on single editor sharing again. The biggest part of the changeset, by far, is a cleanup of the ConfigurationComposite class and associated code. This was necessary not just to support the above feature (where we need to "back out" UI changes when you've made a configuration edit which results in a different file getting opened), but it's also an important preparation for multi configuration editing, where we need to be able to switch configuration settings in and out of a single configuration editor, etc. The configuration data itself is now in a separate Configuration class; the UI is in ConfigurationChooser, and the configuration matching code is in ConfigurationMatcher. There's also a new Locale class to track language/region pairs instead of using 2-element ResourceQualifier arrays. The various menu listeners are also in separate UI classes now. While there are new classes, most of the configuration matching algorithm is unchanged, just moved to a new class and the UI syncing and configuration data lookup replaced. Bitmasks are used to handle configuration changes, such that updating multiple related attributes (e.g. a rendering target change also causes a theme change if say Holo isn't available) can now be processed just once with a single change call. (Various other cleanup too.) Change-Id: I04ac969f46824321be3db0c487ef077c03cc6012