Merge "Fix bug 2565463 Ensure an object cannot appear twice in the  AudioFocus stack.  Enforce parameter check in AudioManager.requestAudioFocus()  Typo correction in AudioService.unregisterMediaButtonEventReceiver()" into froyo
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 417f764..707404b 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -50,6 +50,8 @@
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/com/android/internal/backup)
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/app)
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/content)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/FrameworkTest_intermediates/)
+
 
 # ************************************************
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 15c8856..b0adaec 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -539,14 +539,15 @@
      * {@link android.Manifest.permission#MANAGE_ACCOUNTS} or
      * {@link android.Manifest.permission#USE_CREDENTIALS}
      *
-     * @param accountType The account type of the auth token to invalidate
-     * @param authToken The auth token to invalidate
+     * @param accountType The account type of the auth token to invalidate, must not be null
+     * @param authToken The auth token to invalidate, may be null
      */
     public void invalidateAuthToken(final String accountType, final String authToken) {
         if (accountType == null) throw new IllegalArgumentException("accountType is null");
-        if (authToken == null) throw new IllegalArgumentException("authToken is null");
         try {
-            mService.invalidateAuthToken(accountType, authToken);
+            if (authToken != null) {
+                mService.invalidateAuthToken(accountType, authToken);
+            }
         } catch (RemoteException e) {
             // won't ever happen
             throw new RuntimeException(e);
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index 0ebe3ac..9d217ec 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -795,7 +795,9 @@
             SearchableInfo searchable = mSearchable;
             try {
                 if (searchable.getVoiceSearchLaunchWebSearch()) {
-                    getContext().startActivity(mVoiceWebSearchIntent);
+                    Intent webSearchIntent = createVoiceWebSearchIntent(mVoiceWebSearchIntent,
+                            searchable);
+                    getContext().startActivity(webSearchIntent);
                 } else if (searchable.getVoiceSearchLaunchRecognizer()) {
                     Intent appSearchIntent = createVoiceAppSearchIntent(mVoiceAppSearchIntent,
                             searchable);
@@ -811,6 +813,17 @@
     };
     
     /**
+     * Create and return an Intent that can launch the voice search activity for web search.
+     */
+    private Intent createVoiceWebSearchIntent(Intent baseIntent, SearchableInfo searchable) {
+        Intent voiceIntent = new Intent(baseIntent);
+        ComponentName searchActivity = searchable.getSearchActivity();
+        voiceIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE,
+                searchActivity == null ? null : searchActivity.flattenToShortString());
+        return voiceIntent;
+    }
+    
+    /**
      * Create and return an Intent that can launch the voice search activity, perform a specific
      * voice transcription, and forward the results to the searchable activity.
      * 
@@ -865,7 +878,7 @@
         voiceIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, language);
         voiceIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, maxResults);
         voiceIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE,
-                searchActivity == null ? null : searchActivity.toShortString());
+                searchActivity == null ? null : searchActivity.flattenToShortString());
         
         // Add the values that configure forwarding the results
         voiceIntent.putExtra(RecognizerIntent.EXTRA_RESULTS_PENDINGINTENT, pending);
diff --git a/core/java/android/speech/tts/ITts.aidl b/core/java/android/speech/tts/ITts.aidl
index 2fd3672..c1051c4 100755
--- a/core/java/android/speech/tts/ITts.aidl
+++ b/core/java/android/speech/tts/ITts.aidl
@@ -43,7 +43,7 @@
 

     String[] getLanguage();

 

-    int isLanguageAvailable(in String language, in String country, in String variant);

+    int isLanguageAvailable(in String language, in String country, in String variant, in String[] params);

 

     int setLanguage(in String callingApp, in String language, in String country, in String variant);

 

diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index eeb42c42..e7c6432 100755
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -315,6 +315,10 @@
          */
         public static final String KEY_PARAM_ENGINE = "engine";
         /**
+         * {@hide}
+         */
+        public static final String KEY_PARAM_PITCH = "pitch";
+        /**
          * Parameter key to specify the audio stream type to be used when speaking text
          * or playing back a file.
          * @see TextToSpeech#speak(String, int, HashMap)
@@ -365,7 +369,12 @@
         /**
          * {@hide}
          */
-        protected static final int NB_CACHED_PARAMS = 7;
+        protected static final int PARAM_POSITION_PITCH = 14;
+
+        /**
+         * {@hide}
+         */
+        protected static final int NB_CACHED_PARAMS = 8;
     }
 
     /**
@@ -409,9 +418,10 @@
         mCachedParams[Engine.PARAM_POSITION_STREAM] = Engine.KEY_PARAM_STREAM;
         mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID] = Engine.KEY_PARAM_UTTERANCE_ID;
         mCachedParams[Engine.PARAM_POSITION_ENGINE] = Engine.KEY_PARAM_ENGINE;
+        mCachedParams[Engine.PARAM_POSITION_PITCH] = Engine.KEY_PARAM_PITCH;
 
-        // Leave all defaults that are shown in Settings uninitialized so that
-        // the values set in Settings will take effect if the application does
+        // Leave all defaults that are shown in Settings uninitialized/at the default
+        // so that the values set in Settings will take effect if the application does
         // not try to change these settings itself.
         mCachedParams[Engine.PARAM_POSITION_RATE + 1] = "";
         mCachedParams[Engine.PARAM_POSITION_LANGUAGE + 1] = "";
@@ -421,6 +431,7 @@
                 String.valueOf(Engine.DEFAULT_STREAM);
         mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = "";
         mCachedParams[Engine.PARAM_POSITION_ENGINE + 1] = "";
+        mCachedParams[Engine.PARAM_POSITION_PITCH + 1] = "100";
 
         initTts();
     }
@@ -435,6 +446,9 @@
                 synchronized(mStartLock) {
                     mITts = ITts.Stub.asInterface(service);
                     mStarted = true;
+                    // Cache the default engine and current language
+                    setEngineByPackageName(getDefaultEngine());
+                    setLanguage(getLanguage());
                     if (mInitListener != null) {
                         // TODO manage failures and missing resources
                         mInitListener.onInit(SUCCESS);
@@ -1008,15 +1022,13 @@
                 return result;
             }
             try {
+                // the pitch is not set here, instead it is cached so it will be associated
+                // with all upcoming utterances.
                 if (pitch > 0) {
-                    result = mITts.setPitch(mPackageName, (int)(pitch*100));
+                    int p = (int)(pitch*100);
+                    mCachedParams[Engine.PARAM_POSITION_PITCH + 1] = String.valueOf(p);
+                    result = SUCCESS;
                 }
-            } catch (RemoteException e) {
-                // TTS died; restart it.
-                Log.e("TextToSpeech.java - setPitch", "RemoteException");
-                e.printStackTrace();
-                mStarted = false;
-                initTts();
             } catch (NullPointerException e) {
                 // TTS died; restart it.
                 Log.e("TextToSpeech.java - setPitch", "NullPointerException");
@@ -1057,16 +1069,27 @@
                 return result;
             }
             try {
-                mCachedParams[Engine.PARAM_POSITION_LANGUAGE + 1] = loc.getISO3Language();
-                mCachedParams[Engine.PARAM_POSITION_COUNTRY + 1] = loc.getISO3Country();
-                mCachedParams[Engine.PARAM_POSITION_VARIANT + 1] = loc.getVariant();
-                // the language is not set here, instead it is cached so it will be associated
-                // with all upcoming utterances. But we still need to report the language support,
-                // which is achieved by calling isLanguageAvailable()
-                result = mITts.isLanguageAvailable(
-                        mCachedParams[Engine.PARAM_POSITION_LANGUAGE + 1],
-                        mCachedParams[Engine.PARAM_POSITION_COUNTRY + 1],
-                        mCachedParams[Engine.PARAM_POSITION_VARIANT + 1] );
+                String language = loc.getISO3Language();
+                String country = loc.getISO3Country();
+                String variant = loc.getVariant();
+                // Check if the language, country, variant are available, and cache
+                // the available parts.
+                // Note that the language is not actually set here, instead it is cached so it
+                // will be associated with all upcoming utterances.
+                result = mITts.isLanguageAvailable(language, country, variant, mCachedParams);
+                if (result >= LANG_AVAILABLE){
+                    mCachedParams[Engine.PARAM_POSITION_LANGUAGE + 1] = language;
+                    if (result >= LANG_COUNTRY_AVAILABLE){
+                        mCachedParams[Engine.PARAM_POSITION_COUNTRY + 1] = country;
+                    } else {
+                        mCachedParams[Engine.PARAM_POSITION_COUNTRY + 1] = "";
+                    }
+                    if (result >= LANG_COUNTRY_VAR_AVAILABLE){
+                        mCachedParams[Engine.PARAM_POSITION_VARIANT + 1] = variant;
+                    } else {
+                        mCachedParams[Engine.PARAM_POSITION_VARIANT + 1] = "";
+                    }
+                }
             } catch (RemoteException e) {
                 // TTS died; restart it.
                 Log.e("TextToSpeech.java - setLanguage", "RemoteException");
@@ -1104,11 +1127,18 @@
                 return null;
             }
             try {
-                String[] locStrings = mITts.getLanguage();
-                if ((locStrings != null) && (locStrings.length == 3)) {
-                    return new Locale(locStrings[0], locStrings[1], locStrings[2]);
+                // Only do a call to the native synth if there is nothing in the cached params
+                if (mCachedParams[Engine.PARAM_POSITION_LANGUAGE + 1].length() < 1){
+                    String[] locStrings = mITts.getLanguage();
+                    if ((locStrings != null) && (locStrings.length == 3)) {
+                        return new Locale(locStrings[0], locStrings[1], locStrings[2]);
+                    } else {
+                        return null;
+                    }
                 } else {
-                    return null;
+                    return new Locale(mCachedParams[Engine.PARAM_POSITION_LANGUAGE + 1],
+                            mCachedParams[Engine.PARAM_POSITION_COUNTRY + 1],
+                            mCachedParams[Engine.PARAM_POSITION_VARIANT + 1]);
                 }
             } catch (RemoteException e) {
                 // TTS died; restart it.
@@ -1151,7 +1181,7 @@
             }
             try {
                 result = mITts.isLanguageAvailable(loc.getISO3Language(),
-                        loc.getISO3Country(), loc.getVariant());
+                        loc.getISO3Country(), loc.getVariant(), mCachedParams);
             } catch (RemoteException e) {
                 // TTS died; restart it.
                 Log.e("TextToSpeech.java - isLanguageAvailable", "RemoteException");
diff --git a/core/java/com/android/internal/app/ShutdownThread.java b/core/java/com/android/internal/app/ShutdownThread.java
index 51cd0f8..83614a8 100644
--- a/core/java/com/android/internal/app/ShutdownThread.java
+++ b/core/java/com/android/internal/app/ShutdownThread.java
@@ -33,6 +33,7 @@
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.SystemClock;
+import android.os.Vibrator;
 import android.os.storage.IMountService;
 import android.os.storage.IMountShutdownObserver;
 
@@ -48,6 +49,9 @@
     // maximum time we wait for the shutdown broadcast before going on.
     private static final int MAX_BROADCAST_TIME = 10*1000;
     private static final int MAX_SHUTDOWN_WAIT_TIME = 20*1000;
+
+    // length of vibration before shutting down
+    private static final int SHUTDOWN_VIBRATE_MS = 500;
     
     // state tracking
     private static Object sIsStartedGuard = new Object();
@@ -324,6 +328,15 @@
             } catch (Exception e) {
                 Log.e(TAG, "Reboot failed, will attempt shutdown instead", e);
             }
+        } else if (SHUTDOWN_VIBRATE_MS > 0) {
+            // vibrate before shutting down
+            Vibrator vibrator = new Vibrator();
+            vibrator.vibrate(SHUTDOWN_VIBRATE_MS);
+            // vibrator is asynchronous so we need to wait to avoid shutting down too soon.
+            try {
+                Thread.sleep(SHUTDOWN_VIBRATE_MS);
+            } catch (InterruptedException e) {
+            }
         }
 
         // Shutdown power
diff --git a/core/java/com/android/internal/widget/LockPatternView.java b/core/java/com/android/internal/widget/LockPatternView.java
index 6adce6d..007e7b9 100644
--- a/core/java/com/android/internal/widget/LockPatternView.java
+++ b/core/java/com/android/internal/widget/LockPatternView.java
@@ -21,6 +21,7 @@
 
 import android.content.Context;
 import android.content.res.Resources;
+import android.content.res.TypedArray;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.Canvas;
@@ -50,6 +51,11 @@
  * "correct" states.
  */
 public class LockPatternView extends View {
+    // Aspect to use when rendering this view
+    private static final int ASPECT_SQUARE = 0; // View will be the minimum of width/height
+    private static final int ASPECT_LOCK_WIDTH = 1; // Fixed width; height will be minimum of (w,h)
+    private static final int ASPECT_LOCK_HEIGHT = 2; // Fixed height; width will be minimum of (w,h)
+
     // Vibrator pattern for creating a tactile bump
     private static final long[] DEFAULT_VIBE_PATTERN = {0, 1, 40, 41};
 
@@ -116,12 +122,14 @@
 
     private int mBitmapWidth;
     private int mBitmapHeight;
-   
+
 
     private Vibrator vibe; // Vibrator for creating tactile feedback
 
     private long[] mVibePattern;
 
+    private int mAspect;
+
     /**
      * Represents a cell in the 3 X 3 matrix of the unlock pattern view.
      */
@@ -237,6 +245,20 @@
         super(context, attrs);
         vibe = new Vibrator();
 
+        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.LockPatternView);
+
+        final String aspect = a.getString(R.styleable.LockPatternView_aspect);
+
+        if ("square".equals(aspect)) {
+            mAspect = ASPECT_SQUARE;
+        } else if ("lock_width".equals(aspect)) {
+            mAspect = ASPECT_LOCK_WIDTH;
+        } else if ("lock_height".equals(aspect)) {
+            mAspect = ASPECT_LOCK_HEIGHT;
+        } else {
+            mAspect = ASPECT_SQUARE;
+        }
+
         setClickable(true);
 
         mPathPaint.setAntiAlias(true);
@@ -425,8 +447,22 @@
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
         final int width = MeasureSpec.getSize(widthMeasureSpec);
         final int height = MeasureSpec.getSize(heightMeasureSpec);
-        final int squareSide = Math.min(width, height);
-        setMeasuredDimension(squareSide, squareSide);
+        int viewWidth = width;
+        int viewHeight = height;
+        switch (mAspect) {
+            case ASPECT_SQUARE:
+                viewWidth = viewHeight = Math.min(width, height);
+                break;
+            case ASPECT_LOCK_WIDTH:
+                viewWidth = width;
+                viewHeight = Math.min(width, height);
+                break;
+            case ASPECT_LOCK_HEIGHT:
+                viewWidth = Math.min(width, height);
+                viewHeight = height;
+                break;
+        }
+        setMeasuredDimension(viewWidth, viewHeight);
     }
 
     /**
@@ -890,17 +926,17 @@
         Matrix matrix = new Matrix();
         final int cellWidth = mBitmapCircleDefault.getWidth();
         final int cellHeight = mBitmapCircleDefault.getHeight();
-        
+
         // the up arrow bitmap is at 12:00, so find the rotation from x axis and add 90 degrees.
         final float theta = (float) Math.atan2(
                 (double) (endRow - startRow), (double) (endColumn - startColumn));
-        final float angle = (float) Math.toDegrees(theta) + 90.0f; 
-        
+        final float angle = (float) Math.toDegrees(theta) + 90.0f;
+
         // compose matrix
         matrix.setTranslate(leftX + offsetX, topY + offsetY); // transform to cell position
         matrix.preRotate(angle, cellWidth / 2.0f, cellHeight / 2.0f);  // rotate about cell center
         matrix.preTranslate((cellWidth - arrow.getWidth()) / 2.0f, 0.0f); // translate to 12:00 pos
-        canvas.drawBitmap(arrow, matrix, mPaint); 
+        canvas.drawBitmap(arrow, matrix, mPaint);
     }
 
     /**
@@ -1004,7 +1040,7 @@
             mInStealthMode = (Boolean) in.readValue(null);
             mTactileFeedbackEnabled = (Boolean) in.readValue(null);
         }
-        
+
         public String getSerializedPattern() {
             return mSerializedPattern;
         }
diff --git a/core/res/res/layout/keyguard_screen_unlock_portrait.xml b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
index 97c4ae9..8dacfaf 100644
--- a/core/res/res/layout/keyguard_screen_unlock_portrait.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
@@ -154,6 +154,7 @@
         android:layout_height="0dip"
         android:layout_weight="1"
         android:layout_marginTop="2dip"
+        android:aspect="@string/lock_pattern_view_aspect"
          />
 
     <!-- footer -->
diff --git a/core/res/res/values-port-mdpi/donottranslate.xml b/core/res/res/values-port-mdpi/donottranslate.xml
new file mode 100644
index 0000000..b4581fe
--- /dev/null
+++ b/core/res/res/values-port-mdpi/donottranslate.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/strings.xml
+**
+** Copyright 2009, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- @hide DO NOT TRANSLATE. There isn't enough room on mdpi devices, allow height to vary -->
+    <string name="lock_pattern_view_aspect">lock_width</string>
+</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 16b241b..6d6c47f 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -3623,7 +3623,18 @@
         <!-- Use "horizontal" for a row, "vertical" for a column.  The default is horizontal. -->
         <attr name="orientation" />
     </declare-styleable>
-    
+
+    <!-- =============================== -->
+    <!-- LockPatternView class attributes -->
+    <!-- =============================== -->
+    <eat-comment />
+
+    <declare-styleable name="LockPatternView">
+        <!-- Aspect to use when drawing LockPatternView. Choices are "square"(default), "lock_width"
+             or "lock_height" -->
+        <attr name="aspect" format="string" />
+    </declare-styleable>
+
     <!-- Use <code>recognition-service</code> as the root tag of the XML resource that
          describes a {@link android.speech.RecognitionService}, which is reference from
          its {@link android.speech.RecognitionService#SERVICE_META_DATA} meta-data entry.
diff --git a/core/res/res/values/donottranslate.xml b/core/res/res/values/donottranslate.xml
index 78d4d36..d6d5dbb 100644
--- a/core/res/res/values/donottranslate.xml
+++ b/core/res/res/values/donottranslate.xml
@@ -22,4 +22,6 @@
     <string name="default_text_encoding">Latin-1</string>
     <!-- @hide DO NOT TRANSLATE. Workaround for resource race condition in lockscreen. -->
     <bool name="lockscreen_isPortrait">true</bool>
+    <!-- @hide DO NOT TRANSLATE. Control aspect ratio of lock pattern -->
+    <string name="lock_pattern_view_aspect">square</string>
 </resources>
diff --git a/core/tests/coretests/Android.mk b/core/tests/coretests/Android.mk
index b0e2843..c067b80 100644
--- a/core/tests/coretests/Android.mk
+++ b/core/tests/coretests/Android.mk
@@ -7,6 +7,8 @@
 # Include all test java files.
 LOCAL_SRC_FILES := \
 	$(call all-java-files-under, src) \
+	$(call all-java-files-under, DisabledTestApp/src) \
+	$(call all-java-files-under, EnabledTestApp/src) \
 	src/android/os/IAidlTest.aidl
 
 LOCAL_STATIC_JAVA_LIBRARIES += android-common
@@ -18,3 +20,4 @@
 
 include $(BUILD_PACKAGE)
 
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/core/tests/coretests/AndroidManifest.xml b/core/tests/coretests/AndroidManifest.xml
index 9972a8c..30855d1 100644
--- a/core/tests/coretests/AndroidManifest.xml
+++ b/core/tests/coretests/AndroidManifest.xml
@@ -16,7 +16,8 @@
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           android:installLocation="internalOnly"
-          package="com.android.frameworks.coretests">
+          package="com.android.frameworks.coretests"
+          android:sharedUserId="com.android.uid.test">
 
     <permission android:name="com.android.frameworks.coretests.permission.TEST_GRANTED"
         android:protectionLevel="normal"
diff --git a/tests/AndroidTests/DisabledTestApp/Android.mk b/core/tests/coretests/DisabledTestApp/Android.mk
similarity index 100%
rename from tests/AndroidTests/DisabledTestApp/Android.mk
rename to core/tests/coretests/DisabledTestApp/Android.mk
diff --git a/core/tests/coretests/DisabledTestApp/AndroidManifest.xml b/core/tests/coretests/DisabledTestApp/AndroidManifest.xml
new file mode 100644
index 0000000..5bd840f
--- /dev/null
+++ b/core/tests/coretests/DisabledTestApp/AndroidManifest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.frameworks.coretests.disabled_app"
+        android:sharedUserId="com.android.uid.test">
+
+    <application enabled="false">
+
+        <!-- Used to test package component enabling and disabling -->
+        <activity android:name=".DisabledActivity" android:enabled="false" >
+        </activity>
+        <activity android:name=".EnabledActivity" >
+        </activity>
+    </application>
+</manifest>
diff --git a/tests/AndroidTests/DisabledTestApp/src/com/android/unit_tests/disabled_app/EnabledActivity.java b/core/tests/coretests/DisabledTestApp/src/com/android/frameworks/coretests/disabled_app/EnabledActivity.java
similarity index 92%
copy from tests/AndroidTests/DisabledTestApp/src/com/android/unit_tests/disabled_app/EnabledActivity.java
copy to core/tests/coretests/DisabledTestApp/src/com/android/frameworks/coretests/disabled_app/EnabledActivity.java
index 4e4dc85..e676231 100644
--- a/tests/AndroidTests/DisabledTestApp/src/com/android/unit_tests/disabled_app/EnabledActivity.java
+++ b/core/tests/coretests/DisabledTestApp/src/com/android/frameworks/coretests/disabled_app/EnabledActivity.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests.disabled_app;
+package com.android.frameworks.coretests.disabled_app;
 
 import android.app.Activity;
 
diff --git a/tests/AndroidTests/EnabledTestApp/Android.mk b/core/tests/coretests/EnabledTestApp/Android.mk
similarity index 100%
rename from tests/AndroidTests/EnabledTestApp/Android.mk
rename to core/tests/coretests/EnabledTestApp/Android.mk
diff --git a/core/tests/coretests/EnabledTestApp/AndroidManifest.xml b/core/tests/coretests/EnabledTestApp/AndroidManifest.xml
new file mode 100644
index 0000000..72d933a
--- /dev/null
+++ b/core/tests/coretests/EnabledTestApp/AndroidManifest.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.frameworks.coretests.enabled_app"
+        android:sharedUserId="com.android.uid.test">
+
+    <application>
+
+        <!-- Used to test package component enabling and disabling -->
+        <activity android:name=".DisabledActivity" android:enabled="false" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="com.android.frameworks.coretests.enabled_app.TEST_CATEGORY" />
+            </intent-filter>
+        </activity>
+        <service android:name=".DisabledService" android:enabled="false" >
+        </service>
+        <receiver android:name=".DisabledReceiver" android:enabled="false" >
+            <intent-filter>
+                <action android:name="android.intent.action.ENABLED_APP_DISABLED_RECEIVER" />
+            </intent-filter>
+        </receiver>
+        <provider android:name=".DisabledProvider" android:enabled="false"
+                  android:authorities="com.android.frameworks.coretests.enabled_app.DisabledProvider"
+                  android:process=":disabled.provider.process" />
+        <activity android:name=".EnabledActivity" >
+        </activity>
+        <service android:name=".EnabledService" android:enabled="true" >
+        </service>
+        <receiver android:name=".EnabledReceiver" >
+            <intent-filter>
+                <action android:name="android.intent.action.ENABLED_APP_ENABLED_RECEIVER" />
+            </intent-filter>
+        </receiver>
+        <provider android:name=".EnabledProvider"
+                  android:authorities="com.android.frameworks.coretests.enabled_app.EnabledProvider"
+                  android:process=":enabled.provider.process" />
+    </application>
+</manifest>
diff --git a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledActivity.java b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledActivity.java
similarity index 92%
rename from tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledActivity.java
rename to core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledActivity.java
index 0ab0416..325adfe 100644
--- a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledActivity.java
+++ b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledActivity.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests.enabled_app;
+package com.android.frameworks.coretests.enabled_app;
 
 import android.app.Activity;
 
diff --git a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledProvider.java b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledProvider.java
similarity index 96%
rename from tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledProvider.java
rename to core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledProvider.java
index 06527f9..26781c4 100644
--- a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledProvider.java
+++ b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledProvider.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests.enabled_app;
+package com.android.frameworks.coretests.enabled_app;
 
 import android.content.ContentProvider;
 import android.content.ContentValues;
diff --git a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledReceiver.java b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledReceiver.java
similarity index 93%
rename from tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledReceiver.java
rename to core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledReceiver.java
index c27b87e..b06d2ce 100644
--- a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledReceiver.java
+++ b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledReceiver.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests.enabled_app;
+package com.android.frameworks.coretests.enabled_app;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
diff --git a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledService.java b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledService.java
similarity index 93%
rename from tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledService.java
rename to core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledService.java
index ed8d0b9..ac66ae5 100644
--- a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/DisabledService.java
+++ b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/DisabledService.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests.enabled_app;
+package com.android.frameworks.coretests.enabled_app;
 
 import android.app.Service;
 import android.os.IBinder;
diff --git a/tests/AndroidTests/DisabledTestApp/src/com/android/unit_tests/disabled_app/EnabledActivity.java b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledActivity.java
similarity index 92%
rename from tests/AndroidTests/DisabledTestApp/src/com/android/unit_tests/disabled_app/EnabledActivity.java
rename to core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledActivity.java
index 4e4dc85..1b0ac6d 100644
--- a/tests/AndroidTests/DisabledTestApp/src/com/android/unit_tests/disabled_app/EnabledActivity.java
+++ b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledActivity.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests.disabled_app;
+package com.android.frameworks.coretests.enabled_app;
 
 import android.app.Activity;
 
diff --git a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledProvider.java b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledProvider.java
similarity index 96%
rename from tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledProvider.java
rename to core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledProvider.java
index 764937f..8da70b4 100644
--- a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledProvider.java
+++ b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledProvider.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests.enabled_app;
+package com.android.frameworks.coretests.enabled_app;
 
 import android.content.ContentProvider;
 import android.content.ContentValues;
diff --git a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledReceiver.java b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledReceiver.java
similarity index 93%
rename from tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledReceiver.java
rename to core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledReceiver.java
index 707448f..6cee98d 100644
--- a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledReceiver.java
+++ b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledReceiver.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests.enabled_app;
+package com.android.frameworks.coretests.enabled_app;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
diff --git a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledService.java b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledService.java
similarity index 93%
rename from tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledService.java
rename to core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledService.java
index 81a80b3..7d05db0 100644
--- a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledService.java
+++ b/core/tests/coretests/EnabledTestApp/src/com/android/frameworks/coretests/enabled_app/EnabledService.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests.enabled_app;
+package com.android.frameworks.coretests.enabled_app;
 
 import android.app.Service;
 import android.os.IBinder;
diff --git a/tests/AndroidTests/apks/install_use_perm_good/Android.mk b/core/tests/coretests/apks/install_decl_perm/Android.mk
similarity index 72%
rename from tests/AndroidTests/apks/install_use_perm_good/Android.mk
rename to core/tests/coretests/apks/install_decl_perm/Android.mk
index a25a03c..c38e981 100644
--- a/tests/AndroidTests/apks/install_use_perm_good/Android.mk
+++ b/core/tests/coretests/apks/install_decl_perm/Android.mk
@@ -5,7 +5,7 @@
 
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
 
-LOCAL_PACKAGE_NAME := AndroidTests_install_use_perm_good
+LOCAL_PACKAGE_NAME := FrameworkCoreTests_install_decl_perm
 
 include $(BUILD_PACKAGE)
 
diff --git a/core/tests/coretests/apks/install_decl_perm/AndroidManifest.xml b/core/tests/coretests/apks/install_decl_perm/AndroidManifest.xml
new file mode 100644
index 0000000..9a1f0ff
--- /dev/null
+++ b/core/tests/coretests/apks/install_decl_perm/AndroidManifest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.frameworks.coretests.install_decl_perm">
+
+    <permission android:name="com.android.frameworks.coretests.NORMAL"
+        android:permissionGroup="android.permission-group.COST_MONEY"
+        android:protectionLevel="normal"
+        android:label="test normal perm" />
+        
+    <permission android:name="com.android.frameworks.coretests.DANGEROUS"
+        android:permissionGroup="android.permission-group.COST_MONEY"
+        android:protectionLevel="dangerous"
+        android:label="test dangerous perm" />
+        
+    <permission android:name="com.android.frameworks.coretests.SIGNATURE"
+        android:permissionGroup="android.permission-group.COST_MONEY"
+        android:protectionLevel="signature"
+        android:label="test signature perm" />
+        
+    <application android:hasCode="false">
+    </application>
+</manifest>
diff --git a/tests/AndroidTests/apks/install_decl_perm/res/values/strings.xml b/core/tests/coretests/apks/install_decl_perm/res/values/strings.xml
similarity index 100%
rename from tests/AndroidTests/apks/install_decl_perm/res/values/strings.xml
rename to core/tests/coretests/apks/install_decl_perm/res/values/strings.xml
diff --git a/tests/AndroidTests/apks/install_use_perm_good/Android.mk b/core/tests/coretests/apks/install_use_perm_good/Android.mk
similarity index 71%
copy from tests/AndroidTests/apks/install_use_perm_good/Android.mk
copy to core/tests/coretests/apks/install_use_perm_good/Android.mk
index a25a03c..1a07fc8 100644
--- a/tests/AndroidTests/apks/install_use_perm_good/Android.mk
+++ b/core/tests/coretests/apks/install_use_perm_good/Android.mk
@@ -5,7 +5,7 @@
 
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
 
-LOCAL_PACKAGE_NAME := AndroidTests_install_use_perm_good
+LOCAL_PACKAGE_NAME := FrameworkCoreTests_install_use_perm_good
 
 include $(BUILD_PACKAGE)
 
diff --git a/core/tests/coretests/apks/install_use_perm_good/AndroidManifest.xml b/core/tests/coretests/apks/install_use_perm_good/AndroidManifest.xml
new file mode 100644
index 0000000..dadce7d
--- /dev/null
+++ b/core/tests/coretests/apks/install_use_perm_good/AndroidManifest.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.frameworks.coretests.install_use_perm_good">
+
+    <uses-permission android:name="com.android.frameworks.coretests.NORMAL" />
+    <uses-permission android:name="com.android.frameworks.coretests.DANGEROUS" />
+    <uses-permission android:name="com.android.frameworks.coretests.SIGNATURE" />
+        
+    <application android:hasCode="false">
+    </application>
+</manifest>
diff --git a/tests/AndroidTests/apks/install_use_perm_good/res/values/strings.xml b/core/tests/coretests/apks/install_use_perm_good/res/values/strings.xml
similarity index 100%
rename from tests/AndroidTests/apks/install_use_perm_good/res/values/strings.xml
rename to core/tests/coretests/apks/install_use_perm_good/res/values/strings.xml
diff --git a/tests/AndroidTests/res/raw/alt_ip_only.crt b/core/tests/coretests/res/raw/alt_ip_only.crt
similarity index 100%
rename from tests/AndroidTests/res/raw/alt_ip_only.crt
rename to core/tests/coretests/res/raw/alt_ip_only.crt
diff --git a/tests/AndroidTests/res/raw/subject_alt_only.crt b/core/tests/coretests/res/raw/subject_alt_only.crt
similarity index 100%
rename from tests/AndroidTests/res/raw/subject_alt_only.crt
rename to core/tests/coretests/res/raw/subject_alt_only.crt
diff --git a/tests/AndroidTests/res/raw/subject_only.crt b/core/tests/coretests/res/raw/subject_only.crt
similarity index 100%
rename from tests/AndroidTests/res/raw/subject_only.crt
rename to core/tests/coretests/res/raw/subject_only.crt
diff --git a/tests/AndroidTests/res/raw/subject_with_alt_names.crt b/core/tests/coretests/res/raw/subject_with_alt_names.crt
similarity index 100%
rename from tests/AndroidTests/res/raw/subject_with_alt_names.crt
rename to core/tests/coretests/res/raw/subject_with_alt_names.crt
diff --git a/tests/AndroidTests/res/raw/subject_with_wild_alt_name.crt b/core/tests/coretests/res/raw/subject_with_wild_alt_name.crt
similarity index 100%
rename from tests/AndroidTests/res/raw/subject_with_wild_alt_name.crt
rename to core/tests/coretests/res/raw/subject_with_wild_alt_name.crt
diff --git a/tests/AndroidTests/res/raw/wild_alt_name_only.crt b/core/tests/coretests/res/raw/wild_alt_name_only.crt
similarity index 100%
rename from tests/AndroidTests/res/raw/wild_alt_name_only.crt
rename to core/tests/coretests/res/raw/wild_alt_name_only.crt
diff --git a/tests/AndroidTests/src/com/android/unit_tests/BrickDeniedTest.java b/core/tests/coretests/src/android/content/BrickDeniedTest.java
similarity index 97%
rename from tests/AndroidTests/src/com/android/unit_tests/BrickDeniedTest.java
rename to core/tests/coretests/src/android/content/BrickDeniedTest.java
index 0f2b23b..c7d0b7a 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/BrickDeniedTest.java
+++ b/core/tests/coretests/src/android/content/BrickDeniedTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.content;
 
 import android.content.Intent;
 import android.test.AndroidTestCase;
diff --git a/tests/CoreTests/android/content/SyncQueueTest.java b/core/tests/coretests/src/android/content/SyncQueueTest.java
similarity index 100%
rename from tests/CoreTests/android/content/SyncQueueTest.java
rename to core/tests/coretests/src/android/content/SyncQueueTest.java
diff --git a/tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java b/core/tests/coretests/src/android/content/pm/AppCacheTest.java
similarity index 99%
rename from tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java
rename to core/tests/coretests/src/android/content/pm/AppCacheTest.java
index fa7b9ff..dbb10b1 100755
--- a/tests/AndroidTests/src/com/android/unit_tests/AppCacheTest.java
+++ b/core/tests/coretests/src/android/content/pm/AppCacheTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.content.pm;
 
 import java.io.File;
 import java.io.FileInputStream;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/ComponentTest.java b/core/tests/coretests/src/android/content/pm/ComponentTest.java
similarity index 97%
rename from tests/AndroidTests/src/com/android/unit_tests/ComponentTest.java
rename to core/tests/coretests/src/android/content/pm/ComponentTest.java
index 08fe742..ebfbd68 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/ComponentTest.java
+++ b/core/tests/coretests/src/android/content/pm/ComponentTest.java
@@ -14,16 +14,16 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.content.pm;
 
-import com.android.unit_tests.enabled_app.DisabledActivity;
-import com.android.unit_tests.enabled_app.DisabledProvider;
-import com.android.unit_tests.enabled_app.DisabledReceiver;
-import com.android.unit_tests.enabled_app.DisabledService;
-import com.android.unit_tests.enabled_app.EnabledActivity;
-import com.android.unit_tests.enabled_app.EnabledProvider;
-import com.android.unit_tests.enabled_app.EnabledReceiver;
-import com.android.unit_tests.enabled_app.EnabledService;
+import com.android.frameworks.coretests.enabled_app.DisabledActivity;
+import com.android.frameworks.coretests.enabled_app.DisabledProvider;
+import com.android.frameworks.coretests.enabled_app.DisabledReceiver;
+import com.android.frameworks.coretests.enabled_app.DisabledService;
+import com.android.frameworks.coretests.enabled_app.EnabledActivity;
+import com.android.frameworks.coretests.enabled_app.EnabledProvider;
+import com.android.frameworks.coretests.enabled_app.EnabledReceiver;
+import com.android.frameworks.coretests.enabled_app.EnabledService;
 
 import android.content.ComponentName;
 import android.content.Intent;
@@ -65,9 +65,9 @@
     private Intent mDisabledAppEnabledActivityIntent;
 
     private static final String ENABLED_PACKAGENAME =
-            "com.android.unit_tests.enabled_app";
+            "com.android.frameworks.coretests.enabled_app";
     private static final String DISABLED_PACKAGENAME =
-            "com.android.unit_tests.disabled_app";
+            "com.android.frameworks.coretests.disabled_app";
     private static final String DISABLED_ACTIVITY_CLASSNAME =
             DisabledActivity.class.getName();
     private static final ComponentName DISABLED_ACTIVITY_COMPONENTNAME =
@@ -103,11 +103,11 @@
             new ComponentName(ENABLED_PACKAGENAME, ENABLED_PROVIDER_CLASSNAME);
     private static final String ENABLED_PROVIDER_NAME = EnabledProvider.class.getName();
     private static final String DISABLED_APP_ENABLED_ACTIVITY_CLASSNAME =
-            com.android.unit_tests.disabled_app.EnabledActivity.class.getName();
+            com.android.frameworks.coretests.disabled_app.EnabledActivity.class.getName();
     private static final ComponentName DISABLED_APP_ENABLED_ACTIVITY_COMPONENTNAME =
             new ComponentName(DISABLED_PACKAGENAME, DISABLED_APP_ENABLED_ACTIVITY_CLASSNAME);
     private static final String TEST_CATEGORY =
-            "com.android.unit_tests.enabled_app.TEST_CATEGORY";
+            "com.android.frameworks.coretests.enabled_app.TEST_CATEGORY";
 
     @Override
     protected void setUp() throws Exception {
diff --git a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
index aec82af..c699c10 100755
--- a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
+++ b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
@@ -1946,42 +1946,42 @@
     static final String BASE_PERMISSIONS_DEFINED[] = new String[] {
         PERM_PACKAGE, "com.android.unit_tests.install_decl_perm",
         PERM_DEFINED,
-        "com.android.unit_tests.NORMAL",
-        "com.android.unit_tests.DANGEROUS",
-        "com.android.unit_tests.SIGNATURE",
+        "com.android.frameworks.coretests.NORMAL",
+        "com.android.frameworks.coretests.DANGEROUS",
+        "com.android.frameworks.coretests.SIGNATURE",
     };
     
     static final String BASE_PERMISSIONS_UNDEFINED[] = new String[] {
-        PERM_PACKAGE, "com.android.unit_tests.install_decl_perm",
+        PERM_PACKAGE, "com.android.frameworks.coretests.install_decl_perm",
         PERM_UNDEFINED,
-        "com.android.unit_tests.NORMAL",
-        "com.android.unit_tests.DANGEROUS",
-        "com.android.unit_tests.SIGNATURE",
+        "com.android.frameworks.coretests.NORMAL",
+        "com.android.frameworks.coretests.DANGEROUS",
+        "com.android.frameworks.coretests.SIGNATURE",
     };
     
     static final String BASE_PERMISSIONS_USED[] = new String[] {
-        PERM_PACKAGE, "com.android.unit_tests.install_use_perm_good",
+        PERM_PACKAGE, "com.android.frameworks.coretests.install_use_perm_good",
         PERM_USED,
-        "com.android.unit_tests.NORMAL",
-        "com.android.unit_tests.DANGEROUS",
-        "com.android.unit_tests.SIGNATURE",
+        "com.android.frameworks.coretests.NORMAL",
+        "com.android.frameworks.coretests.DANGEROUS",
+        "com.android.frameworks.coretests.SIGNATURE",
     };
     
     static final String BASE_PERMISSIONS_NOTUSED[] = new String[] {
-        PERM_PACKAGE, "com.android.unit_tests.install_use_perm_good",
+        PERM_PACKAGE, "com.android.frameworks.coretests.install_use_perm_good",
         PERM_NOTUSED,
-        "com.android.unit_tests.NORMAL",
-        "com.android.unit_tests.DANGEROUS",
-        "com.android.unit_tests.SIGNATURE",
+        "com.android.frameworks.coretests.NORMAL",
+        "com.android.frameworks.coretests.DANGEROUS",
+        "com.android.frameworks.coretests.SIGNATURE",
     };
     
     static final String BASE_PERMISSIONS_SIGUSED[] = new String[] {
-        PERM_PACKAGE, "com.android.unit_tests.install_use_perm_good",
+        PERM_PACKAGE, "com.android.frameworks.coretests.install_use_perm_good",
         PERM_USED,
-        "com.android.unit_tests.SIGNATURE",
+        "com.android.frameworks.coretests.SIGNATURE",
         PERM_NOTUSED,
-        "com.android.unit_tests.NORMAL",
-        "com.android.unit_tests.DANGEROUS",
+        "com.android.frameworks.coretests.NORMAL",
+        "com.android.frameworks.coretests.DANGEROUS",
     };
     
     /*
diff --git a/tests/AndroidTests/src/com/android/unit_tests/NewDatabasePerformanceTestSuite.java b/core/tests/coretests/src/android/database/NewDatabasePerformanceTestSuite.java
similarity index 96%
rename from tests/AndroidTests/src/com/android/unit_tests/NewDatabasePerformanceTestSuite.java
rename to core/tests/coretests/src/android/database/NewDatabasePerformanceTestSuite.java
index 3462f97..31cf515 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/NewDatabasePerformanceTestSuite.java
+++ b/core/tests/coretests/src/android/database/NewDatabasePerformanceTestSuite.java
@@ -14,12 +14,9 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
-import android.test.FrameworkTests;
-import android.test.suitebuilder.TestSuiteBuilder;
+package android.database;
 
 import junit.framework.TestSuite;
-import junit.framework.TestCase;
 
 public class NewDatabasePerformanceTestSuite extends TestSuite {
     public static TestSuite suite() {
diff --git a/tests/AndroidTests/src/com/android/unit_tests/NewDatabasePerformanceTests.java b/core/tests/coretests/src/android/database/NewDatabasePerformanceTests.java
similarity index 99%
rename from tests/AndroidTests/src/com/android/unit_tests/NewDatabasePerformanceTests.java
rename to core/tests/coretests/src/android/database/NewDatabasePerformanceTests.java
index 8644fbb..0dca90b 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/NewDatabasePerformanceTests.java
+++ b/core/tests/coretests/src/android/database/NewDatabasePerformanceTests.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.database;
 
 import android.content.ContentValues;
 import android.database.sqlite.SQLiteDatabase;
diff --git a/core/tests/coretests/src/android/text/HtmlTest.java b/core/tests/coretests/src/android/text/HtmlTest.java
index a79b93e..c07d212 100644
--- a/core/tests/coretests/src/android/text/HtmlTest.java
+++ b/core/tests/coretests/src/android/text/HtmlTest.java
@@ -16,14 +16,25 @@
 
 package android.text;
 
-import android.test.InstrumentationTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.text.Html;
-import android.text.Spanned;
-import android.text.style.StyleSpan;
+import android.content.res.ColorStateList;
+import android.content.res.Resources;
 import android.graphics.Typeface;
+import android.test.suitebuilder.annotation.MediumTest;
+import android.test.suitebuilder.annotation.SmallTest;
+import android.text.style.ForegroundColorSpan;
+import android.text.style.QuoteSpan;
+import android.text.style.StrikethroughSpan;
+import android.text.style.StyleSpan;
+import android.text.style.SubscriptSpan;
+import android.text.style.SuperscriptSpan;
+import android.text.style.TextAppearanceSpan;
+import android.text.style.TypefaceSpan;
+import android.text.style.URLSpan;
+import android.text.style.UnderlineSpan;
 
-public class HtmlTest extends InstrumentationTestCase {
+import junit.framework.TestCase;
+
+public class HtmlTest extends TestCase {
 
     @MediumTest
     public void testSingleTagOnWhileString() {
@@ -63,4 +74,175 @@
         String spanned = Html.fromHtml("&copy; &gt; &lt").toString();
         assertEquals("\u00a9 > <", spanned);
     }
+    
+    @MediumTest
+    public void testColor() throws Exception {
+        Spanned s;
+        ForegroundColorSpan[] colors;
+
+        s = Html.fromHtml("<font color=\"#00FF00\">something</font>");
+        colors = s.getSpans(0, s.length(), ForegroundColorSpan.class);
+        assertEquals(1, colors.length);
+        assertEquals(0xFF00FF00, colors[0].getForegroundColor());
+
+        s = Html.fromHtml("<font color=\"navy\">something</font>");
+        colors = s.getSpans(0, s.length(), ForegroundColorSpan.class);
+        assertEquals(1, colors.length);
+        assertEquals(0xFF000080, colors[0].getForegroundColor());
+
+        s = Html.fromHtml("<font color=\"gibberish\">something</font>");
+        colors = s.getSpans(0, s.length(), ForegroundColorSpan.class);
+        assertEquals(0, colors.length);
+    }
+
+    @MediumTest
+    public void testResourceColor() throws Exception {
+        ColorStateList c =
+                Resources.getSystem().getColorStateList(android.R.color.primary_text_dark);
+        Spanned s;
+        TextAppearanceSpan[] colors;
+
+        s = Html.fromHtml("<font color=\"@android:color/primary_text_dark\">something</font>");
+        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
+        assertEquals(1, colors.length);
+        assertEquals(c.toString(), colors[0].getTextColor().toString());
+
+        s = Html.fromHtml("<font color=\"@android:primary_text_dark\">something</font>");
+        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
+        assertEquals(1, colors.length);
+        assertEquals(c.toString(), colors[0].getTextColor().toString());
+
+        s = Html.fromHtml("<font color=\"@color/primary_text_dark\">something</font>");
+        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
+        assertEquals(1, colors.length);
+        assertEquals(c.toString(), colors[0].getTextColor().toString());
+
+        s = Html.fromHtml("<font color=\"@primary_text_dark\">something</font>");
+        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
+        assertEquals(1, colors.length);
+        assertEquals(c.toString(), colors[0].getTextColor().toString());
+
+        s = Html.fromHtml("<font color=\"@" + android.R.color.primary_text_dark
+                + "\">something</font>");
+        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
+        assertEquals(1, colors.length);
+        assertEquals(c.toString(), colors[0].getTextColor().toString());
+
+        s = Html.fromHtml("<font color=\"gibberish\">something</font>");
+        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
+        assertEquals(colors.length, 0);
+    }
+
+    @SmallTest
+    public void testParagraphs() throws Exception {
+        SpannableString s;
+
+        s = new SpannableString("Hello world");
+        assertEquals(Html.toHtml(s), "<p>Hello world</p>\n");
+
+        s = new SpannableString("Hello world\nor something");
+        assertEquals(Html.toHtml(s), "<p>Hello world<br>\nor something</p>\n");
+
+        s = new SpannableString("Hello world\n\nor something");
+        assertEquals(Html.toHtml(s), "<p>Hello world</p>\n<p>or something</p>\n");
+
+        s = new SpannableString("Hello world\n\n\nor something");
+        assertEquals(Html.toHtml(s), "<p>Hello world<br></p>\n<p>or something</p>\n");
+
+        assertEquals("foo\nbar", Html.fromHtml("foo<br>bar").toString());
+        assertEquals("foo\nbar", Html.fromHtml("foo<br>\nbar").toString());
+        assertEquals("foo\nbar", Html.fromHtml("foo<br>\n \nbar").toString());
+    }
+
+    @SmallTest
+    public void testBlockquote() throws Exception {
+        SpannableString s;
+
+        s = new SpannableString("Hello world");
+        s.setSpan(new QuoteSpan(), 0, s.length(), Spannable.SPAN_PARAGRAPH);
+        assertEquals(Html.toHtml(s), "<blockquote><p>Hello world</p>\n</blockquote>\n");
+
+        s = new SpannableString("Hello\n\nworld");
+        s.setSpan(new QuoteSpan(), 0, 7, Spannable.SPAN_PARAGRAPH);
+        assertEquals(Html.toHtml(s), "<blockquote><p>Hello</p>\n</blockquote>\n<p>world</p>\n");
+    }
+
+    @SmallTest
+    public void testEntities() throws Exception {
+        SpannableString s;
+
+        s = new SpannableString("Hello <&> world");
+        assertEquals(Html.toHtml(s), "<p>Hello &lt;&amp;&gt; world</p>\n");
+
+        s = new SpannableString("Hello \u03D5 world");
+        assertEquals(Html.toHtml(s), "<p>Hello &#981; world</p>\n");
+
+        s = new SpannableString("Hello  world");
+        assertEquals(Html.toHtml(s), "<p>Hello&nbsp; world</p>\n");
+    }
+
+    @SmallTest
+    public void testMarkup() throws Exception {
+        SpannableString s;
+
+        s = new SpannableString("Hello bold world");
+        s.setSpan(new StyleSpan(Typeface.BOLD), 6, s.length() - 6,
+                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
+        assertEquals(Html.toHtml(s), "<p>Hello <b>bold</b> world</p>\n");
+
+        s = new SpannableString("Hello italic world");
+        s.setSpan(new StyleSpan(Typeface.ITALIC), 6, s.length() - 6,
+                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
+        assertEquals(Html.toHtml(s), "<p>Hello <i>italic</i> world</p>\n");
+
+        s = new SpannableString("Hello monospace world");
+        s.setSpan(new TypefaceSpan("monospace"), 6, s.length() - 6,
+                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
+        assertEquals(Html.toHtml(s), "<p>Hello <tt>monospace</tt> world</p>\n");
+
+        s = new SpannableString("Hello superscript world");
+        s.setSpan(new SuperscriptSpan(), 6, s.length() - 6,
+                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
+        assertEquals(Html.toHtml(s), "<p>Hello <sup>superscript</sup> world</p>\n");
+
+        s = new SpannableString("Hello subscript world");
+        s.setSpan(new SubscriptSpan(), 6, s.length() - 6,
+                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
+        assertEquals(Html.toHtml(s), "<p>Hello <sub>subscript</sub> world</p>\n");
+
+        s = new SpannableString("Hello underline world");
+        s.setSpan(new UnderlineSpan(), 6, s.length() - 6,
+                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
+        assertEquals(Html.toHtml(s), "<p>Hello <u>underline</u> world</p>\n");
+
+        s = new SpannableString("Hello struck world");
+        s.setSpan(new StrikethroughSpan(), 6, s.length() - 6,
+                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
+        assertEquals(Html.toHtml(s), "<p>Hello <strike>struck</strike> world</p>\n");
+
+        s = new SpannableString("Hello linky world");
+        s.setSpan(new URLSpan("http://www.google.com"), 6, s.length() - 6,
+                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
+        assertEquals(Html.toHtml(s),
+                     "<p>Hello <a href=\"http://www.google.com\">linky</a> world</p>\n");
+    }
+
+    @SmallTest
+    public void testImg() throws Exception {
+        Spanned s;
+
+        s = Html.fromHtml("yes<img src=\"http://example.com/foo.gif\">no");
+
+        assertEquals("<p>yes<img src=\"http://example.com/foo.gif\">no</p>\n",
+                     Html.toHtml(s));
+    }
+
+    @SmallTest
+    public void testUtf8() throws Exception {
+        Spanned s;
+
+        s = Html.fromHtml("<p>\u0124\u00eb\u0142\u0142o, world!</p>");
+        assertEquals("<p>&#292;&#235;&#322;&#322;o, world!</p>\n", Html.toHtml(s));
+    }
+
 }
diff --git a/tests/AndroidTests/src/com/android/unit_tests/LinkifyTest.java b/core/tests/coretests/src/android/text/util/LinkifyTest.java
similarity index 91%
rename from tests/AndroidTests/src/com/android/unit_tests/LinkifyTest.java
rename to core/tests/coretests/src/android/text/util/LinkifyTest.java
index 83e0758..99c6501 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/LinkifyTest.java
+++ b/core/tests/coretests/src/android/text/util/LinkifyTest.java
@@ -14,16 +14,14 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.text.util;
 
 import android.test.AndroidTestCase;
 import android.test.suitebuilder.annotation.MediumTest;
 import android.test.suitebuilder.annotation.SmallTest;
-import android.text.*;
-import android.text.method.*;
-import android.text.style.*;
-import android.text.util.*;
-import android.widget.*;
+import android.text.method.LinkMovementMethod;
+import android.text.util.Linkify;
+import android.widget.TextView;
 
 /**
  * LinkifyTest tests {@link Linkify}.
diff --git a/tests/AndroidTests/src/com/android/unit_tests/PatternsTest.java b/core/tests/coretests/src/android/util/PatternsTest.java
similarity index 98%
rename from tests/AndroidTests/src/com/android/unit_tests/PatternsTest.java
rename to core/tests/coretests/src/android/util/PatternsTest.java
index 0edcd6d..957c593 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/PatternsTest.java
+++ b/core/tests/coretests/src/android/util/PatternsTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.unit_tests;
+package android.util;
 
 import android.test.suitebuilder.annotation.SmallTest;
 import android.util.Patterns;
diff --git a/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListTester.java b/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListTester.java
index ad99ee8..dfb10fb 100644
--- a/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListTester.java
+++ b/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListTester.java
@@ -28,11 +28,11 @@
 import junit.framework.Assert;
 
 public class ExpandableListTester {
-    private ExpandableListView mExpandableListView;
-    private ExpandableListAdapter mAdapter;
-    private ListUtil mListUtil;
+    private final ExpandableListView mExpandableListView;
+    private final ExpandableListAdapter mAdapter;
+    private final ListUtil mListUtil;
 
-    private ActivityInstrumentationTestCase2<? extends ExpandableListScenario>
+    private final ActivityInstrumentationTestCase2<? extends ExpandableListScenario>
         mActivityInstrumentation;
 
     Instrumentation mInstrumentation;
@@ -76,6 +76,8 @@
             View headerChild = mExpandableListView.getChildAt(index
                     - mExpandableListView.getFirstVisiblePosition());
             mExpandableListView.showContextMenuForChild(headerChild);
+            mInstrumentation.waitForIdleSync();
+            Assert.assertNull(menuListener.getErrorMessage(), menuListener.getErrorMessage());
             index++;
         }
 
@@ -92,6 +94,8 @@
             View groupChild = mExpandableListView.getChildAt(index
                     - mExpandableListView.getFirstVisiblePosition());
             mExpandableListView.showContextMenuForChild(groupChild);
+            mInstrumentation.waitForIdleSync();
+            Assert.assertNull(menuListener.getErrorMessage(), menuListener.getErrorMessage());
             index++;
 
             final int childrenCount = mAdapter.getChildrenCount(groupIndex);
@@ -102,6 +106,8 @@
                 View child = mExpandableListView.getChildAt(index
                         - mExpandableListView.getFirstVisiblePosition());
                 mExpandableListView.showContextMenuForChild(child);
+                mInstrumentation.waitForIdleSync();
+                Assert.assertNull(menuListener.getErrorMessage(), menuListener.getErrorMessage());
                 index++;
             }
         }
@@ -115,6 +121,8 @@
             View footerChild = mExpandableListView.getChildAt(index
                     - mExpandableListView.getFirstVisiblePosition());
             mExpandableListView.showContextMenuForChild(footerChild);
+            mInstrumentation.waitForIdleSync();
+            Assert.assertNull(menuListener.getErrorMessage(), menuListener.getErrorMessage());
             index++;
         }
 
diff --git a/core/tests/coretests/src/android/widget/expandablelistview/PositionTesterContextMenuListener.java b/core/tests/coretests/src/android/widget/expandablelistview/PositionTesterContextMenuListener.java
index b482005..2dbdff8 100644
--- a/core/tests/coretests/src/android/widget/expandablelistview/PositionTesterContextMenuListener.java
+++ b/core/tests/coretests/src/android/widget/expandablelistview/PositionTesterContextMenuListener.java
@@ -23,8 +23,6 @@
 import android.widget.ExpandableListView;
 import android.widget.AdapterView.AdapterContextMenuInfo;
 
-import junit.framework.Assert;
-
 public class PositionTesterContextMenuListener implements OnCreateContextMenuListener {
 
     private int groupPosition, childPosition;
@@ -33,6 +31,9 @@
     private static final int ADAPTER_TYPE = -1;
     private int testType; // as returned by getPackedPositionType
 
+    // Will be set to null by each call to onCreateContextMenu, unless an error occurred. 
+    private String errorMessage;
+
     public void expectGroupContextMenu(int groupPosition) {
         this.groupPosition = groupPosition;
         testType = ExpandableListView.PACKED_POSITION_TYPE_GROUP;
@@ -50,30 +51,61 @@
     }
 
     public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
+        errorMessage = null;
         if (testType == ADAPTER_TYPE) {
-            Assert.assertTrue("MenuInfo is not an AdapterContextMenuInfo",
-                    menuInfo instanceof AdapterContextMenuInfo);
+            if (!isTrue("MenuInfo is not an AdapterContextMenuInfo",
+                    menuInfo instanceof AdapterContextMenuInfo)) {
+                return;
+            }
             AdapterContextMenuInfo adapterContextMenuInfo = (AdapterContextMenuInfo) menuInfo;
-            Assert.assertEquals("Wrong flat position",
-                    groupPosition,
-                    adapterContextMenuInfo.position);
+            if (!areEqual("Wrong flat position", groupPosition, adapterContextMenuInfo.position)) {
+                return;
+            }
         } else {
-            Assert.assertTrue("MenuInfo is not an ExpandableListContextMenuInfo",
-                    menuInfo instanceof ExpandableListView.ExpandableListContextMenuInfo);
+            if (!isTrue("MenuInfo is not an ExpandableListContextMenuInfo",
+                    menuInfo instanceof ExpandableListView.ExpandableListContextMenuInfo)) {
+                return;
+            }
             ExpandableListView.ExpandableListContextMenuInfo elvMenuInfo =
                 (ExpandableListView.ExpandableListContextMenuInfo) menuInfo;
             long packedPosition = elvMenuInfo.packedPosition;
 
             int packedPositionType = ExpandableListView.getPackedPositionType(packedPosition);
-            Assert.assertEquals("Wrong packed position type", testType, packedPositionType);
+            if (!areEqual("Wrong packed position type", testType, packedPositionType)) {
+                return;
+            }
 
             int packedPositionGroup = ExpandableListView.getPackedPositionGroup(packedPosition);
-            Assert.assertEquals("Wrong group position", groupPosition, packedPositionGroup);
+            if (!areEqual("Wrong group position", groupPosition, packedPositionGroup)) {
+                return;
+            }
 
             if (testType == ExpandableListView.PACKED_POSITION_TYPE_CHILD) {
-                int packedPosChild = ExpandableListView.getPackedPositionChild(packedPosition);
-                Assert.assertEquals("Wrong child position", childPosition, packedPosChild);
+                int packedPositionChild = ExpandableListView.getPackedPositionChild(packedPosition);
+                if (!areEqual("Wrong child position", childPosition, packedPositionChild)) {
+                    return;
+                }
             }
         }
     }
+
+    private boolean areEqual(String message, int expected, int actual) {
+        if (expected != actual) {
+            errorMessage = String.format(message + " (%d vs %d", expected, actual);
+            return false;
+        }
+        return true;
+    }
+
+    private boolean isTrue(String message, boolean value) {
+        if (!value) {
+            errorMessage = message;
+            return false;
+        }
+        return true;
+    }
+
+    public String getErrorMessage() {
+        return errorMessage;
+    }
 }
diff --git a/tests/AndroidTests/src/com/android/unit_tests/DNParserTest.java b/core/tests/coretests/src/com/android/internal/net/DNParserTest.java
similarity index 97%
rename from tests/AndroidTests/src/com/android/unit_tests/DNParserTest.java
rename to core/tests/coretests/src/com/android/internal/net/DNParserTest.java
index 61d0b42..9b490a3 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/DNParserTest.java
+++ b/core/tests/coretests/src/com/android/internal/net/DNParserTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.unit_tests;
+package com.android.internal.net;
 
 import com.android.internal.net.DNParser;
 
diff --git a/tests/AndroidTests/src/com/android/unit_tests/DomainNameValidatorTest.java b/core/tests/coretests/src/com/android/internal/net/DomainNameValidatorTest.java
similarity index 98%
rename from tests/AndroidTests/src/com/android/unit_tests/DomainNameValidatorTest.java
rename to core/tests/coretests/src/com/android/internal/net/DomainNameValidatorTest.java
index 1754dbe..f0d581e 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/DomainNameValidatorTest.java
+++ b/core/tests/coretests/src/com/android/internal/net/DomainNameValidatorTest.java
@@ -13,9 +13,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.unit_tests;
+package com.android.internal.net;
 
 import com.android.internal.net.DomainNameValidator;
+import com.android.frameworks.coretests.R;
+import com.android.frameworks.coretests.R.raw;
 
 import android.test.AndroidTestCase;
 
diff --git a/tests/AndroidTests/src/com/android/unit_tests/internal/util/HanziToPinyinTest.java b/core/tests/coretests/src/com/android/internal/util/HanziToPinyinTest.java
similarity index 97%
rename from tests/AndroidTests/src/com/android/unit_tests/internal/util/HanziToPinyinTest.java
rename to core/tests/coretests/src/com/android/internal/util/HanziToPinyinTest.java
index 71a8ea7..36dee70 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/internal/util/HanziToPinyinTest.java
+++ b/core/tests/coretests/src/com/android/internal/util/HanziToPinyinTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests.internal.util;
+package com.android.internal.util;
 
 import java.text.Collator;
 import java.util.Arrays;
diff --git a/tests/CoreTests/android/res/color/color1.xml b/graphics/tests/graphicstests/res/color/color1.xml
similarity index 100%
rename from tests/CoreTests/android/res/color/color1.xml
rename to graphics/tests/graphicstests/res/color/color1.xml
diff --git a/tests/CoreTests/android/res/color/color_no_default.xml b/graphics/tests/graphicstests/res/color/color_no_default.xml
similarity index 100%
rename from tests/CoreTests/android/res/color/color_no_default.xml
rename to graphics/tests/graphicstests/res/color/color_no_default.xml
diff --git a/tests/CoreTests/android/res/values/colors.xml b/graphics/tests/graphicstests/res/values/colors.xml
similarity index 100%
rename from tests/CoreTests/android/res/values/colors.xml
rename to graphics/tests/graphicstests/res/values/colors.xml
diff --git a/tests/CoreTests/android/graphics/ColorStateListTest.java b/graphics/tests/graphicstests/src/android/graphics/ColorStateListTest.java
similarity index 97%
rename from tests/CoreTests/android/graphics/ColorStateListTest.java
rename to graphics/tests/graphicstests/src/android/graphics/ColorStateListTest.java
index 68c2fc1..eb1025c 100644
--- a/tests/CoreTests/android/graphics/ColorStateListTest.java
+++ b/graphics/tests/graphicstests/src/android/graphics/ColorStateListTest.java
@@ -16,10 +16,11 @@
 
 package android.graphics;
 
+import com.android.frameworks.graphicstests.R;
+
 import android.content.res.Resources;
 import android.content.res.ColorStateList;
 import android.test.AndroidTestCase;
-import android.core.R;
 import android.test.suitebuilder.annotation.SmallTest;
 
 /**
diff --git a/tests/CoreTests/android/graphics/drawable/StateListDrawableTest.java b/graphics/tests/graphicstests/src/android/graphics/drawable/StateListDrawableTest.java
similarity index 100%
rename from tests/CoreTests/android/graphics/drawable/StateListDrawableTest.java
rename to graphics/tests/graphicstests/src/android/graphics/drawable/StateListDrawableTest.java
diff --git a/tests/CoreTests/android/view/MockView.java b/graphics/tests/graphicstests/src/android/view/MockView.java
similarity index 100%
rename from tests/CoreTests/android/view/MockView.java
rename to graphics/tests/graphicstests/src/android/view/MockView.java
diff --git a/media/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp
index 3e9ba33..efea802 100644
--- a/media/jni/android_media_MediaMetadataRetriever.cpp
+++ b/media/jni/android_media_MediaMetadataRetriever.cpp
@@ -76,7 +76,6 @@
 static void android_media_MediaMetadataRetriever_setDataSource(JNIEnv *env, jobject thiz, jstring path)
 {
     LOGV("setDataSource");
-    Mutex::Autolock lock(sLock);
     MediaMetadataRetriever* retriever = getRetriever(env, thiz);
     if (retriever == 0) {
         jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
@@ -105,7 +104,6 @@
 static void android_media_MediaMetadataRetriever_setDataSourceFD(JNIEnv *env, jobject thiz, jobject fileDescriptor, jlong offset, jlong length)
 {
     LOGV("setDataSource");
-    Mutex::Autolock lock(sLock);
     MediaMetadataRetriever* retriever = getRetriever(env, thiz);
     if (retriever == 0) {
         jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
@@ -135,7 +133,6 @@
 static void android_media_MediaMetadataRetriever_setMode(JNIEnv *env, jobject thiz, jint mode)
 {
     LOGV("setMode");
-    Mutex::Autolock lock(sLock);
     MediaMetadataRetriever* retriever = getRetriever(env, thiz);
     if (retriever == 0) {
         jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
@@ -147,7 +144,6 @@
 static int android_media_MediaMetadataRetriever_getMode(JNIEnv *env, jobject thiz)
 {
     LOGV("getMode");
-    Mutex::Autolock lock(sLock);
     MediaMetadataRetriever* retriever = getRetriever(env, thiz);
     if (retriever == 0) {
         jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
@@ -161,7 +157,6 @@
 static jobject android_media_MediaMetadataRetriever_captureFrame(JNIEnv *env, jobject thiz)
 {
     LOGV("captureFrame");
-    Mutex::Autolock lock(sLock);
     MediaMetadataRetriever* retriever = getRetriever(env, thiz);
     if (retriever == 0) {
         jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
@@ -202,7 +197,6 @@
 static jbyteArray android_media_MediaMetadataRetriever_extractAlbumArt(JNIEnv *env, jobject thiz)
 {
     LOGV("extractAlbumArt");
-    Mutex::Autolock lock(sLock);
     MediaMetadataRetriever* retriever = getRetriever(env, thiz);
     if (retriever == 0) {
         jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
@@ -238,7 +232,6 @@
 static jobject android_media_MediaMetadataRetriever_extractMetadata(JNIEnv *env, jobject thiz, jint keyCode)
 {
     LOGV("extractMetadata");
-    Mutex::Autolock lock(sLock);
     MediaMetadataRetriever* retriever = getRetriever(env, thiz);
     if (retriever == 0) {
         jniThrowException(env, "java/lang/IllegalStateException", "No retriever available");
diff --git a/media/libmedia/mediametadataretriever.cpp b/media/libmedia/mediametadataretriever.cpp
index d34a8ed..e2712ba 100644
--- a/media/libmedia/mediametadataretriever.cpp
+++ b/media/libmedia/mediametadataretriever.cpp
@@ -95,6 +95,7 @@
 status_t MediaMetadataRetriever::setDataSource(const char* srcUrl)
 {
     LOGV("setDataSource");
+    Mutex::Autolock _l(mLock);
     if (mRetriever == 0) {
         LOGE("retriever is not initialized");
         return INVALID_OPERATION;
@@ -110,6 +111,7 @@
 status_t MediaMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t length)
 {
     LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length);
+    Mutex::Autolock _l(mLock);
     if (mRetriever == 0) {
         LOGE("retriever is not initialized");
         return INVALID_OPERATION;
@@ -124,6 +126,7 @@
 status_t MediaMetadataRetriever::setMode(int mode)
 {
     LOGV("setMode(%d)", mode);
+    Mutex::Autolock _l(mLock);
     if (mRetriever == 0) {
         LOGE("retriever is not initialized");
         return INVALID_OPERATION;
@@ -134,6 +137,7 @@
 status_t MediaMetadataRetriever::getMode(int* mode)
 {
     LOGV("getMode");
+    Mutex::Autolock _l(mLock);
     if (mRetriever == 0) {
         LOGE("retriever is not initialized");
         return INVALID_OPERATION;
@@ -144,6 +148,7 @@
 sp<IMemory> MediaMetadataRetriever::captureFrame()
 {
     LOGV("captureFrame");
+    Mutex::Autolock _l(mLock);
     if (mRetriever == 0) {
         LOGE("retriever is not initialized");
         return NULL;
@@ -154,6 +159,7 @@
 const char* MediaMetadataRetriever::extractMetadata(int keyCode)
 {
     LOGV("extractMetadata(%d)", keyCode);
+    Mutex::Autolock _l(mLock);
     if (mRetriever == 0) {
         LOGE("retriever is not initialized");
         return NULL;
@@ -164,6 +170,7 @@
 sp<IMemory> MediaMetadataRetriever::extractAlbumArt()
 {
     LOGV("extractAlbumArt");
+    Mutex::Autolock _l(mLock);
     if (mRetriever == 0) {
         LOGE("retriever is not initialized");
         return NULL;
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkTestRunner.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkTestRunner.java
index 2a4e9a0..3e33951 100755
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkTestRunner.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkTestRunner.java
@@ -24,7 +24,7 @@
 import com.android.mediaframeworktest.functional.MediaRecorderTest;
 import com.android.mediaframeworktest.functional.SimTonesTest;
 import com.android.mediaframeworktest.functional.MediaPlayerInvokeTest;
-
+import com.android.mediaframeworktest.functional.MediaAudioManagerTest;
 import junit.framework.TestSuite;
 
 import android.test.InstrumentationTestRunner;
@@ -54,6 +54,7 @@
         suite.addTestSuite(MediaAudioTrackTest.class);
         suite.addTestSuite(MediaMimeTest.class);
         suite.addTestSuite(MediaPlayerInvokeTest.class);
+        suite.addTestSuite(MediaAudioManagerTest.class);
         return suite;
     }
 
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaAudioManagerTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaAudioManagerTest.java
new file mode 100644
index 0000000..644444a
--- /dev/null
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaAudioManagerTest.java
@@ -0,0 +1,70 @@
+ /*
+  * Copyright (C) 2010 The Android Open Source Project
+  *
+  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+  * use this file except in compliance with the License. You may obtain a copy of
+  * the License at
+  *
+  * http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+  * License for the specific language governing permissions and limitations under
+  * the License.
+  */
+
+package com.android.mediaframeworktest.functional;
+
+import com.android.mediaframeworktest.MediaFrameworkTest;
+import android.content.Context;
+import android.media.AudioManager;
+import android.test.ActivityInstrumentationTestCase2;
+import android.test.suitebuilder.annotation.MediumTest;
+
+/**
+ * Junit / Instrumentation test case for the media AudioManager api
+ */
+
+public class MediaAudioManagerTest extends ActivityInstrumentationTestCase2<MediaFrameworkTest> {
+
+    private String TAG = "MediaAudioManagerTest";
+    private AudioManager mAudioManager;
+    private int[] ringtoneMode = {AudioManager.RINGER_MODE_NORMAL,
+             AudioManager.RINGER_MODE_SILENT, AudioManager.RINGER_MODE_VIBRATE};
+
+    public MediaAudioManagerTest() {
+        super("com.android.mediaframeworktest", MediaFrameworkTest.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mAudioManager = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE);
+     }
+
+     @Override
+     protected void tearDown() throws Exception {
+         super.tearDown();
+     }
+
+     public boolean validateSetRingTone(int i) {
+         int getRingtone = mAudioManager.getRingerMode();
+         if (i != getRingtone)
+             return false;
+         else
+             return true;
+     }
+
+     // Test case 1: Simple test case to validate the set ringtone mode
+     @MediumTest
+     public void testSetRingtoneMode() throws Exception {
+         boolean result = false;
+
+         for (int i = 0; i < ringtoneMode.length; i++) {
+             mAudioManager.setRingerMode(ringtoneMode[i]);
+             result = validateSetRingTone(ringtoneMode[i]);
+             assertTrue("SetRingtoneMode : " + ringtoneMode[i], result);
+         }
+     }
+ }
\ No newline at end of file
diff --git a/packages/TtsService/src/android/tts/TtsService.java b/packages/TtsService/src/android/tts/TtsService.java
index 530ca57..c977ba3 100755
--- a/packages/TtsService/src/android/tts/TtsService.java
+++ b/packages/TtsService/src/android/tts/TtsService.java
@@ -321,6 +321,10 @@
                 TextToSpeech.Engine.DEFAULT_RATE);
     }
 
