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 package com.android.bedstead.nene 17 18 import com.android.bedstead.nene.accessibility.Accessibility 19 import com.android.bedstead.nene.accounts.Accounts 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.broadcasts.Broadcasts 24 import com.android.bedstead.nene.bugreports.BugReports 25 import com.android.bedstead.nene.certificates.Certificates 26 import com.android.bedstead.nene.content.Content 27 import com.android.bedstead.nene.context.Context 28 import com.android.bedstead.nene.credentials.Credentials 29 import com.android.bedstead.nene.device.Device 30 import com.android.bedstead.nene.devicepolicy.DevicePolicy 31 import com.android.bedstead.nene.dumpsys.Dumpsys 32 import com.android.bedstead.nene.inputmethods.InputMethods 33 import com.android.bedstead.nene.instrumentation.Instrumentation 34 import com.android.bedstead.nene.location.Locations 35 import com.android.bedstead.nene.logcat.Logcat 36 import com.android.bedstead.nene.notifications.Notifications 37 import com.android.bedstead.nene.packages.Packages 38 import com.android.bedstead.permissions.Permissions 39 import com.android.bedstead.nene.properties.Properties 40 import com.android.bedstead.nene.resources.Resources 41 import com.android.bedstead.nene.roles.Roles 42 import com.android.bedstead.nene.services.Services 43 import com.android.bedstead.nene.settings.Settings 44 import com.android.bedstead.nene.systemproperties.SystemProperties 45 import com.android.bedstead.nene.telecom.Telecom 46 import com.android.bedstead.nene.telephony.Telephony 47 import com.android.bedstead.nene.tile.QuickSettings 48 import com.android.bedstead.nene.ui.Ui 49 import com.android.bedstead.nene.users.Users 50 import com.android.bedstead.nene.wallpaper.Wallpaper 51 import com.android.bedstead.nene.wifi.Wifi 52 53 /** 54 * Entry point to Nene Test APIs. 55 */ 56 object TestApis { 57 58 /** Access Test APIs related to Users. */ 59 @JvmStatic usersnull60 fun users(): Users = Users.sInstance 61 62 /** Access Test APIs related to Packages. */ 63 @JvmStatic 64 fun packages(): Packages = Packages.sInstance 65 66 /** Access Test APIs related to device policy. */ 67 @JvmStatic 68 fun devicePolicy() = DevicePolicy 69 70 /** Access Test APIs related to permissions. */ 71 @JvmStatic 72 fun permissions(): Permissions = Permissions.sInstance 73 74 /** Access Test APIs related to context. */ 75 @JvmStatic 76 fun context(): Context = Context.sInstance 77 78 /** Access Test APIs relating to Settings. */ 79 @JvmStatic 80 fun settings() = Settings 81 82 /** Access Test APIs related to System Properties. */ 83 @JvmStatic 84 fun systemProperties(): SystemProperties = SystemProperties.sInstance 85 86 /** Access Test APIs related to activities. */ 87 @JvmStatic 88 @Experimental 89 fun activities(): Activities = Activities.sInstance 90 91 /** Access Test APIs related to notifications. */ 92 @JvmStatic 93 fun notifications() = Notifications 94 95 /** Access Test APIs related to the device. */ 96 @JvmStatic 97 fun device(): Device = Device.sInstance 98 99 /** Access Test APIs related to location. */ 100 @Experimental 101 @JvmStatic 102 fun location(): Locations = Locations.sInstance 103 104 /** Access Test APIs related to accessibility. */ 105 @Experimental 106 @JvmStatic 107 fun accessibility() = Accessibility 108 109 /** Access Test APIs related to bluetooth. */ 110 @Experimental 111 @JvmStatic 112 fun bluetooth(): Bluetooth = Bluetooth.sInstance 113 114 /** Access Test APIs related to wifi. */ 115 @JvmStatic 116 fun wifi() = Wifi 117 118 /** Access Test APIs related to input methods. */ 119 @Experimental 120 @JvmStatic 121 fun inputMethods(): InputMethods = InputMethods.sInstance 122 123 /** Access Test APIs related to instrumentation. */ 124 @Experimental 125 @JvmStatic 126 fun instrumentation(): Instrumentation = Instrumentation.sInstance 127 128 /** Access Test APIs related to roles. */ 129 @Experimental 130 @JvmStatic 131 fun roles(): Roles = Roles.sInstance 132 133 /** Access Test APIs related to accounts. */ 134 @Experimental 135 @JvmStatic 136 fun accounts(): Accounts = Accounts.sInstance 137 138 /** Access Test APIs related to ui. */ 139 @Experimental 140 @JvmStatic 141 fun ui(): Ui = Ui.sInstance 142 143 /** Access Test APIs related to resources. */ 144 @JvmStatic 145 fun resources(): Resources = Resources.sInstance 146 147 /** Access Test APIs related to broadcasts. */ 148 @JvmStatic 149 fun broadcasts(): Broadcasts = Broadcasts.sInstance 150 151 /** Access Test APIs related to telecom */ 152 @JvmStatic 153 @Experimental 154 fun telecom() = Telecom 155 156 /** Access Test APIs related to logcat */ 157 @JvmStatic 158 @Experimental 159 fun logcat(): Logcat = Logcat.sInstance 160 161 /** Access Test APIs related to credential manager. */ 162 @JvmStatic 163 fun credentials(): Credentials = Credentials.sInstance 164 165 /** Access Test APIs related to content. */ 166 @JvmStatic 167 fun content(): Content = Content.sInstance 168 169 /** Access Test APIs related to system services. */ 170 @JvmStatic 171 fun services(): Services = Services.sInstance 172 173 /** Access Test APIs related to certificates. */ 174 @JvmStatic 175 fun certificates(): Certificates = Certificates.sInstance 176 177 /** Access Test APIs related to wallpaper. */ 178 @JvmStatic 179 fun wallpaper() = Wallpaper 180 181 /** Access Test APIs related to telephony. */ 182 @JvmStatic 183 fun telephony() = Telephony 184 185 /** Access Test APIs related to bug reports. */ 186 @JvmStatic 187 fun bugReports() = BugReports 188 189 /** Test APIs related to System Properties. */ 190 @JvmStatic 191 fun properties() = Properties 192 193 /** Access Test APIs related to quick settings. */ 194 @JvmStatic 195 @Experimental 196 fun quickSettings(): QuickSettings = QuickSettings 197 } 198