टेस्टडिवाइस

public class TestDevice
extends NativeDevice

java.lang.ऑब्जेक्ट
com.android.tradefed.device.NativeDevice
com.android.tradefed.device.TestDevice


पूर्ण स्टैक एंड्रॉइड डिवाइस के लिए ITestDevice का कार्यान्वयन

सारांश

खेत

public static final String DISMISS_KEYGUARD_CMD

वे आदेश जिनका उपयोग कीगार्ड को ख़ारिज करने के लिए किया जा सकता है।

सार्वजनिक निर्माणकर्ता

TestDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

सार्वजनिक तरीके

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)

संरक्षित तरीके

void doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason)

एडीबी रीबूट करें।

long getCheckNewUserSleep ()

परीक्षण हेतु उजागर किया गया।

long getHostCurrentTime ()

परीक्षण हेतु उजागर किया गया

void prePostBootSetup ()

प्रत्येक डिवाइस प्रकार (AndroidNativeDevice, TestDevice) को विशिष्ट पोस्ट बूट सेटअप के लिए इस विधि को ओवरराइड करने की अनुमति देता है।

खेत

ख़ारिज_कीगार्ड_सीएमडी

public static final String DISMISS_KEYGUARD_CMD

वे आदेश जिनका उपयोग कीगार्ड को ख़ारिज करने के लिए किया जा सकता है।

सार्वजनिक निर्माणकर्ता

टेस्टडिवाइस

public TestDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)

सार्वजनिक तरीके

क्लियरएररडायलॉग्स

public boolean clearErrorDialogs ()

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

उपयोगकर्ता बनाइये

public int createUser (String name)

पैरामीटर
name String

रिटर्न
int

फेंकता
DeviceNotAvailableException

उपयोगकर्ता बनाइये

public int createUser (String name, 
                boolean guest, 
                boolean ephemeral)

पैरामीटर
name String

guest boolean

ephemeral boolean

रिटर्न
int

फेंकता
DeviceNotAvailableException

createUserNoThrow

public int createUserNoThrow (String name)

पैरामीटर
name String

रिटर्न
int

फेंकता
DeviceNotAvailableException

कुंजीगार्ड अक्षम करें

public void disableKeyguard ()

फेंकता
DeviceNotAvailableException

फ़ाइल अस्तित्व में है

public boolean doesFileExist (String deviceFilePath)

पैरामीटर
deviceFilePath String

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

डंपहीप

public File dumpHeap (String process, 
                String devicePath)

पैरामीटर
process String

devicePath String

रिटर्न
File

फेंकता
DeviceNotAvailableException

GetActiveApexes

public  getActiveApexes ()

रिटर्न

फेंकता
DeviceNotAvailableException

सभीसेटिंग्स प्राप्त करें

public  getAllSettings (String namespace)

पैरामीटर
namespace String

रिटर्न

फेंकता
DeviceNotAvailableException

एंड्रॉइडआईडी प्राप्त करें

public String getAndroidId (int userId)

पैरामीटर
userId int

रिटर्न
String

फेंकता
DeviceNotAvailableException

एंड्रॉइडआईड्स प्राप्त करें

public  getAndroidIds ()

रिटर्न

फेंकता
DeviceNotAvailableException

getAppPackageInfo

public PackageInfo getAppPackageInfo (String packageName)

पैरामीटर
packageName String

रिटर्न
PackageInfo

फेंकता
DeviceNotAvailableException

getAppPackageInfos

public  getAppPackageInfos ()

रिटर्न

फेंकता
DeviceNotAvailableException

GetCurrentFoldableState

public DeviceFoldableState getCurrentFoldableState ()

रिटर्न
DeviceFoldableState

फेंकता
DeviceNotAvailableException

getCurrentUser

public int getCurrentUser ()

रिटर्न
int

फेंकता
DeviceNotAvailableException

फोल्डेबलस्टेट्स प्राप्त करें

public  getFoldableStates ()

रिटर्न

फेंकता
DeviceNotAvailableException

स्थापित पैकेजनाम प्राप्त करें

public  getInstalledPackageNames ()

रिटर्न

फेंकता
DeviceNotAvailableException

getKeyguardState

public KeyguardControllerState getKeyguardState ()

रिटर्न
KeyguardControllerState

फेंकता
DeviceNotAvailableException

getMainlineModuleInfo

public  getMainlineModuleInfo ()

रिटर्न

फेंकता
DeviceNotAvailableException

