OSDN Git Service

Move Pair and annoatations into resources.jar now renamed as common.jar
authorXavier Ducrohet <xav@android.com>
Fri, 28 Jan 2011 23:18:32 +0000 (15:18 -0800)
committerXavier Ducrohet <xav@android.com>
Sat, 29 Jan 2011 00:45:05 +0000 (16:45 -0800)
Move all the resource query methods that returned an array of 2 Strings
to return a pair of ResourceType and String.

Change-Id: I6b8447aa27005de786e2defef81ad88a72363523

69 files changed:
common/.classpath [moved from resources/.classpath with 100% similarity]
common/.gitignore [moved from resources/.gitignore with 100% similarity]
common/.project [moved from resources/.project with 93% similarity]
common/Android.mk [moved from resources/Android.mk with 96% similarity]
common/README.txt [new file with mode: 0644]
common/src/com/android/annotations/Nullable.java [moved from sdkmanager/libs/sdklib/src/com/android/sdklib/annotations/Nullable.java with 96% similarity]
common/src/com/android/annotations/VisibleForTesting.java [moved from sdkmanager/libs/sdklib/src/com/android/sdklib/annotations/VisibleForTesting.java with 97% similarity]
common/src/com/android/resources/Density.java [moved from resources/src/com/android/resources/Density.java with 100% similarity]
common/src/com/android/resources/DockMode.java [moved from resources/src/com/android/resources/DockMode.java with 100% similarity]
common/src/com/android/resources/Keyboard.java [moved from resources/src/com/android/resources/Keyboard.java with 100% similarity]
common/src/com/android/resources/KeyboardState.java [moved from resources/src/com/android/resources/KeyboardState.java with 100% similarity]
common/src/com/android/resources/Navigation.java [moved from resources/src/com/android/resources/Navigation.java with 100% similarity]
common/src/com/android/resources/NavigationState.java [moved from resources/src/com/android/resources/NavigationState.java with 100% similarity]
common/src/com/android/resources/NightMode.java [moved from resources/src/com/android/resources/NightMode.java with 100% similarity]
common/src/com/android/resources/ResourceEnum.java [moved from resources/src/com/android/resources/ResourceEnum.java with 100% similarity]
common/src/com/android/resources/ResourceType.java [moved from resources/src/com/android/resources/ResourceType.java with 100% similarity]
common/src/com/android/resources/ScreenOrientation.java [moved from resources/src/com/android/resources/ScreenOrientation.java with 100% similarity]
common/src/com/android/resources/ScreenRatio.java [moved from resources/src/com/android/resources/ScreenRatio.java with 100% similarity]
common/src/com/android/resources/ScreenSize.java [moved from resources/src/com/android/resources/ScreenSize.java with 100% similarity]
common/src/com/android/resources/TouchScreen.java [moved from resources/src/com/android/resources/TouchScreen.java with 100% similarity]
common/src/com/android/util/Pair.java [moved from sdkmanager/libs/sdklib/src/com/android/sdklib/util/Pair.java with 99% similarity]
eclipse/plugins/com.android.ide.eclipse.adt/.classpath
eclipse/plugins/com.android.ide.eclipse.adt/META-INF/MANIFEST.MF
eclipse/plugins/com.android.ide.eclipse.adt/build.properties
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/IClientRulesEngine.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/api/MenuAction.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/AbsoluteLayoutRule.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseLayoutRule.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/FrameLayoutRule.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/RelativeLayoutRule.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/ProjectCallback.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ExtractIncludeAction.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/IncludeFinder.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/IncludeOverlay.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/OutlinePage.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PaletteControl.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PlayAnimationMenu.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/PreviewIconFactory.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/ViewMetadataRepository.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/xml/Hyperlinks.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/CompiledResourcesMonitor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/resources/manager/ProjectResources.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newxmlfile/NewXmlFileCreationPage.java
eclipse/plugins/com.android.ide.eclipse.tests/.classpath
eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/tests/functests/layoutRendering/ApiDemosRenderingTest.java
eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/BaseLayoutRuleTest.java
eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/RelativeLayoutRuleTest.java
eclipse/scripts/create_adt_symlinks.sh
ide_common/.classpath
ide_common/Android.mk
ide_common/src/com/android/ide/common/rendering/LayoutLibrary.java
ide_common/src/com/android/ide/common/rendering/legacy/LegacyCallback.java [moved from ide_common/src/com/android/ide/common/rendering/legacy/ILegacyCallback.java with 53% similarity]
layoutlib_api/.classpath
layoutlib_api/Android.mk
layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java
resources/README.txt [deleted file]
sdkmanager/app/etc/manifest.txt
sdkmanager/libs/sdklib/.classpath
sdkmanager/libs/sdklib/src/Android.mk
sdkmanager/libs/sdklib/src/com/android/sdklib/SdkManager.java
sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/AddonPackage.java
sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/AddonsListFetcher.java
sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/LocalSdkParser.java
sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/PlatformPackage.java
sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/PlatformToolPackage.java
sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/SdkAddonSource.java
sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/SdkRepoSource.java
sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/SdkSource.java
sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/ToolPackage.java

similarity index 100%
rename from resources/.classpath
rename to common/.classpath
similarity index 100%
rename from resources/.gitignore
rename to common/.gitignore
similarity index 93%
rename from resources/.project
rename to common/.project
index 36b452a..3a7717d 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-       <name>resources</name>
+       <name>common</name>
        <comment></comment>
        <projects>
        </projects>
similarity index 96%
rename from resources/Android.mk
rename to common/Android.mk
index 5027a01..aa2ba8e 100644 (file)
@@ -20,7 +20,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under,src)
 
 LOCAL_JAVA_LIBRARIES := \
 
