Fix the CTS android.view.cts.WindowTest failure:
Don't assert background opacity when the window is swipe dismiss.
Bug: 18236932
Change-Id: I888b11c98fed30c45aa830c77499a4d11d092958
diff --git a/tests/tests/view/src/android/view/cts/WindowTest.java b/tests/tests/view/src/android/view/cts/WindowTest.java
index ead4d5b..3c5386d 100644
--- a/tests/tests/view/src/android/view/cts/WindowTest.java
+++ b/tests/tests/view/src/android/view/cts/WindowTest.java
@@ -370,7 +370,9 @@
public void testSetBackgroundDrawable() throws Throwable {
// DecorView holds the background
View decor = mWindow.getDecorView();
- assertEquals(PixelFormat.OPAQUE, decor.getBackground().getOpacity());
+ if (!mWindow.hasFeature(Window.FEATURE_SWIPE_TO_DISMISS)) {
+ assertEquals(PixelFormat.OPAQUE, decor.getBackground().getOpacity());
+ }
runTestOnUiThread(new Runnable() {
public void run() {
// setBackgroundDrawableResource(int resId) has the same