1 /*
2  * Copyright (C) 2019 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.intent;
18 
19 import android.app.Activity;
20 import android.os.Bundle;
21 
22 /**
23  * A collection of activities with various launch modes used in the intent tests.
24  * Each activity is named after the LaunchMode it has enabled.
25  *
26  * They reflect the activities present in the IntentPlayground app. The IntentPlayground app
27  * resides in development/samples/IntentPlayground
28  */
29 public class Activities {
30 
31     private static class BaseActivity extends Activity {
32         @Override
onCreate(Bundle savedInstanceState)33         protected void onCreate(Bundle savedInstanceState) {
34             super.onCreate(savedInstanceState);
35             setTitle(getClass().getSimpleName());
36         }
37     }
38 
39     public static class TrackerActivity extends BaseActivity {
40     }
41 
42     public static class RegularActivity extends BaseActivity {
43     }
44 
45     public static class SingleTopActivity extends BaseActivity {
46     }
47 
48     public static class SingleInstanceActivity extends BaseActivity {
49     }
50 
51     public static class SingleInstanceActivity2 extends BaseActivity {
52     }
53 
54     public static class SingleTaskActivity extends BaseActivity {
55     }
56 
57     public static class SingleTaskActivity2 extends BaseActivity {
58     }
59 
60     public static class SingleInstancePerTaskActivity extends BaseActivity {
61     }
62 
63     public static class SingleInstancePerTaskDocumentNeverActivity extends BaseActivity {
64     }
65 
66     public static class TaskAffinity1Activity extends BaseActivity {
67     }
68 
69     public static class TaskAffinity1Activity2 extends BaseActivity {
70     }
71 
72     public static class TaskAffinity2Activity extends BaseActivity {
73     }
74 
75     public static class TaskAffinity3Activity extends BaseActivity {
76     }
77 
78     public static class ClearTaskOnLaunchActivity extends BaseActivity {
79     }
80 
81     public static class DocumentLaunchIntoActivity extends BaseActivity {
82     }
83 
84     public static class DocumentLaunchAlwaysActivity extends BaseActivity {
85     }
86 
87     public static class DocumentLaunchNeverActivity extends BaseActivity {
88     }
89 
90     public static class NoHistoryActivity extends BaseActivity {
91     }
92 
93     public static class LauncherActivity extends BaseActivity {
94     }
95 
96     public static class RelinquishTaskIdentityActivity extends BaseActivity {
97     }
98 
99     public static class TaskAffinity1RelinquishTaskIdentityActivity extends BaseActivity {
100     }
101 }
102