diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-11-23 02:33:22 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-11-23 02:33:22 +0000 |
commit | 51bdbe582c415d34421d35eee1362441ac47a090 (patch) | |
tree | 3eb39d92dac2ce8e4f0c50601414b1edff8ff674 | |
parent | bfab2cf9e92d0815e572da446432d1231c3529c7 (diff) | |
parent | c802b79f72ec42b5c068b2f8e0d5e7637973fa30 (diff) | |
download | cts-51bdbe582c415d34421d35eee1362441ac47a090.tar.gz |
Merge "Use Views instead of drawable for BlurTests background" into snap-temp-L43100030000417738
4 files changed, 18 insertions, 34 deletions
diff --git a/tests/framework/base/windowmanager/res/drawable/background_image.xml b/tests/framework/base/windowmanager/res/drawable/background_image.xml deleted file mode 100644 index 37f40e185c0..00000000000 --- a/tests/framework/base/windowmanager/res/drawable/background_image.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2023 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. - --> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="2px" - android:height="2px" - android:viewportWidth="2" - android:viewportHeight="2"> - <group> - <path - android:name="blue" - android:pathData="m0,0l1,0l0,2l-1,0l0-2z" - android:fillColor="#0000FF" /> - <path - android:name="red" - android:pathData="m1,0l1,0l0,2l-1,0l0-2z" - android:fillColor="#FF0000" /> - </group> -</vector> diff --git a/tests/framework/base/windowmanager/res/layout/background_image.xml b/tests/framework/base/windowmanager/res/layout/background_image.xml new file mode 100644 index 00000000000..2d9c798090d --- /dev/null +++ b/tests/framework/base/windowmanager/res/layout/background_image.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal"> + <View + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_weight="1" + android:background="#ff0000ff"/> + <View + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_weight="1" + android:background="#ffff0000"/> + +</LinearLayout> diff --git a/tests/framework/base/windowmanager/res/values/styles.xml b/tests/framework/base/windowmanager/res/values/styles.xml index 00f9000bdd0..65092eca8fc 100644 --- a/tests/framework/base/windowmanager/res/values/styles.xml +++ b/tests/framework/base/windowmanager/res/values/styles.xml @@ -67,7 +67,6 @@ <item name="android:windowNoTitle">true</item> <item name="android:windowLayoutInDisplayCutoutMode">always</item> <item name="android:windowSoftInputMode">stateHidden</item> - <item name="android:windowBackground">@drawable/background_image</item> </style> <style name="BlurryDialog" parent="TranslucentDialog"> <item name="android:windowBackgroundBlurRadius">@dimen/test_background_blur_radius</item> diff --git a/tests/framework/base/windowmanager/src/android/server/wm/BlurTests.java b/tests/framework/base/windowmanager/src/android/server/wm/BlurTests.java index 71b82ae1272..5f0f9fbead9 100644 --- a/tests/framework/base/windowmanager/src/android/server/wm/BlurTests.java +++ b/tests/framework/base/windowmanager/src/android/server/wm/BlurTests.java @@ -37,7 +37,6 @@ import android.platform.test.annotations.Presubmit; import android.provider.Settings; import android.server.wm.cts.R; import android.server.wm.settings.SettingsSession; -import android.view.View; import android.view.WindowManager; import androidx.test.rule.ActivityTestRule; @@ -424,7 +423,7 @@ public class BlurTests extends WindowManagerTestBase { super.onCreate(savedInstanceState); getSplashScreen().setOnExitAnimationListener(view -> view.remove()); - setContentView(new View(this)); + setContentView(R.layout.background_image); getWindow().setDecorFitsSystemWindows(false); getWindow().getInsetsController().hide(systemBars()); |