टेस्टडिवाइस
public class TestDevice
extends NativeDevice
एक का कार्यान्वयन ITestDevice
एक पूर्ण ढेर Android डिवाइस के लिए
सारांश
खेत |
---|
public static final String | DISMISS_KEYGUARD_CMD कमांड जिनका उपयोग कीगार्ड को खारिज करने के लिए किया जा सकता है। |
सार्वजनिक तरीके |
---|
boolean | clearErrorDialogs () |
int | createUser (String name) |
int | createUser (String name, boolean guest, boolean ephemeral) |
int | createUserNoThrow (String name) |
void | disableKeyguard () |
boolean | doesFileExist (String deviceFilePath) |
File | dumpHeap (String process, String devicePath) |
| getActiveApexes () |
| getAllSettings (String namespace) |
String | getAndroidId (int userId) |
| getAndroidIds () |
PackageInfo | getAppPackageInfo (String packageName) |
| getAppPackageInfos () |
DeviceFoldableState | getCurrentFoldableState () |
int | getCurrentUser () |
| getFoldableStates () |
| getInstalledPackageNames () |
KeyguardControllerState | getKeyguardState () |
| getMainlineModuleInfo () |
int | getMaxNumberOfRunningUsersSupported () |
int | getMaxNumberOfUsersSupported () |
Integer | getPrimaryUserId () |
InputStreamSource | getScreenshot () |
InputStreamSource | getScreenshot (String format, boolean rescale) |
InputStreamSource | getScreenshot (String format) |
InputStreamSource | getScreenshot (long displayId) |
String | getSetting (String namespace, String key) |
String | getSetting (int userId, String namespace, String key) |
| getUninstallablePackageNames () |
int | getUserFlags (int userId) |
| getUserInfos () |
int | getUserSerialNumber (int userId) |
boolean | hasFeature (String feature) |
String | installPackage (File packageFile, boolean reinstall, String... extraArgs) |
String | installPackage (File packageFile, File certFile, boolean reinstall, String... extraArgs) |
String | installPackage (File packageFile, boolean reinstall, boolean grantPermissions, String... extraArgs) |
String | installPackageForUser (File packageFile, boolean reinstall, boolean grantPermissions, int userId, String... extraArgs) |
String | installPackageForUser (File packageFile, boolean reinstall, int userId, String... extraArgs) |
String | installPackages ( packageFiles, boolean reinstall, String... extraArgs) installPackages ( packageFiles, boolean reinstall, String... extraArgs) |
String | installPackages ( packageFiles, boolean reinstall, boolean grantPermissions, String... extraArgs) installPackages ( packageFiles, boolean reinstall, boolean grantPermissions, String... extraArgs) |
String | installPackagesForUser ( packageFiles, boolean reinstall, boolean grantPermissions, int userId, String... extraArgs) installPackagesForUser ( packageFiles, boolean reinstall, boolean grantPermissions, int userId, String... extraArgs) |
String | installPackagesForUser ( packageFiles, boolean reinstall, int userId, String... extraArgs) installPackagesForUser ( packageFiles, boolean reinstall, int userId, String... extraArgs) |
String | installRemotePackages ( remoteApkPaths, boolean reinstall, boolean grantPermissions, String... extraArgs) installRemotePackages ( remoteApkPaths, boolean reinstall, boolean grantPermissions, String... extraArgs) |
String | installRemotePackages ( remoteApkPaths, boolean reinstall, String... extraArgs) installRemotePackages ( remoteApkPaths, boolean reinstall, String... extraArgs) |
boolean | isAppEnumerationSupported () |
boolean | isMultiUserSupported () |
boolean | isPackageInstalled (String packageName) |
boolean | isPackageInstalled (String packageName, String userId) |
boolean | isUserRunning (int userId) |
boolean | isUserSecondary (int userId) |
| listDisplayIds () |
| listUsers () |
void | postInvocationTearDown (Throwable exception) |
boolean | removeAdmin (String componentName, int userId) |
void | removeOwners () |
boolean | removeUser (int userId) |
boolean | setDeviceOwner (String componentName, int userId) |
void | setSetting (String namespace, String key, String value) |
void | setSetting (int userId, String namespace, String key, String value) |
boolean | startUser (int userId) |
boolean | startUser (int userId, boolean waitFlag) |
boolean | stopUser (int userId, boolean waitFlag, boolean forceFlag) |
boolean | stopUser (int userId) |
boolean | switchUser (int userId) |
boolean | switchUser (int userId, long timeout) |
String | uninstallPackage (String packageName) |
String | uninstallPackageForUser (String packageName, int userId) |
खेत
DISMISS_KEYGUARD_CMD
public static final String DISMISS_KEYGUARD_CMD
कमांड जिनका उपयोग कीगार्ड को खारिज करने के लिए किया जा सकता है।
सार्वजनिक निर्माणकर्ता
टेस्टडिवाइस
public TestDevice (IDevice device,
IDeviceStateMonitor stateMonitor,
IDeviceMonitor allocationMonitor)
सार्वजनिक तरीके
स्पष्ट त्रुटिसंवाद
public boolean clearErrorDialogs ()
फेंकता |
---|
DeviceNotAvailableException | |
उपयोगकर्ता बनाइये
public int createUser (String name)
फेंकता |
---|
DeviceNotAvailableException | |
उपयोगकर्ता बनाइये
public int createUser (String name,
boolean guest,
boolean ephemeral)
मापदंडों |
---|
name | String |
guest | boolean |
ephemeral | boolean |
फेंकता |
---|
DeviceNotAvailableException | |
createUserNoThrow
public int createUserNoThrow (String name)
फेंकता |
---|
DeviceNotAvailableException | |
अक्षमकीगार्ड
public void disableKeyguard ()
फेंकता |
---|
DeviceNotAvailableException | |
doFileExist
public boolean doesFileExist (String deviceFilePath)
मापदंडों |
---|
deviceFilePath | String |
फेंकता |
---|
DeviceNotAvailableException | |
डंपहीप
public File dumpHeap (String process,
String devicePath)
मापदंडों |
---|
process | String |
devicePath | String |
फेंकता |
---|
DeviceNotAvailableException | |
सक्रिय एपेक्स प्राप्त करें
public getActiveApexes ()
फेंकता |
---|
DeviceNotAvailableException | |
सभी सेटिंग्स प्राप्त करें
public getAllSettings (String namespace)
मापदंडों |
---|
namespace | String |
फेंकता |
---|
DeviceNotAvailableException | |
AndroidId प्राप्त करें
public String getAndroidId (int userId)
फेंकता |
---|
DeviceNotAvailableException | |
AndroidId प्राप्त करें
public getAndroidIds ()
फेंकता |
---|
DeviceNotAvailableException | |
getAppPackageInfo
public PackageInfo getAppPackageInfo (String packageName)
मापदंडों |
---|
packageName | String |
फेंकता |
---|
DeviceNotAvailableException | |
getAppPackageInfos
public getAppPackageInfos ()
फेंकता |
---|
DeviceNotAvailableException | |
getCurrentFoldableState
public DeviceFoldableState getCurrentFoldableState ()
रिटर्न |
---|
DeviceFoldableState | |
फेंकता |
---|
DeviceNotAvailableException | |
वर्तमान उपयोगकर्ता प्राप्त करें
public int getCurrentUser ()
फेंकता |
---|
DeviceNotAvailableException | |
फोल्डेबल स्टेट्स प्राप्त करें
public getFoldableStates ()
फेंकता |
---|
DeviceNotAvailableException | |
getInstalledPackageNames
public getInstalledPackageNames ()
फेंकता |
---|
DeviceNotAvailableException | |
गेटकीगार्डस्टेट
public KeyguardControllerState getKeyguardState ()
रिटर्न |
---|
KeyguardControllerState | |
फेंकता |
---|
DeviceNotAvailableException | |
getMainlineModuleInfo
public getMainlineModuleInfo ()
फेंकता |
---|
DeviceNotAvailableException | |
public int getMaxNumberOfRunningUsersSupported ()
फेंकता |
---|
DeviceNotAvailableException | |
public int getMaxNumberOfUsersSupported ()
फेंकता |
---|
DeviceNotAvailableException | |
getPrimaryUserId
public Integer getPrimaryUserId ()
फेंकता |
---|
DeviceNotAvailableException | |
स्क्रीनशॉट प्राप्त करें
public InputStreamSource getScreenshot ()
फेंकता |
---|
DeviceNotAvailableException | |
स्क्रीनशॉट प्राप्त करें
public InputStreamSource getScreenshot (String format,
boolean rescale)
मापदंडों |
---|
format | String |
rescale | boolean |
फेंकता |
---|
DeviceNotAvailableException | |
स्क्रीनशॉट प्राप्त करें
public InputStreamSource getScreenshot (String format)
फेंकता |
---|
DeviceNotAvailableException | |
स्क्रीनशॉट प्राप्त करें
public InputStreamSource getScreenshot (long displayId)
फेंकता |
---|
DeviceNotAvailableException | |
गेटसेटिंग
public String getSetting (String namespace,
String key)
मापदंडों |
---|
namespace | String |
key | String |
फेंकता |
---|
DeviceNotAvailableException | |
गेटसेटिंग
public String getSetting (int userId,
String namespace,
String key)
मापदंडों |
---|
userId | int |
namespace | String |
key | String |
फेंकता |
---|
DeviceNotAvailableException | |
getUninstallablePackageNames
public getUninstallablePackageNames ()
फेंकता |
---|
DeviceNotAvailableException | |
getUserFlags
public int getUserFlags (int userId)
फेंकता |
---|
DeviceNotAvailableException | |
getUserInfos
public getUserInfos ()
फेंकता |
---|
DeviceNotAvailableException | |
getUserSerialNumber
public int getUserSerialNumber (int userId)
फेंकता |
---|
DeviceNotAvailableException | |
हैफ़ीचर
public boolean hasFeature (String feature)
फेंकता |
---|
DeviceNotAvailableException | |
पैकेज स्थापित करे
public String installPackage (File packageFile,
boolean reinstall,
String... extraArgs)
मापदंडों |
---|
packageFile | File |
reinstall | boolean |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
पैकेज स्थापित करे
public String installPackage (File packageFile,
File certFile,
boolean reinstall,
String... extraArgs)
मापदंडों |
---|
packageFile | File |
certFile | File |
reinstall | boolean |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
पैकेज स्थापित करे
public String installPackage (File packageFile,
boolean reinstall,
boolean grantPermissions,
String... extraArgs)
मापदंडों |
---|
packageFile | File |
reinstall | boolean |
grantPermissions | boolean |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
इंस्टालपैकेजफॉरयूजर
public String installPackageForUser (File packageFile,
boolean reinstall,
boolean grantPermissions,
int userId,
String... extraArgs)
मापदंडों |
---|
packageFile | File |
reinstall | boolean |
grantPermissions | boolean |
userId | int |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
इंस्टालपैकेजफॉरयूजर
public String installPackageForUser (File packageFile,
boolean reinstall,
int userId,
String... extraArgs)
मापदंडों |
---|
packageFile | File |
reinstall | boolean |
userId | int |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
पैकेज स्थापित करें
public String installPackages ( packageFiles,
boolean reinstall,
String... extraArgs)
मापदंडों |
---|
packageFiles | |
reinstall | boolean |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
पैकेज स्थापित करें
public String installPackages ( packageFiles,
boolean reinstall,
boolean grantPermissions,
String... extraArgs)
मापदंडों |
---|
packageFiles | |
reinstall | boolean |
grantPermissions | boolean |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
इंस्टालपैकेजफॉरयूजर
public String installPackagesForUser ( packageFiles,
boolean reinstall,
boolean grantPermissions,
int userId,
String... extraArgs)
मापदंडों |
---|
packageFiles | |
reinstall | boolean |
grantPermissions | boolean |
userId | int |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
इंस्टालपैकेजफॉरयूजर
public String installPackagesForUser ( packageFiles,
boolean reinstall,
int userId,
String... extraArgs)
मापदंडों |
---|
packageFiles | |
reinstall | boolean |
userId | int |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
रिमोट पैकेज स्थापित करें
public String installRemotePackages ( remoteApkPaths,
boolean reinstall,
boolean grantPermissions,
String... extraArgs)
मापदंडों |
---|
remoteApkPaths | |
reinstall | boolean |
grantPermissions | boolean |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
रिमोट पैकेज स्थापित करें
public String installRemotePackages ( remoteApkPaths,
boolean reinstall,
String... extraArgs)
मापदंडों |
---|
remoteApkPaths | |
reinstall | boolean |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
isAppEnumerationसमर्थित
public boolean isAppEnumerationSupported ()
फेंकता |
---|
DeviceNotAvailableException | |
बहुउपयोगकर्ता समर्थित है
public boolean isMultiUserSupported ()
फेंकता |
---|
DeviceNotAvailableException | |
पैकेज स्थापित है
public boolean isPackageInstalled (String packageName)
मापदंडों |
---|
packageName | String |
फेंकता |
---|
DeviceNotAvailableException | |
पैकेज स्थापित है
public boolean isPackageInstalled (String packageName,
String userId)
मापदंडों |
---|
packageName | String |
userId | String |
फेंकता |
---|
DeviceNotAvailableException | |
isUserRunning
public boolean isUserRunning (int userId)
फेंकता |
---|
DeviceNotAvailableException | |
isUserSecondary
public boolean isUserSecondary (int userId)
फेंकता |
---|
DeviceNotAvailableException | |
सूची प्रदर्शन आईडी
public listDisplayIds ()
फेंकता |
---|
DeviceNotAvailableException | |
सूची उपयोगकर्ता
public listUsers ()
फेंकता |
---|
DeviceNotAvailableException | |
पोस्टइनवोकेशनटियरडाउन
public void postInvocationTearDown (Throwable exception)
मापदंडों |
---|
exception | Throwable |
निकालें व्यवस्थापक
public boolean removeAdmin (String componentName,
int userId)
मापदंडों |
---|
componentName | String |
userId | int |
फेंकता |
---|
DeviceNotAvailableException | |
मालिकों को हटा दें
public void removeOwners ()
फेंकता |
---|
DeviceNotAvailableException | |
उपयोगकर्ता को हटा दें
public boolean removeUser (int userId)
फेंकता |
---|
DeviceNotAvailableException | |
सेटडिवाइस ओनर
public boolean setDeviceOwner (String componentName,
int userId)
मापदंडों |
---|
componentName | String |
userId | int |
फेंकता |
---|
DeviceNotAvailableException | |
सेटसेटिंग
public void setSetting (String namespace,
String key,
String value)
मापदंडों |
---|
namespace | String |
key | String |
value | String |
फेंकता |
---|
DeviceNotAvailableException | |
सेटसेटिंग
public void setSetting (int userId,
String namespace,
String key,
String value)
मापदंडों |
---|
userId | int |
namespace | String |
key | String |
value | String |
फेंकता |
---|
DeviceNotAvailableException | |
प्रारंभ उपयोगकर्ता
public boolean startUser (int userId)
फेंकता |
---|
DeviceNotAvailableException | |
प्रारंभ उपयोगकर्ता
public boolean startUser (int userId,
boolean waitFlag)
मापदंडों |
---|
userId | int |
waitFlag | boolean |
फेंकता |
---|
DeviceNotAvailableException | |
स्टॉप यूज़र
public boolean stopUser (int userId,
boolean waitFlag,
boolean forceFlag)
मापदंडों |
---|
userId | int |
waitFlag | boolean |
forceFlag | boolean |
फेंकता |
---|
DeviceNotAvailableException | |
स्टॉप यूज़र
public boolean stopUser (int userId)
फेंकता |
---|
DeviceNotAvailableException | |
उपयोगकर्ता बदलें
public boolean switchUser (int userId)
फेंकता |
---|
DeviceNotAvailableException | |
उपयोगकर्ता बदलें
public boolean switchUser (int userId,
long timeout)
मापदंडों |
---|
userId | int |
timeout | long |
फेंकता |
---|
DeviceNotAvailableException | |
अनइंस्टॉल पैकेज
public String uninstallPackage (String packageName)
मापदंडों |
---|
packageName | String |
फेंकता |
---|
DeviceNotAvailableException | |
अनइंस्टॉलपैकेजफॉरयूजर
public String uninstallPackageForUser (String packageName,
int userId)
मापदंडों |
---|
packageName | String |
userId | int |
फेंकता |
---|
DeviceNotAvailableException | |
संरक्षित तरीके
doAdbReboot
protected void doAdbReboot (NativeDevice.RebootMode rebootMode,
String reason)
एक एडीबी रीबूट करें।
मापदंडों |
---|
rebootMode | NativeDevice.RebootMode : इस रिबूट की एक विधा। |
reason | String : इस रिबूट के लिए। |
फेंकता |
---|
DeviceNotAvailableException | |
getCheckNewUserSleep
protected long getCheckNewUserSleep ()
परीक्षण के लिए उजागर।
GetHostCurrentTime
protected long getHostCurrentTime ()
परीक्षण के लिए उजागर
प्रीपोस्टबूटसेटअप
protected void prePostBootSetup ()
प्रत्येक डिवाइस प्रकार (AndroidNativeDevice, TestDevice) को विशिष्ट पोस्ट बूट सेटअप के लिए इस पद्धति को ओवरराइड करने देता है।
फेंकता |
---|
DeviceNotAvailableException | |