From 9c3d628683f9cc6ffed3c358c2ef1e55802f5753 Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Mon, 19 Sep 2022 16:05:15 +0000 Subject: [PATCH 1/4] 1/ Add test apps from WM shell package into flicker Add both apps to the same package to unify all test apps and helpers into a single reusable place Test: atest FlickerLibTest && atest FlickerTests Change-Id: I9fa18eb31b50c4e6869352250be0c89a9acb0be8 --- .../test-apps/flickerapp/AndroidManifest.xml | 225 ++++++++----- .../test-apps/flickerapp/res/drawable/bg.png | Bin 0 -> 1966 bytes .../flickerapp/res/drawable/ic_bubble.xml | 31 ++ .../flickerapp/res/drawable/ic_message.xml | 26 ++ .../flickerapp/res/layout/activity_bubble.xml | 48 +++ ...ity_button.xml => activity_launch_new.xml} | 0 .../flickerapp/res/layout/activity_main.xml | 48 +++ .../res/layout/activity_notification.xml | 30 ++ .../flickerapp/res/layout/activity_pip.xml | 141 ++++++++ .../res/layout/activity_splitscreen.xml | 33 ++ .../layout/activity_splitscreen_secondary.xml | 32 ++ .../ActivityEmbeddingMainActivity.java | 23 +- .../wm/flicker/testapp/ActivityOptions.java | 237 +++++++++----- .../wm/flicker/testapp/BubbleActivity.java | 77 +++++ .../wm/flicker/testapp/BubbleHelper.java | 173 ++++++++++ .../wm/flicker/testapp/FixedActivity.java | 35 ++ .../flicker/testapp/LaunchBubbleActivity.java | 82 +++++ ...onActivity.java => LaunchNewActivity.java} | 6 +- .../wm/flicker/testapp/PipActivity.java | 307 ++++++++++++++++++ .../testapp/SeamlessRotationActivity.java | 2 +- .../testapp/SendNotificationActivity.java | 61 ++++ .../flicker/testapp/SplitScreenActivity.java | 29 ++ .../testapp/SplitScreenSecondaryActivity.java | 28 ++ 23 files changed, 1505 insertions(+), 169 deletions(-) create mode 100644 tests/FlickerTests/test-apps/flickerapp/res/drawable/bg.png create mode 100644 tests/FlickerTests/test-apps/flickerapp/res/drawable/ic_bubble.xml create mode 100644 tests/FlickerTests/test-apps/flickerapp/res/drawable/ic_message.xml create mode 100644 tests/FlickerTests/test-apps/flickerapp/res/layout/activity_bubble.xml rename tests/FlickerTests/test-apps/flickerapp/res/layout/{activity_button.xml => activity_launch_new.xml} (100%) create mode 100644 tests/FlickerTests/test-apps/flickerapp/res/layout/activity_main.xml create mode 100644 tests/FlickerTests/test-apps/flickerapp/res/layout/activity_notification.xml create mode 100644 tests/FlickerTests/test-apps/flickerapp/res/layout/activity_pip.xml create mode 100644 tests/FlickerTests/test-apps/flickerapp/res/layout/activity_splitscreen.xml create mode 100644 tests/FlickerTests/test-apps/flickerapp/res/layout/activity_splitscreen_secondary.xml create mode 100644 tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/BubbleActivity.java create mode 100644 tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/BubbleHelper.java create mode 100644 tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/FixedActivity.java create mode 100644 tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/LaunchBubbleActivity.java rename tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/{ButtonActivity.java => LaunchNewActivity.java} (87%) create mode 100644 tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/PipActivity.java create mode 100644 tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/SendNotificationActivity.java create mode 100644 tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/SplitScreenActivity.java create mode 100644 tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/SplitScreenSecondaryActivity.java diff --git a/tests/FlickerTests/test-apps/flickerapp/AndroidManifest.xml b/tests/FlickerTests/test-apps/flickerapp/AndroidManifest.xml index 725963bc7ca30..6e935d11411e9 100644 --- a/tests/FlickerTests/test-apps/flickerapp/AndroidManifest.xml +++ b/tests/FlickerTests/test-apps/flickerapp/AndroidManifest.xml @@ -15,41 +15,41 @@ --> + package="com.android.server.wm.flicker.testapp"> + android:targetSdkVersion="29"/> + android:supportsRtl="true"> + android:taskAffinity="com.android.server.wm.flicker.testapp.SimpleActivity" + android:theme="@style/CutoutShortEdges" + android:label="SimpleActivity" + android:exported="true"> + android:taskAffinity="com.android.server.wm.flicker.testapp.ImeActivity" + android:theme="@style/CutoutShortEdges" + android:label="ImeActivity" + android:exported="true"> + android:theme="@style/CutoutShortEdges" + android:taskAffinity="com.android.server.wm.flicker.testapp.ImeActivityAutoFocus" + android:windowSoftInputMode="stateVisible" + android:configChanges="orientation|screenSize" + android:label="ImeAppAutoFocus" + android:exported="true"> @@ -66,34 +66,34 @@ + android:taskAffinity="com.android.server.wm.flicker.testapp.SeamlessRotationActivity" + android:theme="@style/CutoutShortEdges" + android:configChanges="orientation|screenSize" + android:label="SeamlessActivity" + android:exported="true"> + android:theme="@style/CutoutShortEdges" + android:resizeableActivity="false" + android:taskAffinity="com.android.server.wm.flicker.testapp.NonResizeableActivity" + android:label="NonResizeableActivity" + android:exported="true" + android:showOnLockScreen="true"> - + @@ -111,55 +111,56 @@ + android:taskAffinity="com.android.server.wm.flicker.testapp.DialogThemedActivity" + android:configChanges="orientation|screenSize" + android:theme="@style/DialogTheme" + android:label="DialogThemedActivity" + android:exported="true"> + android:taskAffinity="com.android.server.wm.flicker.testapp.PortraitOnlyActivity" + android:theme="@style/CutoutShortEdges" + android:screenOrientation="portrait" + android:configChanges="orientation|screenSize" + android:exported="true"> + android:taskAffinity="com.android.server.wm.flicker.testapp.ImeEditorPopupDialogActivity" + android:configChanges="orientation|screenSize" + android:theme="@style/CutoutShortEdges" + android:label="ImeEditorPopupDialogActivity" + android:exported="true"> + android:taskAffinity="com.android.server.wm.flicker.testapp.ShowWhenLockedActivity" + android:theme="@style/CutoutShortEdges" + android:configChanges="orientation|screenSize" + android:label="ShowWhenLockedActivity" + android:showWhenLocked="true" + android:exported="true"> + android:taskAffinity="com.android.server.wm.flicker.testapp.NotificationActivity" + android:theme="@style/CutoutShortEdges" + android:configChanges="orientation|screenSize" + android:label="NotificationActivity" + android:exported="true"> @@ -173,8 +174,8 @@ android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout" android:exported="true"> - - + + + android:exported="true" + android:label="MailActivity" + android:taskAffinity="com.android.server.wm.flicker.testapp.MailActivity" + android:theme="@style/Theme.AppCompat.Light"> + android:taskAffinity="com.android.server.wm.flicker.testapp.GameActivity" + android:immersive="true" + android:theme="@android:style/Theme.NoTitleBar" + android:configChanges="screenSize" + android:label="GameActivity" + android:exported="true"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + android:permission="android.permission.BIND_VOICE_INTERACTION"/> - - + + + android:resource="@xml/recognition_service"/> - + + android:resource="@xml/interaction_service"/> - + diff --git a/tests/FlickerTests/test-apps/flickerapp/res/drawable/bg.png b/tests/FlickerTests/test-apps/flickerapp/res/drawable/bg.png new file mode 100644 index 0000000000000000000000000000000000000000..d424a17b41572ce762a577db4f5009e395ccd839 GIT binary patch literal 1966 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7&t&wwUqN(1_s8KOlRi+PiJR^f};Gi%$!sP z291fe6Ky>XJIEZ3kKU>!%5L3Zk<#HO=He=|mCJR7Kvrv*tdHK`CN*BquI|MTq6$7F zZ+!LO(VErGs}(rv8g}fo)ZFFK`QMvMH_680-SOSk{kzK@HpHdPx@yRmu`73(P@&@F zSkXi4UpR8a3MigBWAsc#lk@(^(td{c_enOV|KFLv*#B%K4+qDQ&1Vd9AMrkV>3jRZ z9)Fos*GN@6bvfggO-K4;!fomv#}rteFkYNyW$G`ZD#n$&W{aWrEUAwo8&_mmJ!LnR zTRmsHMfOvz?0b{<8%(+!K5eI8u>_}15~mQ0#)?HPMma|^u6k~qu;}lO{`wPNy`Kb~ z2xU?}&ZKogVRzjJ`yY4LPMtsJ!z87`1)q-=+PO7+(7Uk0^4#~0k4^jZw|e)jd+o&A^D z6?|h=^BbC-6Sg?qd~NssUEce*_l?i~t7GsDDw-kezF|KwS~v?lB8wRq^pruEv0|xx z8BmbD#M9T6{V69in=Z>XBYrQSkYtH#M2T~LZfkurZLs zBu5XDRTOFmnna1?Dc25kKiNSC2?h$a1HDgP#KE;us9l1rWCORI3feseI1Nyk0!Nb& g71F?vO9JNHC!ewYOL=(Li2(>aUHx3vIVCg!0FQxY5C8xG literal 0 HcmV?d00001 diff --git a/tests/FlickerTests/test-apps/flickerapp/res/drawable/ic_bubble.xml b/tests/FlickerTests/test-apps/flickerapp/res/drawable/ic_bubble.xml new file mode 100644 index 0000000000000..4ea156de9f40f --- /dev/null +++ b/tests/FlickerTests/test-apps/flickerapp/res/drawable/ic_bubble.xml @@ -0,0 +1,31 @@ + + + + + + + diff --git a/tests/FlickerTests/test-apps/flickerapp/res/drawable/ic_message.xml b/tests/FlickerTests/test-apps/flickerapp/res/drawable/ic_message.xml new file mode 100644 index 0000000000000..45ed98c6e503a --- /dev/null +++ b/tests/FlickerTests/test-apps/flickerapp/res/drawable/ic_message.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/tests/FlickerTests/test-apps/flickerapp/res/layout/activity_bubble.xml b/tests/FlickerTests/test-apps/flickerapp/res/layout/activity_bubble.xml new file mode 100644 index 0000000000000..7c7b2cacaefb6 --- /dev/null +++ b/tests/FlickerTests/test-apps/flickerapp/res/layout/activity_bubble.xml @@ -0,0 +1,48 @@ + + + +