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 final ComponentName TOAST_RECEIVER =
172             component("ToastReceiver");
173 
174     public static class LaunchBroadcastReceiver {
175         public static final String LAUNCH_BROADCAST_ACTION =
176                 "android.server.wm.app.LAUNCH_BROADCAST_ACTION";
177 
178         public static final String ACTION_TEST_ACTIVITY_START =
179                 "android.server.wm.app.ACTION_TEST_ACTIVITY_START";
180         public static final String EXTRA_COMPONENT_NAME = "component_name";
181         public static final String EXTRA_TARGET_DISPLAY = "target_display";
182     }
183 
184     public static final ComponentName SINGLE_TASK_INSTANCE_DISPLAY_ACTIVITY =
185             component("SingleTaskInstanceDisplayActivity");
186     public static final ComponentName SINGLE_TASK_INSTANCE_DISPLAY_ACTIVITY2 =
187             component("SingleTaskInstanceDisplayActivity2");
188     public static final ComponentName SINGLE_TASK_INSTANCE_DISPLAY_ACTIVITY3 =
189             component("SingleTaskInstanceDisplayActivity3");
190 
191     public static final ComponentName INPUT_METHOD_TEST_ACTIVITY =
192             component("InputMethodTestActivity");
193 
194     /**
195      * Action and extra key constants for {@link #INPUT_METHOD_TEST_ACTIVITY}.
196      */
197     public static class InputMethodTestActivity {
198         public static final String EXTRA_PRIVATE_IME_OPTIONS = "private_ime_options";
199         public static final String EXTRA_TEST_CURSOR_ANCHOR_INFO = "cursor_anchor_info";
200     }
201 
202     /**
203      * The keys are used for {@link TestJournalProvider} when testing wallpaper
204      * component.
205      */
206     public static class TestLiveWallpaperKeys {
207         public static final String COMPONENT = "LiveWallpaper";
208         public static final String ENGINE_CREATED = "engine_created";
209         public static final String ENGINE_DISPLAY_ID = "engine_display_Id";
210     }
211 
212     /**
213      * Action and extra key constants for {@link #TEST_ACTIVITY}.
214      *
215      * TODO(b/73346885): These constants should be in {@link android.server.wm.app.TestActivity}
216      * once the activity is moved to test APK.
217      */
218     public static class TestActivity {
219         // Finishes the activity
220         public static final String TEST_ACTIVITY_ACTION_FINISH_SELF =
221                 "android.server.wm.app.TestActivity.finish_self";
222         // Sets the fixed orientation (can be one of {@link ActivityInfo.ScreenOrientation}
223         public static final String EXTRA_FIXED_ORIENTATION = "fixed_orientation";
224         public static final String EXTRA_CONFIGURATION = "configuration";
225         public static final String EXTRA_CONFIG_ASSETS_SEQ = "config_assets_seq";
226     }
227 
228     /**
229      * Extra key constants for {@link #LAUNCH_ASSISTANT_ACTIVITY_INTO_STACK} and
230      * {@link #LAUNCH_ASSISTANT_ACTIVITY_FROM_SESSION}.
231      *
232      * TODO(b/73346885): These constants should be in
233      * {@link android.server.wm.app.AssistantActivity} once the activity is moved to test APK.
234      */
235     public static class AssistantActivity {
236         // Launches the given activity in onResume
237         public static final String EXTRA_ASSISTANT_LAUNCH_NEW_TASK = "launch_new_task";
238         // Finishes this activity in onResume, this happens after EXTRA_ASSISTANT_LAUNCH_NEW_TASK
239         public static final String EXTRA_ASSISTANT_FINISH_SELF = "finish_self";
240         // Attempts to enter picture-in-picture in onResume
241         public static final String EXTRA_ASSISTANT_ENTER_PIP = "enter_pip";
242         // Display on which Assistant runs
243         public static final String EXTRA_ASSISTANT_DISPLAY_ID = "assistant_display_id";
244     }
245 
246     /**
247      * Extra key constants for {@link android.server.wm.app.BottomActivity}.
248      *
249      * TODO(b/73346885): These constants should be in {@link android.server.wm.app.BottomActivity}
250      * once the activity is moved to test APK.
251      */
252     public static class BottomActivity {
253         public static final String EXTRA_BOTTOM_WALLPAPER = "USE_WALLPAPER";
254         public static final String EXTRA_STOP_DELAY = "STOP_DELAY";
255     }
256 
257     /**
258      * Extra key constants for {@link android.server.wm.app.BroadcastReceiverActivity}.
259      *
260      * TODO(b/73346885): These constants should be in
261      * {@link android.server.wm.app.BroadcastReceiverActivity} once the activity is moved to test APK.
262      */
263     public static class BroadcastReceiverActivity {
264         public static final String ACTION_TRIGGER_BROADCAST = "trigger_broadcast";
265         public static final String EXTRA_DISMISS_KEYGUARD = "dismissKeyguard";
266         public static final String EXTRA_DISMISS_KEYGUARD_METHOD = "dismissKeyguardMethod";
267         public static final String EXTRA_FINISH_BROADCAST = "finish";
268         public static final String EXTRA_MOVE_BROADCAST_TO_BACK = "moveToBack";
269         public static final String EXTRA_BROADCAST_ORIENTATION = "orientation";
270         public static final String EXTRA_CUTOUT_EXISTS = "cutoutExists";
271     }
272 
273     /** Extra key constants for {@link android.server.wm.app.FontScaleActivity}. */
274     public static class FontScaleActivity {
275         public static final String EXTRA_FONT_PIXEL_SIZE = "fontPixelSize";
276         public static final String EXTRA_FONT_ACTIVITY_DPI = "fontActivityDpi";
277     }
278 
279     /**
280      *  Logging constants for {@link android.server.wm.app.KeyguardDismissLoggerCallback}.
281      *
282      * TODO(b/73346885): These constants should be in
283      * {@link android.server.wm.app.KeyguardDismissLoggerCallback} once the class is moved to test APK.
284      */
285     public static class KeyguardDismissLoggerCallback {
286         public static final String KEYGUARD_DISMISS_LOG_TAG = "KeyguardDismissLoggerCallback";
287         public static final String ENTRY_ON_DISMISS_CANCELLED = "onDismissCancelled";
288         public static final String ENTRY_ON_DISMISS_ERROR = "onDismissError";
289         public static final String ENTRY_ON_DISMISS_SUCCEEDED = "onDismissSucceeded";
290     }
291 
292     /**
293      * Extra key constants for {@link #LAUNCH_ASSISTANT_ACTIVITY_INTO_STACK}.
294      *
295      * TODO(b/73346885): These constants should be in
296      * {@link android.server.wm.app.LaunchAssistantActivityIntoAssistantStack} once the activity is
297      * moved to test APK.
298      */
299     public static class LaunchAssistantActivityIntoAssistantStack {
300         // Launches the translucent assist activity
301         public static final String EXTRA_ASSISTANT_IS_TRANSLUCENT = "is_translucent";
302     }
303 
304     /**
305      * Extra constants for {@link android.server.wm.app.MoveTaskToBackActivity}.
306      *
307      * TODO(b/73346885): These constants should be in
308      * {@link android.server.wm.app.MoveTaskToBackActivity} once the activity is moved to test APK.
309      */
310     public static class MoveTaskToBackActivity {
311         public static final String EXTRA_FINISH_POINT = "finish_point";
312         public static final String FINISH_POINT_ON_PAUSE = "on_pause";
313         public static final String FINISH_POINT_ON_STOP = "on_stop";
314     }
315 
316     /**
317      * Action and extra key constants for {@link android.server.wm.app.PipActivity}.
318      *
319      * TODO(b/73346885): These constants should be in {@link android.server.wm.app.PipActivity}
320      * once the activity is moved to test APK.
321      */
322     public static class PipActivity {
323         // Intent action that this activity dynamically registers to enter picture-in-picture
324         public static final String ACTION_ENTER_PIP = "android.server.wm.app.PipActivity.enter_pip";
325         // Intent action that this activity dynamically registers to move itself to the back
326         public static final String ACTION_MOVE_TO_BACK =
327                 "android.server.wm.app.PipActivity.move_to_back";
328         // Intent action that this activity dynamically registers to expand itself.
329         // If EXTRA_SET_ASPECT_RATIO_WITH_DELAY is set, it will also attempt to apply the aspect
330         // ratio after a short delay.
331         public static final String ACTION_EXPAND_PIP =
332                 "android.server.wm.app/PipActivity.expand_pip";
333         // Intent action that this activity dynamically registers to set requested orientation.
334         // Will apply the oriention to the value set in the EXTRA_FIXED_ORIENTATION extra.
335         public static final String ACTION_SET_REQUESTED_ORIENTATION =
336                 "android.server.wm.app.PipActivity.set_requested_orientation";
337         // Intent action that will finish this activity
338         public static final String ACTION_FINISH = "android.server.wm.app.PipActivity.finish";
339 
340         // Adds an assertion that we do not ever get onStop() before we enter picture in picture
341         public static final String EXTRA_ASSERT_NO_ON_STOP_BEFORE_PIP =
342                 "assert_no_on_stop_before_pip";
343         // Calls enterPictureInPicture() on creation
344         public static final String EXTRA_ENTER_PIP = "enter_pip";
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_NUMERATOR =
347                 "enter_pip_aspect_ratio_numerator";
348         // Used with EXTRA_AUTO_ENTER_PIP, value specifies the aspect ratio to enter PIP with
349         public static final String EXTRA_ENTER_PIP_ASPECT_RATIO_DENOMINATOR =
350                 "enter_pip_aspect_ratio_denominator";
351         // Calls requestAutoEnterPictureInPicture() with the value provided
352         public static final String EXTRA_ENTER_PIP_ON_PAUSE = "enter_pip_on_pause";
353         // Finishes the activity at the end of onResume (after EXTRA_START_ACTIVITY is handled)
354         public static final String EXTRA_FINISH_SELF_ON_RESUME = "finish_self_on_resume";
355         // Sets the fixed orientation (can be one of {@link ActivityInfo.ScreenOrientation}
356         public static final String EXTRA_PIP_ORIENTATION = "fixed_orientation";
357         // The amount to delay to artificially introduce in onPause()
358         // (before EXTRA_ENTER_PIP_ON_PAUSE is processed)
359         public static final String EXTRA_ON_PAUSE_DELAY = "on_pause_delay";
360         // Calls setPictureInPictureAspectRatio with the aspect ratio specified in the value
361         public static final String EXTRA_SET_ASPECT_RATIO_DENOMINATOR =
362                 "set_aspect_ratio_denominator";
363         // Calls setPictureInPictureAspectRatio with the aspect ratio specified in the value
364         public static final String EXTRA_SET_ASPECT_RATIO_NUMERATOR = "set_aspect_ratio_numerator";
365         // Calls setPictureInPictureAspectRatio with the aspect ratio specified in the value with a
366         // fixed delay
367         public static final String EXTRA_SET_ASPECT_RATIO_WITH_DELAY_NUMERATOR =
368                 "set_aspect_ratio_with_delay_numerator";
369         // Calls setPictureInPictureAspectRatio with the aspect ratio specified in the value with a
370         // fixed delay
371         public static final String EXTRA_SET_ASPECT_RATIO_WITH_DELAY_DENOMINATOR =
372                 "set_aspect_ratio_with_delay_denominator";
373         // Shows this activity over the keyguard
374         public static final String EXTRA_SHOW_OVER_KEYGUARD = "show_over_keyguard";
375         // Starts the activity (component name) provided by the value at the end of onCreate
376         public static final String EXTRA_START_ACTIVITY = "start_activity";
377         // Adds a click listener to finish this activity when it is clicked
378         public static final String EXTRA_TAP_TO_FINISH = "tap_to_finish";
379         // Dismiss keyguard when activity show.
380         public static final String EXTRA_DISMISS_KEYGUARD = "dismiss_keyguard";
381     }
382 
383     /**
384      * Extra key constants for {@link android.server.wm.app.TopActivity} and
385      * {@link TranslucentTopActivity}.
386      *
387      * TODO(b/73346885): These constants should be in {@link android.server.wm.app.TopActivity}
388      * once the activity is moved to test APK.
389      */
390     public static class TopActivity {
391         public static final String EXTRA_FINISH_DELAY = "FINISH_DELAY";
392         public static final String EXTRA_TOP_WALLPAPER = "USE_WALLPAPER";
393     }
394 
395     /**
396      * Extra key constants for {@link android.server.wm.app.VirtualDisplayActivity}.
397      *
398      * TODO(b/73346885): These constants should be in
399      * {@link android.server.wm.app.VirtualDisplayActivity} once the activity is moved to test APK.
400      */
401     public static class VirtualDisplayActivity {
402         public static final String VIRTUAL_DISPLAY_PREFIX = "HostedVirtualDisplay";
403         public static final String KEY_CAN_SHOW_WITH_INSECURE_KEYGUARD =
404                 "can_show_with_insecure_keyguard";
405         public static final String KEY_COMMAND = "command";
406         public static final String KEY_COUNT = "count";
407         public static final String KEY_DENSITY_DPI = "density_dpi";
408         public static final String KEY_LAUNCH_TARGET_COMPONENT = "launch_target_component";
409         public static final String KEY_PUBLIC_DISPLAY = "public_display";
410         public static final String KEY_RESIZE_DISPLAY = "resize_display";
411         public static final String KEY_SHOW_SYSTEM_DECORATIONS = "show_system_decorations";
412         public static final String KEY_PRESENTATION_DISPLAY = "presentation_display";
413         // Value constants of {@link #KEY_COMMAND}.
414         public static final String COMMAND_CREATE_DISPLAY = "create_display";
415         public static final String COMMAND_DESTROY_DISPLAY = "destroy_display";
416         public static final String COMMAND_RESIZE_DISPLAY = "resize_display";
417     }
418 
419     public static class ToastReceiver {
420         public static final String ACTION_TOAST_DISPLAYED = "toast_displayed";
421         public static final String ACTION_TOAST_TAP_DETECTED = "toast_tap_detected";
422     }
423 
component(String className)424     private static ComponentName component(String className) {
425         return component(Components.class, className);
426     }
427 
getPackageName()428     public static String getPackageName() {
429         return getPackageName(Components.class);
430     }
431 }
432