टेस्टडिवाइस
public class TestDevice
extends NativeDevice
ज्ञात प्रत्यक्ष उपवर्ग प्रबंधितरिमोटडिवाइस | वर्चुअल मशीन के अंदर चलने वाला एक उपकरण जिसे हम वीएम के अंदर ट्रेडफेड इंस्टेंस के माध्यम से दूरस्थ रूप से प्रबंधित करते हैं। | नेस्टेडरिमोटडिवाइस | रिमोट कटलफिश वीएम के अंदर चल रहे डिवाइस का प्रतिनिधित्व। | रिमोटएंड्रॉइडडिवाइस | एडीबी कनेक्ट के माध्यम से जुड़े पूर्ण स्टैक एंड्रॉइड डिवाइस के लिए ITestDevice का कार्यान्वयन। |
|
पूर्ण स्टैक एंड्रॉइड डिवाइस के लिए ITestDevice
का कार्यान्वयन
सारांश
खेत |
---|
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) |
खेत
ख़ारिज_कीगार्ड_सीएमडी
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 | |
फ़ाइल अस्तित्व में है
public boolean doesFileExist (String deviceFilePath)
पैरामीटर |
---|
deviceFilePath | String |
फेंकता |
---|
DeviceNotAvailableException | |
डंपहीप
public File dumpHeap (String process,
String devicePath)
पैरामीटर |
---|
process | String |
devicePath | String |
फेंकता |
---|
DeviceNotAvailableException | |
GetActiveApexes
public getActiveApexes ()
फेंकता |
---|
DeviceNotAvailableException | |
सभीसेटिंग्स प्राप्त करें
public getAllSettings (String namespace)
पैरामीटर |
---|
namespace | String |
फेंकता |
---|
DeviceNotAvailableException | |
एंड्रॉइडआईडी प्राप्त करें
public String getAndroidId (int userId)
फेंकता |
---|
DeviceNotAvailableException | |
एंड्रॉइडआईड्स प्राप्त करें
public getAndroidIds ()
फेंकता |
---|
DeviceNotAvailableException | |
getAppPackageInfo
public PackageInfo getAppPackageInfo (String packageName)
पैरामीटर |
---|
packageName | String |
फेंकता |
---|
DeviceNotAvailableException | |
getAppPackageInfos
public getAppPackageInfos ()
फेंकता |
---|
DeviceNotAvailableException | |
GetCurrentFoldableState
public DeviceFoldableState getCurrentFoldableState ()
रिटर्न |
---|
DeviceFoldableState | |
फेंकता |
---|
DeviceNotAvailableException | |
getCurrentUser
public int getCurrentUser ()
फेंकता |
---|
DeviceNotAvailableException | |
फोल्डेबलस्टेट्स प्राप्त करें
public getFoldableStates ()
फेंकता |
---|
DeviceNotAvailableException | |
स्थापित पैकेजनाम प्राप्त करें
public getInstalledPackageNames ()
फेंकता |
---|
DeviceNotAvailableException | |
getKeyguardState
public KeyguardControllerState getKeyguardState ()
रिटर्न |
---|
KeyguardControllerState | |
फेंकता |
---|
DeviceNotAvailableException | |
getMainlineModuleInfo
public getMainlineModuleInfo ()
फेंकता |
---|
DeviceNotAvailableException | |
public int getMaxNumberOfRunningUsersSupported ()
फेंकता |
---|
DeviceNotAvailableException | |
public int getMaxNumberOfUsersSupported ()
फेंकता |
---|
DeviceNotAvailableException | |
प्राथमिकउपयोगकर्ताआईडी प्राप्त करें
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 | |
अनइंस्टॉल करने योग्य पैकेजनाम प्राप्त करें
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 | |
installPackageForUser
public String installPackageForUser (File packageFile,
boolean reinstall,
boolean grantPermissions,
int userId,
String... extraArgs)
पैरामीटर |
---|
packageFile | File |
reinstall | boolean |
grantPermissions | boolean |
userId | int |
extraArgs | String |
फेंकता |
---|
DeviceNotAvailableException | |
installPackageForUser
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 | |
isAppEnumerationSupported
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 | |
listDisplayIds
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 | |
stopUser
public boolean stopUser (int userId,
boolean waitFlag,
boolean forceFlag)
पैरामीटर |
---|
userId | int |
waitFlag | boolean |
forceFlag | boolean |
फेंकता |
---|
DeviceNotAvailableException | |
stopUser
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 | |