27 Mart 2025'ten itibaren AOSP'yi derlemek ve AOSP'ye katkıda bulunmak için aosp-main
yerine android-latest-release
kullanmanızı öneririz. Daha fazla bilgi için AOSP'de yapılan değişiklikler başlıklı makaleyi inceleyin.
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
TestDevice
public
class
TestDevice
extends NativeDevice
Bilinen doğrudan alt sınıflar
|
Bilinen dolaylı alt sınıflar
|
Tam yığın Android cihaz için ITestDevice
uygulaması
Özet
Fields'ın oynadığı filmler |
public
static
final
String |
DISMISS_KEYGUARD_CMD
Kilit ekranını kapatmak için kullanılabilecek komutlar.
|
Herkese açık yöntemler |
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)
|
String
|
installPackages( packageFiles, boolean reinstall, boolean grantPermissions, String... extraArgs)
|
String
|
installPackagesForUser( packageFiles, boolean reinstall, boolean grantPermissions, int userId, String... extraArgs)
|
String
|
installPackagesForUser( packageFiles, boolean reinstall, int userId, String... extraArgs)
|
String
|
installRemotePackages( remoteApkPaths, boolean reinstall, boolean grantPermissions, String... extraArgs)
|
String
|
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)
|
Fields'ın oynadığı filmler
DISMISS_KEYGUARD_CMD
public static final String DISMISS_KEYGUARD_CMD
Kilit ekranını kapatmak için kullanılabilecek komutlar.
Herkese açık kurucular
TestDevice
public TestDevice (IDevice device,
IDeviceStateMonitor stateMonitor,
IDeviceMonitor allocationMonitor)
Herkese açık yöntemler
clearErrorDialogs
public boolean clearErrorDialogs ()
Atışlar |
DeviceNotAvailableException |
|
createUser
public int createUser (String name)
Atışlar |
DeviceNotAvailableException |
|
createUser
public int createUser (String name,
boolean guest,
boolean ephemeral)
Parametreler |
name |
String |
guest |
boolean |
ephemeral |
boolean |
Atışlar |
DeviceNotAvailableException |
|
createUserNoThrow
public int createUserNoThrow (String name)
Atışlar |
DeviceNotAvailableException |
|
disableKeyguard
public void disableKeyguard ()
Atışlar |
DeviceNotAvailableException |
|
doesFileExist
public boolean doesFileExist (String deviceFilePath)
Parametreler |
deviceFilePath |
String |
Atışlar |
DeviceNotAvailableException |
|
dumpHeap
public File dumpHeap (String process,
String devicePath)
Parametreler |
process |
String |
devicePath |
String |
Atışlar |
DeviceNotAvailableException |
|
getActiveApexes
public getActiveApexes ()
Atışlar |
DeviceNotAvailableException |
|
getAllSettings
public getAllSettings (String namespace)
Parametreler |
namespace |
String |
Atışlar |
DeviceNotAvailableException |
|
getAndroidId
public String getAndroidId (int userId)
Atışlar |
DeviceNotAvailableException |
|
getAndroidIds
public getAndroidIds ()
Atışlar |
DeviceNotAvailableException |
|
getAppPackageInfo
public PackageInfo getAppPackageInfo (String packageName)
Parametreler |
packageName |
String |
Atışlar |
DeviceNotAvailableException |
|
getAppPackageInfos
public getAppPackageInfos ()
Atışlar |
DeviceNotAvailableException |
|
getCurrentFoldableState
public DeviceFoldableState getCurrentFoldableState ()
İlerlemeler |
DeviceFoldableState |
|
Atışlar |
DeviceNotAvailableException |
|
getCurrentUser
public int getCurrentUser ()
Atışlar |
DeviceNotAvailableException |
|
getFoldableStates
public getFoldableStates ()
Atışlar |
DeviceNotAvailableException |
|
getInstalledPackageNames
public getInstalledPackageNames ()
Atışlar |
DeviceNotAvailableException |
|
getKeyguardState
public KeyguardControllerState getKeyguardState ()
İlerlemeler |
KeyguardControllerState |
|
Atışlar |
DeviceNotAvailableException |
|
getMainlineModuleInfo
public getMainlineModuleInfo ()
Atışlar |
DeviceNotAvailableException |
|
public int getMaxNumberOfRunningUsersSupported ()
Atışlar |
DeviceNotAvailableException |
|
public int getMaxNumberOfUsersSupported ()
Atışlar |
DeviceNotAvailableException |
|
getPrimaryUserId
public Integer getPrimaryUserId ()
Atışlar |
DeviceNotAvailableException |
|
getScreenshot
public InputStreamSource getScreenshot ()
İlerlemeler |
InputStreamSource |
|
Atışlar |
DeviceNotAvailableException |
|
getScreenshot
public InputStreamSource getScreenshot (String format,
boolean rescale)
Parametreler |
format |
String |
rescale |
boolean |
İlerlemeler |
InputStreamSource |
|
Atışlar |
DeviceNotAvailableException |
|
getScreenshot
public InputStreamSource getScreenshot (String format)
Parametreler |
format |
String |
İlerlemeler |
InputStreamSource |
|
Atışlar |
DeviceNotAvailableException |
|
getScreenshot
public InputStreamSource getScreenshot (long displayId)
Parametreler |
displayId |
long |
İlerlemeler |
InputStreamSource |
|
Atışlar |
DeviceNotAvailableException |
|
getSetting
public String getSetting (String namespace,
String key)
Parametreler |
namespace |
String |
key |
String |
Atışlar |
DeviceNotAvailableException |
|
getSetting
public String getSetting (int userId,
String namespace,
String key)
Parametreler |
userId |
int |
namespace |
String |
key |
String |
Atışlar |
DeviceNotAvailableException |
|
getUninstallablePackageNames
public getUninstallablePackageNames ()
Atışlar |
DeviceNotAvailableException |
|
getUserFlags
public int getUserFlags (int userId)
Atışlar |
DeviceNotAvailableException |
|
getUserInfos
public getUserInfos ()
Atışlar |
DeviceNotAvailableException |
|
getUserSerialNumber
public int getUserSerialNumber (int userId)
Atışlar |
DeviceNotAvailableException |
|
hasFeature
public boolean hasFeature (String feature)
Parametreler |
feature |
String |
Atışlar |
DeviceNotAvailableException |
|
installPackage
public String installPackage (File packageFile,
boolean reinstall,
String... extraArgs)
Parametreler |
packageFile |
File |
reinstall |
boolean |
extraArgs |
String |
Atışlar |
DeviceNotAvailableException |
|
installPackage
public String installPackage (File packageFile,
File certFile,
boolean reinstall,
String... extraArgs)
Parametreler |
packageFile |
File |
certFile |
File |
reinstall |
boolean |
extraArgs |
String |
Atışlar |
DeviceNotAvailableException |
|
installPackage
public String installPackage (File packageFile,
boolean reinstall,
boolean grantPermissions,
String... extraArgs)
Parametreler |
packageFile |
File |
reinstall |
boolean |
grantPermissions |
boolean |
extraArgs |
String |
Atışlar |
DeviceNotAvailableException |
|
installPackageForUser
public String installPackageForUser (File packageFile,
boolean reinstall,
boolean grantPermissions,
int userId,
String... extraArgs)
Parametreler |
packageFile |
File |
reinstall |
boolean |
grantPermissions |
boolean |
userId |
int |
extraArgs |
String |
Atışlar |
DeviceNotAvailableException |
|
installPackageForUser
public String installPackageForUser (File packageFile,
boolean reinstall,
int userId,
String... extraArgs)
Parametreler |
packageFile |
File |
reinstall |
boolean |
userId |
int |
extraArgs |
String |
Atışlar |
DeviceNotAvailableException |
|
installPackages
public String installPackages ( packageFiles,
boolean reinstall,
String... extraArgs)
Parametreler |
packageFiles |
|
reinstall |
boolean |
extraArgs |
String |
Atışlar |
DeviceNotAvailableException |
|
installPackages
public String installPackages ( packageFiles,
boolean reinstall,
boolean grantPermissions,
String... extraArgs)
Parametreler |
packageFiles |
|
reinstall |
boolean |
grantPermissions |
boolean |
extraArgs |
String |
Atışlar |
DeviceNotAvailableException |
|
installPackagesForUser
public String installPackagesForUser ( packageFiles,
boolean reinstall,
boolean grantPermissions,
int userId,
String... extraArgs)
Parametreler |
packageFiles |
|
reinstall |
boolean |
grantPermissions |
boolean |
userId |
int |
extraArgs |
String |
Atışlar |
DeviceNotAvailableException |
|
installPackagesForUser
public String installPackagesForUser ( packageFiles,
boolean reinstall,
int userId,
String... extraArgs)
Parametreler |
packageFiles |
|
reinstall |
boolean |
userId |
int |
extraArgs |
String |
Atışlar |
DeviceNotAvailableException |
|
installRemotePackages
public String installRemotePackages ( remoteApkPaths,
boolean reinstall,
boolean grantPermissions,
String... extraArgs)
Parametreler |
remoteApkPaths |
|
reinstall |
boolean |
grantPermissions |
boolean |
extraArgs |
String |
Atışlar |
DeviceNotAvailableException |
|
installRemotePackages
public String installRemotePackages ( remoteApkPaths,
boolean reinstall,
String... extraArgs)
Parametreler |
remoteApkPaths |
|
reinstall |
boolean |
extraArgs |
String |
Atışlar |
DeviceNotAvailableException |
|
isAppEnumerationSupported
public boolean isAppEnumerationSupported ()
Atışlar |
DeviceNotAvailableException |
|
isMultiUserSupported
public boolean isMultiUserSupported ()
Atışlar |
DeviceNotAvailableException |
|
isPackageInstalled
public boolean isPackageInstalled (String packageName)
Parametreler |
packageName |
String |
Atışlar |
DeviceNotAvailableException |
|
isPackageInstalled
public boolean isPackageInstalled (String packageName,
String userId)
Parametreler |
packageName |
String |
userId |
String |
Atışlar |
DeviceNotAvailableException |
|
isUserRunning
public boolean isUserRunning (int userId)
Atışlar |
DeviceNotAvailableException |
|
isUserSecondary
public boolean isUserSecondary (int userId)
Atışlar |
DeviceNotAvailableException |
|
listDisplayIds
public listDisplayIds ()
Atışlar |
DeviceNotAvailableException |
|
listUsers
public listUsers ()
Atışlar |
DeviceNotAvailableException |
|
postInvocationTearDown
public void postInvocationTearDown (Throwable exception)
Parametreler |
exception |
Throwable |
removeAdmin
public boolean removeAdmin (String componentName,
int userId)
Parametreler |
componentName |
String |
userId |
int |
Atışlar |
DeviceNotAvailableException |
|
removeOwners
public void removeOwners ()
Atışlar |
DeviceNotAvailableException |
|
removeUser
public boolean removeUser (int userId)
Atışlar |
DeviceNotAvailableException |
|
setDeviceOwner
public boolean setDeviceOwner (String componentName,
int userId)
Parametreler |
componentName |
String |
userId |
int |
Atışlar |
DeviceNotAvailableException |
|
setSetting
public void setSetting (String namespace,
String key,
String value)
Parametreler |
namespace |
String |
key |
String |
value |
String |
Atışlar |
DeviceNotAvailableException |
|
setSetting
public void setSetting (int userId,
String namespace,
String key,
String value)
Parametreler |
userId |
int |
namespace |
String |
key |
String |
value |
String |
Atışlar |
DeviceNotAvailableException |
|
startUser
public boolean startUser (int userId)
Atışlar |
DeviceNotAvailableException |
|
startUser
public boolean startUser (int userId,
boolean waitFlag)
Parametreler |
userId |
int |
waitFlag |
boolean |
Atışlar |
DeviceNotAvailableException |
|
stopUser
public boolean stopUser (int userId,
boolean waitFlag,
boolean forceFlag)
Parametreler |
userId |
int |
waitFlag |
boolean |
forceFlag |
boolean |
Atışlar |
DeviceNotAvailableException |
|
stopUser
public boolean stopUser (int userId)
Atışlar |
DeviceNotAvailableException |
|
switchUser
public boolean switchUser (int userId)
Atışlar |
DeviceNotAvailableException |
|
switchUser
public boolean switchUser (int userId,
long timeout)
Parametreler |
userId |
int |
timeout |
long |
Atışlar |
DeviceNotAvailableException |
|
uninstallPackage
public String uninstallPackage (String packageName)
Parametreler |
packageName |
String |
Atışlar |
DeviceNotAvailableException |
|
uninstallPackageForUser
public String uninstallPackageForUser (String packageName,
int userId)
Parametreler |
packageName |
String |
userId |
int |
Atışlar |
DeviceNotAvailableException |
|
Korunan yöntemler
doAdbReboot
protected void doAdbReboot (NativeDevice.RebootMode rebootMode,
String reason)
adb reboot komutunu çalıştırın.
Parametreler |
rebootMode |
NativeDevice.RebootMode : Bu yeniden başlatma modu. |
reason |
String : için bu yeniden başlatma işlemini gerçekleştirin. |
Atışlar |
DeviceNotAvailableException |
|
getCheckNewUserSleep
protected long getCheckNewUserSleep ()
Test için yayınlandı.
getHostCurrentTime
protected long getHostCurrentTime ()
Test için gösterilir
prePostBootSetup
protected void prePostBootSetup ()
Her cihaz türünün (AndroidNativeDevice, TestDevice), belirli bir önyükleme sonrası kurulum için bu yöntemi geçersiz kılmasına olanak tanır.
Atışlar |
DeviceNotAvailableException |
|
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-03-26 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-03-26 UTC."],[],[]]