টেস্টডিভাইস

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) নির্দিষ্ট পোস্ট বুট সেটআপের জন্য এই পদ্ধতিটিকে ওভাররাইড করার অনুমতি দেয়৷

ক্ষেত্র

DISMISS_KEYGUARD_CMD

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

GetFoldableStates

public  getFoldableStates ()

রিটার্নস

নিক্ষেপ করে
DeviceNotAvailableException

getInstalledPackageNames

public  getInstalledPackageNames ()

রিটার্নস

নিক্ষেপ করে
DeviceNotAvailableException

getKeyguardState

public KeyguardControllerState getKeyguardState ()

রিটার্নস
KeyguardControllerState

নিক্ষেপ করে
DeviceNotAvailableException

getMainlineModuleInfo

public  getMainlineModuleInfo ()

রিটার্নস

নিক্ষেপ করে
DeviceNotAvailableException

getMaxNumberOfRunningUsersসমর্থিত

public int getMaxNumberOfRunningUsersSupported ()

রিটার্নস
int

নিক্ষেপ করে
DeviceNotAvailableException

getMaxNumberOfUsersসমর্থিত

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

getSetting

public String getSetting (String namespace, 
                String key)

পরামিতি
namespace String

key String

রিটার্নস
String

নিক্ষেপ করে
DeviceNotAvailableException

getSetting

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

ব্যবহারকারীর তথ্য পান

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

isPackage ইনস্টল করা হয়েছে

public boolean isPackageInstalled (String packageName)

পরামিতি
packageName String

রিটার্নস
boolean

নিক্ষেপ করে
DeviceNotAvailableException

isPackage ইনস্টল করা হয়েছে

public boolean isPackageInstalled (String packageName, 
                String userId)

পরামিতি
packageName String

userId String

রিটার্নস
boolean

নিক্ষেপ করে
DeviceNotAvailableException

isUserRunning

public boolean isUserRunning (int userId)

পরামিতি
userId int

রিটার্নস
boolean

নিক্ষেপ করে
DeviceNotAvailableException

isUser সেকেন্ডারি

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

স্টপ ইউজার

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

পরামিতি
userId int

waitFlag boolean

forceFlag boolean

রিটার্নস
boolean

নিক্ষেপ করে
DeviceNotAvailableException

স্টপ ইউজার

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

prePostBootSetup

protected void prePostBootSetup ()

প্রতিটি ডিভাইস প্রকার (AndroidNativeDevice, TestDevice) নির্দিষ্ট পোস্ট বুট সেটআপের জন্য এই পদ্ধতিটিকে ওভাররাইড করার অনুমতি দেয়৷

নিক্ষেপ করে
DeviceNotAvailableException