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 TEST_ACTIVITY_WITH_SAME_AFFINITY_DIFFERENT_UID = 43 component("TestActivityWithSameAffinityDifferentUid"); 44 45 public static final ComponentName SECOND_LAUNCH_BROADCAST_RECEIVER = 46 component("LaunchBroadcastReceiver"); 47 /** See AndroidManifest.xml. */ 48 public static final String SECOND_LAUNCH_BROADCAST_ACTION = 49 getPackageName() + ".LAUNCH_BROADCAST_ACTION"; 50 51 public static final String IMPLICIT_TARGET_SECOND_TEST_ACTION = 52 "android.server.wm.second.TEST_ACTION"; 53 public static final ComponentName IMPLICIT_TARGET_SECOND_ACTIVITY = 54 component(Components.class, "ImplicitTargetActivity"); 55 component(String className)56 private static ComponentName component(String className) { 57 return component(Components.class, className); 58 } 59 getPackageName()60 private static String getPackageName() { 61 return getPackageName(Components.class); 62 } 63 } 64