+    private int getDefaultPitch() {
+        // Pitch is not user settable; the default pitch is always 100.
+        return 100;
+    }
 
     private String getDefaultLanguage() {
         String defaultLang = android.provider.Settings.Secure.getString(mResolver,
@@ -786,6 +790,7 @@
                     String variant = "";
                     String speechRate = "";
                     String engine = "";
+                    String pitch = "";
                     if (speechItem.mParams != null){
                         for (int i = 0; i < speechItem.mParams.size() - 1; i = i + 2){
                             String param = speechItem.mParams.get(i);
@@ -809,6 +814,8 @@
                                     }
                                 } else if (param.equals(TextToSpeech.Engine.KEY_PARAM_ENGINE)) {
                                     engine = speechItem.mParams.get(i + 1);
+                                } else if (param.equals(TextToSpeech.Engine.KEY_PARAM_PITCH)) {
+                                    pitch = speechItem.mParams.get(i + 1);
                                 }
                             }
                         }
@@ -831,6 +838,11 @@
                         } else {
                             setSpeechRate("", getDefaultRate());
                         }
+                        if (pitch.length() > 0){
+                            setPitch("", Integer.parseInt(pitch));
+                        } else {
+                            setPitch("", getDefaultPitch());
+                        }
                         try {
                             sNativeSynth.speak(speechItem.mText, streamType);
                         } catch (NullPointerException e) {
@@ -885,6 +897,7 @@
                     String variant = "";
                     String speechRate = "";
                     String engine = "";
+                    String pitch = "";
                     if (speechItem.mParams != null){
                         for (int i = 0; i < speechItem.mParams.size() - 1; i = i + 2){
                             String param = speechItem.mParams.get(i);
@@ -901,6 +914,8 @@
                                     utteranceId = speechItem.mParams.get(i+1);
                                 } else if (param.equals(TextToSpeech.Engine.KEY_PARAM_ENGINE)) {
                                     engine = speechItem.mParams.get(i + 1);
+                                } else if (param.equals(TextToSpeech.Engine.KEY_PARAM_PITCH)) {
+                                    pitch = speechItem.mParams.get(i + 1);
                                 }
                             }
                         }