-LOCAL_MODULE := resources
+LOCAL_MODULE := common
 
 LOCAL_MODULE_TAGS := optional
 
diff --git a/common/README.txt b/common/README.txt
new file mode 100644 (file)
index 0000000..d4c6232
--- /dev/null
@@ -0,0 +1,14 @@
+common.jar contains resource configuration enums. It is used by various tools, but also
+by layoutlib.jar
+
+Layoutlib.jar is built from frameworks/base.git and therefore is versioned with the platform.
+
+IMPORTANT NOTE REGARDING CHANGES IN common.jar:
+
+- The API must stay compatible. This is because while layoutlib.jar compiles against it,
+  the client provides the implementation and must be able to load earlier versions of layoutlib.jar.
+
+- Updated version of common should be copied to the current in-dev branch of
+  prebuilt/common/common/common-prebuilt.jar
+  The PREBUILT file in the same folder must be updated as well to reflect how to rebuild this
+  prebuilt jar file.
\ No newline at end of file
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.sdklib.annotations;
+package com.android.annotations;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.sdklib.annotations;
+package com.android.annotations;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.sdklib.util;
+package com.android.util;
 
 /**
  * A Pair class is simply a 2-tuple for use in this package. We might want to
index 0e42f20..7a693db 100644 (file)
@@ -12,7 +12,7 @@
        <classpathentry kind="lib" path="libs/sdklib.jar" sourcepath="/SdkLib"/>
        <classpathentry kind="lib" path="libs/sdkstats.jar" sourcepath="/SdkStatsService"/>
        <classpathentry kind="lib" path="libs/sdkuilib.jar" sourcepath="/SdkUiLib"/>
-       <classpathentry kind="lib" path="libs/resources.jar"/>
+       <classpathentry kind="lib" path="libs/common.jar" sourcepath="/common"/>
        <classpathentry combineaccessrules="false" kind="src" path="/ddmlib"/>
        <classpathentry combineaccessrules="false" kind="src" path="/ddmuilib"/>
        <classpathentry kind="output" path="bin"/>
index 0409880..bea92fe 100644 (file)
@@ -13,7 +13,7 @@ Bundle-ClassPath: .,
  libs/kxml2-2.3.0.jar,
  libs/layoutlib_api.jar,
  libs/ide_common.jar,
- libs/resources.jar
+ libs/common.jar
 Bundle-Activator: com.android.ide.eclipse.adt.AdtPlugin
 Bundle-Vendor: The Android Open Source Project
 Require-Bundle: com.android.ide.eclipse.ddms,
@@ -47,7 +47,8 @@ Require-Bundle: com.android.ide.eclipse.ddms,
  org.eclipse.ltk.ui.refactoring,
  org.eclipse.core.expressions
 Eclipse-LazyStart: true
-Export-Package: com.android.ide.common.api;x-friends:="com.android.ide.eclipse.tests",
+Export-Package: com.android.annotations;x-friends:="com.android.ide.eclipse.tests",
+ com.android.ide.common.api;x-friends:="com.android.ide.eclipse.tests",
  com.android.ide.common.layout;x-friends:="com.android.ide.eclipse.tests",
  com.android.ide.common.log;x-friends:="com.android.ide.eclipse.tests",
  com.android.ide.common.rendering;x-friends:="com.android.ide.eclipse.tests",
@@ -110,7 +111,6 @@ Export-Package: com.android.ide.common.api;x-friends:="com.android.ide.eclipse.t
  com.android.prefs;x-friends:="com.android.ide.eclipse.tests",
  com.android.resources;x-friends:="com.android.ide.eclipse.tests",
  com.android.sdklib;x-friends:="com.android.ide.eclipse.tests",
- com.android.sdklib.annotations;x-friends:="com.android.ide.eclipse.tests",
  com.android.sdklib.build;x-friends:="com.android.ide.eclipse.tests",
  com.android.sdklib.internal.avd;x-friends:="com.android.ide.eclipse.tests",
  com.android.sdklib.internal.build;x-friends:="com.android.ide.eclipse.tests",
@@ -128,6 +128,7 @@ Export-Package: com.android.ide.common.api;x-friends:="com.android.ide.eclipse.t
  com.android.sdkuilib.internal.widgets;x-friends:="com.android.ide.eclipse.tests",
  com.android.sdkuilib.repository;x-friends:="com.android.ide.eclipse.tests",
  com.android.sdkuilib.ui;x-friends:="com.android.ide.eclipse.tests",
+ com.android.util;x-friends:="com.android.ide.eclipse.tests",
  org.apache.commons.compress.archivers;x-friends:="com.android.ide.eclipse.tests",
  org.apache.commons.compress.archivers.ar;x-friends:="com.android.ide.eclipse.tests",
  org.apache.commons.compress.archivers.cpio;x-friends:="com.android.ide.eclipse.tests",
index 9eb0d29..96d191e 100644 (file)
@@ -7,7 +7,8 @@ bin.includes = plugin.xml,\
                libs/,\
                about.properties,\
                NOTICE,\
-               about.html
+               about.html,\
+               libs/common.jar
 source.. = src/
 output.. = bin/
 bin.excludes = libs/.gitignore
index 6a01e8a..4f91552 100755 (executable)
@@ -17,7 +17,7 @@
 
 package com.android.ide.common.api;
 
-import com.android.sdklib.annotations.Nullable;
+import com.android.annotations.Nullable;
 
 /**
  * A Client Rules Engine is a set of methods that {@link IViewRule}s can use to
index f0005cc..2fa20ea 100644 (file)
@@ -28,7 +28,7 @@ import com.android.ide.common.api.INodeHandler;
 import com.android.ide.common.api.IViewRule;
 import com.android.ide.common.api.Point;
 import com.android.ide.common.api.Rect;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import java.util.Map;
 
index 69548c3..91110cb 100644 (file)
@@ -32,7 +32,7 @@ import com.android.ide.common.api.Point;
 import com.android.ide.common.api.Rect;
 import com.android.ide.common.api.IAttributeInfo.Format;
 import com.android.ide.common.api.IDragElement.IDragAttribute;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import java.util.Arrays;
 import java.util.HashMap;
index ef0be13..1054c56 100755 (executable)
@@ -26,7 +26,7 @@ import com.android.ide.common.api.INodeHandler;
 import com.android.ide.common.api.IViewRule;
 import com.android.ide.common.api.Point;
 import com.android.ide.common.api.Rect;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import java.util.Map;
 
index 194ac41..b80f2ec 100755 (executable)
@@ -50,7 +50,7 @@ import com.android.ide.common.api.Point;
 import com.android.ide.common.api.Rect;
 import com.android.ide.common.api.IAttributeInfo.Format;
 import com.android.ide.common.api.INode.IAttribute;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import java.util.ArrayList;
 import java.util.Collections;
index 824d0e1..976dfaf 100644 (file)
@@ -18,7 +18,7 @@ package com.android.ide.eclipse.adt.internal.editors.layout;
 
 import com.android.ide.common.rendering.api.IProjectCallback;
 import com.android.ide.common.rendering.api.LayoutLog;
-import com.android.ide.common.rendering.legacy.ILegacyCallback;
+import com.android.ide.common.rendering.legacy.LegacyCallback;
 import com.android.ide.eclipse.adt.AdtPlugin;
 import com.android.ide.eclipse.adt.AndroidConstants;
 import com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper;
@@ -27,6 +27,7 @@ import com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources;
 import com.android.resources.ResourceType;
 import com.android.sdklib.SdkConstants;
 import com.android.sdklib.xml.ManifestData;
+import com.android.util.Pair;
 
 import org.eclipse.core.resources.IProject;
 
@@ -41,7 +42,7 @@ import java.util.TreeSet;
  * <p/>This implements {@link IProjectCallback} for the old and new API through
  * {@link ILegacyCallback}
  */