getMaxNumberOfRunningUsersSupported

public int getMaxNumberOfRunningUsersSupported ()

रिटर्न
int

फेंकता
DeviceNotAvailableException

getMaxNumberOfUsersSupported

public int getMaxNumberOfUsersSupported ()

रिटर्न
int

फेंकता
DeviceNotAvailableException

प्राथमिकउपयोगकर्ताआईडी प्राप्त करें

public Integer getPrimaryUserId ()

रिटर्न
Integer

फेंकता
DeviceNotAvailableException

स्क्रीनशॉट प्राप्त करें

public InputStreamSource getScreenshot ()

रिटर्न
InputStreamSource

फेंकता
DeviceNotAvailableException

स्क्रीनशॉट प्राप्त करें

public InputStreamSource getScreenshot (String format, 
                boolean rescale)

पैरामीटर
format String

rescale boolean

रिटर्न
InputStreamSource

फेंकता
DeviceNotAvailableException

स्क्रीनशॉट प्राप्त करें

public InputStreamSource getScreenshot (String format)

पैरामीटर
format String

रिटर्न
InputStreamSource

फेंकता
DeviceNotAvailableException

स्क्रीनशॉट प्राप्त करें

public InputStreamSource getScreenshot (long displayId)

पैरामीटर
displayId long

रिटर्न
InputStreamSource

फेंकता
DeviceNotAvailableException

सेटिंग प्राप्त करें

public String getSetting (String namespace, 
                String key)

पैरामीटर
namespace String

key String

रिटर्न
String

फेंकता
DeviceNotAvailableException

सेटिंग प्राप्त करें

public String getSetting (int userId, 
                String namespace, 
                String key)

पैरामीटर
userId int

namespace String

key String

रिटर्न
String

फेंकता
DeviceNotAvailableException

अनइंस्टॉल करने योग्य पैकेजनाम प्राप्त करें

public  getUninstallablePackageNames ()

रिटर्न

फेंकता
DeviceNotAvailableException

getUserFlags

public int getUserFlags (int userId)

पैरामीटर
userId int

रिटर्न
int

फेंकता
DeviceNotAvailableException

getUserInfos

public  getUserInfos ()

रिटर्न

फेंकता
DeviceNotAvailableException

getUserSerialNumber

public int getUserSerialNumber (int userId)

पैरामीटर
userId int

रिटर्न
int

फेंकता
DeviceNotAvailableException

फ़ीचर है

public boolean hasFeature (String feature)

पैरामीटर
feature String

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

पैकेज स्थापित करे

public String installPackage (File packageFile, 
                boolean reinstall, 
                String... extraArgs)

पैरामीटर
packageFile File

reinstall boolean

extraArgs String

रिटर्न
String

फेंकता
DeviceNotAvailableException

पैकेज स्थापित करे

public String installPackage (File packageFile, 
                File certFile, 
                boolean reinstall, 
                String... extraArgs)

पैरामीटर
packageFile File

certFile File

reinstall boolean

extraArgs String

रिटर्न
String

फेंकता
DeviceNotAvailableException

पैकेज स्थापित करे

public String installPackage (File packageFile, 
                boolean reinstall, 
                boolean grantPermissions, 
                String... extraArgs)

पैरामीटर
packageFile File

reinstall boolean

grantPermissions boolean

extraArgs String

रिटर्न
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

रिटर्न
String

फेंकता
DeviceNotAvailableException

installPackageForUser

public String installPackageForUser (File packageFile, 
                boolean reinstall, 
                int userId, 
                String... extraArgs)

पैरामीटर
packageFile File

reinstall boolean

userId int

extraArgs String

रिटर्न
String

फेंकता
DeviceNotAvailableException

संकुल स्थापित करें

public String installPackages ( packageFiles, 
                boolean reinstall, 
                String... extraArgs)

पैरामीटर
packageFiles

reinstall boolean

extraArgs String

रिटर्न
String

फेंकता
DeviceNotAvailableException

संकुल स्थापित करें

public String installPackages ( packageFiles, 
                boolean reinstall, 
                boolean grantPermissions, 
                String... extraArgs)

पैरामीटर
packageFiles

reinstall boolean

grantPermissions boolean

extraArgs String

रिटर्न
String

फेंकता
DeviceNotAvailableException

इंस्टॉलपैकेजफॉरयूजर

public String installPackagesForUser ( packageFiles, 
                boolean reinstall, 
                boolean grantPermissions, 
                int userId, 
                String... extraArgs)

