aboutsummaryrefslogtreecommitdiffstats
path: root/sdkmanager/libs/sdklib/src/com/android
Commit message (Collapse)AuthorAgeFilesLines
...
* Unit test for XML with <extra old-path> attribute.Raphael Moll2011-09-013-7/+7
| | | | | | | | | | | | | | | 3 independant things here: - Added actual XML samples for XSD addon-3 and repo-5 that check we can validate and load the <extra old-paths>. - Fixed type in Extra package, new attribute should be named <old-paths>, not <old_paths>, for consistency. - Split the SdkRepositoryTest in 3 (repo + addon + capture handler) because it was started to get a bit large. Change-Id: I0ebfe862d5131a4fa214603e071576bc9108137f
* Repository XSD: System Images Packages.Raphael Moll2011-09-011-0/+64
| | | | | | | | | | The underlying idea is to split system images archives out of platforms, to reduce download size and be more flexible in the future. Code+unit tests are in a separate CL. Change-Id: I9598fcab2c74e696446ebd1f6fce03832bfb711f
* Test ExtraPackage old_path in SDK Manager diffRaphael Moll2011-09-011-5/+10
| | | | | | | | | One more unit-test, this time we check that when the SDK Manager updates its package list it properly identifies ExtraPackages that use the old_paths attribute as an update rather than a new package. Change-Id: I7d5a642ae3287f46a0194b9d4597206f85d2772c
* SDK Manager: Unit tests for ArchiveInstaller.Raphael Moll2011-09-015-89/+287
| | | | Change-Id: I77b369a5bd3bb81da09f6e509b67c635b7b2e2e9
* Repository XSD: New <old_paths> in Extra packages.Raphael Moll2011-09-018-38/+1136
| | | | | | | | | | | This has some basic unit tests to check the presence of the new schema, as well as path comparison done by the ExtraPackage. Tests for the ArchiveInstaller have been extracted in a different CL to reduce the clutter here. Change-Id: Iefadcbf950a56834ff09c0d1ce689411957b666e
* Findbugs cleanup in sdkmanager projectsMichael Zoech2011-08-291-4/+5
| | | | Change-Id: Ie9cd51cbec851667954b672a8dadd345aee7a71f
* SDK Manager: Fix log printf calls.Raphael Moll2011-08-263-22/+29
| | | | | | | | | | | | The SDK manager used to have log(String) calls which were replaced by log(printfFormat, printfArgs..) calls in R12. In a few places, we pass a string to the printf format that comes from some user variable or URL or another method and this string might contain % occurences that should not be taken as formatters. Change-Id: Ida29a18ba70d869a4f9d66f1d66edc010d9ec62d
* Remove some more obsolete code. again.Xavier Ducrohet2011-08-231-137/+0
| | | | Change-Id: If15a8521f6efc25e31cf64d984a0279fd3b153e6
* Rename default.prop/build.prop to project.prop/ant.propXavier Ducrohet2011-08-233-74/+159
| | | | | | | Opening projects in Eclipse will rename the file and "android update project" will do the same. Change-Id: I251881897c251eb07c9704eb9c2448cab47e5b83
* Remove more obsolete code.Xavier Ducrohet2011-08-235-1416/+0
| | | | Change-Id: Ib610456aab10991818c18cd01d8680c9dc3ccd14
* Remove unused export project feature.Xavier Ducrohet2011-08-232-48/+1
| | | | Change-Id: Ia40c3ff899c2641ab18c3aaad6edbc0856a0534e
* Modify android create/update project to deal with new build.xmlXavier Ducrohet2011-08-221-61/+140
| | | | | | | | | | | New mechanism to embed a build version into build.xml to figure out whether the build.xml file is obsolete or not. Use the version-tag: custom case to prevent erase user modifications. Fixed some issues with the name of the project (put in build.xml) for test projects which don't have any activity. Change-Id: Ib0333d15ca9558fffe24a718e704fcf4176c9014
* SDK: Expose Layoutlib Version through IAndroidTarget.Raphael Moll2011-08-182-11/+111
| | | | | | | | | This changes PlatformTarget to parse the Layoutlib Version (API + revision) stored by the SDK Manager in the source.properties of the platform on disk. Then this introduces an helper method in SdkManager to find the highest available layoutlib version. Change-Id: I94990dabed6c7e5ad3f8f06ff3b16696edca8653
* New library project mechanism.Xavier Ducrohet2011-08-175-16/+56
| | | | | | | | | | | | | | | | Libraries now generate a jar file that is used by the projects referencing them, instead of having the main projects compile the library source code themselves. This means we can remove the link mechanism that created linked folder in ADT and instead use a container that is lazily initalized to be all the jar files of the libraries. Also merged all 3 Ant build files (main_rules, lib_rules, test_rules) into a single build.xml that can build any kind of projects. Lot's of improvement in there too. Much cleaner. Change-Id: I98307e25cd76722e8595938528e6ef57a7e226ad
* Fix SdkLib unit test to not print on stderr.Raphael Moll2011-08-121-1/+26
| | | | | | | | | The SdkLib unit tests had the annoying side effect of writing an XML schema validation error on stderr. This patch uses an XML Error Handler to capture the error and actually test for it too. Change-Id: I129804c6f9cb4ba3dfc25db4f3313553fb01df63
* Add-ons do not support codenames.Raphael Moll2011-08-125-14/+6
| | | | | | | | | | | There was a typo in the repository XSD and the addon XSD that had an optional 'codename' element to the addon type. Since it's optional and (should have) never beend used, it's safe to remove it and document why we're removing it without spinning a new XSD version. Also added a unit-test to enforce it's invalid to have. Change-Id: Id3c5725c022d86ac0f46532efe25ac5c000c1af7
* SDK Manager: don't retry source if http auth canceled by user.Raphael Moll2011-08-123-25/+42
| | | | | | | | | | This fixes a minor workflow issue the case of an SDK source using a Basic HTTP Auth: if the user cancels the login dialog, we don't try to be smart and try alternate URLs. It actually means the URL was just fine but the user didn't want to authenticate. Change-Id: If85dc2e01e30ff26decb78088bd912da785a89f9
* Cleanup a few warnings in SdkLib.Raphael Moll2011-08-119-43/+73
| | | | Change-Id: Ie8429f077b7e3a2a7166b6fcd7b9454c9bc47088
* Add support for authenticated add-on servers.Pablo Leite2011-08-116-36/+246
| | | | | | | | | | | Displays a login prompt if necessary. Note: This code depends on Apache http-client libraries. Build files had been modified in order to add this dependency. http-client libraries had also be added on prebuilt project. prebuilt changeID=I084d78dd09a431bc3a2d77e77810b84c693bdcb7 GerritLink=https://review.source.android.com/#change,23387 Change-Id: Icada9b41a21fe3aacef9a1eff209a3fe5591a4e0
* SDK Manager: Fix display of Archive sizes.Raphael Moll2011-07-291-4/+16
| | | | | | SDK Issue: 18875 Change-Id: I702e11cff07bded8e90d415541040fc06ceb7d49
* Style: space after synchronized (object) {...}Raphael Moll2011-07-271-10/+10
| | | | | | | | For keywords such as if, for, while, we put a space between the keyword and the expression. Same should go for synchronized (object) {}. Change-Id: I5b145912f9346e3f4d8367865c2729abea68fdbc
* SDK Manager2: Revamp progress bar handling.Raphael Moll2011-07-275-17/+169
| | | | Change-Id: Ic5751f5c86f7cd4cf31927d83368a7fcb432e216
* SDK Man2: Clear local source caches when reloading.Raphael Moll2011-07-261-0/+16
| | | | Change-Id: I984ae397ada014ff8869d5775be1bc779ef22319
* SDK Manager2: revamp package diff logic.Raphael Moll2011-07-259-0/+446
| | | | | | | | | | | | | | This revamps the diff algorithm used to merge the local and remote packages found during a repository load into the PkgItems displayed in the tree viewer. FYI all the Package and Archive sub-classes are getting an equals() and hashCode() methods to make them behave correctly when put it in a HashTable or Set. These are the auto-generated stuff from Eclipse. Change-Id: I1494a0ed44cd768eed252e3a81b9e74bf86d563c
* Merge "SDK Manager 2: incremental sort when sorting by source + UT"Raphael Moll2011-07-202-2/+12
|\
| * SDK Manager 2: incremental sort when sorting by source + UTRaphael Moll2011-07-162-2/+12
| | | | | | | | | | | | | | | | Also fixes some edge cases with the sort-by-api and ensure switching between sorts doesn't mess too much with the packages shown. Change-Id: I7da43915f4e48bd6cd80760a6a15d657777fa0f7
* | Android project's output for JDT is now bin/classes/Xavier Ducrohet2011-07-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This matches the bin structure of the Ant build system where the javac output is in bin/classes/ and the Android specific files are in bin/ Also, this will allow us better control of android output files as they won't conflict with javac's output. New projects are created with this setup and existing projects are converted as they are opened. Change-Id: I83339906b0d43d7a988a75927c60b664c183d27f
* | Merge "Read the default skin from sdk.properties."Xavier Ducrohet2011-07-172-2/+12
|\ \ | |/ |/|
| * Read the default skin from sdk.properties.Xavier Ducrohet2011-07-172-2/+12
| | | | | | | | Change-Id: Ifad6f2186e499f579df1608055dda4eca1084830
* | SdkManager: fix issue with double-packages on reload.Raphael Moll2011-07-131-1/+4
|/ | | | | | | Rewrote the merge in place + sort of packages by API. Did some refactoring + added some unit tests. Change-Id: I168b306853185866606ed76c324a8db6051b15bb
* Add "android create avd --abi" parameter.Raphael Moll2011-07-081-5/+3
| | | | | | SDK bug 4965341 Change-Id: Iaff42d1272a9c10ba62534c5d478e35e6c2df6e5
* SdkManager2: fixes for asynchronous sources UI.Raphael Moll2011-06-302-1/+19
| | | | | | | | | - Properly refresh display list when installing/deleting a package. - Gray install/delete buttons during an install/delete to avoid nesting operations. Change-Id: I72fdca1252c447b046040afb70e67dfae77188e4
* Sdkman2: Load sources asynchronously.Raphael Moll2011-06-262-51/+70
| | | | Change-Id: Ic79b987ce8594e7bfe30b32e961b9384e2538b6b
* Sdkman2: Simplify packages names, fix extra package sort.Raphael Moll2011-06-232-20/+75
| | | | | | | | | | | | | Simplify package names when sorted by API, that is don't repeat "API nn" or "Android x.y" in the package names if it matches to category. Fix sorting of packages to properly sort extras by vendor+path. The previous sort was broken as it was making the revision number more important than the vendor+path for extras. Change-Id: I51ed0114ab9c77ef5d94710fc2449e5be9cd2ad9
* Add cpu.model to AVD running armeabi-v7a system images.Xavier Ducrohet2011-06-163-18/+31
| | | | Change-Id: I5b97b115ada432e284ad2dd3c69bcf7009677aec
* Properly handle CPU Arch/ABI in AVDs.Xavier Ducrohet2011-06-105-56/+44
| | | | | | | | | | | | | | | | | | | | | When we introduced x86 support in the tree there was no generic emulator exe able to act as a launcher to the -arm and -x86 versions of the emulator. This exe is now present and packaged with the SDK, so we remove the code to launch either arch specific version and instead make the AVD Manager and ADT simply launch the normal emulator once again. (This has the side effect of making ADT 12 able to run on Tools r11 and below.) For this to run though, hw.cpu.arch must be set in the AVD if the arch is not arm. The new AVD manager sets this properly. Also fixed some issues from my previous fix to the hardware property. Now the list contains all of them but there's a isValidForUi that's used to not show up some prop in the UI. Change-Id: I7a264a59cb3c5051ff62f6103da9663c7b7eb22f
* Make String-based hw prop not recognized.Xavier Ducrohet2011-06-101-3/+11
| | | | | | | | | Currently all those strings aren't set to be viewed by the user in the AVD UI so we ignore them. In the future we should use a specific flag to ignore some (like avd.name) and allow others. Change-Id: Icab59bcc0b97c14fa14b786c737457434b7f51ac
* do not package .scala files as resourcesMatthias Granberry2011-06-061-0/+1
| | | | Change-Id: I8b0ac703fd60517f8c7857e7f7ce316e08ab51be
* Repository XML for R12: layoutlib version for addons.Raphael Moll2011-05-259-76/+241
| | | | Change-Id: I5e68225ae8fb12a845e1eeec7412bf0bf7d9d676
* Merge "Add support for addon providing their own layoutlib and/or res."Xavier Ducrohet2011-05-254-6/+79
|\
| * Add support for addon providing their own layoutlib and/or res.Xavier Ducrohet2011-05-254-6/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During addon parsing, the SDK Manager will detect whether the addon has: - data/layoutlib.jar - data/res/ - data/fonts/ if the first one is present, then it is used during rendering. if *both* the 2nd and 3rd ones are present, then addon resources are used during rendering. On the GLE side, all that's needed is adding addons to the list of rendering targets if they have either library or resources (or both). Change-Id: Id16925eea2c98b9fbaaa884ac6fd8c1c1c444db2
* | Fix flaky SdkRepository test.Raphael Moll2011-05-253-22/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | It seems like class.getResourceAsStream throws a NullPointerException on the test machines whereas it returns null (as documented) other times when the resource is not found. This patch refactors 2 duplicated getXsdStream methods in the base RepoConstants and adjusts to take both behaviors into account. Change-Id: Ieefd92a006efda30828b8043e39f6b7e904bc53f
* | Prevent 'make sdk_repo' from picking up future schemas.Raphael Moll2011-05-245-2/+43
| | | | | | | | Change-Id: I749f4727b4c257ef5a6177b05727f5944d5d81ed
* | Merge "New Repository XSD for R12."Raphael Moll2011-05-2410-15/+1006
|\ \ | |/ |/|
| * New Repository XSD for R12.Raphael Moll2011-05-2410-15/+1006
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This add a new schema sdk-repository-4 with the following changes: - <extra> element now has a <project-files> element that contains 1 or or more <path>, each indicating the relative path of a file that this package can contribute to installed projects. - <platform> element now has a mandatory <layoutlib> that indicates the API and revision of that layout library for this particular platform. There's also a matching sdk-addon-2 schema with the same modification to the <extra> element. Change-Id: Id74a5d09dfa36d65f11b9d60a82fe8ba4119eb34
* | Use sdklib.OsHelper in AddCompatibilityJarAction.Raphael Moll2011-05-243-16/+78
|/ | | | | | | | | | | | | ADT's AddCompatibilityJarAction defined 2 new generic useful methods, copyFile and isSameFile. SdkLib already had an OsHelper.copyFile, so I moved that class to a more generic sdklib.io package and added the new method isSameFile. Another suitable candidate would have been io.FileWrapper in the common project. Change-Id: If310e09af112c5f4d87a253b35e67e4f5adb34da
* SdkMan2: Use IDE's log when available.Raphael Moll2011-05-201-8/+41
| | | | Change-Id: Iede7f4f9c1a7bbfbdcbb096f489616478ba94465
* Basic fragment supportTor Norbye2011-05-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | This changeset adds preliminary support for fragments: * Add <fragment> to the palette, along with a drop handler which pops up a class chooser to pick the Fragment class; all project implementations of android.app.Fragment and android.support.v4.app.Fragment are listed. * Adds a fragment descriptor such that code completion works for <fragment> elements * Fix project callback such that it does not complain about a missing class "fragment". * Fix outline to display the name of the fragment rather than the fragment tag name. * This changeset also centers the label in MockViews since those are still used to render fragments Change-Id: I6e062970b335d9c95870f181ed408960978c423e
* SdkManager: handle missing platforms/ and add-ons/ folders.Raphael Moll2011-05-021-15/+29
| | | | | | | | | | | | | | | | | | | | | A while ago, when we were dealing with monolithics SDKs, the strategy was that we wanted to make sure that the 'android' command was invoked from a properly setup SDK folder. Consequently the SdkManager required at least the platforms/ and add-ons/ folders to be present, even if empty. I don't think that behavior is really necessary anymore. The 'android' tool is invoked with knowledge from its tools folder, so we can safely assume the top parent is "the SDK folder" and create these directories if they are missing. We do however try to create them as early as possible if they are missing, so that the tool aborts early if we can't create them. The other alternative would be to just try to create them when we're actually installing a package. Change-Id: I8ea58f23add89c2dac0a22142f6fb5e71b8203aa
* Fix SdkManager unit tests. Refactor AvdInfo.Raphael Moll2011-04-282-337/+406
| | | | | | | | | | | | | | | | | | | | | | | | A couple issues with the current unit tests: - It was correctly allocating a temporary SDK folder. - It was correctly creating temporary AVDs in a temp folder. - However it was still using the regular AVD root for the AVD ini files and leaving them behind. - Minor windows dir-sep issue. This replaces the SdkManagerTestUtils class by a new base TestClass specific to SDK testing that creates both the temporary SDK and AVD manager and correctly overrides the AVD root. One issue is that we have different ways to find what the correct AVD Root is and the default paths used for an AvdInfo where setup using static methods, making them impossible to override in unit tests. This refactors AvdInfo out of AvdManager and most important there's a single non-static method, AvdManager.getBaseAvdFolder(), that is used to know where AVDs should be stored. Change-Id: I4270203f52de15ca9418e9b4f1bf61dbc843c218