@@ -923,6 +938,11 @@
                         } else {
                             setSpeechRate("", getDefaultRate());
                         }
+                        if (pitch.length() > 0){
+                            setPitch("", Integer.parseInt(pitch));
+                        } else {
+                            setPitch("", getDefaultPitch());
+                        }
                         try {
                             sNativeSynth.synthesizeToFile(speechItem.mText, speechItem.mFilename);
                         } catch (NullPointerException e) {
@@ -1377,7 +1397,17 @@
          *      TTS_LANG_COUNTRY_AVAILABLE, TTS_LANG_COUNTRY_VAR_AVAILABLE as defined in
          *      android.speech.tts.TextToSpeech.
          */
-        public int isLanguageAvailable(String lang, String country, String variant) {
+        public int isLanguageAvailable(String lang, String country, String variant,
+                String[] params) {
+            for (int i = 0; i < params.length - 1; i = i + 2){
+                String param = params[i];
+                if (param != null) {
+                    if (param.equals(TextToSpeech.Engine.KEY_PARAM_ENGINE)) {
+                        mSelf.setEngine(params[i + 1]);
+                        break;
+                    }
+                }
+            }
             return mSelf.isLanguageAvailable(lang, country, variant);
         }
 
diff --git a/tests/AndroidTests/Android.mk b/tests/AndroidTests/Android.mk
deleted file mode 100644
index c22547f..0000000
--- a/tests/AndroidTests/Android.mk
+++ /dev/null
@@ -1,21 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_JAVA_LIBRARIES := framework-tests android.test.runner services
-
-# Resource unit tests use a private locale
-LOCAL_AAPT_FLAGS = -c xx_YY -c cs -c 160dpi -c 32dpi -c 240dpi
-
-LOCAL_SRC_FILES := \
-	$(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := AndroidTests
-LOCAL_CERTIFICATE := platform
-
-include $(BUILD_PACKAGE)
-
-LOCAL_STORED_PATH:= $(LOCAL_PATH)
-include $(call all-makefiles-under,$(LOCAL_STORED_PATH))
-include $(call all-makefiles-under,$(LOCAL_STORED_PATH)/apks)
diff --git a/tests/AndroidTests/AndroidManifest.xml b/tests/AndroidTests/AndroidManifest.xml
deleted file mode 100644
index 1f0bf4d..0000000
--- a/tests/AndroidTests/AndroidManifest.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        package="com.android.unit_tests"
-        android:sharedUserId="com.android.uid.test">
-
-    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
-    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-    <uses-permission android:name="android.permission.CLEAR_APP_CACHE" />
-    <uses-permission android:name="android.permission.CLEAR_APP_USER_DATA" />
-    <uses-permission android:name="android.permission.DELETE_CACHE_FILES" />
-    <uses-permission android:name="android.permission.GET_PACKAGE_SIZE" />
-    <uses-permission android:name="android.permission.WAKE_LOCK" />
-    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
-    <uses-permission android:name="android.permission.INSTALL_PACKAGES" />
-    <uses-permission android:name="android.permission.DELETE_PACKAGES" />
-    <uses-permission android:name="android.permission.MOVE_PACKAGE" />
-    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
-    <uses-permission android:name="android.permission.ASEC_ACCESS" />
-    <uses-permission android:name="android.permission.ASEC_CREATE" />
-    <uses-permission android:name="android.permission.ASEC_DESTROY" />
-    <uses-permission android:name="android.permission.ASEC_MOUNT_UNMOUNT" />
-    <uses-permission android:name="android.permission.ASEC_RENAME" />
-    <uses-permission android:name="android.permission.SHUTDOWN" />
-    <uses-permission android:name="com.android.unit_tests.permission.TEST_GRANTED" />
-    <uses-permission android:name="com.google.android.googleapps.permission.ACCESS_GOOGLE_PASSWORD" />
-    <uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH" />
-    <uses-permission android:name="com.google.android.googleapps.permission.GOOGLE_AUTH.ALL_SERVICES" />
-
-    <!-- InstrumentationTestRunner for AndroidTests -->
-    <instrumentation android:name="android.test.InstrumentationTestRunner"
-                     android:targetPackage="com.android.unit_tests"
-                     android:label="Tests for AndroidTests (unit tests collection)"/>
-
-    <application>
-        <uses-library android:name="android.test.runner" />
-        <activity android:name="AndroidPerformanceTests" android:label="Android Performance Tests">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.UNIT_TEST" />
-            </intent-filter>
-        </activity>
-
-    </application>
-</manifest>
diff --git a/tests/AndroidTests/DisabledTestApp/AndroidManifest.xml b/tests/AndroidTests/DisabledTestApp/AndroidManifest.xml
deleted file mode 100644
index 4d6843e..0000000
--- a/tests/AndroidTests/DisabledTestApp/AndroidManifest.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        package="com.android.unit_tests.disabled_app"
-        android:sharedUserId="com.android.uid.test">
-
-    <application enabled="false">
-
-        <!-- Used to test package component enabling and disabling -->
-        <activity android:name=".DisabledActivity" android:enabled="false" >
-        </activity>
-        <activity android:name=".EnabledActivity" >
-        </activity>
-    </application>
-</manifest>
diff --git a/tests/AndroidTests/EnabledTestApp/AndroidManifest.xml b/tests/AndroidTests/EnabledTestApp/AndroidManifest.xml
deleted file mode 100644
index ad610f1..0000000
--- a/tests/AndroidTests/EnabledTestApp/AndroidManifest.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        package="com.android.unit_tests.enabled_app"
-        android:sharedUserId="com.android.uid.test">
-
-    <application>
-
-        <!-- Used to test package component enabling and disabling -->
-        <activity android:name=".DisabledActivity" android:enabled="false" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="com.android.unit_tests.enabled_app.TEST_CATEGORY" />
-            </intent-filter>
-        </activity>
-        <service android:name=".DisabledService" android:enabled="false" >
-        </service>
-        <receiver android:name=".DisabledReceiver" android:enabled="false" >
-            <intent-filter>
-                <action android:name="android.intent.action.ENABLED_APP_DISABLED_RECEIVER" />
-            </intent-filter>
-        </receiver>
-        <provider android:name=".DisabledProvider" android:enabled="false"
-                  android:authorities="com.android.unit_tests.enabled_app.DisabledProvider"
-                  android:process=":disabled.provider.process" />
-        <activity android:name=".EnabledActivity" >
-        </activity>
-        <service android:name=".EnabledService" android:enabled="true" >
-        </service>
-        <receiver android:name=".EnabledReceiver" >
-            <intent-filter>
-                <action android:name="android.intent.action.ENABLED_APP_ENABLED_RECEIVER" />
-            </intent-filter>
-        </receiver>
-        <provider android:name=".EnabledProvider"
-                  android:authorities="com.android.unit_tests.enabled_app.EnabledProvider"
-                  android:process=":enabled.provider.process" />
-    </application>
-</manifest>
diff --git a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledActivity.java b/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledActivity.java
deleted file mode 100644
index cfac3ec..0000000
--- a/tests/AndroidTests/EnabledTestApp/src/com/android/unit_tests/enabled_app/EnabledActivity.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.unit_tests.enabled_app;
-
-import android.app.Activity;
-
-/**
- * Empty Activity for testing
- */
-
-public class EnabledActivity extends Activity {
-
-}
diff --git a/tests/AndroidTests/MODULE_LICENSE_APACHE2 b/tests/AndroidTests/MODULE_LICENSE_APACHE2
deleted file mode 100644
index e69de29..0000000
--- a/tests/AndroidTests/MODULE_LICENSE_APACHE2
+++ /dev/null
diff --git a/tests/AndroidTests/NOTICE b/tests/AndroidTests/NOTICE
deleted file mode 100644
index c5b1efa..0000000
--- a/tests/AndroidTests/NOTICE
+++ /dev/null
@@ -1,190 +0,0 @@
-
-   Copyright (c) 2005-2008, The Android Open Source Project
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
diff --git a/tests/AndroidTests/apks/install_decl_perm/Android.mk b/tests/AndroidTests/apks/install_decl_perm/Android.mk
deleted file mode 100644
index 9dcf9a0..0000000
--- a/tests/AndroidTests/apks/install_decl_perm/Android.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_PACKAGE_NAME := AndroidTests_install_decl_perm
-
-include $(BUILD_PACKAGE)
-
diff --git a/tests/AndroidTests/apks/install_decl_perm/AndroidManifest.xml b/tests/AndroidTests/apks/install_decl_perm/AndroidManifest.xml
deleted file mode 100644
index 4387500..0000000
--- a/tests/AndroidTests/apks/install_decl_perm/AndroidManifest.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        package="com.android.unit_tests.install_decl_perm">
-
-    <permission android:name="com.android.unit_tests.NORMAL"
-        android:permissionGroup="android.permission-group.COST_MONEY"
-        android:protectionLevel="normal"
-        android:label="test normal perm" />
-        
-    <permission android:name="com.android.unit_tests.DANGEROUS"
-        android:permissionGroup="android.permission-group.COST_MONEY"
-        android:protectionLevel="dangerous"
-        android:label="test dangerous perm" />
-        
-    <permission android:name="com.android.unit_tests.SIGNATURE"
-        android:permissionGroup="android.permission-group.COST_MONEY"
-        android:protectionLevel="signature"
-        android:label="test signature perm" />
-        
-    <application android:hasCode="false">
-    </application>
-</manifest>
diff --git a/tests/AndroidTests/apks/install_use_perm_good/AndroidManifest.xml b/tests/AndroidTests/apks/install_use_perm_good/AndroidManifest.xml
deleted file mode 100644
index 6dd3e71..0000000
--- a/tests/AndroidTests/apks/install_use_perm_good/AndroidManifest.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        package="com.android.unit_tests.install_use_perm_good">
-
-    <uses-permission android:name="com.android.unit_tests.NORMAL" />
-    <uses-permission android:name="com.android.unit_tests.DANGEROUS" />
-    <uses-permission android:name="com.android.unit_tests.SIGNATURE" />
-        
-    <application android:hasCode="false">
-    </application>
-</manifest>
diff --git a/tests/AndroidTests/res/values-12key-63x57/configVarying.xml b/tests/AndroidTests/res/values-12key-63x57/configVarying.xml
deleted file mode 100644
index 50b3765..0000000
--- a/tests/AndroidTests/res/values-12key-63x57/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple 12key 63x57</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag 12key 63x57</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-12key-dpad/configVarying.xml b/tests/AndroidTests/res/values-12key-dpad/configVarying.xml
deleted file mode 100644
index 83eb080..0000000
--- a/tests/AndroidTests/res/values-12key-dpad/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple 12key dpad</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag 12key dpad</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-12key/configVarying.xml b/tests/AndroidTests/res/values-12key/configVarying.xml
deleted file mode 100644
index e11340c..0000000
--- a/tests/AndroidTests/res/values-12key/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple 12key</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag 12key</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-240dpi/configVarying.xml b/tests/AndroidTests/res/values-240dpi/configVarying.xml
deleted file mode 100644
index 9f32f8d..0000000
--- a/tests/AndroidTests/res/values-240dpi/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple 240dpi</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag 240dpi</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-32dpi-keysexposed/configVarying.xml b/tests/AndroidTests/res/values-32dpi-keysexposed/configVarying.xml
deleted file mode 100644
index cd7f8da..0000000
--- a/tests/AndroidTests/res/values-32dpi-keysexposed/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple 32dpi keysexposed</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag 32dpi keysexposed</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-32dpi-stylus/configVarying.xml b/tests/AndroidTests/res/values-32dpi-stylus/configVarying.xml
deleted file mode 100644
index 63fcdc8..0000000
--- a/tests/AndroidTests/res/values-32dpi-stylus/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple 32dpi stylus</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag 32dpi stylus</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-32dpi/configVarying.xml b/tests/AndroidTests/res/values-32dpi/configVarying.xml
deleted file mode 100644
index f903f0f..0000000
--- a/tests/AndroidTests/res/values-32dpi/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple 32dpi</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag 32dpi</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-480x320/configVarying.xml b/tests/AndroidTests/res/values-480x320/configVarying.xml
deleted file mode 100644
index d4305fc..0000000
--- a/tests/AndroidTests/res/values-480x320/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple 480x320</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag 480x320</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-640x400/configVarying.xml b/tests/AndroidTests/res/values-640x400/configVarying.xml
deleted file mode 100644
index 30332c0..0000000
--- a/tests/AndroidTests/res/values-640x400/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple 640x400</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag 640x400</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-cs/strings.xml b/tests/AndroidTests/res/values-cs/strings.xml
deleted file mode 100644
index bd402c7..0000000
--- a/tests/AndroidTests/res/values-cs/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- 
-    <plurals name="plurals_test">
-        <item quantity="one">A Czech dog</item>
-        <item quantity="few">Few Czech dogs</item>
-        <item quantity="other">Some Czech dogs</item>
-    </plurals>
-</resources>
-
diff --git a/tests/AndroidTests/res/values-dpad-63x57/configVarying.xml b/tests/AndroidTests/res/values-dpad-63x57/configVarying.xml
deleted file mode 100644
index 8383e9e..0000000
--- a/tests/AndroidTests/res/values-dpad-63x57/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple dpad 63x57</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag dpad 63x57</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-dpad/configVarying.xml b/tests/AndroidTests/res/values-dpad/configVarying.xml
deleted file mode 100644
index c8d5767..0000000
--- a/tests/AndroidTests/res/values-dpad/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple dpad</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag dpad</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-fr-rFR/configVarying.xml b/tests/AndroidTests/res/values-fr-rFR/configVarying.xml
deleted file mode 100644
index 5ecac7c..0000000
--- a/tests/AndroidTests/res/values-fr-rFR/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple fr FR</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag fr FR</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-fr/configVarying.xml b/tests/AndroidTests/res/values-fr/configVarying.xml
deleted file mode 100644
index 8413b5a..0000000
--- a/tests/AndroidTests/res/values-fr/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple fr</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag fr</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-keysexposed-12key/configVarying.xml b/tests/AndroidTests/res/values-keysexposed-12key/configVarying.xml
deleted file mode 100644
index 2a2b8d9..0000000
--- a/tests/AndroidTests/res/values-keysexposed-12key/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple keysexposed 12key</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag keysexposed 12key</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-keysexposed-dpad/configVarying.xml b/tests/AndroidTests/res/values-keysexposed-dpad/configVarying.xml
deleted file mode 100644
index f279eb0..0000000
--- a/tests/AndroidTests/res/values-keysexposed-dpad/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple keysexposed dpad</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag keysexposed dpad</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-keysexposed/configVarying.xml b/tests/AndroidTests/res/values-keysexposed/configVarying.xml
deleted file mode 100644
index 2380e7e..0000000
--- a/tests/AndroidTests/res/values-keysexposed/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple keysexposed</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag keysexposed</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-land/configVarying.xml b/tests/AndroidTests/res/values-land/configVarying.xml
deleted file mode 100644
index 7d3d7e8..0000000
--- a/tests/AndroidTests/res/values-land/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple landscape</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag landscape</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mcc110-xx/configVarying.xml b/tests/AndroidTests/res/values-mcc110-xx/configVarying.xml
deleted file mode 100644
index 82e2435..0000000
--- a/tests/AndroidTests/res/values-mcc110-xx/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mcc110 xx</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mcc110 xx</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mcc111-mnc222/configVarying.xml b/tests/AndroidTests/res/values-mcc111-mnc222/configVarying.xml
deleted file mode 100644
index 84c31c6..0000000
--- a/tests/AndroidTests/res/values-mcc111-mnc222/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mcc111 mnc222</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mcc111 mnc222</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mcc111-xx-rYY/configVarying.xml b/tests/AndroidTests/res/values-mcc111-xx-rYY/configVarying.xml
deleted file mode 100644
index 3aa1ba0..0000000
--- a/tests/AndroidTests/res/values-mcc111-xx-rYY/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mcc111 xx-rYY</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mcc111 xx-rYY</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mcc111-xx/configVarying.xml b/tests/AndroidTests/res/values-mcc111-xx/configVarying.xml
deleted file mode 100644
index 09bd817..0000000
--- a/tests/AndroidTests/res/values-mcc111-xx/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mcc111 xx</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mcc111 xx</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mcc111/configVarying.xml b/tests/AndroidTests/res/values-mcc111/configVarying.xml
deleted file mode 100644
index b516194..0000000
--- a/tests/AndroidTests/res/values-mcc111/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mcc111</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mcc111</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mcc112/configVarying.xml b/tests/AndroidTests/res/values-mcc112/configVarying.xml
deleted file mode 100644
index 9c05d77..0000000
--- a/tests/AndroidTests/res/values-mcc112/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mcc112</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mcc112</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mnc220-xx/configVarying.xml b/tests/AndroidTests/res/values-mnc220-xx/configVarying.xml
deleted file mode 100644
index fbc7888..0000000
--- a/tests/AndroidTests/res/values-mnc220-xx/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mnc220 xx</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mnc220 xx</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mnc222-32dpi/configVarying.xml b/tests/AndroidTests/res/values-mnc222-32dpi/configVarying.xml
deleted file mode 100644
index 03bea33..0000000
--- a/tests/AndroidTests/res/values-mnc222-32dpi/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mnc222 32dpi</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mnc222 32dpi</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mnc222-square/configVarying.xml b/tests/AndroidTests/res/values-mnc222-square/configVarying.xml
deleted file mode 100644
index 952c595..0000000
--- a/tests/AndroidTests/res/values-mnc222-square/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mnc222 square</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mnc222 square</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mnc222-xx/configVarying.xml b/tests/AndroidTests/res/values-mnc222-xx/configVarying.xml
deleted file mode 100644
index c1cafbc..0000000
--- a/tests/AndroidTests/res/values-mnc222-xx/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mnc222 xx</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mnc222 xx</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mnc222/configVarying.xml b/tests/AndroidTests/res/values-mnc222/configVarying.xml
deleted file mode 100644
index a37b7ef..0000000
--- a/tests/AndroidTests/res/values-mnc222/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mnc222</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mnc222</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-mnc223/configVarying.xml b/tests/AndroidTests/res/values-mnc223/configVarying.xml
deleted file mode 100644
index 8936cbc..0000000
--- a/tests/AndroidTests/res/values-mnc223/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple mnc223</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag mnc223</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-nokeys/configVarying.xml b/tests/AndroidTests/res/values-nokeys/configVarying.xml
deleted file mode 100644
index 71f7e0b..0000000
--- a/tests/AndroidTests/res/values-nokeys/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple nokeys</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag nokeys</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-nonav/configVarying.xml b/tests/AndroidTests/res/values-nonav/configVarying.xml
deleted file mode 100644
index 1254920..0000000
--- a/tests/AndroidTests/res/values-nonav/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple nonav</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag nonav</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-notouch/configVarying.xml b/tests/AndroidTests/res/values-notouch/configVarying.xml
deleted file mode 100644
index f919f87..0000000
--- a/tests/AndroidTests/res/values-notouch/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple notouch</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag notouch</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-square-32dpi/configVarying.xml b/tests/AndroidTests/res/values-square-32dpi/configVarying.xml
deleted file mode 100644
index 41a69cd..0000000
--- a/tests/AndroidTests/res/values-square-32dpi/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple square 32dpi</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag square 32dpi</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-square-stylus/configVarying.xml b/tests/AndroidTests/res/values-square-stylus/configVarying.xml
deleted file mode 100644
index de7892e..0000000
--- a/tests/AndroidTests/res/values-square-stylus/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple square stylus</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag square stylus</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-square/configVarying.xml b/tests/AndroidTests/res/values-square/configVarying.xml
deleted file mode 100644
index ba3a036..0000000
--- a/tests/AndroidTests/res/values-square/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple square</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag square</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-stylus-12key/configVarying.xml b/tests/AndroidTests/res/values-stylus-12key/configVarying.xml
deleted file mode 100644
index d79f079..0000000
--- a/tests/AndroidTests/res/values-stylus-12key/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple stylus 12key</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag stylus 12key</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-stylus-keysexposed/configVarying.xml b/tests/AndroidTests/res/values-stylus-keysexposed/configVarying.xml
deleted file mode 100644
index ff4e766..0000000
--- a/tests/AndroidTests/res/values-stylus-keysexposed/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple stylus keysexposed</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag stylus keysexposed</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-stylus/configVarying.xml b/tests/AndroidTests/res/values-stylus/configVarying.xml
deleted file mode 100644
index 83936a7..0000000
--- a/tests/AndroidTests/res/values-stylus/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple stylus</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag stylus</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-wheel/configVarying.xml b/tests/AndroidTests/res/values-wheel/configVarying.xml
deleted file mode 100644
index 6164855..0000000
--- a/tests/AndroidTests/res/values-wheel/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple wheel</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag wheel</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-xx-32dpi/configVarying.xml b/tests/AndroidTests/res/values-xx-32dpi/configVarying.xml
deleted file mode 100644
index 4cc162c..0000000
--- a/tests/AndroidTests/res/values-xx-32dpi/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple xx 32dpi</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag xx 32dpi</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-xx-rYY/configVarying.xml b/tests/AndroidTests/res/values-xx-rYY/configVarying.xml
deleted file mode 100644
index 2d2a9a1..0000000
--- a/tests/AndroidTests/res/values-xx-rYY/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple xx-rYY</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag xx-rYY</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-xx-square/configVarying.xml b/tests/AndroidTests/res/values-xx-square/configVarying.xml
deleted file mode 100644
index 807feec..0000000
--- a/tests/AndroidTests/res/values-xx-square/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple xx square</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag xx square</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values-xx/configVarying.xml b/tests/AndroidTests/res/values-xx/configVarying.xml
deleted file mode 100644
index fef2737..0000000
--- a/tests/AndroidTests/res/values-xx/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple xx</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag xx</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values/arrays.xml b/tests/AndroidTests/res/values/arrays.xml
deleted file mode 100644
index 20ab407..0000000
--- a/tests/AndroidTests/res/values/arrays.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="integer" name="reference" format="integer">101</item>
-    
-    <!--
-    <array name="generic">
-        <item>zero</item>
-        <item>1</item>
-        <item>@string/reference</item>
-    </array>
-    <array name="genericStrings" format="string">
-        <item>zero</item>
-        <item>1</item>
-        <item>@string/reference</item>
-    </array>
-    -->
-    <string-array name="strings">
-        <item>zero</item>
-        <item>1</item>
-        <item>@string/reference</item>
-    </string-array>
-    <integer-array name="integers">
-        <item>0</item>
-        <item>1</item>
-        <item>@integer/reference</item>
-    </integer-array>
-</resources>
diff --git a/tests/AndroidTests/res/values/attrs.xml b/tests/AndroidTests/res/values/attrs.xml
deleted file mode 100644
index d3a31ca..0000000
--- a/tests/AndroidTests/res/values/attrs.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <attr name="testEnum">
-        <enum name="val1" value="1" />
-        <enum name="val2" value="2" />
-        <enum name="val10" value="10" />
-    </attr>
-
-    <attr name="testFlags">
-        <flag name="bit1" value="0x1" />
-        <flag name="bit2" value="0x2" />
-        <flag name="bit31" value="0x40000000" />
-    </attr>
-
-    <attr name="testString" format="string" />
-    
-    <declare-styleable name="EnumStyle">
-        <attr name="testEnum" />
-    </declare-styleable>
-
-    <declare-styleable name="FlagStyle">
-        <attr name="testFlags" />
-    </declare-styleable>
-    
-    <declare-styleable name="TestConfig">
-        <attr name="testString" />
-    </declare-styleable>
-</resources>
-
diff --git a/tests/AndroidTests/res/values/bools.xml b/tests/AndroidTests/res/values/bools.xml
deleted file mode 100644
index ffa8955..0000000
--- a/tests/AndroidTests/res/values/bools.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-	<bool name="trueRes">true</bool>
-	<bool name="falseRes">false</bool>
-</resources>
diff --git a/tests/AndroidTests/res/values/configVarying.xml b/tests/AndroidTests/res/values/configVarying.xml
deleted file mode 100644
index 3b3e4a4..0000000
--- a/tests/AndroidTests/res/values/configVarying.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item type="configVarying" name="simple">simple default</item>
-    <bag type="configVarying" name="bag">
-        <item name="testString">bag default</item>
-    </bag>
-</resources>
diff --git a/tests/AndroidTests/res/values/dimens.xml b/tests/AndroidTests/res/values/dimens.xml
deleted file mode 100644
index 72d1010..0000000
--- a/tests/AndroidTests/res/values/dimens.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <item name="frac100perc" type="dimen" format="fraction">100%</item>
-    <item name="frac1perc" type="dimen" format="fraction">1%</item>
-    <item name="fracp1perc" type="dimen" format="fraction">.1%</item>
-    <item name="fracp01perc" type="dimen" format="fraction">.01%</item>
-    <item name="frac0perc" type="dimen" format="fraction">0%</item>
-    <item name="frac1p1perc" type="dimen" format="fraction">1.1%</item>
-    <item name="frac100p1perc" type="dimen" format="fraction">100.1%</item>
-    <item name="frac25510perc" type="dimen" format="fraction">25510%</item>
-    <item name="frac25610perc" type="dimen" format="fraction">25610%</item>
-    <item name="frac6553510perc" type="dimen" format="fraction">6553510%</item>
-    <item name="frac6553610perc" type="dimen" format="fraction">6553610%</item>
-
-    <item name="frac100pperc" type="dimen" format="fraction">100%p</item>
-    <item name="frac1pperc" type="dimen" format="fraction">1%p</item>
-    <item name="fracp1pperc" type="dimen" format="fraction">.1%p</item>
-    <item name="fracp01pperc" type="dimen" format="fraction">.01%p</item>
-    <item name="frac0pperc" type="dimen" format="fraction">0%p</item>
-    <item name="frac1p1pperc" type="dimen" format="fraction">1.1%p</item>
-    <item name="frac100p1pperc" type="dimen" format="fraction">100.1%p</item>
-    <item name="frac25510pperc" type="dimen" format="fraction">25510%p</item>
-    <item name="frac25610pperc" type="dimen" format="fraction">25610%p</item>
-    <item name="frac6553510pperc" type="dimen" format="fraction">6553510%p</item>
-    <item name="frac6553610pperc" type="dimen" format="fraction">6553610%p</item> 
-</resources>
-
diff --git a/tests/AndroidTests/res/values/strings.xml b/tests/AndroidTests/res/values/strings.xml
deleted file mode 100644
index e8b150a..0000000
--- a/tests/AndroidTests/res/values/strings.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASI
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
-    <string name="coerceIntegerToString">100</string>
-    <string name="coerceBooleanToString">true</string>
-    <string name="coerceColorToString">#fff</string>
-    <string name="coerceFloatToString">100.0</string>
-    <string name="coerceDimensionToString">100px</string>
-    <string name="coerceFractionToString">100<xliff:g id="percent">%</xliff:g></string>
-
-    <string name="formattedStringNone">Format[]</string>
-    <string name="formattedStringOne">Format[<xliff:g id="format">%d</xliff:g>]</string>
-    <string name="formattedStringTwo">Format[<xliff:g id="format">%3$d,%2$s</xliff:g>]</string>
-    
-    <string name="reference">here</string>
-    
-    <plurals name="plurals_test">
-        <item quantity="one">A dog</item>
-        <item quantity="other">Some dogs</item>
-    </plurals>
-    
-<!--    <string name="layout_six_text_text">F</string> -->
-</resources>
diff --git a/tests/AndroidTests/res/values/styles.xml b/tests/AndroidTests/res/values/styles.xml
deleted file mode 100644
index 6c60e21..0000000
--- a/tests/AndroidTests/res/values/styles.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources>
-    <style name="TestEnum1">
-        <item name="testEnum">val1</item>
-    </style>
-    <style name="TestEnum2">
-        <item name="testEnum">val2</item>
-    </style>
-    <style name="TestEnum10">
-        <item name="testEnum">val10</item>
-    </style>
-
-    <style name="TestFlag1">
-        <item name="testFlags">bit1</item>
-    </style>
-    <style name="TestFlag2">
-        <item name="testFlags">bit2</item>
-    </style>
-    <style name="TestFlag31">
-        <item name="testFlags">bit31</item>
-    </style>
-    <style name="TestFlag1And2">
-        <item name="testFlags">bit1|bit2</item>
-    </style>
-    <style name="TestFlag1And2And31">
-        <item name="testFlags">bit1|bit2|bit31</item>
-    </style>
-    
-    <style name="TestEnum1.EmptyInherit">
-    </style>
-</resources>
diff --git a/tests/AndroidTests/run_test.sh b/tests/AndroidTests/run_test.sh
deleted file mode 100755
index bc06b7e..0000000
--- a/tests/AndroidTests/run_test.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-framework=/system/framework
-bpath=$framework/core.jar:$framework/ext.jar:$framework/framework.jar:$framework/android.test.runner.jar
-adb shell exec dalvikvm  -Xbootclasspath:$bpath -cp /system/app/AndroidTests.apk:/data/app/com.android.unit_tests.apk:/data/app/AndroidTests.apk \
-      com.android.internal.util.WithFramework junit.textui.TestRunner $*
diff --git a/tests/AndroidTests/src/com/android/unit_tests/HtmlTest.java b/tests/AndroidTests/src/com/android/unit_tests/HtmlTest.java
deleted file mode 100644
index 027730f..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/HtmlTest.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.unit_tests;
-
-import android.content.res.ColorStateList;
-import android.content.res.Resources;
-import android.graphics.Typeface;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.text.Html;
-import android.text.Spannable;
-import android.text.SpannableString;
-import android.text.Spanned;
-import android.text.style.ForegroundColorSpan;
-import android.text.style.QuoteSpan;
-import android.text.style.StrikethroughSpan;
-import android.text.style.StyleSpan;
-import android.text.style.SubscriptSpan;
-import android.text.style.SuperscriptSpan;
-import android.text.style.TextAppearanceSpan;
-import android.text.style.TypefaceSpan;
-import android.text.style.URLSpan;
-import android.text.style.UnderlineSpan;
-
-import junit.framework.TestCase;
-
-/**
- * HtmlTest tests the Spanned-to-HTML converter
- */
-public class HtmlTest extends TestCase {
-    @MediumTest
-    public void testColor() throws Exception {
-        Spanned s;
-        ForegroundColorSpan[] colors;
-
-        s = Html.fromHtml("<font color=\"#00FF00\">something</font>");
-        colors = s.getSpans(0, s.length(), ForegroundColorSpan.class);
-        assertEquals(1, colors.length);
-        assertEquals(0xFF00FF00, colors[0].getForegroundColor());
-
-        s = Html.fromHtml("<font color=\"navy\">something</font>");
-        colors = s.getSpans(0, s.length(), ForegroundColorSpan.class);
-        assertEquals(1, colors.length);
-        assertEquals(0xFF000080, colors[0].getForegroundColor());
-
-        s = Html.fromHtml("<font color=\"gibberish\">something</font>");
-        colors = s.getSpans(0, s.length(), ForegroundColorSpan.class);
-        assertEquals(0, colors.length);
-    }
-
-    @MediumTest
-    public void testResourceColor() throws Exception {
-        ColorStateList c =
-                Resources.getSystem().getColorStateList(android.R.color.primary_text_dark);
-        Spanned s;
-        TextAppearanceSpan[] colors;
-
-        s = Html.fromHtml("<font color=\"@android:color/primary_text_dark\">something</font>");
-        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
-        assertEquals(1, colors.length);
-        assertEquals(c.toString(), colors[0].getTextColor().toString());
-
-        s = Html.fromHtml("<font color=\"@android:primary_text_dark\">something</font>");
-        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
-        assertEquals(1, colors.length);
-        assertEquals(c.toString(), colors[0].getTextColor().toString());
-
-        s = Html.fromHtml("<font color=\"@color/primary_text_dark\">something</font>");
-        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
-        assertEquals(1, colors.length);
-        assertEquals(c.toString(), colors[0].getTextColor().toString());
-
-        s = Html.fromHtml("<font color=\"@primary_text_dark\">something</font>");
-        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
-        assertEquals(1, colors.length);
-        assertEquals(c.toString(), colors[0].getTextColor().toString());
-
-        s = Html.fromHtml("<font color=\"@" + android.R.color.primary_text_dark
-                + "\">something</font>");
-        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
-        assertEquals(1, colors.length);
-        assertEquals(c.toString(), colors[0].getTextColor().toString());
-
-        s = Html.fromHtml("<font color=\"gibberish\">something</font>");
-        colors = s.getSpans(0, s.length(), TextAppearanceSpan.class);
-        assertEquals(colors.length, 0);
-    }
-
-    @SmallTest
-    public void testParagraphs() throws Exception {
-        SpannableString s;
-
-        s = new SpannableString("Hello world");
-        assertEquals(Html.toHtml(s), "<p>Hello world</p>\n");
-
-        s = new SpannableString("Hello world\nor something");
-        assertEquals(Html.toHtml(s), "<p>Hello world<br>\nor something</p>\n");
-
-        s = new SpannableString("Hello world\n\nor something");
-        assertEquals(Html.toHtml(s), "<p>Hello world</p>\n<p>or something</p>\n");
-
-        s = new SpannableString("Hello world\n\n\nor something");
-        assertEquals(Html.toHtml(s), "<p>Hello world<br></p>\n<p>or something</p>\n");
-
-        assertEquals("foo\nbar", Html.fromHtml("foo<br>bar").toString());
-        assertEquals("foo\nbar", Html.fromHtml("foo<br>\nbar").toString());
-        assertEquals("foo\nbar", Html.fromHtml("foo<br>\n \nbar").toString());
-    }
-
-    @SmallTest
-    public void testBlockquote() throws Exception {
-        SpannableString s;
-
-        s = new SpannableString("Hello world");
-        s.setSpan(new QuoteSpan(), 0, s.length(), Spannable.SPAN_PARAGRAPH);
-        assertEquals(Html.toHtml(s), "<blockquote><p>Hello world</p>\n</blockquote>\n");
-
-        s = new SpannableString("Hello\n\nworld");
-        s.setSpan(new QuoteSpan(), 0, 7, Spannable.SPAN_PARAGRAPH);
-        assertEquals(Html.toHtml(s), "<blockquote><p>Hello</p>\n</blockquote>\n<p>world</p>\n");
-    }
-
-    @SmallTest
-    public void testEntities() throws Exception {
-        SpannableString s;
-
-        s = new SpannableString("Hello <&> world");
-        assertEquals(Html.toHtml(s), "<p>Hello &lt;&amp;&gt; world</p>\n");
-
-        s = new SpannableString("Hello \u03D5 world");
-        assertEquals(Html.toHtml(s), "<p>Hello &#981; world</p>\n");
-
-        s = new SpannableString("Hello  world");
-        assertEquals(Html.toHtml(s), "<p>Hello&nbsp; world</p>\n");
-    }
-
-    @SmallTest
-    public void testMarkup() throws Exception {
-        SpannableString s;
-
-        s = new SpannableString("Hello bold world");
-        s.setSpan(new StyleSpan(Typeface.BOLD), 6, s.length() - 6,
-                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
-        assertEquals(Html.toHtml(s), "<p>Hello <b>bold</b> world</p>\n");
-
-        s = new SpannableString("Hello italic world");
-        s.setSpan(new StyleSpan(Typeface.ITALIC), 6, s.length() - 6,
-                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
-        assertEquals(Html.toHtml(s), "<p>Hello <i>italic</i> world</p>\n");
-
-        s = new SpannableString("Hello monospace world");
-        s.setSpan(new TypefaceSpan("monospace"), 6, s.length() - 6,
-                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
-        assertEquals(Html.toHtml(s), "<p>Hello <tt>monospace</tt> world</p>\n");
-
-        s = new SpannableString("Hello superscript world");
-        s.setSpan(new SuperscriptSpan(), 6, s.length() - 6,
-                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
-        assertEquals(Html.toHtml(s), "<p>Hello <sup>superscript</sup> world</p>\n");
-
-        s = new SpannableString("Hello subscript world");
-        s.setSpan(new SubscriptSpan(), 6, s.length() - 6,
-                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
-        assertEquals(Html.toHtml(s), "<p>Hello <sub>subscript</sub> world</p>\n");
-
-        s = new SpannableString("Hello underline world");
-        s.setSpan(new UnderlineSpan(), 6, s.length() - 6,
-                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
-        assertEquals(Html.toHtml(s), "<p>Hello <u>underline</u> world</p>\n");
-
-        s = new SpannableString("Hello struck world");
-        s.setSpan(new StrikethroughSpan(), 6, s.length() - 6,
-                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
-        assertEquals(Html.toHtml(s), "<p>Hello <strike>struck</strike> world</p>\n");
-
-        s = new SpannableString("Hello linky world");
-        s.setSpan(new URLSpan("http://www.google.com"), 6, s.length() - 6,
-                  Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
-        assertEquals(Html.toHtml(s),
-                     "<p>Hello <a href=\"http://www.google.com\">linky</a> world</p>\n");
-    }
-
-    @SmallTest
-    public void testImg() throws Exception {
-        Spanned s;
-
-        s = Html.fromHtml("yes<img src=\"http://example.com/foo.gif\">no");
-
-        assertEquals("<p>yes<img src=\"http://example.com/foo.gif\">no</p>\n",
-                     Html.toHtml(s));
-    }
-
-    @SmallTest
-    public void testUtf8() throws Exception {
-        Spanned s;
-
-        s = Html.fromHtml("<p>\u0124\u00eb\u0142\u0142o, world!</p>");
-        assertEquals("<p>&#292;&#235;&#322;&#322;o, world!</p>\n", Html.toHtml(s));
-    }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/AndroidPerformanceTests.java b/tests/CoreTests/android/core/AndroidPerformanceTests.java
similarity index 96%
rename from tests/AndroidTests/src/com/android/unit_tests/AndroidPerformanceTests.java
rename to tests/CoreTests/android/core/AndroidPerformanceTests.java
index 795fe2b..e604d59 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/AndroidPerformanceTests.java
+++ b/tests/CoreTests/android/core/AndroidPerformanceTests.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import android.test.TestListActivity;
 
diff --git a/tests/AndroidTests/src/com/android/unit_tests/ArrayListTest.java b/tests/CoreTests/android/core/ArrayListPerformanceTest.java
similarity index 98%
rename from tests/AndroidTests/src/com/android/unit_tests/ArrayListTest.java
rename to tests/CoreTests/android/core/ArrayListPerformanceTest.java
index 81e6efd..6130e83 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/ArrayListTest.java
+++ b/tests/CoreTests/android/core/ArrayListPerformanceTest.java
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import java.util.ArrayList;
 import android.test.PerformanceTestBase;
 
-public class ArrayListTest extends PerformanceTestBase {
+public class ArrayListPerformanceTest extends PerformanceTestBase {
 
     private ArrayList<Integer> mList;
 
diff --git a/tests/AndroidTests/src/com/android/unit_tests/HashMapTest.java b/tests/CoreTests/android/core/HashMapPerformanceTest.java
similarity index 97%
rename from tests/AndroidTests/src/com/android/unit_tests/HashMapTest.java
rename to tests/CoreTests/android/core/HashMapPerformanceTest.java
index b4d15c9..82727bb 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/HashMapTest.java
+++ b/tests/CoreTests/android/core/HashMapPerformanceTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import java.util.Collection;
 import java.util.HashMap;
@@ -23,7 +23,7 @@
 import android.test.PerformanceTestBase;
 import android.test.PerformanceTestCase;
 
-public class HashMapTest extends PerformanceTestBase {
+public class HashMapPerformanceTest extends PerformanceTestBase {
     public static final int ITERATIONS = 1000;
     public HashMap mMap;
     public String[] mKeys;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/HashSetTest.java b/tests/CoreTests/android/core/HashSetTest.java
similarity index 98%
rename from tests/AndroidTests/src/com/android/unit_tests/HashSetTest.java
rename to tests/CoreTests/android/core/HashSetTest.java
index 80d3d8d..09a711f 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/HashSetTest.java
+++ b/tests/CoreTests/android/core/HashSetTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import android.test.PerformanceTestBase;
 import android.test.PerformanceTestCase;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/HashtableTest.java b/tests/CoreTests/android/core/HashtableTest.java
similarity index 99%
rename from tests/AndroidTests/src/com/android/unit_tests/HashtableTest.java
rename to tests/CoreTests/android/core/HashtableTest.java
index 42bec11..6160f57 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/HashtableTest.java
+++ b/tests/CoreTests/android/core/HashtableTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import android.test.PerformanceTestBase;
 import android.test.PerformanceTestCase;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/HeapTest.java b/tests/CoreTests/android/core/HeapTest.java
similarity index 99%
rename from tests/AndroidTests/src/com/android/unit_tests/HeapTest.java
rename to tests/CoreTests/android/core/HeapTest.java
index f6ae6f6..6116f5e 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/HeapTest.java
+++ b/tests/CoreTests/android/core/HeapTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import android.test.suitebuilder.annotation.LargeTest;
 import android.test.suitebuilder.annotation.MediumTest;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/InstanceofTest.java b/tests/CoreTests/android/core/InstanceofTest.java
similarity index 98%
rename from tests/AndroidTests/src/com/android/unit_tests/InstanceofTest.java
rename to tests/CoreTests/android/core/InstanceofTest.java
index 1f82df8..b35ef6b 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/InstanceofTest.java
+++ b/tests/CoreTests/android/core/InstanceofTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import junit.framework.TestCase;
 import android.test.suitebuilder.annotation.MediumTest;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/JavaPerformanceTests.java b/tests/CoreTests/android/core/JavaPerformanceTests.java
similarity index 80%
rename from tests/AndroidTests/src/com/android/unit_tests/JavaPerformanceTests.java
rename to tests/CoreTests/android/core/JavaPerformanceTests.java
index e778d53..fbe70cc 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/JavaPerformanceTests.java
+++ b/tests/CoreTests/android/core/JavaPerformanceTests.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 /**
  * 
@@ -24,15 +24,15 @@
     public static String[] children() {
         return new String[] {
                 StringTest.class.getName(),
-                HashMapTest.class.getName(),
-                ArrayListTest.class.getName(),
-                TreeMapTest.class.getName(),
+                HashMapPerformanceTest.class.getName(),
+                ArrayListPerformanceTest.class.getName(),
+                TreeMapPerformanceTest.class.getName(),
                 TreeSetTest.class.getName(),
                 HashSetTest.class.getName(),
                 HashtableTest.class.getName(),
                 VectorTest.class.getName(),
                 LinkedListTest.class.getName(),
-                MathTest.class.getName(),
+                MathPerformanceTest.class.getName(),
         };
     }
 }
diff --git a/tests/AndroidTests/src/com/android/unit_tests/JniLibTest.java b/tests/CoreTests/android/core/JniLibTest.java
similarity index 97%
rename from tests/AndroidTests/src/com/android/unit_tests/JniLibTest.java
rename to tests/CoreTests/android/core/JniLibTest.java
index 6b740ba..d476072 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/JniLibTest.java
+++ b/tests/CoreTests/android/core/JniLibTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import android.test.suitebuilder.annotation.Suppress;
 import android.util.Log;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/LinkedListTest.java b/tests/CoreTests/android/core/LinkedListTest.java
similarity index 99%
rename from tests/AndroidTests/src/com/android/unit_tests/LinkedListTest.java
rename to tests/CoreTests/android/core/LinkedListTest.java
index ca470cd..8b237fd 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/LinkedListTest.java
+++ b/tests/CoreTests/android/core/LinkedListTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import android.test.PerformanceTestBase;
 import android.test.PerformanceTestCase;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/MathTest.java b/tests/CoreTests/android/core/MathPerformanceTest.java
similarity index 98%
rename from tests/AndroidTests/src/com/android/unit_tests/MathTest.java
rename to tests/CoreTests/android/core/MathPerformanceTest.java
index caf2d20..b1eb500 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/MathTest.java
+++ b/tests/CoreTests/android/core/MathPerformanceTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import android.test.PerformanceTestBase;
 import android.test.PerformanceTestCase;
@@ -25,7 +25,7 @@
  * 
  */
 
-public class MathTest extends PerformanceTestBase {
+public class MathPerformanceTest extends PerformanceTestBase {
     public static final int ITERATIONS = 1000;
     public static final double sDouble1 = -2450.50;
     public static final double sDouble2 = -500;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/MonitorTest.java b/tests/CoreTests/android/core/MonitorTest.java
similarity index 99%
rename from tests/AndroidTests/src/com/android/unit_tests/MonitorTest.java
rename to tests/CoreTests/android/core/MonitorTest.java
index b5c6d87..73c33db 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/MonitorTest.java
+++ b/tests/CoreTests/android/core/MonitorTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import junit.framework.TestCase;
 import android.test.suitebuilder.annotation.MediumTest;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/PerformanceTests.java b/tests/CoreTests/android/core/PerformanceTests.java
similarity index 99%
rename from tests/AndroidTests/src/com/android/unit_tests/PerformanceTests.java
rename to tests/CoreTests/android/core/PerformanceTests.java
index 9e54540..faf46e6 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/PerformanceTests.java
+++ b/tests/CoreTests/android/core/PerformanceTests.java
@@ -14,13 +14,12 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
-import android.os.Debug;
-import junit.framework.Assert;
+import org.apache.harmony.dalvik.NativeTestTarget;
+
 import android.test.PerformanceTestBase;
 import android.test.PerformanceTestCase;
-import org.apache.harmony.dalvik.NativeTestTarget;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -28,6 +27,8 @@
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import junit.framework.Assert;
+
 public class PerformanceTests {
     public static String[] children() {
         return new String[] {
diff --git a/tests/AndroidTests/src/com/android/unit_tests/SerializationTest.java b/tests/CoreTests/android/core/SerializationTest.java
similarity index 97%
rename from tests/AndroidTests/src/com/android/unit_tests/SerializationTest.java
rename to tests/CoreTests/android/core/SerializationTest.java
index 4b64144..9644d03 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/SerializationTest.java
+++ b/tests/CoreTests/android/core/SerializationTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import junit.framework.TestCase;
 
diff --git a/tests/AndroidTests/src/com/android/unit_tests/StringTest.java b/tests/CoreTests/android/core/StringTest.java
similarity index 99%
rename from tests/AndroidTests/src/com/android/unit_tests/StringTest.java
rename to tests/CoreTests/android/core/StringTest.java
index dc40a0a..128531c 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/StringTest.java
+++ b/tests/CoreTests/android/core/StringTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import java.util.Locale;
 
diff --git a/tests/AndroidTests/src/com/android/unit_tests/TestHttpClient.java b/tests/CoreTests/android/core/TestHttpClient.java
similarity index 98%
rename from tests/AndroidTests/src/com/android/unit_tests/TestHttpClient.java
rename to tests/CoreTests/android/core/TestHttpClient.java
index 9b5e655..c657f1e 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/TestHttpClient.java
+++ b/tests/CoreTests/android/core/TestHttpClient.java
@@ -29,7 +29,7 @@
  *
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import java.io.IOException;
 
diff --git a/tests/AndroidTests/src/com/android/unit_tests/TreeMapTest.java b/tests/CoreTests/android/core/TreeMapPerformanceTest.java
similarity index 98%
rename from tests/AndroidTests/src/com/android/unit_tests/TreeMapTest.java
rename to tests/CoreTests/android/core/TreeMapPerformanceTest.java
index d77a819..3a210f4 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/TreeMapTest.java
+++ b/tests/CoreTests/android/core/TreeMapPerformanceTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import android.test.PerformanceTestBase;
 import android.test.PerformanceTestCase;
@@ -28,7 +28,7 @@
  * Implements basic performance test functionality for java.util.TreeMap
  */
 
-public class TreeMapTest extends PerformanceTestBase {
+public class TreeMapPerformanceTest extends PerformanceTestBase {
     public static final int ITERATIONS = 1000;
     public static TreeMap<String, Integer> sMap;
     public static String[] sKeys;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/TreeSetTest.java b/tests/CoreTests/android/core/TreeSetTest.java
similarity index 99%
rename from tests/AndroidTests/src/com/android/unit_tests/TreeSetTest.java
rename to tests/CoreTests/android/core/TreeSetTest.java
index 60dfe9a..a6a3309 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/TreeSetTest.java
+++ b/tests/CoreTests/android/core/TreeSetTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import android.test.PerformanceTestBase;
 import android.test.PerformanceTestCase;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/VectorTest.java b/tests/CoreTests/android/core/VectorTest.java
similarity index 99%
rename from tests/AndroidTests/src/com/android/unit_tests/VectorTest.java
rename to tests/CoreTests/android/core/VectorTest.java
index 22f9771..b4c84fd 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/VectorTest.java
+++ b/tests/CoreTests/android/core/VectorTest.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.unit_tests;
+package android.core;
 
 import android.test.PerformanceTestBase;
 import android.test.PerformanceTestCase;
diff --git a/tests/FrameworkTest/Android.mk b/tests/FrameworkTest/Android.mk
deleted file mode 100644
index 61cdbfa..0000000
--- a/tests/FrameworkTest/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_JAVA_LIBRARIES := android.test.runner
-
-LOCAL_PACKAGE_NAME := FrameworkTest
-
-include $(BUILD_PACKAGE)
-# Use the following include to make our test apk.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/FrameworkTest/AndroidManifest.xml b/tests/FrameworkTest/AndroidManifest.xml
deleted file mode 100644
index 4db8952..0000000
--- a/tests/FrameworkTest/AndroidManifest.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.frameworktest">
-
-    <uses-permission android:name="android.permission.READ_CONTACTS" />
-    <uses-permission android:name="android.permission.HARDWARE_TEST" />
-    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
-    <uses-permission android:name="android.permission.ACCESSIBILITY_EVENT_VIEW_TYPES" />
-    <uses-permission android:name="android.permission.ACCESSIBILITY_EVENT_TRANSITION_TYPES" />
-    <uses-permission android:name="android.permission.ACCESSIBILITY_EVENT_NOTIFICATION_TYPES" />
-
-    <application android:theme="@style/Theme">
-        <uses-library android:name="android.test.runner" />
-
-        <activity android:name=".FrameworkTestApplication" android:label="FrameworkTestApplication">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-
-        <activity android:name=".performance.InvalidateCycle" android:label="InvalidateCycle">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
-            </intent-filter>
-        </activity>
-
-        <activity android:name=".settings.RingtonePickerActivityLauncher" android:label="RingtonePickerActivityLauncher">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
-            </intent-filter>
-        </activity>
-        
-
-    </application>
-
-</manifest>
diff --git a/tests/FrameworkTest/README b/tests/FrameworkTest/README
deleted file mode 100644
index d6d0042..0000000
--- a/tests/FrameworkTest/README
+++ /dev/null
@@ -1,8 +0,0 @@
-FrameworkTestApplication should hold snippets of functionality that are
-helpful for testing the UI framework code, but not appropriate for
-sample code.  For instance, a layout contrived to exercise an edge case
-of scrolling behavior.
-
-InstrumentationTestCases should be added under tests and added to the
-list of tests in FrameworkInstrumentationTestRunner.
-
diff --git a/tests/FrameworkTest/res/values/styles.xml b/tests/FrameworkTest/res/values/styles.xml
deleted file mode 100644
index 7a90197..0000000
--- a/tests/FrameworkTest/res/values/styles.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<resources>
-    <style name="Theme" parent="android:Theme">
-        <item name="android:windowAnimationStyle">@style/Animation</item>
-    </style>
-
-    <style name="Animation">
-        <item name="android:activityOpenEnterAnimation">@null</item>
-        <item name="android:activityOpenExitAnimation">@null</item>
-        <item name="android:activityCloseEnterAnimation">@null</item>
-        <item name="android:activityCloseExitAnimation">@null</item>
-        <item name="android:taskOpenEnterAnimation">@null</item>
-        <item name="android:taskOpenExitAnimation">@null</item>
-        <item name="android:taskCloseEnterAnimation">@null</item>
-        <item name="android:taskCloseExitAnimation">@null</item>
-        <item name="android:taskToFrontEnterAnimation">@null</item>
-        <item name="android:taskToFrontExitAnimation">@null</item>
-        <item name="android:taskToBackEnterAnimation">@null</item>
-        <item name="android:taskToBackExitAnimation">@null</item>
-    </style>
-</resources>
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/FrameworkTestApplication.java b/tests/FrameworkTest/src/com/android/frameworktest/FrameworkTestApplication.java
deleted file mode 100644
index c57b997..0000000
--- a/tests/FrameworkTest/src/com/android/frameworktest/FrameworkTestApplication.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.frameworktest;
-
-import android.app.LauncherActivity;
-import android.content.Intent;
-
-/**
- * Holds little snippets of functionality used as code under test for
- * instrumentation tests of framework code.
- */
-public class FrameworkTestApplication extends LauncherActivity {
-
-    protected Intent getTargetIntent() {
-        // TODO: partition into categories by label like the sample code app
-        Intent targetIntent = new Intent(Intent.ACTION_MAIN, null);
-        targetIntent.addCategory(Intent.CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST);
-        targetIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-        return targetIntent;
-    }
-}
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/performance/InvalidateCycle.java b/tests/FrameworkTest/src/com/android/frameworktest/performance/InvalidateCycle.java
deleted file mode 100644
index 22bb46f..0000000
--- a/tests/FrameworkTest/src/com/android/frameworktest/performance/InvalidateCycle.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.frameworktest.performance;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.os.Debug;
-import android.os.Handler;
-import android.view.View;
-import android.view.ViewGroup;
-import android.content.Context;
-import android.graphics.Canvas;
-
-public class InvalidateCycle extends Activity {
-    private boolean mStartProfiling;
-    private InvalidateCycle.AutoInvalidateView mView;
-
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        mView = new AutoInvalidateView(this);
-        mView.setLayoutParams(new ViewGroup.LayoutParams(16, 16));
-        setContentView(mView);
-
-        new Handler().postDelayed(new Runnable() {
-            public void run() {
-                mStartProfiling = true;
-                android.util.Log.d("Performance", "Profiling started");
-                Debug.startMethodTracing("invalidateCycle");
-                mView.invalidate();
-            }
-        }, 15000);
-    }
-
-    private class AutoInvalidateView extends View {
-        private boolean mFirstDraw;
-
-        public AutoInvalidateView(Context context) {
-            super(context);
-        }
-
-        protected void onDraw(Canvas canvas) {
-            if (mStartProfiling && !mFirstDraw) {
-                Debug.stopMethodTracing();
-                android.util.Log.d("Performance", "Profiling ended");
-                mFirstDraw = true;
-            }
-            canvas.drawColor(0xFFFF0000);            
-        }
-    }
-}
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/settings/RingtonePickerActivityLauncher.java b/tests/FrameworkTest/src/com/android/frameworktest/settings/RingtonePickerActivityLauncher.java
deleted file mode 100644
index 19113da..0000000
--- a/tests/FrameworkTest/src/com/android/frameworktest/settings/RingtonePickerActivityLauncher.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.frameworktest.settings;
-
-import com.android.internal.app.RingtonePickerActivity;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.media.RingtoneManager;
-import android.net.Uri;
-import android.os.Bundle;
-
-/**
- * Activity that will launch the RingtonePickerActivity as a subactivity, and
- * waits for its result.
- */
-public class RingtonePickerActivityLauncher extends Activity {
-
-    private static final String TAG = "RingtonePickerActivityLauncher";
-    
-    public boolean resultReceived = false;
-    
-    public int resultCode;
-    public Intent result;
-
-    public Uri pickedUri;
-    
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        
-        setContentView(android.R.layout.simple_list_item_1);
-    }
-
-    /**
-     * Launches the {@link RingtonePickerActivity} and blocks until it returns.
-     * 
-     * @param showDefault {@link RingtonePickerActivity#EXTRA_SHOW_DEFAULT}
-     * @param existingUri {@link RingtonePickerActivity#EXTRA_EXISTING_URI}
-     * @param filterColumns {@link RingtonePickerActivity#EXTRA_RINGTONE_COLUMNS}
-     */
-    public void launchRingtonePickerActivity(boolean showDefault, Uri existingUri,
-            int types) {
-        Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
-        intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, showDefault);
-        intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, existingUri);
-        intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, types);
-        startActivityForResult(intent, 0);
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-       
-        resultReceived = true;
-
-        this.resultCode = resultCode;
-        this.result = data;
-        
-        if (data != null) {
-            this.pickedUri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
-        }
-    }
-    
-}
diff --git a/tests/FrameworkTest/tests/Android.mk b/tests/FrameworkTest/tests/Android.mk
deleted file mode 100644
index 5c54684..0000000
--- a/tests/FrameworkTest/tests/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-# We only want this apk build for tests.
-LOCAL_MODULE_TAGS := tests
-
-# Include all test java files.
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_JAVA_LIBRARIES := android.test.runner
-
-LOCAL_PACKAGE_NAME := FrameworkTestTests
-
-LOCAL_INSTRUMENTATION_FOR := FrameworkTest
-
-include $(BUILD_PACKAGE)
-
diff --git a/tests/FrameworkTest/tests/AndroidManifest.xml b/tests/FrameworkTest/tests/AndroidManifest.xml
deleted file mode 100644
index 65aaebb..0000000
--- a/tests/FrameworkTest/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.frameworktest.tests">
-
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    This declares that this app uses the instrumentation test runner targeting
-    the package of com.android.frameworktest.  To run the tests use the command:
-    "adb shell am instrument -w com.android.frameworktest.tests/android.test.InstrumentationTestRunner"
-    -->
-    <instrumentation android:name="android.test.InstrumentationTestRunner"
-                     android:targetPackage="com.android.frameworktest"
-                     android:label="framework tests"/>
-
-</manifest>
diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/settings/RingtonePickerActivityTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/settings/RingtonePickerActivityTest.java
deleted file mode 100644
index 42888ff..0000000
--- a/tests/FrameworkTest/tests/src/com/android/frameworktest/settings/RingtonePickerActivityTest.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.frameworktest.settings;
-
-import com.android.frameworktest.settings.RingtonePickerActivityLauncher;
-
-import android.app.Instrumentation;
-import android.database.Cursor;
-import android.media.RingtoneManager;
-import android.net.Uri;
-import android.provider.MediaStore;
-import android.test.ActivityInstrumentationTestCase;
-import android.test.suitebuilder.annotation.Suppress;
-import android.view.KeyEvent;
-
-/**
- * Tests the RingtonePickerActivity.
- * <p>
- * There is a launcher for launching the RingtonePickerActivity (RPA) since the RPA needs
- * to be a subactivity.  We don't have a reference to the actual RPA.
- * <p>
- * This relies heavily on keypresses getting to the right widget.  It depends on:
- * <li> Less than NUM_RINGTONES_AND_SOME ringtones on the system
- * <li> Pressing arrow-down a ton will eventually end up on the 'Cancel' button
- * <li> From the 'Cancel' button, pressing arrow-left will end up on 'OK' button
- */
-@Suppress
-public class RingtonePickerActivityTest extends ActivityInstrumentationTestCase<RingtonePickerActivityLauncher> {
-
-    private static final int NUM_RINGTONES_AND_SOME = 20;
-    private RingtonePickerActivityLauncher mActivity;
-    private Instrumentation mInstrumentation;
-    
-    public RingtonePickerActivityTest() {
-        super("com.android.frameworktest", RingtonePickerActivityLauncher.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        
-        mActivity = getActivity();
-        mInstrumentation = getInstrumentation();
-        assertNotNull(mActivity);
-        assertFalse(mActivity.resultReceived);
-        assertNotNull(mInstrumentation);
-    }
-    
-    public void testDefault() {
-        mActivity.launchRingtonePickerActivity(true, null, RingtoneManager.TYPE_ALL);
-        mInstrumentation.waitForIdleSync();
-        
-        // Go to top
-        goTo(true);
-        // Select default ringtone 
-        sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
-        // Go to bottom/cancel button
-        goTo(false);
-        // Select OK button
-        sendKeys(KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_CENTER);
-        
-        mInstrumentation.waitForIdleSync();
-        
-        assertTrue(mActivity.resultReceived);
-        assertNotNull(mActivity.result);
-        assertTrue(RingtoneManager.isDefault(mActivity.pickedUri));
-    }
-    
-    public void testFirst() {
-        mActivity.launchRingtonePickerActivity(true, null, RingtoneManager.TYPE_ALL);
-        mInstrumentation.waitForIdleSync();
-        
-        // Go to top
-        goTo(true);
-        // Select first (non-default) ringtone 
-        sendKeys(KeyEvent.KEYCODE_DPAD_DOWN, KeyEvent.KEYCODE_DPAD_CENTER);
-        // Go to bottom/cancel button
-        goTo(false);
-        // Select OK button
-        sendKeys(KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_CENTER);
-        
-        mInstrumentation.waitForIdleSync();
-        
-        assertTrue(mActivity.resultReceived);
-        assertNotNull(mActivity.result);
-        assertNotNull(mActivity.pickedUri);
-        assertFalse(RingtoneManager.isDefault(mActivity.pickedUri));
-    }
-
-    public void testExisting() {
-        // We need to get an existing ringtone first, so launch it, pick first,
-        // and keep that URI
-        testFirst();
-        Uri firstUri = mActivity.pickedUri;
-        
-        mActivity.launchRingtonePickerActivity(true, firstUri, RingtoneManager.TYPE_ALL);
-        mInstrumentation.waitForIdleSync();
-
-        //// Hit cancel:
-        
-        // Go to bottom
-        goTo(false);
-        // Select Cancel button
-        sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
-        
-        mInstrumentation.waitForIdleSync();
-        
-        assertTrue(mActivity.resultReceived);
-        assertEquals(mActivity.pickedUri, firstUri);
-    }
-    
-    public void testExistingButDifferent() {
-        // We need to get an existing ringtone first, so launch it, pick first,
-        // and keep that URI
-        testFirst();
-        Uri firstUri = mActivity.pickedUri;
-        
-        mActivity.launchRingtonePickerActivity(true, firstUri, RingtoneManager.TYPE_ALL);
-        mInstrumentation.waitForIdleSync();
-
-        //// Pick second:
-        
-        // Go to top
-        goTo(true);
-        // Select second (non-default) ringtone 
-        sendKeys(KeyEvent.KEYCODE_DPAD_DOWN, KeyEvent.KEYCODE_DPAD_DOWN,
-                KeyEvent.KEYCODE_DPAD_CENTER);
-        // Go to bottom/cancel button
-        goTo(false);
-        // Select OK button
-        sendKeys(KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_CENTER);
-        
-        mInstrumentation.waitForIdleSync();
-        
-        assertTrue(mActivity.resultReceived);
-        assertNotNull(mActivity.result);
-        assertTrue(!firstUri.equals(mActivity.pickedUri));
-    }
-    
-    public void testCancel() {
-        mActivity.launchRingtonePickerActivity(true, null, RingtoneManager.TYPE_ALL);
-        mInstrumentation.waitForIdleSync();
-        
-        // Go to bottom
-        goTo(false);
-        // Select Cancel button
-        sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
-        
-        mInstrumentation.waitForIdleSync();
-        
-        assertTrue(mActivity.resultReceived);
-        assertNull(mActivity.result);
-    }
-
-    public void testNoDefault() {
-        mActivity.launchRingtonePickerActivity(false, null, RingtoneManager.TYPE_ALL);
-        mInstrumentation.waitForIdleSync();
-        
-        // Go to top
-        goTo(true);
-        // Select first (non-default) ringtone 
-        sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
-        // Go to bottom/cancel button
-        goTo(false);
-        // Select OK button
-        sendKeys(KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_CENTER);
-        
-        mInstrumentation.waitForIdleSync();
-        
-        assertTrue(mActivity.resultReceived);
-        assertNotNull(mActivity.result);
-        assertNotNull(mActivity.pickedUri);
-        assertFalse(RingtoneManager.isDefault(mActivity.pickedUri));
-    }
-    
-    public void testNotifications() {
-        mActivity.launchRingtonePickerActivity(false, null, RingtoneManager.TYPE_NOTIFICATION);
-        mInstrumentation.waitForIdleSync();
-        
-        // Move to top of list
-        goTo(true);
-        // Select first ringtone in list
-        sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
-        // Move all the way down (will focus 'Cancel')
-        goTo(false);
-        // Move left and click (will click 'Ok')
-        sendKeys(KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.KEYCODE_DPAD_CENTER);
-
-        // Wait until main thread is idle
-        mInstrumentation.waitForIdleSync();
-
-        assertTrue(mActivity.resultReceived);
-        assertNotNull(mActivity.result);
-        assertNotNull(mActivity.pickedUri);
-        
-        // Get the path of the picked ringtone
-        Uri uri = mActivity.pickedUri;
-        Cursor c = mActivity.getContentResolver().query(uri, new String[] { "_data" },
-                null, null, null);
-        assertTrue("Query for selected ringtone URI does not have a result", c.moveToFirst());
-        String path = c.getString(0);
-        // Quick check to see if the ringtone is a notification
-        assertTrue("The path of the selected ringtone did not contain \"notification\"",
-                path.contains("notifications"));
-    }
-    
-    private void goTo(boolean top) {
-        // Get to the buttons at the bottom (top == false), or the top (top == true)
-        for (int i = 0; i < NUM_RINGTONES_AND_SOME; i++) {
-            sendKeys(top ? KeyEvent.KEYCODE_DPAD_UP : KeyEvent.KEYCODE_DPAD_DOWN);
-        }
-    }
-}