-public final class ProjectCallback implements ILegacyCallback {
+public final class ProjectCallback extends LegacyCallback {
 
     private final HashMap<String, Class<?>> mLoadedClasses = new HashMap<String, Class<?>>();
     private final Set<String> mMissingClasses = new TreeSet<String>();
@@ -205,7 +206,7 @@ public final class ProjectCallback implements ILegacyCallback {
         return mNamespace;
     }
 
-    public String[] resolveResourceValue(int id) {
+    public Pair<ResourceType, String> resolveResourceId(int id) {
         if (mProjectRes != null) {
             return mProjectRes.resolveResourceValue(id);
         }
@@ -213,7 +214,7 @@ public final class ProjectCallback implements ILegacyCallback {
         return null;
     }
 
-    public String resolveResourceValue(int[] id) {
+    public String resolveResourceId(int[] id) {
         if (mProjectRes != null) {
             return mProjectRes.resolveResourceValue(id);
         }
@@ -221,14 +222,7 @@ public final class ProjectCallback implements ILegacyCallback {
         return null;
     }
 
-    /**
-     * @deprecated use {@link #getResourceValue(ResourceType, String)} instead.
-     */
-    public Integer getResourceValue(String type, String name) {
-        return getResourceValue(ResourceType.getEnum(type), name);
-    }
-
-    public Integer getResourceValue(ResourceType type, String name) {
+    public Integer getResourceId(ResourceType type, String name) {
         if (mProjectRes != null) {
             return mProjectRes.getResourceValue(type, name);
         }
index 46ec8f3..8c2c956 100644 (file)
@@ -41,7 +41,7 @@ import com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElement
 import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
 import com.android.ide.eclipse.adt.internal.preferences.AdtPrefs;
 import com.android.ide.eclipse.adt.internal.wizards.newxmlfile.ResourceNameValidator;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
index e7a7fdf..9ca5ae7 100644 (file)
@@ -20,11 +20,13 @@ import static com.android.ide.eclipse.adt.AndroidConstants.EXT_XML;
 import static com.android.ide.eclipse.adt.AndroidConstants.WS_LAYOUTS;
 import static com.android.ide.eclipse.adt.AndroidConstants.WS_SEP;
 import static com.android.sdklib.SdkConstants.FD_LAYOUT;
+
 import static org.eclipse.core.resources.IResourceDelta.ADDED;
 import static org.eclipse.core.resources.IResourceDelta.CHANGED;
 import static org.eclipse.core.resources.IResourceDelta.CONTENT;
 import static org.eclipse.core.resources.IResourceDelta.REMOVED;
 
+import com.android.annotations.VisibleForTesting;
 import com.android.ide.eclipse.adt.AdtPlugin;
 import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors;
 import com.android.ide.eclipse.adt.internal.project.BaseProjectHelper;
@@ -37,7 +39,6 @@ import com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager.IR
 import com.android.ide.eclipse.adt.io.IFileWrapper;
 import com.android.resources.ResourceType;
 import com.android.sdklib.SdkConstants;
-import com.android.sdklib.annotations.VisibleForTesting;
 import com.android.sdklib.io.IAbstractFile;
 
 import org.eclipse.core.resources.IFile;
index 4870894..d7bc412 100755 (executable)
@@ -21,8 +21,10 @@ import static com.android.ide.common.layout.LayoutConstants.ATTR_SRC;
 import static com.android.ide.common.layout.LayoutConstants.ATTR_TEXT;
 import static com.android.ide.common.layout.LayoutConstants.DRAWABLE_PREFIX;
 import static com.android.ide.common.layout.LayoutConstants.LAYOUT_PREFIX;
+
 import static org.eclipse.jface.viewers.StyledString.QUALIFIER_STYLER;
 
+import com.android.annotations.VisibleForTesting;
 import com.android.ide.common.api.INode;
 import com.android.ide.common.api.InsertType;
 import com.android.ide.common.layout.BaseLayoutRule;
@@ -37,8 +39,7 @@ import com.android.ide.eclipse.adt.internal.editors.layout.gre.NodeProxy;
 import com.android.ide.eclipse.adt.internal.editors.layout.uimodel.UiViewElementNode;
 import com.android.ide.eclipse.adt.internal.editors.ui.ErrorImageComposite;
 import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
-import com.android.sdklib.annotations.VisibleForTesting;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.ActionContributionItem;
index fbf7167..fdc559d 100755 (executable)
@@ -50,7 +50,7 @@ import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
 import com.android.ide.eclipse.adt.internal.sdk.Sdk;
 import com.android.sdklib.IAndroidTarget;
 import com.android.sdklib.SdkConstants;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
index 79c68d9..3fcae86 100644 (file)
@@ -27,7 +27,7 @@ import com.android.ide.eclipse.adt.AdtPlugin;
 import com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditor;
 import com.android.ide.eclipse.adt.internal.wizards.newxmlfile.NewXmlFileWizard;
 import com.android.resources.ResourceType;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import org.eclipse.core.resources.IProject;
 import org.eclipse.jface.action.Action;
index a93c81e..2fb2ebe 100644 (file)
@@ -36,7 +36,7 @@ import com.android.ide.eclipse.adt.internal.editors.layout.gre.ViewMetadataRepos
 import com.android.ide.eclipse.adt.internal.editors.uimodel.UiDocumentNode;
 import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
 import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.jface.resource.ImageDescriptor;
index 049ac64..589ad2d 100644 (file)
@@ -27,7 +27,7 @@ import com.android.ide.eclipse.adt.AdtPlugin;
 import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.LayoutDescriptors;
 import com.android.ide.eclipse.adt.internal.editors.layout.descriptors.ViewElementDescriptor;
 import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
index 5225911..c6ca95e 100644 (file)
@@ -32,6 +32,7 @@ import static com.android.sdklib.xml.AndroidManifest.ATTRIBUTE_PACKAGE;
 import static com.android.sdklib.xml.AndroidManifest.NODE_ACTIVITY;
 import static com.android.sdklib.xml.AndroidManifest.NODE_SERVICE;
 
+import com.android.annotations.VisibleForTesting;
 import com.android.ide.common.rendering.api.ResourceValue;
 import com.android.ide.eclipse.adt.AdtPlugin;
 import com.android.ide.eclipse.adt.AndroidConstants;
@@ -51,9 +52,8 @@ import com.android.ide.eclipse.adt.io.IFileWrapper;
 import com.android.resources.ResourceType;
 import com.android.sdklib.IAndroidTarget;
 import com.android.sdklib.SdkConstants;
-import com.android.sdklib.annotations.VisibleForTesting;
 import com.android.sdklib.io.FileWrapper;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import org.apache.xerces.parsers.DOMParser;
 import org.apache.xerces.xni.Augmentations;
index 2233cab..295fd4c 100644 (file)
@@ -24,6 +24,7 @@ import com.android.ide.eclipse.adt.internal.resources.manager.GlobalProjectMonit
 import com.android.ide.eclipse.adt.internal.resources.manager.GlobalProjectMonitor.IProjectListener;
 import com.android.resources.ResourceType;
 import com.android.sdklib.xml.ManifestData;
+import com.android.util.Pair;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarkerDelta;
@@ -150,8 +151,8 @@ public final class CompiledResourcesMonitor implements IFileListener, IProjectLi
                         // create the maps to store the result of the parsing
                         Map<ResourceType, Map<String, Integer>> resourceValueMap =
                             new EnumMap<ResourceType, Map<String, Integer>>(ResourceType.class);
-                        Map<Integer, String[]> genericValueToNameMap =
-                            new HashMap<Integer, String[]>();
+                        Map<Integer, Pair<ResourceType, String>> genericValueToNameMap =
+                            new HashMap<Integer, Pair<ResourceType, String>>();
                         Map<IntArrayWrapper, String> styleableValueToNameMap =
                             new HashMap<IntArrayWrapper, String>();
 
@@ -181,7 +182,8 @@ public final class CompiledResourcesMonitor implements IFileListener, IProjectLi
      * @param resourceValueMap
      * @return True if we managed to parse the R class.
      */
-    private boolean parseClass(Class<?> rClass, Map<Integer, String[]> genericValueToNameMap,
+    private boolean parseClass(Class<?> rClass,
+            Map<Integer, Pair<ResourceType, String>> genericValueToNameMap,
             Map<IntArrayWrapper, String> styleableValueToNameMap, Map<ResourceType,
             Map<String, Integer>> resourceValueMap) {
         try {
@@ -205,8 +207,7 @@ public final class CompiledResourcesMonitor implements IFileListener, IProjectLi
                                         f.getName());
                             } else if (type == int.class) {
                                 Integer value = (Integer) f.get(null);
-                                genericValueToNameMap.put(value,
-                                        new String[] { f.getName(), resType.getName() });
+                                genericValueToNameMap.put(value, Pair.of(resType, f.getName()));
                                 fullMap.put(f.getName(), value);
                             } else {
                                 assert false;
index f0939da..64a36e1 100644 (file)
@@ -28,6 +28,7 @@ import com.android.ide.eclipse.adt.internal.sdk.Sdk;
 import com.android.ide.eclipse.adt.io.IFolderWrapper;
 import com.android.resources.ResourceType;
 import com.android.sdklib.io.IAbstractFolder;
+import com.android.util.Pair;
 
 import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IProject;
@@ -62,7 +63,7 @@ public class ProjectResources implements IResourceRepository {
     /** Map of (name, id) for resources of type {@link ResourceType#ID} coming from R.java */
     private Map<ResourceType, Map<String, Integer>> mResourceValueMap;
     /** Map of (id, [name, resType]) for all resources coming from R.java */
-    private Map<Integer, String[]> mResIdValueToNameMap;
+    private Map<Integer, Pair<ResourceType, String>> mResIdValueToNameMap;
     /** Map of (int[], name) for styleable resources coming from R.java */
     private Map<IntArrayWrapper, String> mStyleableValueToNameMap;
 
@@ -522,7 +523,7 @@ public class ProjectResources implements IResourceRepository {
      * @param id
      * @return an array of 2 strings { name, type } or null if the id could not be resolved
      */
-    public String[] resolveResourceValue(int id) {
+    public Pair<ResourceType, String> resolveResourceValue(int id) {
         if (mResIdValueToNameMap != null) {
             return mResIdValueToNameMap.get(id);
         }
@@ -922,7 +923,7 @@ public class ProjectResources implements IResourceRepository {
      * @param resourceValueMap a map of (name, id) for resources of type {@link ResourceType#ID}.
      * The list is acquired by the {@link ProjectResources} object.
      */
-    void setCompiledResources(Map<Integer, String[]> resIdValueToNameMap,
+    void setCompiledResources(Map<Integer, Pair<ResourceType, String>> resIdValueToNameMap,
             Map<IntArrayWrapper, String> styleableValueMap,
             Map<ResourceType, Map<String, Integer>> resourceValueMap) {
         mResourceValueMap = resourceValueMap;
index b20da44..03aed88 100644 (file)
@@ -38,7 +38,7 @@ import com.android.ide.eclipse.adt.internal.ui.ConfigurationSelector.Configurati
 import com.android.ide.eclipse.adt.internal.ui.ConfigurationSelector.SelectorMode;
 import com.android.sdklib.IAndroidTarget;
 import com.android.sdklib.SdkConstants;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
index b9a72c4..28377f7 100644 (file)
@@ -13,6 +13,6 @@
        <classpathentry kind="lib" path="/adt/libs/ninepatch.jar" sourcepath="/ninepatch"/>
        <classpathentry kind="lib" path="/adt/libs/sdklib.jar" sourcepath="/SdkLib"/>
        <classpathentry kind="lib" path="/adt/libs/sdkuilib.jar" sourcepath="/SdkUiLib"/>
-       <classpathentry kind="lib" path="/adt/libs/resources.jar"/>
+       <classpathentry kind="lib" path="/adt/libs/common.jar"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
index 3e66649..13d9a49 100644 (file)
@@ -39,12 +39,11 @@ import com.android.ide.eclipse.adt.internal.resources.manager.ProjectResources;
 import com.android.ide.eclipse.adt.internal.resources.manager.ResourceManager;
 import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
 import com.android.ide.eclipse.tests.SdkTestCase;
-import com.android.layoutlib.api.IXmlPullParser;
-import com.android.resources.ResourceType;
 import com.android.resources.Density;
 import com.android.resources.Keyboard;
 import com.android.resources.KeyboardState;
 import com.android.resources.Navigation;
+import com.android.resources.ResourceType;
 import com.android.resources.ScreenOrientation;
 import com.android.resources.ScreenRatio;
 import com.android.resources.ScreenSize;
@@ -52,6 +51,7 @@ import com.android.resources.TouchScreen;
 import com.android.sdklib.IAndroidTarget;
 import com.android.sdklib.SdkConstants;
 import com.android.sdklib.io.FolderWrapper;
+import com.android.util.Pair;
 
 import org.kxml2.io.KXmlParser;
 import org.xmlpull.v1.XmlPullParser;
@@ -68,7 +68,7 @@ import javax.imageio.ImageIO;
 public class ApiDemosRenderingTest extends SdkTestCase {
 
     /**
-     * Custom parser that implements {@link IXmlPullParser} (which itself extends
+     * Custom parser that implements {@link ILayoutPullParser} (which itself extends
      * {@link XmlPullParser}).
      */
     private final static class TestParser extends KXmlParser implements ILayoutPullParser {
@@ -94,7 +94,8 @@ public class ApiDemosRenderingTest extends SdkTestCase {
         // in some cases, the id that getResourceValue(String type, String name) returns
         // will be sent back to get the type/name. This map stores the id/type/name we generate
         // to be able to do the reverse resolution.
-        private Map<Integer, String[]> mResourceMap = new HashMap<Integer, String[]>();
+        private Map<Integer, Pair<ResourceType, String>> mResourceMap =
+            new HashMap<Integer, Pair<ResourceType, String>>();
 
         private boolean mCustomViewAttempt = false;
 
@@ -103,18 +104,6 @@ public class ApiDemosRenderingTest extends SdkTestCase {
             return "com.example.android.apis";
         }
 
-        public Integer getResourceValue(String type, String name) {
-            Integer result = ++mIdCounter;
-            mResourceMap.put(result, new String[] { name, type });
-            return result;
-        }
-
-        public Integer getResourceValue(ResourceType type, String name) {
-            Integer result = ++mIdCounter;
-            mResourceMap.put(result, new String[] { name, type.getName() });
-            return result;
-        }
-
         @SuppressWarnings("unchecked")
         public Object loadView(String name, Class[] constructorSignature, Object[] constructorArgs)
                 throws ClassNotFoundException, Exception {
@@ -122,11 +111,17 @@ public class ApiDemosRenderingTest extends SdkTestCase {
             return null;
         }
 
-        public String[] resolveResourceValue(int id) {
+        public Integer getResourceId(ResourceType type, String name) {
+            Integer result = ++mIdCounter;
+            mResourceMap.put(result, Pair.of(type, name));
+            return result;
+        }
+
+        public Pair<ResourceType, String> resolveResourceId(int id) {
             return mResourceMap.get(id);
         }
 
-        public String resolveResourceValue(int[] id) {
+        public String resolveResourceId(int[] id) {
             return null;
         }
 
index 8fac515..f914e5f 100644 (file)
@@ -23,7 +23,7 @@ import com.android.ide.common.api.IDragElement;
 import com.android.ide.common.api.INode;
 import com.android.ide.common.api.Rect;
 import com.android.ide.common.layout.BaseLayoutRule.AttributeFilter;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import java.util.Arrays;
 import java.util.HashMap;
index 8ccbb25..c0fa548 100644 (file)
@@ -21,7 +21,7 @@ import static com.android.ide.common.layout.LayoutConstants.ANDROID_URI;
 import com.android.ide.common.api.INode;
 import com.android.ide.common.api.Point;
 import com.android.ide.common.api.Rect;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import java.util.ArrayList;
 import java.util.List;
index 6b70bf4..949362e 100755 (executable)
@@ -16,7 +16,7 @@ BACK=`echo $DEST | sed 's@[^/]*@..@g'`
 
 mkdir -p $DEST
 
-LIBS="sdkstats androidprefs layoutlib_api ide_common ninepatch sdklib sdkuilib resources"
+LIBS="sdkstats androidprefs common layoutlib_api ide_common ninepatch sdklib sdkuilib"
 
 echo "make java libs ..."
 make -j3 showcommands $LIBS || die "ADT: Fail to build one of $LIBS."
index 9d91c20..89ce2dd 100644 (file)
@@ -4,6 +4,6 @@
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry combineaccessrules="false" kind="src" path="/layoutlib_api"/>
        <classpathentry kind="var" path="ANDROID_SRC/prebuilt/common/kxml2/kxml2-2.3.0.jar" sourcepath="/ANDROID_SRC/dalvik/libcore/xml/src/main/java"/>
-       <classpathentry combineaccessrules="false" kind="src" path="/resources"/>
+       <classpathentry combineaccessrules="false" kind="src" path="/common"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
index 2cb3f84..5316703 100644 (file)
@@ -20,7 +20,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under,src)
 
 LOCAL_JAVA_LIBRARIES := \
        layoutlib_api \
-       resources \
+       common \
        kxml2-2.3.0
 
 LOCAL_MODULE := ide_common
index 6fe7f10..e7ea32e 100644 (file)
@@ -28,7 +28,7 @@ import com.android.ide.common.rendering.api.Result;
 import com.android.ide.common.rendering.api.ViewInfo;
 import com.android.ide.common.rendering.api.Params.RenderingMode;
 import com.android.ide.common.rendering.api.Result.Status;
-import com.android.ide.common.rendering.legacy.ILegacyCallback;
+import com.android.ide.common.rendering.legacy.LegacyCallback;
 import com.android.ide.common.rendering.legacy.ILegacyPullParser;
 import com.android.ide.common.resources.ResourceResolver;
 import com.android.ide.common.sdk.LoadStatus;
@@ -65,7 +65,7 @@ import java.util.Map.Entry;
  * For client wanting to access both new and old (pre API level 5) layout libraries, it is
  * important that the following interfaces be used:<br>
  * {@link ILegacyPullParser} instead of {@link ILayoutPullParser}<br>
- * {@link ILegacyCallback} instead of{@link com.android.ide.common.rendering.api.IProjectCallback}.
+ * {@link LegacyCallback} instead of{@link com.android.ide.common.rendering.api.IProjectCallback}.
  * <p/>
  * These interfaces will ensure that both new and older Layout libraries can be accessed.
  */
 package com.android.ide.common.rendering.legacy;
 
 import com.android.ide.common.rendering.api.IProjectCallback;
+import com.android.resources.ResourceType;
+import com.android.util.Pair;
 
 /**
- * Intermediary interface extending both old and new project call back from the layout lib API.
+ * Intermediary class implementing parts of both the old and new project call back from the
+ * layout lib API.
  *
  * Clients should use this instead of {@link IProjectCallback} to target both old and new
  * Layout Libraries.
  *
  */
 @SuppressWarnings("deprecation")
-public interface ILegacyCallback extends com.android.ide.common.rendering.api.IProjectCallback,
+public abstract class LegacyCallback implements
+        com.android.ide.common.rendering.api.IProjectCallback,
         com.android.layoutlib.api.IProjectCallback {
+
+    // ------ implementation of the old interface using the new interface.
+
+    public final Integer getResourceValue(String type, String name) {
+        return getResourceId(ResourceType.getEnum(type), name);
+    }
+
+    public final String[] resolveResourceValue(int id) {
+        Pair<ResourceType, String> info = resolveResourceId(id);
+        return new String[] { info.getSecond(), info.getFirst().getName() };
+    }
+
+    public final String resolveResourceValue(int[] id) {
+        return resolveResourceId(id);
+    }
+
+    // ------
 }
index bae87a9..4095535 100644 (file)
@@ -3,6 +3,6 @@
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry kind="var" path="ANDROID_SRC/prebuilt/common/kxml2/kxml2-2.3.0.jar" sourcepath="/ANDROID_SRC/dalvik/libcore/xml/src/main/java"/>
-       <classpathentry combineaccessrules="false" kind="src" path="/resources"/>
+       <classpathentry combineaccessrules="false" kind="src" path="/common"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
index 4ebf1f6..30ce41b 100644 (file)
@@ -19,7 +19,7 @@ include $(CLEAR_VARS)
 LOCAL_SRC_FILES := $(call all-java-files-under,src)
 
 LOCAL_JAVA_LIBRARIES := \
-       resources \
+       common \
        kxml2-2.3.0
 
 LOCAL_MODULE := layoutlib_api
index aebc5a5..0ec214f 100644 (file)
@@ -17,6 +17,7 @@
 package com.android.ide.common.rendering.api;
 
 import com.android.resources.ResourceType;
+import com.android.util.Pair;
 
 /**
  * Callback for project information needed by the Layout Library.
@@ -49,10 +50,10 @@ public interface IProjectCallback {
      * <p/>The resource id is the value of a <code>R.&lt;type&gt;.&lt;name&gt;</code>, and
      * this method will return both the type and name of the resource.
      * @param id the Id to resolve.
-     * @return an array of 2 strings containing the resource name and type, or null if the id
-     * does not match any resource.
+     * @return a Pair of {@link ResourceType} and resource name, or null if the id
+     *     does not match any resource.
      */
-    String[] resolveResourceValue(int id);
+    Pair<ResourceType, String> resolveResourceId(int id);
 
     /**
      * Resolves the id of a resource Id of type int[]
@@ -61,7 +62,7 @@ public interface IProjectCallback {
      * @param id the Id to resolve.
      * @return the name of the resource or <code>null</code> if not found.
      */
-    String resolveResourceValue(int[] id);
+    String resolveResourceId(int[] id);
 
     /**
      * Returns the id of a resource.
@@ -71,6 +72,5 @@ public interface IProjectCallback {
      * @param name the name of the resource
      * @return an Integer containing the resource Id, or <code>null</code> if not found.
      */
-    Integer getResourceValue(ResourceType type, String name);
-
+    Integer getResourceId(ResourceType type, String name);
 }
diff --git a/resources/README.txt b/resources/README.txt
deleted file mode 100644 (file)
index 9b90814..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-resources.jar contains resource configuration enums. It is used by various tools, but also
-by layoutlib.jar
-
-Layoutlib.jar is built from frameworks/base.git and therefore is versioned with the platform.
-
-IMPORTANT NOTE REGARDING CHANGES IN resources.jar:
-
-- The API must stay compatible. This is because while layoutlib.jar compiles against it,
-  the client provides the implementation and must be able to load earlier versions of layoutlib.jar.
-  This is true for all the classes under com.android.ide.common.rendering.api and
-  com.android.layoutlib.api although the latter is obsolete and should not be changed at all.
-
-- Updated version of layoutlib_api should be copied to the current in-dev branch of
-  prebuilt/common/resources/resources-prebuilt.jar
-  The PREBUILT file in the same folder must be updated as well to reflect how to rebuild this
-  prebuilt jar file.
\ No newline at end of file
index 50f3e66..51845c7 100644 (file)
@@ -1,2 +1,2 @@
 Main-Class: com.android.sdkmanager.Main
-Class-Path: androidprefs.jar resources.jar sdklib.jar sdkuilib.jar org.eclipse.jface_3.4.2.M20090107-0800.jar org.eclipse.equinox.common_3.4.0.v20080421-2006.jar org.eclipse.core.commands_3.4.0.I20080509-2000.jar
+Class-Path: androidprefs.jar common.jar sdklib.jar sdkuilib.jar org.eclipse.jface_3.4.2.M20090107-0800.jar org.eclipse.equinox.common_3.4.0.v20080421-2006.jar org.eclipse.core.commands_3.4.0.I20080509-2000.jar
index b3528a4..174a804 100644 (file)
@@ -6,6 +6,6 @@
        <classpathentry combineaccessrules="false" kind="src" path="/AndroidPrefs"/>
        <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
        <classpathentry kind="var" path="ANDROID_SRC/prebuilt/common/commons-compress/commons-compress-1.0.jar"/>
-       <classpathentry combineaccessrules="false" kind="src" path="/resources"/>
+       <classpathentry combineaccessrules="false" kind="src" path="/common"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
index 3c91e88..37eda21 100644 (file)
@@ -21,7 +21,7 @@ LOCAL_JAVA_RESOURCE_DIRS := .
 LOCAL_JAR_MANIFEST := ../manifest.txt
 LOCAL_JAVA_LIBRARIES := \
         androidprefs \
-        resources \
+        common \
         commons-compress-1.0
 
 LOCAL_MODULE := sdklib
index 2920674..767e582 100644 (file)
@@ -21,7 +21,7 @@ import com.android.prefs.AndroidLocation.AndroidLocationException;
 import com.android.sdklib.AndroidVersion.AndroidVersionException;
 import com.android.sdklib.internal.project.ProjectProperties;
 import com.android.sdklib.io.FileWrapper;
-import com.android.sdklib.util.Pair;
+import com.android.util.Pair;
 
 import java.io.File;
 import java.io.FileInputStream;
index ab27561..9a90b2c 100755 (executable)
 \r
 package com.android.sdklib.internal.repository;\r
 \r
+import com.android.annotations.VisibleForTesting;\r
+import com.android.annotations.VisibleForTesting.Visibility;\r
 import com.android.sdklib.AndroidVersion;\r
 import com.android.sdklib.IAndroidTarget;\r
 import com.android.sdklib.SdkConstants;\r
 import com.android.sdklib.SdkManager;\r
 import com.android.sdklib.IAndroidTarget.IOptionalLibrary;\r
-import com.android.sdklib.annotations.VisibleForTesting;\r
-import com.android.sdklib.annotations.VisibleForTesting.Visibility;\r
 import com.android.sdklib.internal.repository.Archive.Arch;\r
 import com.android.sdklib.internal.repository.Archive.Os;\r
 import com.android.sdklib.repository.SdkRepoConstants;\r
index fcef972..9b8d808 100755 (executable)
@@ -16,8 +16,8 @@
 \r
 package com.android.sdklib.internal.repository;\r
 \r
-import com.android.sdklib.annotations.VisibleForTesting;\r
-import com.android.sdklib.annotations.VisibleForTesting.Visibility;\r
+import com.android.annotations.VisibleForTesting;\r
+import com.android.annotations.VisibleForTesting.Visibility;\r
 import com.android.sdklib.repository.SdkAddonsListConstants;\r
 \r
 import org.w3c.dom.Document;\r
index e0a6b21..9a2bf46 100755 (executable)
@@ -22,7 +22,7 @@ import com.android.sdklib.SdkConstants;
 import com.android.sdklib.SdkManager;\r
 import com.android.sdklib.internal.repository.Archive.Arch;\r
 import com.android.sdklib.internal.repository.Archive.Os;\r
-import com.android.sdklib.util.Pair;\r
+import com.android.util.Pair;\r
 \r
 import java.io.File;\r
 import java.io.FileInputStream;\r
index b8a8623..8dee635 100755 (executable)
 \r
 package com.android.sdklib.internal.repository;\r
 \r
+import com.android.annotations.VisibleForTesting;\r
+import com.android.annotations.VisibleForTesting.Visibility;\r
 import com.android.sdklib.AndroidVersion;\r
 import com.android.sdklib.IAndroidTarget;\r
 import com.android.sdklib.SdkConstants;\r
 import com.android.sdklib.SdkManager;\r
-import com.android.sdklib.annotations.VisibleForTesting;\r
-import com.android.sdklib.annotations.VisibleForTesting.Visibility;\r
 import com.android.sdklib.internal.repository.Archive.Arch;\r
 import com.android.sdklib.internal.repository.Archive.Os;\r
 import com.android.sdklib.repository.SdkRepoConstants;\r
index c31325f..860d703 100755 (executable)
 
 package com.android.sdklib.internal.repository;
 
+import com.android.annotations.VisibleForTesting;
+import com.android.annotations.VisibleForTesting.Visibility;
 import com.android.sdklib.SdkConstants;
 import com.android.sdklib.SdkManager;
-import com.android.sdklib.annotations.VisibleForTesting;
-import com.android.sdklib.annotations.VisibleForTesting.Visibility;
 import com.android.sdklib.internal.repository.Archive.Arch;
 import com.android.sdklib.internal.repository.Archive.Os;
 
index 049dad8..b79cc90 100755 (executable)
@@ -16,7 +16,7 @@
 \r
 package com.android.sdklib.internal.repository;\r
 \r
-import com.android.sdklib.annotations.Nullable;\r
+import com.android.annotations.Nullable;\r
 import com.android.sdklib.repository.SdkAddonConstants;\r
 \r
 import org.w3c.dom.Document;\r
index 9b63be3..43e49e3 100755 (executable)
@@ -16,7 +16,7 @@
 \r
 package com.android.sdklib.internal.repository;\r
 \r
-import com.android.sdklib.annotations.Nullable;\r
+import com.android.annotations.Nullable;\r
 import com.android.sdklib.internal.repository.Archive.Arch;\r
 import com.android.sdklib.internal.repository.Archive.Os;\r
 import com.android.sdklib.repository.RepoConstants;\r
index 2a917a1..77eb981 100755 (executable)
@@ -16,9 +16,9 @@
 \r
 package com.android.sdklib.internal.repository;\r
 \r
-import com.android.sdklib.annotations.Nullable;\r
-import com.android.sdklib.annotations.VisibleForTesting;\r
-import com.android.sdklib.annotations.VisibleForTesting.Visibility;\r
+import com.android.annotations.Nullable;\r
+import com.android.annotations.VisibleForTesting;\r
+import com.android.annotations.VisibleForTesting.Visibility;\r
 import com.android.sdklib.repository.RepoConstants;\r
 import com.android.sdklib.repository.SdkAddonConstants;\r
 import com.android.sdklib.repository.SdkRepoConstants;\r
index 73ddc24..6e53dd7 100755 (executable)
 \r
 package com.android.sdklib.internal.repository;\r
 \r
+import com.android.annotations.VisibleForTesting;\r
+import com.android.annotations.VisibleForTesting.Visibility;\r
 import com.android.sdklib.SdkConstants;\r
 import com.android.sdklib.SdkManager;\r
-import com.android.sdklib.annotations.VisibleForTesting;\r
-import com.android.sdklib.annotations.VisibleForTesting.Visibility;\r
 import com.android.sdklib.internal.repository.Archive.Arch;\r
 import com.android.sdklib.internal.repository.Archive.Os;\r
 import com.android.sdklib.repository.SdkRepoConstants;\r