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.accessibility.Accessibility; 20 import com.android.bedstead.nene.activities.Activities; 21 import com.android.bedstead.nene.annotations.Experimental; 22 import com.android.bedstead.nene.bluetooth.Bluetooth; 23 import com.android.bedstead.nene.context.Context; 24 import com.android.bedstead.nene.device.Device; 25 import com.android.bedstead.nene.devicepolicy.DevicePolicy; 26 import com.android.bedstead.nene.inputmethods.InputMethods; 27 import com.android.bedstead.nene.instrumentation.Instrumentation; 28 import com.android.bedstead.nene.location.Locations; 29 import com.android.bedstead.nene.notifications.Notifications; 30 import com.android.bedstead.nene.packages.Packages; 31 import com.android.bedstead.nene.permissions.Permissions; 32 import com.android.bedstead.nene.roles.Roles; 33 import com.android.bedstead.nene.settings.Settings; 34 import com.android.bedstead.nene.systemproperties.SystemProperties; 35 import com.android.bedstead.nene.users.Users; 36 37 /** 38 * Entry point to Nene Test APIs. 39 */ 40 public final class TestApis { 41 /** Access Test APIs related to Users. */ users()42 public static Users users() { 43 return Users.sInstance; 44 } 45 46 /** Access Test APIs related to Packages. */ packages()47 public static Packages packages() { 48 return Packages.sInstance; 49 } 50 51 /** Access Test APIs related to device policy. */ devicePolicy()52 public static DevicePolicy devicePolicy() { 53 return DevicePolicy.sInstance; 54 } 55 56 /** Access Test APIs related to permissions. */ permissions()57 public static Permissions permissions() { 58 return Permissions.sInstance; 59 } 60 61 /** Access Test APIs related to context. */ context()62 public static Context context() { 63 return Context.sInstance; 64 } 65 66 /** Access Test APIs relating to Settings. */ settings()67 public static Settings settings() { 68 return Settings.sInstance; 69 } 70 71 /** Access Test APIs related to System Properties. */ systemProperties()72 public static SystemProperties systemProperties() { 73 return SystemProperties.sInstance; 74 } 75 76 /** Access Test APIs related to activities. */ 77 @Experimental activities()78 public static Activities activities() { 79 return Activities.sInstance; 80 } 81 82 /** Access Test APIs related to notifications. */ notifications()83 public static Notifications notifications() { 84 return Notifications.sInstance; 85 } 86 87 /** Access Test APIs related to the device. */ device()88 public static Device device() { 89 return Device.sInstance; 90 } 91 92 /** Access Test APIs related to location. */ 93 @Experimental location()94 public static Locations location() { 95 return Locations.sInstance; 96 } 97 98 /** Access Test APIs related to accessibility. */ 99 @Experimental accessibility()100 public static Accessibility accessibility() { 101 return Accessibility.sInstance; 102 } 103 104 /** Access Test APIs related to bluetooth. */ 105 @Experimental bluetooth()106 public static Bluetooth bluetooth() { 107 return Bluetooth.sInstance; 108 } 109 110 /** Access Test APIs related to input methods. */ 111 @Experimental inputMethods()112 public static InputMethods inputMethods() { 113 return InputMethods.sInstance; 114 } 115 116 /** Access Test APIs related to instrumentation. */ 117 @Experimental instrumentation()118 public static Instrumentation instrumentation() { 119 return Instrumentation.sInstance; 120 } 121 122 /** Access Test APIs related to roles. */ 123 @Experimental roles()124 public static Roles roles() { 125 return Roles.sInstance; 126 } 127 128 /** @deprecated Use statically */ 129 @Deprecated() TestApis()130 public TestApis() { 131 132 } 133 } 134