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.second; 18 19 import android.content.ComponentName; 20 import android.server.wm.component.ComponentsBase; 21 22 public class Components extends ComponentsBase { 23 24 public static final ComponentName EMBEDDING_ACTIVITY = component("EmbeddingActivity"); 25 26 public static class EmbeddingActivity { 27 public static final String ACTION_EMBEDDING_TEST_ACTIVITY_START = 28 "broadcast_test_activity_start"; 29 public static final String EXTRA_EMBEDDING_COMPONENT_NAME = "component_name"; 30 public static final String EXTRA_EMBEDDING_TARGET_DISPLAY = "target_display"; 31 } 32 33 public static final ComponentName SECOND_ACTIVITY = component("SecondActivity"); 34 35 public static class SecondActivity { 36 public static final String EXTRA_DISPLAY_ACCESS_CHECK = "display_access_check"; 37 } 38 39 public static final ComponentName SECOND_NO_EMBEDDING_ACTIVITY = 40 component("SecondActivityNoEmbedding"); 41 42 public static final ComponentName SECOND_LAUNCH_BROADCAST_RECEIVER = 43 component("LaunchBroadcastReceiver"); 44 /** See AndroidManifest.xml. */ 45 public static final String SECOND_LAUNCH_BROADCAST_ACTION = 46 getPackageName() + ".LAUNCH_BROADCAST_ACTION"; 47 component(String className)48 private static ComponentName component(String className) { 49 return component(Components.class, className); 50 } 51 getPackageName()52 private static String getPackageName() { 53 return getPackageName(Components.class); 54 } 55 } 56