am a2c97865: am 5f7feeff: am ecdf0299: (-s ours) am 5cbd4601: Merge "Revert "DO NOT MERGE Add test to check for duplicate random output"" into jb-dev

* commit 'a2c97865af14be4752673935634ed3a228101825':
  Revert "DO NOT MERGE Add test to check for duplicate random output"
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index d81abee..f2fa09e 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -18,10 +18,10 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="com.android.cts.verifier"
       android:versionCode="1"
-      android:versionName="4.2_r4">
+      android:versionName="4.2_r6">
 
-    <!-- Using 10 for more complete NFC support... -->
-    <uses-sdk android:minSdkVersion="10"></uses-sdk>
+    <!-- Using 10+ for more complete NFC support... -->
+    <uses-sdk android:minSdkVersion="12"></uses-sdk>
 
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
@@ -52,7 +52,6 @@
             android:debuggable="true"
             android:largeHeap="true">
 
-        <uses-library android:name="com.android.future.usb.accessory" />
         <meta-data android:name="com.google.android.backup.api_key"
                 android:value="AEdPqrEAAAAIbK6ldcOzoeRtQ1u1dFVJ1A7KetRhit-a1Xa82Q" />
 
@@ -354,7 +353,7 @@
             </intent-filter>
             <meta-data android:name="test_category" android:value="@string/test_category_camera" />
             <meta-data android:name="test_required_features" android:value="android.hardware.sensor.gyroscope" />
-            <meta-data android:name="test_required_features" android:value="android.hardware.camera.any"/>
+            <meta-data android:name="test_required_features" android:value="android.hardware.camera"/>
         </activity>
         <activity
             android:name=".camera.fov.DetermineFovActivity"
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java
index ca3c2a9..84d64cf 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/features/FeatureSummaryActivity.java
@@ -154,7 +154,7 @@
 
     public static final Feature[] ALL_HONEYCOMB_MR1_FEATURES = {
             new Feature("android.hardware.usb.host", false),
-            new Feature("android.hardware.usb.accessory", true),
+            new Feature("android.hardware.usb.accessory", false),
     };
 
     public static final Feature[] ALL_HONEYCOMB_MR2_FEATURES = {
diff --git a/hostsidetests/monkey/src/com/android/cts/monkey/AbstractMonkeyTest.java b/hostsidetests/monkey/src/com/android/cts/monkey/AbstractMonkeyTest.java
index 3930ea4..8580a9d 100644
--- a/hostsidetests/monkey/src/com/android/cts/monkey/AbstractMonkeyTest.java
+++ b/hostsidetests/monkey/src/com/android/cts/monkey/AbstractMonkeyTest.java
@@ -17,7 +17,7 @@
     /** 
      * Base monkey command with flags to avoid side effects like airplane mode.
      */
-    static final String MONKEY_CMD = "monkey --pct-majornav 0 --pct-syskeys 0 --pct-anyevent 0";
+    static final String MONKEY_CMD = "monkey --pct-touch 0 --pct-motion 0 --pct-majornav 0 --pct-syskeys 0 --pct-anyevent 0";
 
     CtsBuildHelper mBuild;
     ITestDevice mDevice;
diff --git a/hostsidetests/monkey/test-apps/CtsMonkeyApp/AndroidManifest.xml b/hostsidetests/monkey/test-apps/CtsMonkeyApp/AndroidManifest.xml
index a3dfc83..849d6a4 100644
--- a/hostsidetests/monkey/test-apps/CtsMonkeyApp/AndroidManifest.xml
+++ b/hostsidetests/monkey/test-apps/CtsMonkeyApp/AndroidManifest.xml
@@ -18,14 +18,14 @@
 
     <application android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
 
-        <activity android:name=".MonkeyActivity">
+        <activity android:name=".MonkeyActivity" android:screenOrientation="portrait">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
         
-        <activity android:name=".BaboonActivity">
+        <activity android:name=".BaboonActivity" android:screenOrientation="portrait">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.MONKEY" />
diff --git a/tests/accessibilityservice/res/xml/accessibilityservice.xml b/tests/accessibilityservice/res/xml/accessibilityservice.xml
index 395d022..1d3e313 100644
--- a/tests/accessibilityservice/res/xml/accessibilityservice.xml
+++ b/tests/accessibilityservice/res/xml/accessibilityservice.xml
@@ -18,6 +18,6 @@
     android:accessibilityFeedbackType="feedbackGeneric"
     android:accessibilityFlags="flagDefault"
     android:canRetrieveWindowContent="true"
-    android:notificationTimeout="50"
+    android:notificationTimeout="0"
     android:settingsActivity="android.accessibilityservice.delegate.SomeActivity"
     android:description="@string/title_delegating_accessibility_service" />
diff --git a/tests/src/android/view/inputmethod/cts/InputMethodInfoStub.java b/tests/src/android/view/inputmethod/cts/InputMethodSettingsActivityStub.java
similarity index 84%
rename from tests/src/android/view/inputmethod/cts/InputMethodInfoStub.java
rename to tests/src/android/view/inputmethod/cts/InputMethodSettingsActivityStub.java
index 0eeefbe..58aa364 100644
--- a/tests/src/android/view/inputmethod/cts/InputMethodInfoStub.java
+++ b/tests/src/android/view/inputmethod/cts/InputMethodSettingsActivityStub.java
@@ -16,8 +16,8 @@
 
 package android.view.inputmethod.cts;
 
-import android.inputmethodservice.InputMethodService;
+import android.preference.PreferenceActivity;
 
-public class InputMethodInfoStub extends InputMethodService {
+public class InputMethodSettingsActivityStub extends PreferenceActivity {
 
 }
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityActivityTestCase.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityActivityTestCase.java
index a5d92ee..affc9ec 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityActivityTestCase.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityActivityTestCase.java
@@ -66,7 +66,7 @@
     /**
      * The timeout after the last accessibility event to consider the device idle.
      */
-    public static final long TIMEOUT_ACCESSIBILITY_STATE_IDLE = 100;
+    public static final long TIMEOUT_ACCESSIBILITY_STATE_IDLE = 200;
 
     /**
      * Instance for detecting the next accessibility event.
@@ -130,9 +130,12 @@
             public boolean accept(AccessibilityEvent event) {
                 final int eventType = event.getEventType();
                 CharSequence packageName = event.getPackageName();
-                Context targetContext = getInstrumentation().getTargetContext();
-                return (eventType == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED
-                        && targetContext.getPackageName().equals(packageName));
+                // Do not check the package name since an event of this type may
+                // come concurrently from the app and from the IME (since input
+                // focus goes to the first focusable) but we dispatch one event
+                // of each type within a timeout. Hence, sometimes the window
+                // change event from the IME may override the one from the app.
+                return (eventType == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
             }
         },
         TIMEOUT_ASYNC_PROCESSING);
@@ -520,6 +523,8 @@
                 mEventQueue.clear();
                 // Prepare to wait for an event.
                 mWaitingForEventDelivery = true;
+                // We will ignore events from previous interactions.
+                final long executionStartTimeMillis = SystemClock.uptimeMillis();
                 // Execute the command.
                 command.run();
                 try {
@@ -529,11 +534,16 @@
                         // Drain the event queue
                         while (!mEventQueue.isEmpty()) {
                             AccessibilityEvent event = mEventQueue.remove(0);
+
+                            // Ignore events from previous interactions.
+                            if (event.getEventTime() < executionStartTimeMillis) {
+                                continue;
+                            }
                             if (filter.accept(event)) {
                                 return event;
-                            } else {
-                                event.recycle();
                             }
+                            
+                            event.recycle();
                         }
                         // Check if timed out and if not wait.
                         final long elapsedTimeMillis = SystemClock.uptimeMillis() - startTimeMillis;
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityServiceInfoTest.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityServiceInfoTest.java
index 0f687d0..750460b 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityServiceInfoTest.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityServiceInfoTest.java
@@ -111,7 +111,7 @@
         assertSame(AccessibilityEvent.TYPES_ALL_MASK, speakingService.eventTypes);
         assertSame(AccessibilityServiceInfo.FEEDBACK_GENERIC, speakingService.feedbackType);
         assertSame(AccessibilityServiceInfo.DEFAULT, speakingService.flags);
-        assertSame(50l, speakingService.notificationTimeout);
+        assertSame(0l, speakingService.notificationTimeout);
         assertEquals("Delegating Accessibility Service", speakingService.getDescription());
         assertNull(speakingService.packageNames /*all packages*/);
         assertNotNull(speakingService.getId());
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java
index 517b71a..e7f8823 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityTextTraversalTest.java
@@ -903,6 +903,261 @@
     }
 
     @MediumTest
