1 /* 2 * Copyright (C) 2018 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.server.wm.flicker.testapp; 18 19 import android.content.ComponentName; 20 21 public class ActivityOptions { 22 public static final String FLICKER_APP_PACKAGE = "com.android.server.wm.flicker.testapp"; 23 24 public static class SimpleActivity { 25 public static final String LABEL = "SimpleActivity"; 26 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 27 FLICKER_APP_PACKAGE + ".SimpleActivity"); 28 } 29 30 public static class SeamlessRotation { 31 public static final String LABEL = "SeamlessRotationActivity"; 32 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 33 FLICKER_APP_PACKAGE + ".SeamlessRotationActivity"); 34 35 public static final String EXTRA_STARVE_UI_THREAD = "StarveUiThread"; 36 } 37 38 public static class Ime { 39 public static class Default { 40 public static final String LABEL = "ImeActivity"; 41 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 42 FLICKER_APP_PACKAGE + ".ImeActivity"); 43 44 /** Intent action used to finish the test activity. */ 45 public static final String ACTION_FINISH_ACTIVITY = 46 FLICKER_APP_PACKAGE + ".ImeActivity.FINISH_ACTIVITY"; 47 48 /** Intent action used to start a {@link DialogThemedActivity}. */ 49 public static final String ACTION_START_DIALOG_THEMED_ACTIVITY = 50 FLICKER_APP_PACKAGE + ".ImeActivity.START_DIALOG_THEMED_ACTIVITY"; 51 52 /** Intent action used to toggle activity orientation. */ 53 public static final String ACTION_TOGGLE_ORIENTATION = 54 FLICKER_APP_PACKAGE + ".ImeActivity.TOGGLE_ORIENTATION"; 55 } 56 57 public static class AutoFocusActivity { 58 public static final String LABEL = "ImeAppAutoFocus"; 59 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 60 FLICKER_APP_PACKAGE + ".ImeActivityAutoFocus"); 61 } 62 63 public static class StateInitializeActivity { 64 public static final String LABEL = "ImeStateInitializeActivity"; 65 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 66 FLICKER_APP_PACKAGE + ".ImeStateInitializeActivity"); 67 } 68 69 public static class EditorPopupDialogActivity { 70 public static final String LABEL = "ImeEditorPopupDialogActivity"; 71 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 72 FLICKER_APP_PACKAGE + ".ImeEditorPopupDialogActivity"); 73 } 74 } 75 76 public static class NonResizeableActivity { 77 public static final String LABEL = "NonResizeableActivity"; 78 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 79 FLICKER_APP_PACKAGE + ".NonResizeableActivity"); 80 } 81 82 public static class NonResizeablePortraitActivity { 83 public static final String LABEL = "NonResizeablePortraitActivity"; 84 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 85 FLICKER_APP_PACKAGE + ".NonResizeablePortraitActivity"); 86 } 87 88 public static class PortraitImmersiveActivity { 89 public static final String LABEL = "PortraitImmersiveActivity"; 90 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 91 FLICKER_APP_PACKAGE + ".PortraitImmersiveActivity"); 92 } 93 94 public static class TransparentActivity { 95 public static final String LABEL = "TransparentActivity"; 96 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 97 FLICKER_APP_PACKAGE + ".TransparentActivity"); 98 } 99 100 public static class LaunchTransparentActivity { 101 public static final String LABEL = "LaunchTransparentActivity"; 102 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 103 FLICKER_APP_PACKAGE + ".LaunchTransparentActivity"); 104 } 105 106 public static class DialogThemedActivity { 107 public static final String LABEL = "DialogThemedActivity"; 108 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 109 FLICKER_APP_PACKAGE + ".DialogThemedActivity"); 110 } 111 112 public static class PortraitOnlyActivity { 113 public static final String LABEL = "PortraitOnlyActivity"; 114 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 115 FLICKER_APP_PACKAGE + ".PortraitOnlyActivity"); 116 public static final String EXTRA_FIXED_ORIENTATION = "fixed_orientation"; 117 } 118 119 public static class ActivityEmbedding { 120 public static class MainActivity { 121 public static final String LABEL = "ActivityEmbeddingMainActivity"; 122 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 123 FLICKER_APP_PACKAGE + ".ActivityEmbeddingMainActivity"); 124 } 125 126 public static class SecondaryActivity { 127 public static final String LABEL = "ActivityEmbeddingSecondaryActivity"; 128 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 129 FLICKER_APP_PACKAGE + ".ActivityEmbeddingSecondaryActivity"); 130 } 131 132 public static class ThirdActivity { 133 public static final String LABEL = "ActivityEmbeddingThirdActivity"; 134 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 135 FLICKER_APP_PACKAGE + ".ActivityEmbeddingThirdActivity"); 136 } 137 138 public static class AlwaysExpandActivity { 139 public static final String LABEL = "ActivityEmbeddingAlwaysExpandActivity"; 140 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 141 FLICKER_APP_PACKAGE + ".ActivityEmbeddingAlwaysExpandActivity"); 142 } 143 144 public static class PlaceholderPrimaryActivity { 145 public static final String LABEL = "ActivityEmbeddingPlaceholderPrimaryActivity"; 146 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 147 FLICKER_APP_PACKAGE + ".ActivityEmbeddingPlaceholderPrimaryActivity"); 148 } 149 150 public static class PlaceholderSecondaryActivity { 151 public static final String LABEL = "ActivityEmbeddingPlaceholderSecondaryActivity"; 152 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 153 FLICKER_APP_PACKAGE + ".ActivityEmbeddingPlaceholderSecondaryActivity"); 154 } 155 156 public static class TrampolineActivity { 157 public static final String LABEL = "ActivityEmbeddingTrampolineActivity"; 158 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 159 FLICKER_APP_PACKAGE + ".ActivityEmbeddingTrampolineActivity"); 160 } 161 } 162 163 public static class Notification { 164 public static final String LABEL = "NotificationActivity"; 165 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 166 FLICKER_APP_PACKAGE + ".NotificationActivity"); 167 } 168 169 public static class Mail { 170 public static final String LABEL = "MailActivity"; 171 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 172 FLICKER_APP_PACKAGE + ".MailActivity"); 173 } 174 175 public static class ShowWhenLockedActivity { 176 public static final String LABEL = "ShowWhenLockedActivity"; 177 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 178 FLICKER_APP_PACKAGE + ".ShowWhenLockedActivity"); 179 } 180 181 public static class LaunchNewTask { 182 public static final String LABEL = "LaunchNewTaskActivity"; 183 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 184 FLICKER_APP_PACKAGE + ".LaunchNewTaskActivity"); 185 } 186 187 public static class Game { 188 public static final String LABEL = "GameActivity"; 189 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 190 FLICKER_APP_PACKAGE + ".GameActivity"); 191 } 192 193 public static class LaunchNewActivity { 194 public static final String LABEL = "LaunchNewActivity"; 195 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 196 FLICKER_APP_PACKAGE + ".LaunchNewActivity"); 197 } 198 199 public static class TransferSplashscreenActivity { 200 public static final String LABEL = "TransferSplashscreenActivity"; 201 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 202 FLICKER_APP_PACKAGE + ".TransferSplashscreenActivity"); 203 } 204 205 public static class Pip { 206 // Test App > Pip Activity 207 public static final String LABEL = "PipActivity"; 208 public static final String MENU_ACTION_NO_OP = "No-Op"; 209 public static final String MENU_ACTION_ON = "On"; 210 public static final String MENU_ACTION_OFF = "Off"; 211 public static final String MENU_ACTION_CLEAR = "Clear"; 212 213 // Intent action that this activity dynamically registers to enter picture-in-picture 214 public static final String ACTION_ENTER_PIP = 215 FLICKER_APP_PACKAGE + ".PipActivity.ENTER_PIP"; 216 // Intent action that this activity dynamically registers to set requested orientation. 217 // Will apply the oriention to the value set in the EXTRA_FIXED_ORIENTATION extra. 218 public static final String ACTION_SET_REQUESTED_ORIENTATION = 219 FLICKER_APP_PACKAGE + ".PipActivity.SET_REQUESTED_ORIENTATION"; 220 221 // Calls enterPictureInPicture() on creation 222 public static final String EXTRA_ENTER_PIP = "enter_pip"; 223 // Sets the fixed orientation (can be one of {@link ActivityInfo.ScreenOrientation} 224 public static final String EXTRA_PIP_ORIENTATION = "fixed_orientation"; 225 // Adds a click listener to finish this activity when it is clicked 226 public static final String EXTRA_TAP_TO_FINISH = "tap_to_finish"; 227 228 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 229 FLICKER_APP_PACKAGE + ".PipActivity"); 230 } 231 232 public static class SplitScreen { 233 public static class Primary { 234 public static final String LABEL = "SplitScreenPrimaryActivity"; 235 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 236 FLICKER_APP_PACKAGE + ".SplitScreenActivity"); 237 238 public static final String EXTRA_LAUNCH_ADJACENT = "launch_adjacent"; 239 } 240 241 public static class Secondary { 242 public static final String LABEL = "SplitScreenSecondaryActivity"; 243 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 244 FLICKER_APP_PACKAGE + ".SplitScreenSecondaryActivity"); 245 } 246 } 247 248 public static class Bubbles { 249 public static class LaunchBubble { 250 public static final String LABEL = "LaunchBubbleActivity"; 251 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 252 FLICKER_APP_PACKAGE + ".LaunchBubbleActivity"); 253 } 254 255 public static class BubbleActivity { 256 public static final String LABEL = "BubbleActivity"; 257 public static final ComponentName COMPONENT = new ComponentName(FLICKER_APP_PACKAGE, 258 FLICKER_APP_PACKAGE + ".BubbleActivity"); 259 } 260 } 261 262 public static final String GAME_ACTIVITY_LAUNCHER_NAME = "GameApp"; 263 public static final ComponentName GAME_ACTIVITY_COMPONENT_NAME = 264 new ComponentName(FLICKER_APP_PACKAGE, FLICKER_APP_PACKAGE + ".GameActivity"); 265 266 public static final ComponentName ASSISTANT_SERVICE_COMPONENT_NAME = 267 new ComponentName( 268 FLICKER_APP_PACKAGE, FLICKER_APP_PACKAGE + ".AssistantInteractionService"); 269 } 270