Move Pair and annoatations into resources.jar now renamed as common.jar

Move all the resource query methods that returned an array of 2 Strings
to return a pair of ResourceType and String.

Change-Id: I6b8447aa27005de786e2defef81ad88a72363523
diff --git a/layoutlib_api/.classpath b/layoutlib_api/.classpath
index bae87a9..4095535 100644
--- a/layoutlib_api/.classpath
+++ b/layoutlib_api/.classpath
@@ -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>
diff --git a/layoutlib_api/Android.mk b/layoutlib_api/Android.mk
index 4ebf1f6..30ce41b 100644
--- a/layoutlib_api/Android.mk
+++ b/layoutlib_api/Android.mk
@@ -19,7 +19,7 @@
 LOCAL_SRC_FILES := $(call all-java-files-under,src)
 
 LOCAL_JAVA_LIBRARIES := \
-	resources \
+	common \
 	kxml2-2.3.0
 
 LOCAL_MODULE := layoutlib_api
diff --git a/layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java b/layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java
index aebc5a5..0ec214f 100644
--- a/layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java
+++ b/layoutlib_api/src/com/android/ide/common/rendering/api/IProjectCallback.java
@@ -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 @@
      * <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 @@
      * @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 @@
      * @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);
 }