पैरामीटर
packageFiles

reinstall boolean

grantPermissions boolean

userId int

extraArgs String

रिटर्न
String

फेंकता
DeviceNotAvailableException

इंस्टॉलपैकेजफॉरयूजर

public String installPackagesForUser ( packageFiles, 
                boolean reinstall, 
                int userId, 
                String... extraArgs)

पैरामीटर
packageFiles

reinstall boolean

userId int

extraArgs String

रिटर्न
String

फेंकता
DeviceNotAvailableException

रिमोटपैकेज इंस्टॉल करें

public String installRemotePackages ( remoteApkPaths, 
                boolean reinstall, 
                boolean grantPermissions, 
                String... extraArgs)

पैरामीटर
remoteApkPaths

reinstall boolean

grantPermissions boolean

extraArgs String

रिटर्न
String

फेंकता
DeviceNotAvailableException

रिमोटपैकेज इंस्टॉल करें

public String installRemotePackages ( remoteApkPaths, 
                boolean reinstall, 
                String... extraArgs)

पैरामीटर
remoteApkPaths

reinstall boolean

extraArgs String

रिटर्न
String

फेंकता
DeviceNotAvailableException

isAppEnumerationSupported

public boolean isAppEnumerationSupported ()

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

मल्टीयूजर समर्थित है

public boolean isMultiUserSupported ()

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

पैकेज स्थापित है

public boolean isPackageInstalled (String packageName)

पैरामीटर
packageName String

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

पैकेज स्थापित है

public boolean isPackageInstalled (String packageName, 
                String userId)

पैरामीटर
packageName String

userId String

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

isUserRunning

public boolean isUserRunning (int userId)

पैरामीटर
userId int

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

isUserSecondary

public boolean isUserSecondary (int userId)

पैरामीटर
userId int

रिटर्न
boolean

फेंकता
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

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

मालिकों को हटाएं

public void removeOwners ()

फेंकता
DeviceNotAvailableException

उपयोगकर्ता हटाएँ

public boolean removeUser (int userId)

पैरामीटर
userId int

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

सेटडिवाइसओनर

public boolean setDeviceOwner (String componentName, 
                int userId)

पैरामीटर
componentName String

userId int

रिटर्न
boolean

फेंकता
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)

पैरामीटर
userId int

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

प्रारंभ उपयोक्ता

public boolean startUser (int userId, 
                boolean waitFlag)

पैरामीटर
userId int

waitFlag boolean

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

stopUser

public boolean stopUser (int userId, 
                boolean waitFlag, 
                boolean forceFlag)

पैरामीटर
userId int

waitFlag boolean

forceFlag boolean

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

stopUser

public boolean stopUser (int userId)

पैरामीटर
userId int

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

उपयोगकर्ता बदलें

public boolean switchUser (int userId)

पैरामीटर
userId int

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

उपयोगकर्ता बदलें

public boolean switchUser (int userId, 
                long timeout)

पैरामीटर
userId int

timeout long

रिटर्न
boolean

फेंकता
DeviceNotAvailableException

अनइंस्टॉलपैकेज

public String uninstallPackage (String packageName)

पैरामीटर
packageName String

रिटर्न
String

फेंकता
DeviceNotAvailableException

पैकेजफॉरयूजर को अनइंस्टॉल करें

public String uninstallPackageForUser (String packageName, 
                int userId)

पैरामीटर
packageName String

userId int

रिटर्न
String

फेंकता
DeviceNotAvailableException

संरक्षित तरीके

doAdbReboot

protected void doAdbReboot (NativeDevice.RebootMode rebootMode, 
                String reason)

एडीबी रीबूट करें।

पैरामीटर
rebootMode NativeDevice.RebootMode : इस रीबूट का एक मोड।

reason String : इस रिबूट के लिए।

फेंकता
DeviceNotAvailableException

GetCheckNewUserSleep

protected long getCheckNewUserSleep ()

परीक्षण हेतु उजागर किया गया।

रिटर्न
long

getHostCurrentTime

protected long getHostCurrentTime ()

परीक्षण हेतु उजागर किया गया

रिटर्न
long

प्रीपोस्टबूटसेटअप

protected void prePostBootSetup ()

प्रत्येक डिवाइस प्रकार (AndroidNativeDevice, TestDevice) को विशिष्ट पोस्ट बूट सेटअप के लिए इस विधि को ओवरराइड करने की अनुमति देता है।

फेंकता
DeviceNotAvailableException