+    public void testActionNextAndPreviousAtGranularityWordOverEditTextWithContentDescription()
+            throws Exception {
+
+        final EditText editText = (EditText) getActivity().findViewById(R.id.edit);
+
+        getInstrumentation().runOnMainSync(new Runnable() {
+            @Override
+            public void run() {
+                editText.setText(getString(R.string.foo_bar_baz));
+                editText.setContentDescription(getString(R.string.android_wiki));
+            }
+        });
+
+        final AccessibilityNodeInfo text = getInteractionBridge()
+               .findAccessibilityNodeInfoByTextFromRoot(getString(R.string.foo_bar_baz));
+
+        final int granularities = text.getMovementGranularities();
+        assertEquals(granularities, AccessibilityNodeInfo.MOVEMENT_GRANULARITY_CHARACTER
+                | AccessibilityNodeInfo.MOVEMENT_GRANULARITY_WORD
+                | AccessibilityNodeInfo.MOVEMENT_GRANULARITY_LINE
+                | AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PARAGRAPH
+                | AccessibilityNodeInfo.MOVEMENT_GRANULARITY_PAGE);
+
+        final Bundle arguments = new Bundle();
+        arguments.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT,
+                AccessibilityNodeInfo.MOVEMENT_GRANULARITY_WORD);
+
+        // Move to the next word and wait for an event.
+        AccessibilityEvent firstExpected = getInteractionBridge()
+                .executeCommandAndWaitForAccessibilityEvent(new Runnable() {
+            @Override
+            public void run() {
+                getInteractionBridge().performAction(text,
+                        AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY, arguments);
+            }
+        }, new AccessibilityEventFilter() {
+            @Override
+            public boolean accept(AccessibilityEvent event) {
+                return
+                (event.getEventType() ==
+                    AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY
+                        && event.getAction() ==
+                                AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY
+                        && event.getPackageName().equals(getActivity().getPackageName())
+                        && event.getClassName().equals(EditText.class.getName())
+                        && event.getText().size() > 0
+                        && event.getText().get(0).toString().equals(getString(R.string.foo_bar_baz))
+                        && event.getContentDescription().equals(getString(R.string.android_wiki))
+                        && event.getFromIndex() == 0
+                        && event.getToIndex() == 3
+                        && event.getMovementGranularity() ==
+                                AccessibilityNodeInfo.MOVEMENT_GRANULARITY_WORD);
+            }
+        }, TIMEOUT_ASYNC_PROCESSING);
+
+        // Make sure we got the expected event.
+        assertNotNull(firstExpected);
+
+        // Verify the selection position.
+        assertEquals(3, editText.getSelectionStart());
+        assertEquals(3, editText.getSelectionEnd());
+
+        // Move to the next word and wait for an event.
+        AccessibilityEvent secondExpected = getInteractionBridge()
+                .executeCommandAndWaitForAccessibilityEvent(new Runnable() {
+            @Override
+            public void run() {
+                getInteractionBridge().performAction(text,
+                        AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY, arguments);
+            }
+        }, new AccessibilityEventFilter() {
+            @Override
+            public boolean accept(AccessibilityEvent event) {
+                return
+                (event.getEventType() ==
+                    AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY
+                        && event.getAction() ==
+                                AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY
+                        && event.getPackageName().equals(getActivity().getPackageName())
+                        && event.getClassName().equals(EditText.class.getName())
+                        && event.getText().size() > 0
+                        && event.getText().get(0).toString().equals(getString(R.string.foo_bar_baz))
+                        && event.getContentDescription().equals(getString(R.string.android_wiki))
+                        && event.getFromIndex() == 4
+                        && event.getToIndex() == 7
+                        && event.getMovementGranularity() ==
+                                AccessibilityNodeInfo.MOVEMENT_GRANULARITY_WORD);
+            }
+        }, TIMEOUT_ASYNC_PROCESSING);
+
+        // Make sure we got the expected event.
+        assertNotNull(secondExpected);
+
+        // Verify the selection position.
+        assertEquals(7, editText.getSelectionStart());
+        assertEquals(7, editText.getSelectionEnd());
+
+        // Move to the next word and wait for an event.
+        AccessibilityEvent thirdExpected = getInteractionBridge()
+                .executeCommandAndWaitForAccessibilityEvent(new Runnable() {
+            @Override
+            public void run() {
+                getInteractionBridge().performAction(text,
+                        AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY, arguments);
+            }
+        }, new AccessibilityEventFilter() {
+            @Override
+            public boolean accept(AccessibilityEvent event) {
+                return
+                (event.getEventType() ==
+                    AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY
+                        && event.getAction() ==
+                                AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY
+                        && event.getPackageName().equals(getActivity().getPackageName())
+                        && event.getClassName().equals(EditText.class.getName())
+                        && event.getText().size() > 0
+                        && event.getText().get(0).toString().equals(getString(R.string.foo_bar_baz))
+                        && event.getContentDescription().equals(getString(R.string.android_wiki))
+                        && event.getFromIndex() == 8
+                        && event.getToIndex() == 11
+                        && event.getMovementGranularity() ==
+                                 AccessibilityNodeInfo.MOVEMENT_GRANULARITY_WORD);
+            }
+        }, TIMEOUT_ASYNC_PROCESSING);
+
+        // Make sure we got the expected event.
+        assertNotNull(thirdExpected);
+
+        // Verify the selection position.
+        assertEquals(11, editText.getSelectionStart());
+        assertEquals(11, editText.getSelectionEnd());
+
+        // Make sure there is no next.
+        assertFalse(getInteractionBridge().performAction(text,
+                AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY, arguments));
+
+        // Verify the selection position.
+        assertEquals(11, editText.getSelectionStart());
+        assertEquals(11, editText.getSelectionEnd());
+
+        // Move to the next word and wait for an event.
+        AccessibilityEvent fourthExpected = getInteractionBridge()
+                .executeCommandAndWaitForAccessibilityEvent(new Runnable() {
+            @Override
+            public void run() {
+                getInteractionBridge().performAction(text,
+                        AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY, arguments);
+            }
+        }, new AccessibilityEventFilter() {
+            @Override
+            public boolean accept(AccessibilityEvent event) {
+                return
+                (event.getEventType() ==
+                    AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY
+                        && event.getAction() ==
+                                AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY
+                        && event.getPackageName().equals(getActivity().getPackageName())
+                        && event.getClassName().equals(EditText.class.getName())
+                        && event.getText().size() > 0
+                        && event.getText().get(0).toString().equals(getString(R.string.foo_bar_baz))
+                        && event.getContentDescription().equals(getString(R.string.android_wiki))
+                        && event.getFromIndex() == 8
+                        && event.getToIndex() == 11
+                        && event.getMovementGranularity() ==
+                                AccessibilityNodeInfo.MOVEMENT_GRANULARITY_WORD);
+            }
+        }, TIMEOUT_ASYNC_PROCESSING);
+
+        // Make sure we got the expected event.
+        assertNotNull(fourthExpected);
+
+        // Verify the selection position.
+        assertEquals(8, editText.getSelectionStart());
+        assertEquals(8, editText.getSelectionEnd());
+
+        // Move to the next word and wait for an event.
+        AccessibilityEvent fifthExpected = getInteractionBridge()
+                .executeCommandAndWaitForAccessibilityEvent(new Runnable() {
+            @Override
+            public void run() {
+                getInteractionBridge().performAction(text,
+                        AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY, arguments);
+            }
+        }, new AccessibilityEventFilter() {
+            @Override
+            public boolean accept(AccessibilityEvent event) {
+                return
+                (event.getEventType() ==
+                    AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY
+                        && event.getAction() ==
+                                AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY
+                        && event.getPackageName().equals(getActivity().getPackageName())
+                        && event.getClassName().equals(EditText.class.getName())
+                        && event.getText().size() > 0
+                        && event.getText().get(0).toString().equals(getString(R.string.foo_bar_baz))
+                        && event.getContentDescription().equals(getString(R.string.android_wiki))
+                        && event.getFromIndex() == 4
+                        && event.getToIndex() == 7
+                        && event.getMovementGranularity() ==
+                                AccessibilityNodeInfo.MOVEMENT_GRANULARITY_WORD);
+            }
+        }, TIMEOUT_ASYNC_PROCESSING);
+
+        // Make sure we got the expected event.
+        assertNotNull(fifthExpected);
+
+        // Verify the selection position.
+        assertEquals(4, editText.getSelectionStart());
+        assertEquals(4, editText.getSelectionEnd());
+
+        // Move to the next character and wait for an event.
+        AccessibilityEvent sixthExpected = getInteractionBridge()
+                .executeCommandAndWaitForAccessibilityEvent(new Runnable() {
+            @Override
+            public void run() {
+                getInteractionBridge().performAction(text,
+                        AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY, arguments);
+            }
+        }, new AccessibilityEventFilter() {
+            @Override
+            public boolean accept(AccessibilityEvent event) {
+                return
+                (event.getEventType() ==
+                    AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY
+                        && event.getAction() ==
+                                AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY
+                        && event.getPackageName().equals(getActivity().getPackageName())
+                        && event.getClassName().equals(EditText.class.getName())
+                        && event.getText().size() > 0
+                        && event.getText().get(0).toString().equals(getString(R.string.foo_bar_baz))
+                        && event.getContentDescription().equals(getString(R.string.android_wiki))
+                        && event.getFromIndex() == 0
+                        && event.getToIndex() == 3
+                        && event.getMovementGranularity() ==
+                                AccessibilityNodeInfo.MOVEMENT_GRANULARITY_WORD);
+            }
+        }, TIMEOUT_ASYNC_PROCESSING);
+
+        // Make sure we got the expected event.
+        assertNotNull(sixthExpected);
+
+        // Verify the selection position.
+        assertEquals(0, editText.getSelectionStart());
+        assertEquals(0, editText.getSelectionEnd());
+
+        // Make sure there is no previous.
+        assertFalse(getInteractionBridge().performAction(text,
+                AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY, arguments));
+
+        // Verify the selection position.
+        assertEquals(0, editText.getSelectionStart());
+        assertEquals(0, editText.getSelectionEnd());
+    }
+
+    @MediumTest
     public void testActionNextAndPreviousAtGranularityLineOverText() throws Exception {
         final TextView textView = (TextView) getActivity().findViewById(R.id.text);
 
diff --git a/tests/tests/app/src/android/app/cts/ActivityManagerMemoryClassTest.java b/tests/tests/app/src/android/app/cts/ActivityManagerMemoryClassTest.java
index 1db04ea..622055c 100644
--- a/tests/tests/app/src/android/app/cts/ActivityManagerMemoryClassTest.java
+++ b/tests/tests/app/src/android/app/cts/ActivityManagerMemoryClassTest.java
@@ -90,6 +90,10 @@
                 expectedMinimumMemory = isXLarge ? 128 : 64;
                 break;
 
+            case DisplayMetrics.DENSITY_XXHIGH:
+                expectedMinimumMemory = isXLarge ? 256 : 128;
+                break;
+
             default:
                 throw new IllegalArgumentException("No memory requirement specified "
                         + " for screen density " + screenDensity);
diff --git a/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java b/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java
index 74a9f22..572c3f4 100644
--- a/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java
+++ b/tests/tests/dpi/src/android/dpi/cts/AspectRatioTest.java
@@ -40,46 +40,27 @@
     }
 
     /**
-     * Get all the aspect rations in different orientations. They could be
-     * different due to the system bar being different sizes. Test that
-     * one of the aspect ratios is within the range.
+     * Get the full screen size directly (including system bar) to calculate
+     * aspect ratio. With this, the screen orientation doesn't affect the aspect
+     * ratio value anymore. Test that the aspect ratio is within the range.
      */
     public void testAspectRatio() throws Exception {
-        List<Double> aspectRatios = getAllAspectRatios();
-        for (double aspectRatio : aspectRatios) {
-            if (aspectRatio >= 1.333 && aspectRatio <= 1.86) {
-                return;
-            }
+        double aspectRatio = getRealAspectRatio(getActivity());
+        if (aspectRatio >= 1.333 && aspectRatio <= 1.86) {
+            return;
         }
-        fail("Aspect ratios were not between 1.333 and 1.86: " + aspectRatios);
+        fail("Aspect ratio was not between 1.333 and 1.86: " + aspectRatio);
     }
 
-    private List<Double> getAllAspectRatios() throws Exception {
-        List<Double> aspectRatios = new ArrayList<Double>();
-        for (int i = 0; i < ORIENTATIONS.length; i++) {
-            Activity activity = startOrientationActivity(ORIENTATIONS[i]);
-            aspectRatios.add(getAspectRatio(activity));
-            tearDown();
-        }
-        return aspectRatios;
-    }
-
-    private double getAspectRatio(Context context) {
+    private double getRealAspectRatio(Context context) {
         WindowManager windowManager =
                 (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
         Display display = windowManager.getDefaultDisplay();
         DisplayMetrics metrics = new DisplayMetrics();
-        display.getMetrics(metrics);
+        display.getRealMetrics(metrics);
 
         int max = Math.max(metrics.widthPixels, metrics.heightPixels);
         int min = Math.min(metrics.widthPixels, metrics.heightPixels);
         return (double) max / min;
     }
-
-    private Activity startOrientationActivity(int orientation) {
-        Intent intent = new Intent();
-        intent.putExtra(OrientationActivity.EXTRA_ORIENTATION, orientation);
-        setActivityIntent(intent);
-        return getActivity();
-    }
 }
diff --git a/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java b/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java
index 937d8f8..6f26b6e 100644
--- a/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java
+++ b/tests/tests/dpi/src/android/dpi/cts/ConfigurationTest.java
@@ -52,6 +52,7 @@
         allowedDensities.add(DisplayMetrics.DENSITY_TV);
         allowedDensities.add(DisplayMetrics.DENSITY_HIGH);
         allowedDensities.add(DisplayMetrics.DENSITY_XHIGH);
+        allowedDensities.add(DisplayMetrics.DENSITY_XXHIGH);
         assertTrue("DisplayMetrics#densityDpi must be one of the DisplayMetrics.DENSITY_* values: "
                 + allowedDensities, allowedDensities.contains(metrics.densityDpi));
 
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_calendar_view.png
index aea9b8d..52959f1 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_calendar_view_feb.png
index 5093067..6a0feb3 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_dialog_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_dialog_calendar_view.png
index c199329..aea9b8d 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_dialog_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_dialog_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_dialog_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_dialog_calendar_view_feb.png
index dea6b40..5093067 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_dialog_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_dialog_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_dialog_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_dialog_minwidth_calendar_view.png
index c199329..aea9b8d 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_dialog_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_dialog_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_dialog_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_dialog_minwidth_calendar_view_feb.png
index dea6b40..5093067 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_dialog_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_dialog_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_calendar_view.png
index aea9b8d..52959f1 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_calendar_view_feb.png
index 5093067..6a0feb3 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_minwidth_calendar_view.png
index aea9b8d..52959f1 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
index 5093067..6a0feb3 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_dialogwhenlarge_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_dialogwhenlarge_calendar_view.png
index aea9b8d..52959f1 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_dialogwhenlarge_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_dialogwhenlarge_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_dialogwhenlarge_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_dialogwhenlarge_calendar_view_feb.png
index 5093067..6a0feb3 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_dialogwhenlarge_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_dialogwhenlarge_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_light_calendar_view.png
index df79dc4..0874ee5 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_light_calendar_view_feb.png
index c4365ae..617dd44 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_darkactionbar_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_light_darkactionbar_calendar_view.png
index df79dc4..0874ee5 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_darkactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_darkactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_darkactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_light_darkactionbar_calendar_view_feb.png
index c4365ae..617dd44 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_darkactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_darkactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_calendar_view.png
index 3935ca1..df79dc4 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_calendar_view_feb.png
index 5a11a6c..c4365ae 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_minwidth_calendar_view.png
index 3935ca1..df79dc4 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_minwidth_calendar_view_feb.png
index 5a11a6c..c4365ae 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_calendar_view.png
index df79dc4..0874ee5 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_calendar_view_feb.png
index c4365ae..617dd44 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
index df79dc4..0874ee5 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
index c4365ae..617dd44 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_dialogwhenlarge_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_light_dialogwhenlarge_calendar_view.png
index df79dc4..0874ee5 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_dialogwhenlarge_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_dialogwhenlarge_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_dialogwhenlarge_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_light_dialogwhenlarge_calendar_view_feb.png
index c4365ae..617dd44 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_dialogwhenlarge_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_dialogwhenlarge_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_noactionbar_fullscreen_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_light_noactionbar_fullscreen_calendar_view.png
index 0874ee5..0c7df4f 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_noactionbar_fullscreen_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_noactionbar_fullscreen_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_noactionbar_fullscreen_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_light_noactionbar_fullscreen_calendar_view_feb.png
index 617dd44..026c73c 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_noactionbar_fullscreen_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_noactionbar_fullscreen_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_panel_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_light_panel_calendar_view.png
index 0874ee5..0c7df4f 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_panel_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_panel_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_light_panel_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_light_panel_calendar_view_feb.png
index 617dd44..026c73c 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_light_panel_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_light_panel_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_noactionbar_fullscreen_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_noactionbar_fullscreen_calendar_view.png
index 52959f1..e790c06 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_noactionbar_fullscreen_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_noactionbar_fullscreen_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_noactionbar_fullscreen_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_noactionbar_fullscreen_calendar_view_feb.png
index 6a0feb3..8899deb 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_noactionbar_fullscreen_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_noactionbar_fullscreen_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_wallpaper_calendar_view.png b/tests/tests/holo/res/drawable-hdpi/holo_wallpaper_calendar_view.png
index aea9b8d..52959f1 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_wallpaper_calendar_view.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_wallpaper_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-hdpi/holo_wallpaper_calendar_view_feb.png b/tests/tests/holo/res/drawable-hdpi/holo_wallpaper_calendar_view_feb.png
index 5093067..6a0feb3 100644
--- a/tests/tests/holo/res/drawable-hdpi/holo_wallpaper_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-hdpi/holo_wallpaper_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_calendar_view.png
index 7149aeb..6d5b173 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_calendar_view_feb.png
index e77a2fb..e9d5de9 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_dialog_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_dialog_calendar_view.png
index 867a1c7..7149aeb 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_dialog_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_dialog_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_dialog_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_dialog_calendar_view_feb.png
index 9ea8c1d..e77a2fb 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_dialog_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_dialog_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_dialog_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_dialog_minwidth_calendar_view.png
index 867a1c7..7149aeb 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_dialog_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_dialog_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_dialog_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_dialog_minwidth_calendar_view_feb.png
index 9ea8c1d..e77a2fb 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_dialog_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_dialog_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_calendar_view.png
index 7149aeb..6d5b173 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_calendar_view_feb.png
index e77a2fb..e9d5de9 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_minwidth_calendar_view.png
index 7149aeb..6d5b173 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
index e77a2fb..e9d5de9 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_dialogwhenlarge_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_dialogwhenlarge_calendar_view.png
index 7149aeb..6d5b173 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_dialogwhenlarge_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_dialogwhenlarge_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_dialogwhenlarge_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_dialogwhenlarge_calendar_view_feb.png
index e77a2fb..e9d5de9 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_dialogwhenlarge_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_dialogwhenlarge_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_light_calendar_view.png
index 20f587c..c8b76c8 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_light_calendar_view_feb.png
index c85dad2..ef2b2d6 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_darkactionbar_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_light_darkactionbar_calendar_view.png
index 20f587c..c8b76c8 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_darkactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_darkactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_darkactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_light_darkactionbar_calendar_view_feb.png
index c85dad2..ef2b2d6 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_darkactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_darkactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_calendar_view.png
index 3d30ded..20f587c 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_calendar_view_feb.png
index 6de8708..c85dad2 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_minwidth_calendar_view.png
index 3d30ded..20f587c 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_minwidth_calendar_view_feb.png
index 6de8708..c85dad2 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_calendar_view.png
index 20f587c..c8b76c8 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_calendar_view_feb.png
index c85dad2..ef2b2d6 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
index 20f587c..c8b76c8 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
index c85dad2..ef2b2d6 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_dialogwhenlarge_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_light_dialogwhenlarge_calendar_view.png
index 20f587c..c8b76c8 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_dialogwhenlarge_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_dialogwhenlarge_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_dialogwhenlarge_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_light_dialogwhenlarge_calendar_view_feb.png
index c85dad2..ef2b2d6 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_dialogwhenlarge_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_dialogwhenlarge_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_noactionbar_fullscreen_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_light_noactionbar_fullscreen_calendar_view.png
index c8b76c8..e8dea77 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_noactionbar_fullscreen_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_noactionbar_fullscreen_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_light_noactionbar_fullscreen_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_light_noactionbar_fullscreen_calendar_view_feb.png
index ef2b2d6..26756a2 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_light_noactionbar_fullscreen_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_light_noactionbar_fullscreen_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_noactionbar_fullscreen_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_noactionbar_fullscreen_calendar_view.png
index 6d5b173..a0e3eef 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_noactionbar_fullscreen_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_noactionbar_fullscreen_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_noactionbar_fullscreen_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_noactionbar_fullscreen_calendar_view_feb.png
index e9d5de9..3231fd6 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_noactionbar_fullscreen_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_noactionbar_fullscreen_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_panel_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_panel_calendar_view.png
index 6d5b173..a0e3eef 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_panel_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_panel_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_panel_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_panel_calendar_view_feb.png
index e9d5de9..3231fd6 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_panel_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_panel_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_wallpaper_calendar_view.png b/tests/tests/holo/res/drawable-ldpi/holo_wallpaper_calendar_view.png
index 7149aeb..6d5b173 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_wallpaper_calendar_view.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_wallpaper_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-ldpi/holo_wallpaper_calendar_view_feb.png b/tests/tests/holo/res/drawable-ldpi/holo_wallpaper_calendar_view_feb.png
index e77a2fb..e9d5de9 100644
--- a/tests/tests/holo/res/drawable-ldpi/holo_wallpaper_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-ldpi/holo_wallpaper_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-mdpi/holo_wallpaper_calendar_view.png b/tests/tests/holo/res/drawable-mdpi/holo_wallpaper_calendar_view.png
index 191128d..ce2791f 100644
--- a/tests/tests/holo/res/drawable-mdpi/holo_wallpaper_calendar_view.png
+++ b/tests/tests/holo/res/drawable-mdpi/holo_wallpaper_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_calendar_view.png
index 0beff09..643b5e0 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_calendar_view_feb.png
index 568bb25..9c505f8 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_minwidth_calendar_view.png
index 0beff09..643b5e0 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_minwidth_calendar_view_feb.png
index 568bb25..9c505f8 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_calendar_view.png
index 643b5e0..5c257cb 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_calendar_view_feb.png
index 9c505f8..f61d7b7 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_minwidth_calendar_view.png
index 643b5e0..5c257cb 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
index 9c505f8..f61d7b7 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_dialogwhenlarge_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_dialogwhenlarge_noactionbar_calendar_view.png
index 643b5e0..5c257cb 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_dialogwhenlarge_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_dialogwhenlarge_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_dialogwhenlarge_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_dialogwhenlarge_noactionbar_calendar_view_feb.png
index 9c505f8..f61d7b7 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_dialogwhenlarge_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_dialogwhenlarge_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_inputmethod_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_inputmethod_calendar_view.png
index 8990fed..dde6d9e 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_inputmethod_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_inputmethod_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_inputmethod_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_inputmethod_calendar_view_feb.png
index 8fd6b84..c57376b 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_inputmethod_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_inputmethod_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_calendar_view.png
index 9b0c1cd..8990fed 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_calendar_view_feb.png
index f95740f..8fd6b84 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_minwidth_calendar_view.png
index 9b0c1cd..8990fed 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_minwidth_calendar_view_feb.png
index f95740f..8fd6b84 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_calendar_view.png
index 8990fed..dde6d9e 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_calendar_view_feb.png
index 8fd6b84..c57376b 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
index 8990fed..dde6d9e 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
index 8fd6b84..c57376b 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view.png
index 8990fed..dde6d9e 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view_feb.png
index 8fd6b84..c57376b 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_noactionbar_calendar_view.png
index 8990fed..dde6d9e 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_noactionbar_calendar_view_feb.png
index 8fd6b84..c57376b 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_light_panel_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_light_panel_calendar_view_feb.png
index 8fd6b84..c57376b 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_light_panel_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_light_panel_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_noactionbar_calendar_view_feb.png
index 9c505f8..f61d7b7 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_wallpaper_notitlebar_calendar_view.png b/tests/tests/holo/res/drawable-tvdpi/holo_wallpaper_notitlebar_calendar_view.png
index 643b5e0..5c257cb 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_wallpaper_notitlebar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_wallpaper_notitlebar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-tvdpi/holo_wallpaper_notitlebar_calendar_view_feb.png b/tests/tests/holo/res/drawable-tvdpi/holo_wallpaper_notitlebar_calendar_view_feb.png
index 9c505f8..f61d7b7 100644
--- a/tests/tests/holo/res/drawable-tvdpi/holo_wallpaper_notitlebar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-tvdpi/holo_wallpaper_notitlebar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_calendar_view.png
index f2918d8..617f66d 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_calendar_view_feb.png
index dfe29b1..5a41e89 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_minwidth_calendar_view.png
index f2918d8..617f66d 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_minwidth_calendar_view_feb.png
index dfe29b1..5a41e89 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_calendar_view.png
index 617f66d..f1a3471 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_calendar_view_feb.png
index 5a41e89..8048081 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_minwidth_calendar_view.png
index 617f66d..f1a3471 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
index 5a41e89..8048081 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_dialog_noactionbar_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_dialogwhenlarge_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_dialogwhenlarge_noactionbar_calendar_view.png
index 617f66d..f1a3471 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_dialogwhenlarge_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_dialogwhenlarge_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_dialogwhenlarge_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_dialogwhenlarge_noactionbar_calendar_view_feb.png
index 5a41e89..8048081 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_dialogwhenlarge_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_dialogwhenlarge_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_inputmethod_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_inputmethod_calendar_view.png
index 6bb8c7b..4a7d2ae 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_inputmethod_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_inputmethod_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_inputmethod_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_inputmethod_calendar_view_feb.png
index 6a32add..02a117c 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_inputmethod_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_inputmethod_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_calendar_view.png
index 78d05e2..6bb8c7b 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_calendar_view_feb.png
index d11f86f..6a32add 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_minwidth_calendar_view.png
index 78d05e2..6bb8c7b 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_minwidth_calendar_view_feb.png
index d11f86f..6a32add 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_calendar_view.png
index 6bb8c7b..4a7d2ae 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_calendar_view_feb.png
index 6a32add..02a117c 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
index 6bb8c7b..4a7d2ae 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_minwidth_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
index 6a32add..02a117c 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialog_noactionbar_minwidth_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view.png
index 6bb8c7b..4a7d2ae 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view_feb.png
index 6a32add..02a117c 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_dialogwhenlarge_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_noactionbar_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_noactionbar_calendar_view.png
index 6bb8c7b..4a7d2ae 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_noactionbar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_noactionbar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_light_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_light_noactionbar_calendar_view_feb.png
index 6a32add..02a117c 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_light_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_light_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_noactionbar_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_noactionbar_calendar_view_feb.png
index 5a41e89..8048081 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_noactionbar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_noactionbar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_wallpaper_notitlebar_calendar_view.png b/tests/tests/holo/res/drawable-xhdpi/holo_wallpaper_notitlebar_calendar_view.png
index 617f66d..f1a3471 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_wallpaper_notitlebar_calendar_view.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_wallpaper_notitlebar_calendar_view.png
Binary files differ
diff --git a/tests/tests/holo/res/drawable-xhdpi/holo_wallpaper_notitlebar_calendar_view_feb.png b/tests/tests/holo/res/drawable-xhdpi/holo_wallpaper_notitlebar_calendar_view_feb.png
index 5a41e89..8048081 100644
--- a/tests/tests/holo/res/drawable-xhdpi/holo_wallpaper_notitlebar_calendar_view_feb.png
+++ b/tests/tests/holo/res/drawable-xhdpi/holo_wallpaper_notitlebar_calendar_view_feb.png
Binary files differ
diff --git a/tests/tests/media/src/android/media/cts/StreamingMediaPlayerTest.java b/tests/tests/media/src/android/media/cts/StreamingMediaPlayerTest.java
index 0398e96..74c709a 100644
--- a/tests/tests/media/src/android/media/cts/StreamingMediaPlayerTest.java
+++ b/tests/tests/media/src/android/media/cts/StreamingMediaPlayerTest.java
@@ -57,54 +57,54 @@
 */
     // Streaming HTTP video from YouTube
     public void testHTTP_H263_AMR_Video1() throws Exception {
-        playVideoTest("http://v20.lscache8.c.youtube.com/videoplayback?id=271de9756065677e"
-                + "&itag=13&ip=0.0.0.0&ipbits=0&expire=999999999999999999"
-                + "&sparams=ip,ipbits,expire,ip,ipbits,expire,id,itag"
-                + "&signature=372FA4C532AA49D14EAF049BCDA66460EEE161E9"
-                + ".6D8BF096B73B7A68A7032CA8685053CFB498D30A"
+        playVideoTest("http://redirector.c.youtube.com/videoplayback?id=271de9756065677e"
+                + "&itag=13&source=youtube&ip=0.0.0.0&ipbits=0&expire=19000000000"
+                + "&sparams=ip,ipbits,expire,id,itag,source"
+                + "&signature=6F5AEC448AAF88466D7A10EBB76020745405D33F."
+                + "5050D35AE997E1535FE828B0DE99EF31A699D9D0"
                 + "&key=test_key1&user=android-device-test", 176, 144);
     }
     public void testHTTP_H263_AMR_Video2() throws Exception {
-        playVideoTest("http://v20.lscache8.c.youtube.com/videoplayback?id=c80658495af60617"
-                + "&itag=13&ip=0.0.0.0&ipbits=0&expire=999999999999999999"
-                + "&sparams=ip,ipbits,expire,ip,ipbits,expire,id,itag"
-                + "&signature=191FCD5C4B7400065C20845D7AC2B437B1291F26"
-                + ".66F8B8D7EFF7F144141AC67E8E35E078468CE6FB"
+        playVideoTest("http://redirector.c.youtube.com/videoplayback?id=c80658495af60617"
+                + "&itag=13&source=youtube&ip=0.0.0.0&ipbits=0&expire=19000000000"
+                + "&sparams=ip,ipbits,expire,id,itag,source"
+                + "&signature=71749754E28115FD1C233E3BE96CDDC3F430CB74."
+                + "49D1506DE694CC8FCEE63CB4F3AD41EB76C198CE"
                 + "&key=test_key1&user=android-device-test", 176, 144);
     }
 
     public void testHTTP_MPEG4SP_AAC_Video1() throws Exception {
-        playVideoTest("http://v20.lscache8.c.youtube.com/videoplayback?id=271de9756065677e"
-                + "&itag=17&ip=0.0.0.0&ipbits=0&expire=999999999999999999"
-                + "&sparams=ip,ipbits,expire,ip,ipbits,expire,id,itag"
-                + "&signature=3DCD3F79E045F95B6AF661765F046FB0440FF016"
-                + ".06A42661B3AF6BAF046F012549CC9BA34EBC80A9"
+        playVideoTest("http://redirector.c.youtube.com/videoplayback?id=271de9756065677e"
+                + "&itag=17&source=youtube&ip=0.0.0.0&ipbits=0&expire=19000000000"
+                + "&sparams=ip,ipbits,expire,id,itag,source"
+                + "&signature=197A9742C1EFCA95725F2F26DFFD512FC48C149F."
+                + "A59B42FD490F6B591B292F3B2659A9723B980351"
                 + "&key=test_key1&user=android-device-test", 176, 144);
     }
     public void testHTTP_MPEG4SP_AAC_Video2() throws Exception {
-        playVideoTest("http://v20.lscache8.c.youtube.com/videoplayback?id=c80658495af60617"
-                + "&itag=17&ip=0.0.0.0&ipbits=0&expire=999999999999999999"
-                + "&sparams=ip,ipbits,expire,ip,ipbits,expire,id,itag"
-                + "&signature=242B7AEF3AB38519F593203FDEF420E2A585DA6E"
-                + ".4A57C03AF6859FE4694CD69C3225E386373A98B0"
+        playVideoTest("http://redirector.c.youtube.com/videoplayback?id=c80658495af60617"
+                + "&itag=17&source=youtube&ip=0.0.0.0&ipbits=0&expire=19000000000"
+                + "&sparams=ip,ipbits,expire,id,itag,source"
+                + "&signature=0F84740A7E06F884127E78A6D7DE6DEA8F4B8BFD."
+                + "248DF1E90B8137C30769C79BF23147F6BB3DFCDF"
                 + "&key=test_key1&user=android-device-test", 176, 144);
     }
 
     public void testHTTP_H264Base_AAC_Video1() throws Exception {
-        playVideoTest("http://v20.lscache8.c.youtube.com/videoplayback?id=271de9756065677e"
-                + "&itag=18&ip=0.0.0.0&ipbits=0&expire=999999999999999999"
-                + "&sparams=ip,ipbits,expire,ip,ipbits,expire,id,itag"
-                + "&signature=1219C2B07AF0638C27916307A6093C0E43CB894E"
-                + ".126B6B916BD57157782738AA7C03E59F21DBC168"
-                + "&key=test_key1&user=android-device-test", 640, 360);
+        playVideoTest("http://redirector.c.youtube.com/videoplayback?id=271de9756065677e"
+                + "&itag=18&source=youtube&ip=0.0.0.0&ipbits=0&expire=19000000000"
+                + "&sparams=ip,ipbits,expire,id,itag,source"
+                + "&signature=3CFCAFB87EB9FC943FACDC54FEC8C725A801642C."
+                + "7D77ACBC4CAF40349BF093E302B635757E45F345"
+                + "&key=test_key1&user=android-device-test", 480, 270);
     }
     public void testHTTP_H264Base_AAC_Video2() throws Exception {
-        playVideoTest("http://v20.lscache8.c.youtube.com/videoplayback?id=c80658495af60617"
-                + "&itag=18&ip=0.0.0.0&ipbits=0&expire=999999999999999999"
-                + "&sparams=ip,ipbits,expire,ip,ipbits,expire,id,itag"
-                + "&signature=61674BC069F2C812A18C390DE785CECD296228C7"
-                + ".11F5FCE823FB8FA31269A06A483C2F9B2C22F357"
-                + "&key=test_key1&user=android-device-test", 640, 360);
+        playVideoTest("http://redirector.c.youtube.com/videoplayback?id=c80658495af60617"
+                + "&itag=18&source=youtube&ip=0.0.0.0&ipbits=0&expire=19000000000"
+                + "&sparams=ip,ipbits,expire,id,itag,source"
+                + "&signature=A11D8BA0AA67A27F1409BE0C0B96B756625DB88B."
+                + "9BF4C93A130583ADBDF2B953AD5A8A58F518B012"
+                + "&key=test_key1&user=android-device-test", 480, 270);
     }
 
     // Streaming HLS video from YouTube
diff --git a/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java b/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java
index 283f63b..213dc17 100644
--- a/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java
+++ b/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java
@@ -407,6 +407,10 @@
      * To pass this CTS test, a connected WiFi link is required.
      */
     public void testWifiWatchdog() throws Exception {
+        if (!WifiFeature.isWifiSupported(getContext())) {
+            // skip the test if WiFi is not supported
+            return;
+        }
         // Make sure WiFi is enabled
         if (!mWifiManager.isWifiEnabled()) {
             setWifiEnabled(true);
diff --git a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
index cc8020e..668ae19 100644
--- a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
@@ -537,15 +537,49 @@
         }
     }
 
-    private static final Set<File> SYS_EXCEPTIONS = new HashSet<File>(
+    // This set contains all exceptions for writable sysfs, if it is a
+    // directory, all files below that directory are included, so be
+    // careful.
+    private static final Set<String> SYS_EXCEPTIONS = new HashSet<String>(
             Arrays.asList(
-                new File("/sys/kernel/debug/tracing/trace_marker")
+                "/sys/kernel/debug/tracing/trace_marker",
+                "/sys/fs/selinux"
             ));
 
+    private static Set <File> getIgnorablesFromPaths(Set <String> paths) {
+
+        Set <File> ignorable = new HashSet <File> ();
+
+        for(String ignore : paths) {
+               File tmp = new File(ignore);
+
+               File[] files = null;
+               if(tmp.isDirectory()) {
+                    files = tmp.listFiles(new FileFilter() {
+                       @Override public boolean accept(File pathname) {
+                           return pathname.isFile();
+                       }
+                   });
+               }
+               else if(tmp.isFile()){
+                   files = new File[1];
+                   files [0] = tmp;
+               }
+               else {
+                   // Should this be an Exception?
+                   continue;
+               }
+               ignorable.addAll(Arrays.asList(files));
+        }
+        return ignorable;
+    }
+
     @LargeTest
     public void testAllFilesInSysAreNotWritable() throws Exception {
         Set<File> writable = getAllWritableFilesInDirAndSubDir(new File("/sys"));
-        writable.removeAll(SYS_EXCEPTIONS);
+        Set<File> ignorables = getIgnorablesFromPaths(SYS_EXCEPTIONS);
+
+        writable.removeAll(ignorables);
         assertTrue("Found writable: " + writable.toString(),
                 writable.isEmpty());
     }
@@ -663,6 +697,12 @@
     getAllInsecureBlockDevicesInDirAndSubdir(File dir) throws Exception {
         assertTrue(dir.isDirectory());
         Set<File> retval = new HashSet<File>();
+
+        if (isSymbolicLink(dir)) {
+            // don't examine symbolic links.
+            return retval;
+        }
+
         File[] subDirectories = dir.listFiles(new FileFilter() {
             @Override public boolean accept(File pathname) {
                 return pathname.isDirectory();
diff --git a/tests/tests/provider/src/android/provider/cts/CalendarTest.java b/tests/tests/provider/src/android/provider/cts/CalendarTest.java
index e460453..cbefa9d 100644
--- a/tests/tests/provider/src/android/provider/cts/CalendarTest.java
+++ b/tests/tests/provider/src/android/provider/cts/CalendarTest.java
@@ -1946,6 +1946,10 @@
         assertTrue(eventId >= 0);
         return eventValues;
       }
+
+      public long getCalendarId() {
+        return mCalendarId;
+      }
     }
 
     /**
@@ -1981,7 +1985,8 @@
           CalendarContract.Instances.CONTENT_BY_DAY_URI, julianStart + "/" + julianEnd);
 
       // Query the range, sorting by event start time
-      Cursor c = mContentResolver.query(uri, null, null, null, Events.DTSTART);
+      Cursor c = mContentResolver.query(uri, null, Instances.CALENDAR_ID + "="
+              + helper.getCalendarId(), null, Events.DTSTART);
 
       // Assert that two events are returned
       assertEquals(c.getCount(), 2);
diff --git a/tests/tests/provider/src/android/provider/cts/ContactsContract_DumpFileProviderTest.java b/tests/tests/provider/src/android/provider/cts/ContactsContract_DumpFileProviderTest.java
new file mode 100644
index 0000000..5c5afaa
--- /dev/null
+++ b/tests/tests/provider/src/android/provider/cts/ContactsContract_DumpFileProviderTest.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2013 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 android.provider.cts;
+
+import android.content.ContentResolver;
+import android.net.Uri;
+import android.test.AndroidTestCase;
+
+import java.io.FileNotFoundException;
+
+public class ContactsContract_DumpFileProviderTest extends AndroidTestCase {
+
+    private static final String URI_PREFIX = "content://com.android.contacts.dumpfile/";
+
+    private static final String[] NOT_ALLOWED_FILES = {
+            "not_allowed.txt",
+            "../A-contacts-db.zip",   // ".." is not allowed.
+            "/A-contacts-db.zip",     // "/" is not allowed
+            "-contacts-db.zip",       // no name prefix
+            "asdf-contacts-db.zip"};
+
+    private static final String[] ALLOWED_FILES = {
+            "1234567890abcdefABCDEF-contacts-db.zip",
+            "a-contacts-db.zip",
+            "0-contacts-db.zip",
+            "A-contacts-db.zip",
+            "abcdefabcdefabcdefabcdef-contacts-db.zip"};
+
+    private ContentResolver mResolver;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mResolver = getContext().getContentResolver();
+    }
+
+    public void testOpenFileDescriptor_throwsErrorWithIllegalFileName() {
+        for (String fileName : NOT_ALLOWED_FILES) {
+            Uri uri = Uri.parse(URI_PREFIX + fileName);
+            assertOpenFileDescriptorThrowsError(uri);
+        }
+    }
+
+    public void testOpenFileDescriptor_worksWithValidFileName() {
+        for (String fileName : ALLOWED_FILES) {
+            final Uri uri = Uri.parse(URI_PREFIX + fileName);
+            try {
+                mResolver.openFileDescriptor(uri, "r");
+            } catch (FileNotFoundException e) {
+
+            }
+        }
+    }
+
+    public void testQuery_throwsErrorWithIllegalFileName() {
+        for (String fileName : NOT_ALLOWED_FILES) {
+            final Uri uri = Uri.parse(URI_PREFIX + fileName);
+            assertQueryThrowsError(uri);
+        }
+    }
+
+    public void testQuery_worksWithValidFileName() {
+        for (String fileName : ALLOWED_FILES) {
+            final Uri uri = Uri.parse(URI_PREFIX + fileName);
+            mResolver.query(uri, null, null, null, null);
+        }
+    }
+
+    private void assertQueryThrowsError(Uri uri) {
+        try {
+            mResolver.query(uri, null, null, null, null);
+        } catch (IllegalArgumentException e) {
+            // pass
+            return;
+        }
+
+        fail("IllegalArgumentException expected but not thrown.");
+    }
+
+    private void assertOpenFileDescriptorThrowsError(Uri uri) {
+        try {
+            mResolver.openFileDescriptor(uri, "r");
+        } catch (IllegalArgumentException e) {
+            // pass
+            return;
+        } catch (FileNotFoundException e) {
+
+        }
+
+        fail("IllegalArgumentException expected but not thrown.");
+    }
+}
diff --git a/tests/tests/util/src/android/util/cts/DisplayMetricsTest.java b/tests/tests/util/src/android/util/cts/DisplayMetricsTest.java
index 821bb09..d7c1895 100644
--- a/tests/tests/util/src/android/util/cts/DisplayMetricsTest.java
+++ b/tests/tests/util/src/android/util/cts/DisplayMetricsTest.java
@@ -37,8 +37,8 @@
         assertEquals(0, outMetrics.widthPixels);
         assertEquals(0, outMetrics.heightPixels);
         // according to Android enmulator doc UI -scale confine density should between 0.1 to 3
-        assertTrue((0.1 < outMetrics.density) && (outMetrics.density < 3));
-        assertTrue((0.1 < outMetrics.scaledDensity) && (outMetrics.scaledDensity < 3));
+        assertTrue((0.1 <= outMetrics.density) && (outMetrics.density <= 3));
+        assertTrue((0.1 <= outMetrics.scaledDensity) && (outMetrics.scaledDensity <= 3));
         assertTrue(0 < outMetrics.xdpi);
         assertTrue(0 < outMetrics.ydpi);
 
@@ -49,8 +49,8 @@
         assertEquals(display.getHeight(), metrics.heightPixels);
         assertEquals(display.getWidth(), metrics.widthPixels);
         // according to Android enmulator doc UI -scale confine density should between 0.1 to 3
-        assertTrue((0.1 < metrics.density) && (metrics.density < 3));
-        assertTrue((0.1 < metrics.scaledDensity) && (metrics.scaledDensity < 3));
+        assertTrue((0.1 <= metrics.density) && (metrics.density <= 3));
+        assertTrue((0.1 <= metrics.scaledDensity) && (metrics.scaledDensity <= 3));
         assertTrue(0 < metrics.xdpi);
         assertTrue(0 < metrics.ydpi);
     }
diff --git a/tests/tests/view/src/android/view/cts/ViewTest.java b/tests/tests/view/src/android/view/cts/ViewTest.java
index 888bb73..0af3f21 100644
--- a/tests/tests/view/src/android/view/cts/ViewTest.java
+++ b/tests/tests/view/src/android/view/cts/ViewTest.java
@@ -247,10 +247,11 @@
         Rect rect = new Rect();
         final Button button = new Button(mActivity);
         final int WRAP_CONTENT = ViewGroup.LayoutParams.WRAP_CONTENT;
+        final int btnHeight = view.getHeight()/3;
         runTestOnUiThread(new Runnable() {
             public void run() {
                 mActivity.addContentView(button,
-                        new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
+                        new LinearLayout.LayoutParams(WRAP_CONTENT, btnHeight));
             }
         });
         getInstrumentation().waitForIdleSync();
diff --git a/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java b/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java
index 00a8dea..722c1b3 100644
--- a/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java
+++ b/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java
@@ -16,7 +16,6 @@
 
 package android.view.inputmethod.cts;
 
-
 import android.content.ComponentName;
 import android.content.Intent;
 import android.content.pm.PackageManager;
@@ -27,6 +26,7 @@
 import android.util.Printer;
 import android.view.inputmethod.InputMethod;
 import android.view.inputmethod.InputMethodInfo;
+import android.view.inputmethod.InputMethodSubtype;
 
 import org.xmlpull.v1.XmlPullParserException;
 
@@ -40,14 +40,40 @@
     private CharSequence mLabel;
     private String mSettingsActivity;
 
+    private int mSubtypeNameResId;
+    private int mSubtypeIconResId;
+    private String mSubtypeLocale;
+    private String mSubtypeMode;
+    private String mSubtypeExtraValue_key;
+    private String mSubtypeExtraValue_value;
+    private String mSubtypeExtraValue;
+    private boolean mSubtypeIsAuxiliary;
+    private boolean mSubtypeOverridesImplicitlyEnabledSubtype;
+    private int mSubtypeId;
+    private InputMethodSubtype mInputMethodSubtype;
+
     @Override
     protected void setUp() throws Exception {
         super.setUp();
         mPackageName = mContext.getPackageName();
-        mClassName = InputMethodInfoStub.class.getName();
+        mClassName = InputMethodSettingsActivityStub.class.getName();
         mLabel = "test";
-        mSettingsActivity = "android.view.inputmethod.cts.InputMethodInfoStub";
+        mSettingsActivity = "android.view.inputmethod.cts.InputMethodSettingsActivityStub";
         mInputMethodInfo = new InputMethodInfo(mPackageName, mClassName, mLabel, mSettingsActivity);
+
+        mSubtypeNameResId = 0;
+        mSubtypeIconResId = 0;
+        mSubtypeLocale = "en_US";
+        mSubtypeMode = "keyboard";
+        mSubtypeExtraValue_key = "key1";
+        mSubtypeExtraValue_value = "value1";
+        mSubtypeExtraValue = "tag," + mSubtypeExtraValue_key + "=" + mSubtypeExtraValue_value;
+        mSubtypeIsAuxiliary = false;
+        mSubtypeOverridesImplicitlyEnabledSubtype = false;
+        mSubtypeId = 99;
+        mInputMethodSubtype = new InputMethodSubtype(mSubtypeNameResId, mSubtypeIconResId,
+                mSubtypeLocale, mSubtypeMode, mSubtypeExtraValue, mSubtypeIsAuxiliary,
+                mSubtypeOverridesImplicitlyEnabledSubtype, mSubtypeId);
     }
 
     public void testInputMethodInfoProperties() throws XmlPullParserException, IOException {
@@ -58,7 +84,7 @@
         assertEquals(0, mInputMethodInfo.getIsDefaultResourceId());
 
         Intent intent = new Intent(InputMethod.SERVICE_INTERFACE);
-        intent.setClass(mContext, InputMethodInfoStub.class);
+        intent.setClass(mContext, InputMethodSettingsActivityStub.class);
         PackageManager pm = mContext.getPackageManager();
         List<ResolveInfo> ris = pm.queryIntentServices(intent, PackageManager.GET_META_DATA);
         for (int i = 0; i < ris.size(); i++) {
@@ -69,6 +95,22 @@
         }
     }
 
+    public void testInputMethodSubtypeProperties() {
+        // TODO: Test InputMethodSubtype.getDisplayName()
+        assertEquals(mSubtypeNameResId, mInputMethodSubtype.getNameResId());
+        assertEquals(mSubtypeIconResId, mInputMethodSubtype.getIconResId());
+        assertEquals(mSubtypeLocale, mInputMethodSubtype.getLocale());
+        assertEquals(mSubtypeMode, mInputMethodSubtype.getMode());
+        assertEquals(mSubtypeExtraValue, mInputMethodSubtype.getExtraValue());
+        assertTrue(mInputMethodSubtype.containsExtraValueKey(mSubtypeExtraValue_key));
+        assertEquals(mSubtypeExtraValue_value,
+                mInputMethodSubtype.getExtraValueOf(mSubtypeExtraValue_key));
+        assertEquals(mSubtypeIsAuxiliary, mInputMethodSubtype.isAuxiliary());
+        assertEquals(mSubtypeOverridesImplicitlyEnabledSubtype,
+                mInputMethodSubtype.overridesImplicitlyEnabledSubtype());
+        assertEquals(mSubtypeId, mInputMethodSubtype.hashCode());
+    }
+
     private void assertService(ServiceInfo expected, ServiceInfo actual) {
         assertEquals(expected.getIconResource(), actual.getIconResource());
         assertEquals(expected.labelRes, actual.labelRes);
@@ -110,19 +152,39 @@
         assertEquals(expected.toString(), mInputMethodInfo.loadLabel(pm).toString());
     }
 
-    public void testWriteToParcel() {
-        Parcel p = Parcel.obtain();
+    public void testInputMethodInfoWriteToParcel() {
+        final Parcel p = Parcel.obtain();
         mInputMethodInfo.writeToParcel(p, 0);
         p.setDataPosition(0);
-        InputMethodInfo inputMethodInfo = InputMethodInfo.CREATOR.createFromParcel(p);
+        final InputMethodInfo imi = InputMethodInfo.CREATOR.createFromParcel(p);
 
-        assertEquals(mInputMethodInfo.getPackageName(), inputMethodInfo.getPackageName());
-        assertEquals(mInputMethodInfo.getServiceName(), inputMethodInfo.getServiceName());
-        assertEquals(mInputMethodInfo.getSettingsActivity(), inputMethodInfo.getSettingsActivity());
-        assertEquals(mInputMethodInfo.getId(), inputMethodInfo.getId());
-        assertEquals(mInputMethodInfo.getIsDefaultResourceId(), inputMethodInfo
-                .getIsDefaultResourceId());
-        assertService(mInputMethodInfo.getServiceInfo(), inputMethodInfo.getServiceInfo());
+        assertEquals(mInputMethodInfo.getPackageName(), imi.getPackageName());
+        assertEquals(mInputMethodInfo.getServiceName(), imi.getServiceName());
+        assertEquals(mInputMethodInfo.getSettingsActivity(), imi.getSettingsActivity());
+        assertEquals(mInputMethodInfo.getId(), imi.getId());
+        assertEquals(mInputMethodInfo.getIsDefaultResourceId(), imi.getIsDefaultResourceId());
+        assertService(mInputMethodInfo.getServiceInfo(), imi.getServiceInfo());
+    }
+
+    public void testInputMethodSubtypeWriteToParcel() {
+        final Parcel p = Parcel.obtain();
+        mInputMethodSubtype.writeToParcel(p, 0);
+        p.setDataPosition(0);
+        final InputMethodSubtype subtype = InputMethodSubtype.CREATOR.createFromParcel(p);
+
+        assertEquals(mInputMethodSubtype.containsExtraValueKey(mSubtypeExtraValue_key),
+                subtype.containsExtraValueKey(mSubtypeExtraValue_key));
+        assertEquals(mInputMethodSubtype.getExtraValue(), subtype.getExtraValue());
+        assertEquals(mInputMethodSubtype.getExtraValueOf(mSubtypeExtraValue_key),
+                subtype.getExtraValueOf(mSubtypeExtraValue_key));
+        assertEquals(mInputMethodSubtype.getIconResId(), subtype.getIconResId());
+        assertEquals(mInputMethodSubtype.getLocale(), subtype.getLocale());
+        assertEquals(mInputMethodSubtype.getMode(), subtype.getMode());
+        assertEquals(mInputMethodSubtype.getNameResId(), subtype.getNameResId());
+        assertEquals(mInputMethodSubtype.hashCode(), subtype.hashCode());
+        assertEquals(mInputMethodSubtype.isAuxiliary(), subtype.isAuxiliary());
+        assertEquals(mInputMethodSubtype.overridesImplicitlyEnabledSubtype(),
+                subtype.overridesImplicitlyEnabledSubtype());
     }
 
     class MockPrinter implements Printer {
diff --git a/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java b/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java
index 5de9805..5885315 100644
--- a/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java
+++ b/tests/uiautomator/src/com/android/cts/uiautomatortest/CtsUiAutomatorTest.java
@@ -787,6 +787,12 @@
      * @throws UiObjectNotFoundException
      */
     private void openTest(String name) throws UiObjectNotFoundException {
+        try {
+            UiDevice.getInstance().setOrientationNatural();
+        } catch (RemoteException e) {
+            // will catch it in its own test. For now try to put the device
+            // in its natural orientation prior to each test
+        }
         UiScrollable listView = new UiScrollable(
                 new UiSelector().className(android.widget.ListView.class.getName()));
 
diff --git a/tests/uiautomator/test-apps/CtsUiAutomatorApp/res/layout-land/test5_detail_fragment.xml b/tests/uiautomator/test-apps/CtsUiAutomatorApp/res/layout-land/test5_detail_fragment.xml
new file mode 100644
index 0000000..123ebde
--- /dev/null
+++ b/tests/uiautomator/test-apps/CtsUiAutomatorApp/res/layout-land/test5_detail_fragment.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ * Copyright (C) 2011 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.
+ -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:contentDescription="@string/test_5_Widgets_collection"
+    android:orientation="horizontal" >
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:orientation="vertical" >
+
+        <CheckBox
+            android:id="@+id/test_5_checkBox"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/test5_CheckBox" />
+
+        <Spinner
+            android:id="@+id/test_5_spinner"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content" />
+
+        <ProgressBar
+            android:id="@+id/test_5_progressBar"
+            style="?android:attr/progressBarStyleLarge"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content" />
+
+        <GridLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:columnCount="3" >
+
+            <ImageButton
+                android:id="@+id/test_5_imageButton"
+                android:layout_column="0"
+                android:layout_gravity="left"
+                android:layout_row="0"
+                android:src="@drawable/ic_launcher" />
+
+            <RatingBar
+                android:id="@+id/test_5_ratingBar"
+                android:layout_column="1"
+                android:layout_columnSpan="2"
+                android:layout_gravity="left|bottom"
+                android:layout_row="0" />
+
+            <Button
+                android:id="@+id/test_5_button2"
+                style="?android:attr/buttonStyleSmall"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="left|bottom"
+                android:enabled="false"
+                android:layout_row="0"
+                android:text="@string/test5_Button_Disabled" />
+
+            <Space
+                android:layout_width="21dp"
+                android:layout_height="1dp"
+                android:layout_column="1"
+                android:layout_row="0" />
+
+            <Space
+                android:layout_width="1dp"
+                android:layout_height="21dp"
+                android:layout_column="0"
+                android:layout_row="0" />
+
+            <Space
+                android:layout_width="221dp"
+                android:layout_height="15dp"
+                android:layout_column="2"
+                android:layout_row="1" />
+
+            <ToggleButton
+                android:id="@+id/test_5_toggleButton"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_column="2"
+                android:text="@string/test5_ToggleButton" />
+        </GridLayout>
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical" >
+
+        <SeekBar
+            android:id="@+id/test_5_seekBar"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+
+        <Button
+            android:id="@+id/test_5_button1"
+            style="?android:attr/buttonStyleSmall"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:contentDescription="@string/test5_Button_Description"
+            android:text="@string/test5_Button" />
+
+    </LinearLayout>
+
+</LinearLayout>
diff --git a/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java b/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
index 6674bdf..e91595b 100644
--- a/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
+++ b/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java
@@ -31,7 +31,7 @@
     @Option(name="cts-install-path", description="the path to the cts installation to use")
     private String mCtsRootDirPath = System.getProperty("CTS_ROOT");
 
-    public static final String CTS_BUILD_VERSION = "4.2_r1";
+    public static final String CTS_BUILD_VERSION = "4.2_r4";
 
     /**
      * {@inheritDoc}