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 android.server.wm.app; 18 19 import android.content.ComponentName; 20 import android.server.wm.component.ComponentsBase; 21 import android.server.wm.TestJournalProvider; 22 23 public class Components extends ComponentsBase { 24 public static final ComponentName ALT_LAUNCHING_ACTIVITY = component("AltLaunchingActivity"); 25 public static final ComponentName ALWAYS_FOCUSABLE_PIP_ACTIVITY = 26 component("AlwaysFocusablePipActivity"); 27 public static final ComponentName ANIMATION_TEST_ACTIVITY = component("AnimationTestActivity"); 28 public static final ComponentName ASSISTANT_ACTIVITY = component("AssistantActivity"); 29 public static final ComponentName BOTTOM_ACTIVITY = component("BottomActivity"); 30 public static final ComponentName BOTTOM_LEFT_LAYOUT_ACTIVITY = 31 component("BottomLeftLayoutActivity"); 32 public static final ComponentName BOTTOM_RIGHT_LAYOUT_ACTIVITY = 33 component("BottomRightLayoutActivity"); 34 public static final ComponentName BROADCAST_RECEIVER_ACTIVITY = 35 component("BroadcastReceiverActivity"); 36 public static final ComponentName DIALOG_WHEN_LARGE_ACTIVITY = 37 component("DialogWhenLargeActivity"); 38 public static final ComponentName DISMISS_KEYGUARD_ACTIVITY = 39 component("DismissKeyguardActivity"); 40 public static final ComponentName DISMISS_KEYGUARD_METHOD_ACTIVITY = 41 component("DismissKeyguardMethodActivity"); 42 public static final ComponentName DOCKED_ACTIVITY = component("DockedActivity"); 43 /** 44 * This activity is an alias activity pointing {@link TrampolineActivity} 45 * in AndroidManifest.xml 46 */ 47 public static final ComponentName ENTRY_POINT_ALIAS_ACTIVITY = 48 component("EntryPointAliasActivity"); 49 public static final ComponentName FONT_SCALE_ACTIVITY = component("FontScaleActivity"); 50 public static final ComponentName FONT_SCALE_NO_RELAUNCH_ACTIVITY = 51 component("FontScaleNoRelaunchActivity"); 52 public static final ComponentName FREEFORM_ACTIVITY = component("FreeformActivity"); 53 public static final ComponentName KEYGUARD_LOCK_ACTIVITY = component("KeyguardLockActivity"); 54 public static final ComponentName LANDSCAPE_ORIENTATION_ACTIVITY = 55 component("LandscapeOrientationActivity"); 56 public static final ComponentName LAUNCH_ASSISTANT_ACTIVITY_FROM_SESSION = 57 component("LaunchAssistantActivityFromSession"); 58 public static final ComponentName LAUNCH_ASSISTANT_ACTIVITY_INTO_STACK = 59 component("LaunchAssistantActivityIntoAssistantStack"); 60 public static final ComponentName LAUNCH_ENTER_PIP_ACTIVITY = 61 component("LaunchEnterPipActivity"); 62 public static final ComponentName LAUNCH_INTO_PINNED_STACK_PIP_ACTIVITY = 63 component("LaunchIntoPinnedStackPipActivity"); 64 public static final ComponentName LAUNCH_PIP_ON_PIP_ACTIVITY = 65 component("LaunchPipOnPipActivity"); 66 public static final ComponentName LAUNCHING_ACTIVITY = component("LaunchingActivity"); 67 public static final ComponentName LOG_CONFIGURATION_ACTIVITY = 68 component("LogConfigurationActivity"); 69 public static final ComponentName MOVE_TASK_TO_BACK_ACTIVITY = 70 component("MoveTaskToBackActivity"); 71 public static final ComponentName NIGHT_MODE_ACTIVITY = component("NightModeActivity"); 72 public static final ComponentName NO_DISPLAY_ACTIVITY = component("NoDisplayActivity"); 73 public static final ComponentName NO_HISTORY_ACTIVITY = component("NoHistoryActivity"); 74 public static final ComponentName NO_RELAUNCH_ACTIVITY = component("NoRelaunchActivity"); 75 public static final ComponentName NON_RESIZEABLE_ACTIVITY = component("NonResizeableActivity"); 76 public static final ComponentName PIP_ACTIVITY = component("PipActivity"); 77 public static final ComponentName PIP_ACTIVITY2 = component("PipActivity2"); 78 public static final ComponentName PIP_ACTIVITY_WITH_SAME_AFFINITY = 79 component("PipActivityWithSameAffinity"); 80 public static final ComponentName PIP_ON_STOP_ACTIVITY = component("PipOnStopActivity"); 81 public static final ComponentName PORTRAIT_ORIENTATION_ACTIVITY = 82 component("PortraitOrientationActivity"); 83 public static final ComponentName RECURSIVE_ACTIVITY = component("RecursiveActivity"); 84 public static final ComponentName REPORT_FULLY_DRAWN_ACTIVITY = 85 component("ReportFullyDrawnActivity"); 86 public static final ComponentName RESIZEABLE_ACTIVITY = component("ResizeableActivity"); 87 public static final ComponentName RESUME_WHILE_PAUSING_ACTIVITY = 88 component("ResumeWhilePausingActivity"); 89 public static final ComponentName SHOW_WHEN_LOCKED_ACTIVITY = 90 component("ShowWhenLockedActivity"); 91 public static final ComponentName SHOW_WHEN_LOCKED_ATTR_IME_ACTIVITY = 92 component("ShowWhenLockedAttrImeActivity"); 93 public static final ComponentName SHOW_WHEN_LOCKED_ATTR_ACTIVITY = 94 component("ShowWhenLockedAttrActivity"); 95 public static final ComponentName SHOW_WHEN_LOCKED_ATTR_ROTATION_ACTIVITY = 96 component("ShowWhenLockedAttrRotationActivity"); 97 public static final ComponentName SHOW_WHEN_LOCKED_ATTR_REMOVE_ATTR_ACTIVITY = 98 component("ShowWhenLockedAttrRemoveAttrActivity"); 99 public static final ComponentName INHERIT_SHOW_WHEN_LOCKED_ADD_ACTIVITY = 100 component("InheritShowWhenLockedAddActivity"); 101 public static final ComponentName INHERIT_SHOW_WHEN_LOCKED_ATTR_ACTIVITY = 102 component("InheritShowWhenLockedAttrActivity"); 103 public static final ComponentName INHERIT_SHOW_WHEN_LOCKED_REMOVE_ACTIVITY = 104 component("InheritShowWhenLockedRemoveActivity"); 105 public static final ComponentName NO_INHERIT_SHOW_WHEN_LOCKED_ATTR_ACTIVITY = 106 component("NoInheritShowWhenLockedAttrActivity"); 107 public static final ComponentName SHOW_WHEN_LOCKED_DIALOG_ACTIVITY = 108 component("ShowWhenLockedDialogActivity"); 109 public static final ComponentName SHOW_WHEN_LOCKED_TRANSLUCENT_ACTIVITY = 110 component("ShowWhenLockedTranslucentActivity"); 111 public static final ComponentName SHOW_WHEN_LOCKED_WITH_DIALOG_ACTIVITY = 112 component("ShowWhenLockedWithDialogActivity"); 113 public static final ComponentName SINGLE_INSTANCE_ACTIVITY = 114 component("SingleInstanceActivity"); 115 public static final ComponentName HOME_ACTIVITY = component("HomeActivity"); 116 public static final ComponentName SECONDARY_HOME_ACTIVITY = component("SecondaryHomeActivity"); 117 public static final ComponentName SINGLE_HOME_ACTIVITY = component("SingleHomeActivity"); 118 public static final ComponentName SINGLE_SECONDARY_HOME_ACTIVITY = 119 component("SingleSecondaryHomeActivity"); 120 public static final ComponentName SINGLE_TASK_ACTIVITY = component("SingleTaskActivity"); 121 public static final ComponentName SLOW_CREATE_ACTIVITY = component("SlowCreateActivity"); 122 public static final ComponentName SPLASHSCREEN_ACTIVITY = component("SplashscreenActivity"); 123 public static final ComponentName SWIPE_REFRESH_ACTIVITY = component("SwipeRefreshActivity"); 124 public static final ComponentName TEST_ACTIVITY = component("TestActivity"); 125 public static final ComponentName TOAST_ACTIVITY = component("ToastActivity"); 126 public static final ComponentName TOP_ACTIVITY = component("TopActivity"); 127 public static final ComponentName TEST_ACTIVITY_WITH_SAME_AFFINITY = 128 component("TestActivityWithSameAffinity"); 129 public static final ComponentName TEST_LIVE_WALLPAPER_SERVICE = component("LiveWallpaper"); 130 public static final ComponentName TOP_LEFT_LAYOUT_ACTIVITY = component("TopLeftLayoutActivity"); 131 public static final ComponentName TOP_RIGHT_LAYOUT_ACTIVITY = 132 component("TopRightLayoutActivity"); 133 public static final ComponentName TRANSLUCENT_ACTIVITY = component("TranslucentActivity"); 134 public static final ComponentName TRANSLUCENT_ASSISTANT_ACTIVITY = 135 component("TranslucentAssistantActivity"); 136 public static final ComponentName TRANSLUCENT_TOP_ACTIVITY = 137 component("TranslucentTopActivity"); 138 public static final ComponentName TRANSLUCENT_TEST_ACTIVITY = 139 component("TranslucentTestActivity"); 140 public static final ComponentName TURN_SCREEN_ON_ACTIVITY = component("TurnScreenOnActivity"); 141 public static final ComponentName TURN_SCREEN_ON_ATTR_ACTIVITY = 142 component("TurnScreenOnAttrActivity"); 143 public static final ComponentName TURN_SCREEN_ON_ATTR_DISMISS_KEYGUARD_ACTIVITY = 144 component("TurnScreenOnAttrDismissKeyguardActivity"); 145 public static final ComponentName TURN_SCREEN_ON_ATTR_REMOVE_ATTR_ACTIVITY = 146 component("TurnScreenOnAttrRemoveAttrActivity"); 147 public static final ComponentName TURN_SCREEN_ON_DISMISS_KEYGUARD_ACTIVITY = 148 component("TurnScreenOnDismissKeyguardActivity"); 149 public static final ComponentName TURN_SCREEN_ON_SHOW_ON_LOCK_ACTIVITY = 150 component("TurnScreenOnShowOnLockActivity"); 151 public static final ComponentName TURN_SCREEN_ON_SINGLE_TASK_ACTIVITY = 152 component("TurnScreenOnSingleTaskActivity"); 153 public static final ComponentName TURN_SCREEN_ON_WITH_RELAYOUT_ACTIVITY = 154 component("TurnScreenOnWithRelayoutActivity"); 155 public static final ComponentName VIRTUAL_DISPLAY_ACTIVITY = 156 component("VirtualDisplayActivity"); 157 public static final ComponentName VR_TEST_ACTIVITY = component("VrTestActivity"); 158 public static final ComponentName WALLPAPAER_ACTIVITY = component("WallpaperActivity"); 159 public static final ComponentName LAUNCH_TEST_ON_DESTROY_ACTIVITY = component( 160 "LaunchTestOnDestroyActivity"); 161 public static final ComponentName ALIAS_TEST_ACTIVITY = component("AliasTestActivity"); 162 public static final ComponentName DISPLAY_ACCESS_CHECK_EMBEDDING_ACTIVITY = component( 163 "DisplayAccessCheckEmbeddingActivity"); 164 165 public static final ComponentName ASSISTANT_VOICE_INTERACTION_SERVICE = 166 component("AssistantVoiceInteractionService"); 167 168 public static final ComponentName LAUNCH_BROADCAST_RECEIVER = 169 component("LaunchBroadcastReceiver"); 170 171 public static class LaunchBroadcastReceiver { 172 public static final String LAUNCH_BROADCAST_ACTION = 173 "android.server.wm.app.LAUNCH_BROADCAST_ACTION"; 174 175 public static final String ACTION_TEST_ACTIVITY_START = 176 "android.server.wm.app.ACTION_TEST_ACTIVITY_START"; 177 public static final String EXTRA_COMPONENT_NAME = "component_name"; 178 public static final String EXTRA_TARGET_DISPLAY = "target_display"; 179 } 180 181 public static final ComponentName SINGLE_TASK_INSTANCE_DISPLAY_ACTIVITY = 182 component("SingleTaskInstanceDisplayActivity"); 183 public static final ComponentName SINGLE_TASK_INSTANCE_DISPLAY_ACTIVITY2 = 184 component("SingleTaskInstanceDisplayActivity2"); 185 public static final ComponentName SINGLE_TASK_INSTANCE_DISPLAY_ACTIVITY3 = 186 component("SingleTaskInstanceDisplayActivity3"); 187 188 public static final ComponentName INPUT_METHOD_TEST_ACTIVITY = 189 component("InputMethodTestActivity"); 190 191 /** 192 * Action and extra key constants for {@link #INPUT_METHOD_TEST_ACTIVITY}. 193 */ 194 public static class InputMethodTestActivity { 195 public static final String EXTRA_PRIVATE_IME_OPTIONS = "private_ime_options"; 196 public static final String EXTRA_TEST_CURSOR_ANCHOR_INFO = "cursor_anchor_info"; 197 } 198 199 /** 200 * The keys are used for {@link TestJournalProvider} when testing wallpaper 201 * component. 202 */ 203 public static class TestLiveWallpaperKeys { 204 public static final String COMPONENT = "LiveWallpaper"; 205 public static final String ENGINE_CREATED = "engine_created"; 206 public static final String ENGINE_DISPLAY_ID = "engine_display_Id"; 207 } 208 209 /** 210 * Action and extra key constants for {@link #TEST_ACTIVITY}. 211 * 212 * TODO(b/73346885): These constants should be in {@link android.server.wm.app.TestActivity} 213 * once the activity is moved to test APK. 214 */ 215 public static class TestActivity { 216 // Finishes the activity 217 public static final String TEST_ACTIVITY_ACTION_FINISH_SELF = 218 "android.server.wm.app.TestActivity.finish_self"; 219 // Sets the fixed orientation (can be one of {@link ActivityInfo.ScreenOrientation} 220 public static final String EXTRA_FIXED_ORIENTATION = "fixed_orientation"; 221 public static final String EXTRA_CONFIGURATION = "configuration"; 222 public static final String EXTRA_CONFIG_ASSETS_SEQ = "config_assets_seq"; 223 } 224 225 /** 226 * Extra key constants for {@link #LAUNCH_ASSISTANT_ACTIVITY_INTO_STACK} and 227 * {@link #LAUNCH_ASSISTANT_ACTIVITY_FROM_SESSION}. 228 * 229 * TODO(b/73346885): These constants should be in 230 * {@link android.server.wm.app.AssistantActivity} once the activity is moved to test APK. 231 */ 232 public static class AssistantActivity { 233 // Launches the given activity in onResume 234 public static final String EXTRA_ASSISTANT_LAUNCH_NEW_TASK = "launch_new_task"; 235 // Finishes this activity in onResume, this happens after EXTRA_ASSISTANT_LAUNCH_NEW_TASK 236 public static final String EXTRA_ASSISTANT_FINISH_SELF = "finish_self"; 237 // Attempts to enter picture-in-picture in onResume 238 public static final String EXTRA_ASSISTANT_ENTER_PIP = "enter_pip"; 239 // Display on which Assistant runs 240 public static final String EXTRA_ASSISTANT_DISPLAY_ID = "assistant_display_id"; 241 } 242 243 /** 244 * Extra key constants for {@link android.server.wm.app.BottomActivity}. 245 * 246 * TODO(b/73346885): These constants should be in {@link android.server.wm.app.BottomActivity} 247 * once the activity is moved to test APK. 248 */ 249 public static class BottomActivity { 250 public static final String EXTRA_BOTTOM_WALLPAPER = "USE_WALLPAPER"; 251 public static final String EXTRA_STOP_DELAY = "STOP_DELAY"; 252 } 253 254 /** 255 * Extra key constants for {@link android.server.wm.app.BroadcastReceiverActivity}. 256 * 257 * TODO(b/73346885): These constants should be in 258 * {@link android.server.wm.app.BroadcastReceiverActivity} once the activity is moved to test APK. 259 */ 260 public static class BroadcastReceiverActivity { 261 public static final String ACTION_TRIGGER_BROADCAST = "trigger_broadcast"; 262 public static final String EXTRA_DISMISS_KEYGUARD = "dismissKeyguard"; 263 public static final String EXTRA_DISMISS_KEYGUARD_METHOD = "dismissKeyguardMethod"; 264 public static final String EXTRA_FINISH_BROADCAST = "finish"; 265 public static final String EXTRA_MOVE_BROADCAST_TO_BACK = "moveToBack"; 266 public static final String EXTRA_BROADCAST_ORIENTATION = "orientation"; 267 public static final String EXTRA_CUTOUT_EXISTS = "cutoutExists"; 268 } 269 270 /** Extra key constants for {@link android.server.wm.app.FontScaleActivity}. */ 271 public static class FontScaleActivity { 272 public static final String EXTRA_FONT_PIXEL_SIZE = "fontPixelSize"; 273 public static final String EXTRA_FONT_ACTIVITY_DPI = "fontActivityDpi"; 274 } 275 276 /** 277 * Logging constants for {@link android.server.wm.app.KeyguardDismissLoggerCallback}. 278 * 279 * TODO(b/73346885): These constants should be in 280 * {@link android.server.wm.app.KeyguardDismissLoggerCallback} once the class is moved to test APK. 281 */ 282 public static class KeyguardDismissLoggerCallback { 283 public static final String KEYGUARD_DISMISS_LOG_TAG = "KeyguardDismissLoggerCallback"; 284 public static final String ENTRY_ON_DISMISS_CANCELLED = "onDismissCancelled"; 285 public static final String ENTRY_ON_DISMISS_ERROR = "onDismissError"; 286 public static final String ENTRY_ON_DISMISS_SUCCEEDED = "onDismissSucceeded"; 287 } 288 289 /** 290 * Extra key constants for {@link #LAUNCH_ASSISTANT_ACTIVITY_INTO_STACK}. 291 * 292 * TODO(b/73346885): These constants should be in 293 * {@link android.server.wm.app.LaunchAssistantActivityIntoAssistantStack} once the activity is 294 * moved to test APK. 295 */ 296 public static class LaunchAssistantActivityIntoAssistantStack { 297 // Launches the translucent assist activity 298 public static final String EXTRA_ASSISTANT_IS_TRANSLUCENT = "is_translucent"; 299 } 300 301 /** 302 * Extra constants for {@link android.server.wm.app.MoveTaskToBackActivity}. 303 * 304 * TODO(b/73346885): These constants should be in 305 * {@link android.server.wm.app.MoveTaskToBackActivity} once the activity is moved to test APK. 306 */ 307 public static class MoveTaskToBackActivity { 308 public static final String EXTRA_FINISH_POINT = "finish_point"; 309 public static final String FINISH_POINT_ON_PAUSE = "on_pause"; 310 public static final String FINISH_POINT_ON_STOP = "on_stop"; 311 } 312 313 /** 314 * Action and extra key constants for {@link android.server.wm.app.PipActivity}. 315 * 316 * TODO(b/73346885): These constants should be in {@link android.server.wm.app.PipActivity} 317 * once the activity is moved to test APK. 318 */ 319 public static class PipActivity { 320 // Intent action that this activity dynamically registers to enter picture-in-picture 321 public static final String ACTION_ENTER_PIP = "android.server.wm.app.PipActivity.enter_pip"; 322 // Intent action that this activity dynamically registers to move itself to the back 323 public static final String ACTION_MOVE_TO_BACK = 324 "android.server.wm.app.PipActivity.move_to_back"; 325 // Intent action that this activity dynamically registers to expand itself. 326 // If EXTRA_SET_ASPECT_RATIO_WITH_DELAY is set, it will also attempt to apply the aspect 327 // ratio after a short delay. 328 public static final String ACTION_EXPAND_PIP = 329 "android.server.wm.app/PipActivity.expand_pip"; 330 // Intent action that this activity dynamically registers to set requested orientation. 331 // Will apply the oriention to the value set in the EXTRA_FIXED_ORIENTATION extra. 332 public static final String ACTION_SET_REQUESTED_ORIENTATION = 333 "android.server.wm.app.PipActivity.set_requested_orientation"; 334 // Intent action that will finish this activity 335 public static final String ACTION_FINISH = "android.server.wm.app.PipActivity.finish"; 336 337 // Adds an assertion that we do not ever get onStop() before we enter picture in picture 338 public static final String EXTRA_ASSERT_NO_ON_STOP_BEFORE_PIP = 339 "assert_no_on_stop_before_pip"; 340 // Calls enterPictureInPicture() on creation 341 public static final String EXTRA_ENTER_PIP = "enter_pip"; 342 // Used with EXTRA_AUTO_ENTER_PIP, value specifies the aspect ratio to enter PIP with 343 public static final String EXTRA_ENTER_PIP_ASPECT_RATIO_NUMERATOR = 344 "enter_pip_aspect_ratio_numerator"; 345 // Used with EXTRA_AUTO_ENTER_PIP, value specifies the aspect ratio to enter PIP with 346 public static final String EXTRA_ENTER_PIP_ASPECT_RATIO_DENOMINATOR = 347 "enter_pip_aspect_ratio_denominator"; 348 // Calls requestAutoEnterPictureInPicture() with the value provided 349 public static final String EXTRA_ENTER_PIP_ON_PAUSE = "enter_pip_on_pause"; 350 // Finishes the activity at the end of onResume (after EXTRA_START_ACTIVITY is handled) 351 public static final String EXTRA_FINISH_SELF_ON_RESUME = "finish_self_on_resume"; 352 // Sets the fixed orientation (can be one of {@link ActivityInfo.ScreenOrientation} 353 public static final String EXTRA_PIP_ORIENTATION = "fixed_orientation"; 354 // The amount to delay to artificially introduce in onPause() 355 // (before EXTRA_ENTER_PIP_ON_PAUSE is processed) 356 public static final String EXTRA_ON_PAUSE_DELAY = "on_pause_delay"; 357 // Calls setPictureInPictureAspectRatio with the aspect ratio specified in the value 358 public static final String EXTRA_SET_ASPECT_RATIO_DENOMINATOR = 359 "set_aspect_ratio_denominator"; 360 // Calls setPictureInPictureAspectRatio with the aspect ratio specified in the value 361 public static final String EXTRA_SET_ASPECT_RATIO_NUMERATOR = "set_aspect_ratio_numerator"; 362 // Calls setPictureInPictureAspectRatio with the aspect ratio specified in the value with a 363 // fixed delay 364 public static final String EXTRA_SET_ASPECT_RATIO_WITH_DELAY_NUMERATOR = 365 "set_aspect_ratio_with_delay_numerator"; 366 // Calls setPictureInPictureAspectRatio with the aspect ratio specified in the value with a 367 // fixed delay 368 public static final String EXTRA_SET_ASPECT_RATIO_WITH_DELAY_DENOMINATOR = 369 "set_aspect_ratio_with_delay_denominator"; 370 // Shows this activity over the keyguard 371 public static final String EXTRA_SHOW_OVER_KEYGUARD = "show_over_keyguard"; 372 // Starts the activity (component name) provided by the value at the end of onCreate 373 public static final String EXTRA_START_ACTIVITY = "start_activity"; 374 // Adds a click listener to finish this activity when it is clicked 375 public static final String EXTRA_TAP_TO_FINISH = "tap_to_finish"; 376 // Dismiss keyguard when activity show. 377 public static final String EXTRA_DISMISS_KEYGUARD = "dismiss_keyguard"; 378 } 379 380 /** 381 * Extra key constants for {@link android.server.wm.app.TopActivity} and 382 * {@link TranslucentTopActivity}. 383 * 384 * TODO(b/73346885): These constants should be in {@link android.server.wm.app.TopActivity} 385 * once the activity is moved to test APK. 386 */ 387 public static class TopActivity { 388 public static final String EXTRA_FINISH_DELAY = "FINISH_DELAY"; 389 public static final String EXTRA_TOP_WALLPAPER = "USE_WALLPAPER"; 390 } 391 392 /** 393 * Extra key constants for {@link android.server.wm.app.VirtualDisplayActivity}. 394 * 395 * TODO(b/73346885): These constants should be in 396 * {@link android.server.wm.app.VirtualDisplayActivity} once the activity is moved to test APK. 397 */ 398 public static class VirtualDisplayActivity { 399 public static final String VIRTUAL_DISPLAY_PREFIX = "HostedVirtualDisplay"; 400 public static final String KEY_CAN_SHOW_WITH_INSECURE_KEYGUARD = 401 "can_show_with_insecure_keyguard"; 402 public static final String KEY_COMMAND = "command"; 403 public static final String KEY_COUNT = "count"; 404 public static final String KEY_DENSITY_DPI = "density_dpi"; 405 public static final String KEY_LAUNCH_TARGET_COMPONENT = "launch_target_component"; 406 public static final String KEY_PUBLIC_DISPLAY = "public_display"; 407 public static final String KEY_RESIZE_DISPLAY = "resize_display"; 408 public static final String KEY_SHOW_SYSTEM_DECORATIONS = "show_system_decorations"; 409 public static final String KEY_PRESENTATION_DISPLAY = "presentation_display"; 410 // Value constants of {@link #KEY_COMMAND}. 411 public static final String COMMAND_CREATE_DISPLAY = "create_display"; 412 public static final String COMMAND_DESTROY_DISPLAY = "destroy_display"; 413 public static final String COMMAND_RESIZE_DISPLAY = "resize_display"; 414 } 415 416 private static ComponentName component(String className) { 417 return component(Components.class, className); 418 } 419 420 private static String getPackageName() { 421 return getPackageName(Components.class); 422 } 423 } 424