1 /*
2  * Copyright (C) 2021 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 com.android.bedstead.nene;
18 
19 import com.android.bedstead.nene.activities.Activities;
20 import com.android.bedstead.nene.annotations.Experimental;
21 import com.android.bedstead.nene.context.Context;
22 import com.android.bedstead.nene.devicepolicy.DevicePolicy;
23 import com.android.bedstead.nene.notifications.Notifications;
24 import com.android.bedstead.nene.packages.Packages;
25 import com.android.bedstead.nene.permissions.Permissions;
26 import com.android.bedstead.nene.settings.Settings;
27 import com.android.bedstead.nene.systemproperties.SystemProperties;
28 import com.android.bedstead.nene.users.Users;
29 
30 /**
31  * Entry point to Nene Test APIs.
32  */
33 public final class TestApis {
34     /** Access Test APIs related to Users. */
users()35     public static Users users() {
36         return Users.sInstance;
37     }
38 
39     /** Access Test APIs related to Packages. */
packages()40     public static Packages packages() {
41         return Packages.sInstance;
42     }
43 
44     /** Access Test APIs related to device policy. */
devicePolicy()45     public static DevicePolicy devicePolicy() {
46         return DevicePolicy.sInstance;
47     }
48 
49     /** Access Test APIs related to permissions. */
permissions()50     public static Permissions permissions() {
51         return Permissions.sInstance;
52     }
53 
54     /** Access Test APIs related to context. */
context()55     public static Context context() {
56         return Context.sInstance;
57     }
58 
59     /** Access Test APIs relating to Settings. */
settings()60     public static Settings settings() {
61         return Settings.sInstance;
62     }
63 
64     /** Access Test APIs related to System Properties. */
systemProperties()65     public static SystemProperties systemProperties() {
66         return SystemProperties.sInstance;
67     }
68 
69     /** Access Test APIs related to activities. */
70     @Experimental
activities()71     public static Activities activities() {
72         return Activities.sInstance;
73     }
74 
75     /** Access Test APIs related to notifications. */
notifications()76     public static Notifications notifications() {
77         return Notifications.sInstance;
78     }
79 
80     /** @deprecated Use statically */
81     @Deprecated()
TestApis()82     public TestApis() {
83 
84     }
85 }
86