Kelas bertingkat |
---|
class | NativeDevice.AdbAction DeviceAction untuk menjalankan perintah OS 'adb ....'. |
class | NativeDevice.AdbShellAction |
class | NativeDevice.RebootDeviceAction DeviceAction untuk me-reboot perangkat. |
enum | NativeDevice.RebootMode Mode reboot. |
Metode publik |
---|
boolean | checkApiLevelAgainstNextRelease (int strictMinLevel) |
boolean | checkConnectivity () |
boolean | clearErrorDialogs () |
void | clearLastConnectedWifiNetwork () |
void | clearLogcat () |
boolean | connectToWifiNetwork (String wifiSsid, String wifiPsk) |
boolean | connectToWifiNetwork (String wifiSsid, String wifiPsk, boolean scanSsid) |
boolean | connectToWifiNetworkIfNeeded (String wifiSsid, String wifiPsk, boolean scanSsid) |
boolean | connectToWifiNetworkIfNeeded (String wifiSsid, String wifiPsk) |
int | createUser (String name, boolean guest, boolean ephemeral) |
int | createUser (String name) |
int | createUserNoThrow (String name) |
void | deleteFile (String deviceFilePath) |
boolean | deviceSoftRestarted (ProcessInfo prevSystemServerProcess) |
boolean | deviceSoftRestartedSince (long utcEpochTime, TimeUnit timeUnit) |
boolean | disableAdbRoot () |
void | disableKeyguard () |
boolean | disableNetworkMonitor () |
boolean | disconnectFromWifi () |
boolean | doesFileExist (String deviceFilePath) |
File | dumpHeap (String process, String devicePath) |
boolean | enableAdbRoot () |
boolean | enableNetworkMonitor () |
boolean | encryptDevice (boolean inplace) |
String | executeAdbCommand (long timeout, String... cmdArgs) |
String | executeAdbCommand (String... cmdArgs) |
CommandResult | executeFastbootCommand (String... cmdArgs) |
CommandResult | executeFastbootCommand (long timeout, String... cmdArgs) |
CommandResult | executeLongFastbootCommand (String... cmdArgs) |
String | executeShellCommand (String command) |
void | executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts) |
void | executeShellCommand (String command, IShellOutputReceiver receiver, long maxTimeoutForCommand, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts) |
void | executeShellCommand (String command, IShellOutputReceiver receiver) |
CommandResult | executeShellV2Command (String cmd) |
CommandResult | executeShellV2Command (String cmd, OutputStream pipeToOutput) |
CommandResult | executeShellV2Command (String cmd, File pipeAsInput) |
CommandResult | executeShellV2Command (String cmd, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts) |
CommandResult | executeShellV2Command (String cmd, long maxTimeoutForCommand, TimeUnit timeUnit) |
CommandResult | executeShellV2Command (String cmd, File pipeAsInput, OutputStream pipeToOutput, long maxTimeoutForCommand, TimeUnit timeUnit, int retryAttempts) |
CommandResult | fastbootWipePartition (String partition) |
| getActiveApexes () |
| getAllSettings (String namespace) |
DeviceAllocationState | getAllocationState () |
String | getAndroidId (int userId) |
| getAndroidIds () |
int | getApiLevel () |
PackageInfo | getAppPackageInfo (String packageName) |
| getAppPackageInfos () |
String | getBasebandVersion () |
Integer | getBattery () |
boolean | getBooleanProperty (String name, boolean defaultValue) |
| getBootHistory () |
| getBootHistorySince (long utcEpochTime, TimeUnit timeUnit) |
String | getBootloaderVersion () |
InputStreamSource | getBugreport () |
InputStreamSource | getBugreportz () |
String | getBuildAlias () |
String | getBuildFlavor () |
String | getBuildId () |
String | getBuildSigningKeys () |
DeviceDescriptor | getCachedDeviceDescriptor () |
String[] | getChildren (String path) |
int | getCurrentUser () |
String | getDeviceClass () |
long | getDeviceDate () |
DeviceDescriptor | getDeviceDescriptor () |
TestDeviceState | getDeviceState () |
long | getDeviceTimeOffset (Date date) |
InputStreamSource | getEmulatorOutput () |
Process | getEmulatorProcess () |
final File | getExecuteShellCommandLog () Log yang berisi semua log executeShellCommand(String) . |
long | getExternalStoreFreeSpace () |
String | getFastbootPath () |
String | getFastbootProductType () |
String | getFastbootProductVariant () |
String | getFastbootVariable (String variableName) |
String | getFastbootVersion () |
IFileEntry | getFileEntry (String path) |
IFileEntry | getFileEntry (FileListingService.FileEntry entry) FileEntry tidak resmi untuk mendapatkan FileEntry dari jalur non-root. |
IDevice | getIDevice () |
| getInstalledPackageNames () |
long | getIntProperty (String name, long defaultValue) |
String | getIpAddress () |
KeyguardControllerState | getKeyguardState () |
long | getLastExpectedRebootTimeMillis () |
int | getLaunchApiLevel () |
InputStreamSource | getLogcat () |
InputStreamSource | getLogcat (int maxBytes) |
InputStreamSource | getLogcatDump () |
InputStreamSource | getLogcatSince (long date) |
String | getMacAddress () |
int | getMaxNumberOfRunningUsersSupported () |
int | getMaxNumberOfUsersSupported () |
IDeviceStateMonitor | getMonitor () |
String | getMountPoint (String mountName) |
ITestDevice.MountPointInfo | getMountPointInfo (String mountpoint) |
| getMountPointInfo () |
TestDeviceOptions | getOptions () |
long | getPartitionFreeSpace (String partition) |
Integer | getPrimaryUserId () |
ProcessInfo | getProcessByName (String processName) |
String | getProcessPid (String process) |
String | getProductType () |
String | getProductVariant () |
String | getProperty (String name) |
ITestDevice.RecoveryMode | getRecoveryMode () |
InputStreamSource | getScreenshot (String format) |
InputStreamSource | getScreenshot (long displayId) |
InputStreamSource | getScreenshot (String format, boolean rescale) |
InputStreamSource | getScreenshot () |
String | getSerialNumber () |
String | getSetting (int userId, String namespace, String key) |
String | getSetting (String namespace, String key) |
String | getSimOperator () |
String | getSimState () |
| getTombstones () |
long | getTotalMemory () |
| getUninstallablePackageNames () |
boolean | getUseFastbootErase () |
int | getUserFlags (int userId) |
| getUserInfos () |
int | getUserSerialNumber (int userId) |
IManagedTestDevice.DeviceEventResponse | handleAllocationEvent (DeviceEvent event) Proses DeviceEvent, yang mungkin atau mungkin tidak mentransisikan perangkat ini ke status alokasi baru. |
boolean | hasFeature (String feature) |
String | installPackage (File packageFile, boolean reinstall, String... extraArgs) |
String | installPackage (File packageFile, boolean reinstall, boolean grantPermissions, String... extraArgs) |
String | installPackageForUser (File packageFile, boolean reinstall, int userId, String... extraArgs) |
String | installPackageForUser (File packageFile, boolean reinstall, boolean grantPermissions, int userId, String... extraArgs) |
boolean | isAdbRoot () |
boolean | isAdbTcp () |
boolean | isAppEnumerationSupported () |
boolean | isDeviceEncrypted () |
boolean | isDirectory (String path) |
boolean | isEnableAdbRoot () |
boolean | isEncryptionSupported () |
boolean | isExecutable (String fullPath) |
boolean | isFastbootEnabled () |
boolean | isHeadless () |
boolean | isMultiUserSupported () |
boolean | isPackageInstalled (String packageName, String userId) |
boolean | isPackageInstalled (String packageName) |
boolean | isRuntimePermissionSupported () |
boolean | isStateBootloaderOrFastbootd () |
boolean | isUserRunning (int userId) |
boolean | isUserSecondary (int userId) |
boolean | isWifiEnabled () |
| listDisplayIds () |
| listUsers () |
boolean | logBugreport (String dataName, ITestLogger listener) |
void | logOnDevice (String tag, Log.LogLevel level, String format, Object... args) |
void | nonBlockingReboot () |
void | postAdbRootAction () Ganti jika perangkat memerlukan beberapa tindakan khusus yang harus diambil setelah adb root dan sebelum perangkat kembali online. |
void | postAdbUnrootAction () Ganti jika perangkat memerlukan beberapa tindakan khusus untuk diambil setelah adb unroot dan sebelum perangkat kembali online. |
void | postBootSetup () |
void | postInvocationTearDown (Throwable exception) |
void | preInvocationSetup (IBuildInfo info) |
boolean | pullDir (String deviceFilePath, File localDir) |
boolean | pullFile (String remoteFilePath, File localFile) |
File | pullFile (String remoteFilePath) |
String | pullFileContents (String remoteFilePath) |
File | pullFileFromExternal (String remoteFilePath) |
boolean | pushDir (File localFileDir, String deviceFilePath, excludedDirectories) pushDir (File localFileDir, String deviceFilePath, excludedDirectories) |
boolean | pushDir (File localFileDir, String deviceFilePath) |
boolean | pushFile (File localFile, String remoteFilePath) |
boolean | pushString (String contents, String remoteFilePath) |
void | reboot (String reason) |
void | reboot () |
void | rebootIntoBootloader () |
void | rebootIntoFastbootd () |
void | rebootIntoRecovery () |
void | rebootIntoSideload () |
void | rebootIntoSideload (boolean autoReboot) |
void | rebootUntilOnline () |
void | rebootUntilOnline (String reason) |
void | rebootUserspace () |
void | rebootUserspaceUntilOnline () |
void | recoverDevice () Mencoba memulihkan komunikasi perangkat. |
void | remountSystemWritable () |
void | remountVendorWritable () |
boolean | removeAdmin (String componentName, int userId) |
void | removeOwners () |
boolean | removeUser (int userId) |
boolean | runInstrumentationTests (IRemoteAndroidTestRunner runner, ITestLifeCycleReceiver... listeners) |
boolean | runInstrumentationTests (IRemoteAndroidTestRunner runner, listeners) runInstrumentationTests (IRemoteAndroidTestRunner runner, listeners) |
boolean | runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, ITestLifeCycleReceiver... listeners) |
boolean | runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, listeners) runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, int userId, listeners) |
void | setDate (Date date) |
boolean | setDeviceOwner (String componentName, int userId) |
void | setDeviceState (TestDeviceState deviceState) |
void | setEmulatorOutputStream ( SizeLimitedOutputStream output) Untuk emulator, setel SizeLimitedOutputStream ke keluaran log |
void | setEmulatorProcess (Process p) |
void | setFastbootEnabled (boolean fastbootEnabled) |
void | setFastbootPath (String fastbootPath) |
void | setIDevice (IDevice newDevice) |
void | setOptions (TestDeviceOptions options) |
boolean | setProperty (String propKey, String propValue) |
void | setRecovery (IDeviceRecovery recovery) |
void | setRecoveryMode (ITestDevice.RecoveryMode mode) |
void | setSetting (String namespace, String key, String value) |
void | setSetting (int userId, String namespace, String key, String value) |
void | setUseFastbootErase (boolean useFastbootErase) |
void | startLogcat () |
boolean | startUser (int userId) |
boolean | startUser (int userId, boolean waitFlag) |
void | stopEmulatorOutput () |
void | stopLogcat () |
boolean | stopUser (int userId) |
boolean | stopUser (int userId, boolean waitFlag, boolean forceFlag) |
String | switchToAdbTcp () |
boolean | switchToAdbUsb () |
boolean | switchUser (int userId) |
boolean | switchUser (int userId, long timeout) |
boolean | syncFiles (File localFileDir, String deviceFilePath) |
Bugreport | takeBugreport () |
boolean | unencryptDevice () |
String | uninstallPackage (String packageName) |
boolean | unlockDevice () |
boolean | waitForBootComplete (long timeOut) |
void | waitForDeviceAvailable () |
void | waitForDeviceAvailable (long waitTime) |
boolean | waitForDeviceInRecovery (long waitTime) |
boolean | waitForDeviceInSideload (long waitTime) |
boolean | waitForDeviceNotAvailable (long waitTime) |
void | waitForDeviceOnline () |
void | waitForDeviceOnline (long waitTime) |
boolean | waitForDeviceShell (long waitTime) |
Metode yang dilindungi |
---|
void | checkApiLevelAgainst (String feature, int strictMinLevel) |
NativeDevice.RebootDeviceAction | createRebootDeviceAction ( NativeDevice.RebootMode rebootMode, String reason) Buat RebootDeviceAction untuk digunakan saat melakukan tindakan reboot. |
void | doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason) Lakukan reboot adb. |
void | ensureRuntimePermissionSupported () metode helper untuk menampilkan pengecualian jika izin waktu proses tidak didukung |
InputStreamSource | getBugreportInternal () |
File | getBugreportzInternal () Metode Pembantu Internal untuk mendapatkan file zip bugreportz sebagai ERROR(/File) . |
IRunUtil | getRunUtil () Dapatkan instance RunUtil untuk digunakan. |
String | internalGetProperty (String propName, String fastbootVar, String description) Ambil properti perangkat, dari cache ddmlib secara default, dan kembali ke `adb shell getprop` atau` fastboot getvar` bergantung pada apakah perangkat ada di Fastboot atau tidak. |
boolean | isNewer (File localFile, IFileEntry entry) Kembalikan nilai true jika file lokal lebih baru dari file jarak jauh. |
boolean | performDeviceAction (String actionDescription, com.android.tradefed.device.NativeDevice.DeviceAction action, int retryAttempts) Melakukan tindakan di perangkat ini. |
void | postAdbReboot () Tindakan ekstra yang mungkin dilakukan setelah reboot. |
void | prePostBootSetup () Mengizinkan setiap jenis perangkat (AndroidNativeDevice, TestDevice) untuk mengganti metode ini untuk penyiapan pasca boot tertentu. |
void | setClock (Clock clock) Setel instance Jam untuk digunakan. |
void | setLogStartDelay (int delay) Menyetel waktu dalam md untuk menunggu sebelum memulai pengambilan logcat untuk perangkat online. |
void | waitForDeviceNotAvailable (String operationDesc, long time) |
Konstanta
INVALID_USER_ID
public static final int INVALID_USER_ID
Nilai yang dikembalikan untuk setiap id pengguna yang tidak valid / tidak ditemukan: UserHandle menentukan nilai -10000
Nilai Konstanta: -10000 (0xffffd8f0)
MAX_HOST_DEVICE_TIME_OFFSET
protected static final long MAX_HOST_DEVICE_TIME_OFFSET
Nilai Konstanta: 5000 (0x0000000000001388)
MAX_RETRY_ATTEMPTS
protected static final int MAX_RETRY_ATTEMPTS
jumlah default dari percobaan ulang perintah untuk dilakukan
Nilai Konstanta: 2 (0x00000002)
Fields
KARTU SD
protected static final String SD_CARD
mOptions
protected TestDeviceOptions mOptions
mStateMonitor
protected final IDeviceStateMonitor mStateMonitor
Konstruktor publik
NativeDevice
public NativeDevice (IDevice device,
IDeviceStateMonitor stateMonitor,
IDeviceMonitor allocationMonitor)
Membuat TestDevice
.
Parameter |
---|
device | IDevice : IDevice terkait |
stateMonitor | IDeviceStateMonitor : mekanisme IDeviceStateMonitor yang akan digunakan |
allocationMonitor | IDeviceMonitor : IDeviceMonitor untuk menginformasikan perubahan status alokasi. Bisa nol |
Metode publik
checkApiLevelAgainstNextRelease
public boolean checkApiLevelAgainstNextRelease (int strictMinLevel)
Parameter |
---|
strictMinLevel | int |
Melempar |
---|
DeviceNotAvailableException | |
checkConnectivity
public boolean checkConnectivity ()
Melempar |
---|
DeviceNotAvailableException | |
clearErrorDialogs
public boolean clearErrorDialogs ()
Melempar |
---|
DeviceNotAvailableException | |
clearLastConnectedWifiNetwork
public void clearLastConnectedWifiNetwork ()
clearLogcat
public void clearLogcat ()
connectToWifiNetwork
public boolean connectToWifiNetwork (String wifiSsid,
String wifiPsk)
Parameter |
---|
wifiSsid | String |
wifiPsk | String |
Melempar |
---|
DeviceNotAvailableException | |
connectToWifiNetwork
public boolean connectToWifiNetwork (String wifiSsid,
String wifiPsk,
boolean scanSsid)
Parameter |
---|
wifiSsid | String |
wifiPsk | String |
scanSsid | boolean |
Melempar |
---|
DeviceNotAvailableException | |
connectToWifiNetworkIfNeeded
public boolean connectToWifiNetworkIfNeeded (String wifiSsid,
String wifiPsk,
boolean scanSsid)
Parameter |
---|
wifiSsid | String |
wifiPsk | String |
scanSsid | boolean |
Melempar |
---|
DeviceNotAvailableException | |
connectToWifiNetworkIfNeeded
public boolean connectToWifiNetworkIfNeeded (String wifiSsid,
String wifiPsk)
Parameter |
---|
wifiSsid | String |
wifiPsk | String |
Melempar |
---|
DeviceNotAvailableException | |
buat pengguna
public int createUser (String name,
boolean guest,
boolean ephemeral)
Parameter |
---|
name | String |
guest | boolean |
ephemeral | boolean |
Melempar |
---|
DeviceNotAvailableException | |
buat pengguna
public int createUser (String name)
Melempar |
---|
DeviceNotAvailableException | |
createUserNoThrow
public int createUserNoThrow (String name)
Melempar |
---|
DeviceNotAvailableException | |
menghapus berkas
public void deleteFile (String deviceFilePath)
Parameter |
---|
deviceFilePath | String |
Melempar |
---|
DeviceNotAvailableException | |
deviceSoftRestarted
public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)
Parameter |
---|
prevSystemServerProcess | ProcessInfo |
Melempar |
---|
DeviceNotAvailableException | |
deviceSoftRestartedSince
public boolean deviceSoftRestartedSince (long utcEpochTime,
TimeUnit timeUnit)
Parameter |
---|
utcEpochTime | long |
timeUnit | TimeUnit |
Melempar |
---|
DeviceNotAvailableException | |
disableAdbRoot
public boolean disableAdbRoot ()
Melempar |
---|
DeviceNotAvailableException | |
disableKeyguard
public void disableKeyguard ()
Melempar |
---|
DeviceNotAvailableException | |
nonaktifkanNetworkMonitor
public boolean disableNetworkMonitor ()
Melempar |
---|
DeviceNotAvailableException | |
disconnectFromWifi
public boolean disconnectFromWifi ()
Melempar |
---|
DeviceNotAvailableException | |
doesFileExist
public boolean doesFileExist (String deviceFilePath)
Parameter |
---|
deviceFilePath | String |
Melempar |
---|
DeviceNotAvailableException | |
dumpHeap
public File dumpHeap (String process,
String devicePath)
Parameter |
---|
process | String |
devicePath | String |
Melempar |
---|
DeviceNotAvailableException | |
enableAdbRoot
public boolean enableAdbRoot ()
Melempar |
---|
DeviceNotAvailableException | |
aktifkanNetworkMonitor
public boolean enableNetworkMonitor ()
Melempar |
---|
DeviceNotAvailableException | |
encryptDevice
086ac E5E5E550
Parameter |
---|
inplace | boolean |
Melempar |
---|
DeviceNotAvailableException | |
eksekusiAdbCommand
public String executeAdbCommand (long timeout,
String... cmdArgs)
Parameter |
---|
timeout | long |
cmdArgs | String |
Melempar |
---|
DeviceNotAvailableException | |
eksekusiAdbCommand
public String executeAdbCommand (String... cmdArgs)
Melempar |
---|
DeviceNotAvailableException | |
eksekusiFastbootCommand
public CommandResult executeFastbootCommand (String... cmdArgs)
Melempar |
---|
DeviceNotAvailableException | |
eksekusiFastbootCommand
public CommandResult executeFastbootCommand (long timeout,
String... cmdArgs)
Parameter |
---|
timeout | long |
cmdArgs | String |
Melempar |
---|
DeviceNotAvailableException | |
executeLongFastbootCommand
public CommandResult executeLongFastbootCommand (String... cmdArgs)
Melempar |
---|
DeviceNotAvailableException | |
eksekusiShellCommand
public String executeShellCommand (String command)
Melempar |
---|
DeviceNotAvailableException | |
eksekusiShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver,
long maxTimeToOutputShellResponse,
TimeUnit timeUnit,
int retryAttempts)
Parameter |
---|
command | String |
receiver | IShellOutputReceiver |
maxTimeToOutputShellResponse | long |
timeUnit | TimeUnit |
retryAttempts | int |
Melempar |
---|
DeviceNotAvailableException | |
eksekusiShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver,
long maxTimeoutForCommand,
long maxTimeToOutputShellResponse,
TimeUnit timeUnit,
int retryAttempts)
Parameter |
---|
command | String |
receiver | IShellOutputReceiver |
maxTimeoutForCommand | long |
maxTimeToOutputShellResponse | long |
timeUnit | TimeUnit |
retryAttempts | int |
Melempar |
---|
DeviceNotAvailableException | |
eksekusiShellCommand
public void executeShellCommand (String command,
IShellOutputReceiver receiver)
Parameter |
---|
command | String |
receiver | IShellOutputReceiver |
Melempar |
---|
DeviceNotAvailableException | |
eksekusiShellV2Command
public CommandResult executeShellV2Command (String cmd)
Melempar |
---|
DeviceNotAvailableException | |
eksekusiShellV2Command
public CommandResult executeShellV2Command (String cmd,
OutputStream pipeToOutput)
Parameter |
---|
cmd | String |
pipeToOutput | OutputStream |
Melempar |
---|
DeviceNotAvailableException | |
eksekusiShellV2Command
public CommandResult executeShellV2Command (String cmd,
File pipeAsInput)
Parameter |
---|
cmd | String |
pipeAsInput | File |
Melempar |
---|
DeviceNotAvailableException | |
eksekusiShellV2Command
public CommandResult executeShellV2Command (String cmd,
long maxTimeoutForCommand,
TimeUnit timeUnit,
int retryAttempts)
Parameter |
---|
cmd | String |
maxTimeoutForCommand | long |
timeUnit | TimeUnit |
retryAttempts | int |
Melempar |
---|
DeviceNotAvailableException | |
eksekusiShellV2Command
public CommandResult executeShellV2Command (String cmd,
long maxTimeoutForCommand,
TimeUnit timeUnit)
Parameter |
---|
cmd | String |
maxTimeoutForCommand | long |
timeUnit | TimeUnit |
Melempar |
---|
DeviceNotAvailableException | |
eksekusiShellV2Command
public CommandResult executeShellV2Command (String cmd,
File pipeAsInput,
OutputStream pipeToOutput,
long maxTimeoutForCommand,
TimeUnit timeUnit,
int retryAttempts)
Parameter |
---|
cmd | String |
pipeAsInput | File |
pipeToOutput | OutputStream |
maxTimeoutForCommand | long |
timeUnit | TimeUnit |
retryAttempts | int |
Melempar |
---|
DeviceNotAvailableException | |
fastbootWipePartition
public CommandResult fastbootWipePartition (String partition)
Parameter |
---|
partition | String |
Melempar |
---|
DeviceNotAvailableException | |
getActiveApexes
public getActiveApexes ()
Melempar |
---|
DeviceNotAvailableException | |
getAllSettings
public getAllSettings (String namespace)
Parameter |
---|
namespace | String |
Melempar |
---|
DeviceNotAvailableException | |
getAllocationState
public DeviceAllocationState getAllocationState ()
Kembali |
---|
DeviceAllocationState | |
getAndroidId
public String getAndroidId (int userId)
Melempar |
---|
DeviceNotAvailableException | |
getAndroidIds
public getAndroidIds ()
Melempar |
---|
DeviceNotAvailableException | |
getApiLevel
public int getApiLevel ()
Melempar |
---|
DeviceNotAvailableException | |
getAppPackageInfo
public PackageInfo getAppPackageInfo (String packageName)
Parameter |
---|
packageName | String |
Melempar |
---|
DeviceNotAvailableException | |
getAppPackageInfos
public getAppPackageInfos ()
Melempar |
---|
DeviceNotAvailableException | |
getBasebandVersion
public String getBasebandVersion ()
Melempar |
---|
DeviceNotAvailableException | |
getBattery
public Integer getBattery ()
getBooleanProperty
public boolean getBooleanProperty (String name,
boolean defaultValue)
Parameter |
---|
name | String |
defaultValue | boolean |
Melempar |
---|
DeviceNotAvailableException | |
getBootHistory
public getBootHistory ()
Melempar |
---|
DeviceNotAvailableException | |
getBootHistorySince
public getBootHistorySince (long utcEpochTime,
TimeUnit timeUnit)
Parameter |
---|
utcEpochTime | long |
timeUnit | TimeUnit |
Melempar |
---|
DeviceNotAvailableException | |
getBootloaderVersion
public String getBootloaderVersion ()
Melempar |
---|
DeviceNotAvailableException | |
getBugreport
public InputStreamSource getBugreport ()
.dll
Kembali |
---|
InputStreamSource | |
getBugreportz
public InputStreamSource getBugreportz ()
Kembali |
---|
InputStreamSource | |
getBuildAlias
public String getBuildAlias ()
Melempar |
---|
DeviceNotAvailableException | |
getBuildFlavor
public String getBuildFlavor ()
Melempar |
---|
DeviceNotAvailableException | |
getBuildId
public String getBuildId ()
Melempar |
---|
DeviceNotAvailableException | |
getBuildSigningKeys
public String getBuildSigningKeys ()
Melempar |
---|
DeviceNotAvailableException | |
getCachedDeviceDescriptor
public DeviceDescriptor getCachedDeviceDescriptor ()
getChildren
public String[] getChildren (String path)
Melempar |
---|
DeviceNotAvailableException | |
getCurrentUser
public int getCurrentUser ()
Melempar |
---|
DeviceNotAvailableException | |
getDeviceClass
public String getDeviceClass ()
getDeviceDate
public long getDeviceDate ()
Melempar |
---|
DeviceNotAvailableException | |
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor ()
getDeviceState
public TestDeviceState getDeviceState ()
getDeviceTimeOffset
public long getDeviceTimeOffset (Date date)
Melempar |
---|
DeviceNotAvailableException | |
getEmulatorOutput
public InputStreamSource getEmulatorOutput ()
Kembali |
---|
InputStreamSource | |
getEmulatorProcess
public Process getEmulatorProcess ()
getExternalStoreFreeSpace
public long getExternalStoreFreeSpace ()
Melempar |
---|
DeviceNotAvailableException | |
getFastbootPath
public String getFastbootPath ()
getFastbootProductType
public String getFastbootProductType ()
Melempar |
---|
DeviceNotAvailableException | |
getFastbootProductVariant
public String getFastbootProductVariant ()
Melempar |
---|
DeviceNotAvailableException | |
getFastbootVariable
public String getFastbootVariable (String variableName)
Parameter |
---|
variableName | String |
Melempar |
---|
DeviceNotAvailableException | |
getFastbootVersion
public String getFastbootVersion ()
getFileEntry
public IFileEntry getFileEntry (String path)
Melempar |
---|
DeviceNotAvailableException | |
getFileEntry
public IFileEntry getFileEntry (FileListingService.FileEntry entry)
FileEntry
tidak resmi untuk mendapatkan FileEntry
dari jalur non-root. FIXME: Refactor sistem FileEntry agar tersedia dari jalur mana pun. (bahkan non root).
Parameter |
---|
entry | FileListingService.FileEntry : FileEntry tidak harus di-root seperti yang dibutuhkan Ddmlib. |
Melempar |
---|
DeviceNotAvailableException | |
getIDevice
public IDevice getIDevice ()
getInstalledPackageNames
public getInstalledPackageNames ()
Melempar |
---|
DeviceNotAvailableException | |
getIntProperty
public long getIntProperty (String name,
long defaultValue)
Parameter |
---|
name | String |
defaultValue | long |
Melempar |
---|
DeviceNotAvailableException | |
getIpAddress
public String getIpAddress ()
Melempar |
---|
DeviceNotAvailableException | |
getKeyguardState
public KeyguardControllerState getKeyguardState ()
Kembali |
---|
KeyguardControllerState | |
Melempar |
---|
DeviceNotAvailableException | |
getLastExpectedRebootTimeMillis
public long getLastExpectedRebootTimeMillis ()
getLaunchApiLevel
public int getLaunchApiLevel ()
Melempar |
---|
DeviceNotAvailableException | |
getLogcat
public InputStreamSource getLogcat ()
Kembali |
---|
InputStreamSource | |
getLogcat
public InputStreamSource getLogcat (int maxBytes)
Kembali |
---|
InputStreamSource | |
getLogcatDump
public InputStreamSource getLogcatDump ()
Kembali |
---|
InputStreamSource | |
getLogcatSince
public InputStreamSource getLogcatSince (long date)
Kembali |
---|
InputStreamSource | |
getMacAddress
public String getMacAddress ()
public int getMaxNumberOfRunningUsersSupported ()
Melempar |
---|
DeviceNotAvailableException | |
public int getMaxNumberOfUsersSupported ()
Melempar |
---|
DeviceNotAvailableException | |
getMonitor
public IDeviceStateMonitor getMonitor ()
Kembali |
---|
IDeviceStateMonitor | |
getMountPoint
public String getMountPoint (String mountName)
Parameter |
---|
mountName | String |
getMountPointInfo
public ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)
Parameter |
---|
mountpoint | String |
Kembali |
---|
ITestDevice.MountPointInfo | |
Melempar |
---|
DeviceNotAvailableException | |
getMountPointInfo
public getMountPointInfo ()
Melempar |
---|
DeviceNotAvailableException | |
getOptions
public TestDeviceOptions getOptions ()
Kembali |
---|
TestDeviceOptions | |
getPartitionFreeSpace
public long getPartitionFreeSpace (String partition)
Parameter |
---|
partition | String |
Melempar |
---|
DeviceNotAvailableException | |
getPrimaryUserId
public Integer getPrimaryUserId ()
Melempar |
---|
DeviceNotAvailableException | |
getProcessByName
public ProcessInfo getProcessByName (String processName)
Parameter |
---|
processName | String |
Melempar |
---|
DeviceNotAvailableException | |
getProcessPid
public String getProcessPid (String process)
Melempar |
---|
DeviceNotAvailableException | |
getProductType
public String getProductType ()
Melempar |
---|
DeviceNotAvailableException | |
getProductVariant
public String getProductVariant ()
Melempar |
---|
DeviceNotAvailableException | |
getProperty
public String getProperty (String name)
Melempar |
---|
DeviceNotAvailableException | |
getRecoveryMode
public ITestDevice.RecoveryMode getRecoveryMode ()
Kembali |
---|
ITestDevice.RecoveryMode | |
getScreenshot
public InputStreamSource getScreenshot (String format)
Kembali |
---|
InputStreamSource | |
Melempar |
---|
DeviceNotAvailableException | |
getScreenshot
public InputStreamSource getScreenshot (long displayId)
Kembali |
---|
InputStreamSource | |
Melempar |
---|
DeviceNotAvailableException | |
getScreenshot
public InputStreamSource getScreenshot (String format,
boolean rescale)
Parameter |
---|
format | String |
rescale | boolean |
Kembali |
---|
InputStreamSource | |
Melempar |
---|
DeviceNotAvailableException | |
getScreenshot
public InputStreamSource getScreenshot ()
Kembali |
---|
InputStreamSource | |
Melempar |
---|
DeviceNotAvailableException | |
getSerialNumber
public String getSerialNumber ()
.dll
getSetting
public String getSetting (int userId,
String namespace,
String key)
Parameter |
---|
userId | int |
namespace | String |
key | String |
Melempar |
---|
DeviceNotAvailableException | |
getSetting
public String getSetting (String namespace,
String key)
Parameter |
---|
namespace | String |
key | String |
Melempar |
---|
DeviceNotAvailableException | |
getSimOperator
public String getSimOperator ()
getSimState
public String getSimState ()
getTombstones
public getTombstones ()
Melempar |
---|
DeviceNotAvailableException | |
getTotalMemory
public long getTotalMemory ()
getUninstallablePackageNames
public getUninstallablePackageNames ()
Melempar |
---|
DeviceNotAvailableException | |
getUseFastbootErase
public boolean getUseFastbootErase ()
getUserFlags
public int getUserFlags (int userId)
Melempar |
---|
DeviceNotAvailableException | |
getUserInfos
public getUserInfos ()
Melempar |
---|
DeviceNotAvailableException | |
getUserSerialNumber
public int getUserSerialNumber (int userId)
Melempar |
---|
DeviceNotAvailableException | |
handleAllocationEvent
public IManagedTestDevice.DeviceEventResponse handleAllocationEvent (DeviceEvent event)
Proses DeviceEvent, yang mungkin atau mungkin tidak mentransisikan perangkat ini ke status alokasi baru.
Parameter |
---|
event | DeviceEvent |
Kembali |
---|
IManagedTestDevice.DeviceEventResponse | |
hasFeature
public boolean hasFeature (String feature)
Melempar |
---|
DeviceNotAvailableException | |
installPackage
public String installPackage (File packageFile,
boolean reinstall,
String... extraArgs)
Parameter |
---|
packageFile | File |
reinstall | boolean |
extraArgs | String |
Melempar |
---|
DeviceNotAvailableException | |
installPackage
public String installPackage (File packageFile,
boolean reinstall,
boolean grantPermissions,
String... extraArgs)
Parameter |
---|
packageFile | File |
reinstall | boolean |
grantPermissions | boolean |
extraArgs | String |
Melempar |
---|
DeviceNotAvailableException | |
installPackageForUser
public String installPackageForUser (File packageFile,
boolean reinstall,
int userId,
String... extraArgs)
Parameter |
---|
packageFile | File |
reinstall | boolean |
userId | int |
extraArgs | String |
Melempar |
---|
DeviceNotAvailableException | |
installPackageForUser
public String installPackageForUser (File packageFile,
boolean reinstall,
boolean grantPermissions,
int userId,
String... extraArgs)
Parameter |
---|
packageFile | File |
reinstall | boolean |
grantPermissions | boolean |
userId | int |
extraArgs | String |
Melempar |
---|
DeviceNotAvailableException | |
isAdbRoot
public boolean isAdbRoot ()
Melempar |
---|
DeviceNotAvailableException | |
isAdbTcp
public boolean isAdbTcp ()
isAppEnumerationSupported
public boolean isAppEnumerationSupported ()
Melempar |
---|
DeviceNotAvailableException | |
isDeviceEncrypted
public boolean isDeviceEncrypted ()
Melempar |
---|
DeviceNotAvailableException | |
isDirectory
public boolean isDirectory (String path)
Melempar |
---|
DeviceNotAvailableException | |
isEnableAdbRoot
public boolean isEnableAdbRoot ()
Kembali |
---|
boolean | true jika adb root harus diaktifkan di perangkat |
isEncryptionSupported
public boolean isEncryptionSupported ()
Melempar |
---|
DeviceNotAvailableException | |
isExecutable
public boolean isExecutable (String fullPath)
Parameter |
---|
fullPath | String |
Melempar |
---|
DeviceNotAvailableException | |
isFastbootEnabled
public boolean isFastbootEnabled ()
isHeadless
public boolean isHeadless ()
Melempar |
---|
DeviceNotAvailableException | |
isMultiUserSupported
public boolean isMultiUserSupported ()
Melempar |
---|
DeviceNotAvailableException | |
isPackageInstalled
public boolean isPackageInstalled (String packageName,
String userId)
Parameter |
---|
packageName | String |
userId | String |
Melempar |
---|
DeviceNotAvailableException | |
isPackageInstalled
public boolean isPackageInstalled (String packageName)
Parameter |
---|
packageName | String |
Melempar |
---|
DeviceNotAvailableException | |
isRuntimePermissionSupported
public boolean isRuntimePermissionSupported ()
Melempar |
---|
DeviceNotAvailableException | |
isStateBootloaderOrFastbootd
public boolean isStateBootloaderOrFastbootd ()
isUserRunning
public boolean isUserRunning (int userId)
Melempar |
---|
DeviceNotAvailableException | |
isUserSecondary
public boolean isUserSecondary (int userId)
Melempar |
---|
DeviceNotAvailableException | |
isWifiEnabled
public boolean isWifiEnabled ()
Melempar |
---|
DeviceNotAvailableException | |
listDisplayIds
public listDisplayIds ()
Melempar |
---|
DeviceNotAvailableException | |
listUsers
public listUsers ()
Melempar |
---|
DeviceNotAvailableException | |
logBugreport
public boolean logBugreport (String dataName,
ITestLogger listener)
Parameter |
---|
dataName | String |
listener | ITestLogger |
logOnDevice
public void logOnDevice (String tag,
Log.LogLevel level,
String format,
Object... args)
Parameter |
---|
tag | String |
level | Log.LogLevel |
format | String |
args | Object |
nonBlockingReboot
public void nonBlockingReboot ()
Melempar |
---|
DeviceNotAvailableException | |
postAdbRootAction
public void postAdbRootAction ()
Ganti jika perangkat memerlukan beberapa tindakan spesifik yang harus diambil setelah adb root dan sebelum perangkat kembali online. Penerapan default tidak menyertakan tindakan penambahan apa pun. adb root tidak dijamin akan diaktifkan pada tahap ini.
Melempar |
---|
DeviceNotAvailableException | |
postAdbUnrootAction
public void postAdbUnrootAction ()
.dll
Ganti jika perangkat memerlukan beberapa tindakan spesifik yang harus diambil setelah adb unroot dan sebelum perangkat kembali online. Penerapan default tidak menyertakan tindakan tambahan apa pun. adb root tidak dijamin akan dinonaktifkan pada tahap ini.
Melempar |
---|
DeviceNotAvailableException | |
postBootSetup
public void postBootSetup ()
Melempar |
---|
DeviceNotAvailableException | |
postInvocationTearDown
public void postInvocationTearDown (Throwable exception)
Parameter |
---|
exception | Throwable |
preInvocationSetup
public void preInvocationSetup (IBuildInfo info)
Parameter |
---|
info | IBuildInfo |
Melempar |
---|
DeviceNotAvailableException | |
TargetSetupError | |
pullDir
public boolean pullDir (String deviceFilePath,
File localDir)
Parameter |
---|
deviceFilePath | String |
localDir | File |
Melempar |
---|
DeviceNotAvailableException | |
pullFile
public boolean pullFile (String remoteFilePath,
File localFile)
Parameter |
---|
remoteFilePath | String |
localFile | File |
Melempar |
---|
DeviceNotAvailableException | |
pullFile
public File pullFile (String remoteFilePath)
Parameter |
---|
remoteFilePath | String |
Melempar |
---|
DeviceNotAvailableException | |
pullFileContents
public String pullFileContents (String remoteFilePath)
Parameter |
---|
remoteFilePath | String |
Melempar |
---|
DeviceNotAvailableException | |
pullFileFromExternal
public File pullFileFromExternal (String remoteFilePath)
Parameter |
---|
remoteFilePath | String |
Melempar |
---|
DeviceNotAvailableException | |
pushDir
public boolean pushDir (File localFileDir,
String deviceFilePath,
excludedDirectories)
Parameter |
---|
localFileDir | File |
deviceFilePath | String |
excludedDirectories | |
Melempar |
---|
DeviceNotAvailableException | |
pushDir
public boolean pushDir (File localFileDir,
String deviceFilePath)
Parameter |
---|
localFileDir | File |
deviceFilePath | String |
Melempar |
---|
DeviceNotAvailableException | |
pushFile
public boolean pushFile (File localFile,
String remoteFilePath)
Parameter |
---|
localFile | File |
remoteFilePath | String |
Melempar |
---|
DeviceNotAvailableException | |
pushString
public boolean pushString (String contents,
String remoteFilePath)
Parameter |
---|
contents | String |
remoteFilePath | String |
Melempar |
---|
DeviceNotAvailableException | |
reboot
public void reboot (String reason)
Melempar |
---|
DeviceNotAvailableException | |
reboot
public void reboot ()
Melempar |
---|
DeviceNotAvailableException | |
rebootIntoBootloader
public void rebootIntoBootloader ()
Melempar |
---|
DeviceNotAvailableException | |
rebootIntoFastbootd
public void rebootIntoFastbootd ()
Melempar |
---|
DeviceNotAvailableException | |
rebootIntoRecovery
public void rebootIntoRecovery ()
Melempar |
---|
DeviceNotAvailableException | |
rebootIntoSideload
public void rebootIntoSideload ()
Melempar |
---|
DeviceNotAvailableException | |
rebootIntoSideload
public void rebootIntoSideload (boolean autoReboot)
Parameter |
---|
autoReboot | boolean |
Melempar |
---|
DeviceNotAvailableException | |
rebootUntilOnline
public void rebootUntilOnline ()
Melempar |
---|
DeviceNotAvailableException | |
rebootUntilOnline
public void rebootUntilOnline (String reason)
Melempar |
---|
DeviceNotAvailableException | |
rebootUserspace
public void rebootUserspace ()
Melempar |
---|
DeviceNotAvailableException | |
rebootUserspaceUntilOnline
public void rebootUserspaceUntilOnline ()
Melempar |
---|
DeviceNotAvailableException | |
recoveryDevice
public void recoverDevice ()
Mencoba memulihkan komunikasi perangkat.
Melempar |
---|
DeviceNotAvailableException | jika perangkat tidak lagi tersedia |
remountSystemWritable
public void remountSystemWritable ()
.dll
Melempar |
---|
DeviceNotAvailableException | |
remountVendorWritable
public void remountVendorWritable ()
Melempar |
---|
DeviceNotAvailableException | |
removeAdmin
public boolean removeAdmin (String componentName,
int userId)
Parameter |
---|
componentName | String |
userId | int |
Melempar |
---|
DeviceNotAvailableException | |
removeOwners
public void removeOwners ()
Melempar |
---|
DeviceNotAvailableException | |
removeUser
public boolean removeUser (int userId)
Melempar |
---|
DeviceNotAvailableException | |
runInstrumentationTests
public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner,
ITestLifeCycleReceiver... listeners)
Parameter |
---|
runner | IRemoteAndroidTestRunner |
listeners | ITestLifeCycleReceiver |
Melempar |
---|
DeviceNotAvailableException | |
runInstrumentationTests
public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner,
listeners)
Parameter |
---|
runner | IRemoteAndroidTestRunner |
listeners | |
Melempar |
---|
DeviceNotAvailableException | |
runInstrumentationTestsAsUser
public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner,
int userId,
ITestLifeCycleReceiver... listeners)
Parameter |
---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners | ITestLifeCycleReceiver |
Melempar |
---|
DeviceNotAvailableException | |
runInstrumentationTestsAsUser
public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner,
int userId,
listeners)
Parameter |
---|
runner | IRemoteAndroidTestRunner |
userId | int |
listeners | |
Melempar |
---|
DeviceNotAvailableException | |
Atur tanggal
public void setDate (Date date)
Melempar |
---|
DeviceNotAvailableException | |
setDeviceOwner
public boolean setDeviceOwner (String componentName,
int userId)
Parameter |
---|
componentName | String |
userId | int |
Melempar |
---|
DeviceNotAvailableException | |
setDeviceState
public void setDeviceState (TestDeviceState deviceState)
Parameter |
---|
deviceState | TestDeviceState |
setEmulatorProcess
public void setEmulatorProcess (Process p)
setFastbootEnabled
public void setFastbootEnabled (boolean fastbootEnabled)
Parameter |
---|
fastbootEnabled | boolean |
setFastbootPath
public void setFastbootPath (String fastbootPath)
Parameter |
---|
fastbootPath | String |
setIDevice
public void setIDevice (IDevice newDevice)
Parameter |
---|
newDevice | IDevice |
setOptions
public void setOptions (TestDeviceOptions options)
Parameter |
---|
options | TestDeviceOptions |
setProperty
public boolean setProperty (String propKey,
String propValue)
Parameter |
---|
propKey | String |
propValue | String |
Melempar |
---|
DeviceNotAvailableException | |
setRecovery
public void setRecovery (IDeviceRecovery recovery)
Parameter |
---|
recovery | IDeviceRecovery |
setRecoveryMode
public void setRecoveryMode (ITestDevice.RecoveryMode mode)
.dll
Parameter |
---|
mode | ITestDevice.RecoveryMode |
setSetting
public void setSetting (String namespace,
String key,
String value)
Parameter |
---|
namespace | String |
key | String |
value | String |
Melempar |
---|
DeviceNotAvailableException | |
setSetting
public void setSetting (int userId,
String namespace,
String key,
String value)
Parameter |
---|
userId | int |
namespace | String |
key | String |
value | String |
Melempar |
---|
DeviceNotAvailableException | |
setUseFastbootErase
public void setUseFastbootErase (boolean useFastbootErase)
Parameter |
---|
useFastbootErase | boolean |
startLogcat
public void startLogcat ()
startUser
public boolean startUser (int userId)
Melempar |
---|
DeviceNotAvailableException | |
startUser
public boolean startUser (int userId,
boolean waitFlag)
Parameter |
---|
userId | int |
waitFlag | boolean |
Melempar |
---|
DeviceNotAvailableException | |
stopEmulatorOutput
public void stopEmulatorOutput ()
stopLogcat
public void stopLogcat ()
stopUser
public boolean stopUser (int userId)
Melempar |
---|
DeviceNotAvailableException | |
stopUser
public boolean stopUser (int userId,
boolean waitFlag,
boolean forceFlag)
Parameter |
---|
userId | int |
waitFlag | boolean |
forceFlag | boolean |
Melempar |
---|
DeviceNotAvailableException | |
switchToAdbTcp
public String switchToAdbTcp ()
Melempar |
---|
DeviceNotAvailableException | |
switchToAdbUsb
public boolean switchToAdbUsb ()
Melempar |
---|
DeviceNotAvailableException | |
switchUser
public boolean switchUser (int userId)
Melempar |
---|
DeviceNotAvailableException | |
switchUser
public boolean switchUser (int userId,
long timeout)
Parameter |
---|
userId | int |
timeout | long |
Melempar |
---|
DeviceNotAvailableException | |
syncFiles
public boolean syncFiles (File localFileDir,
String deviceFilePath)
Parameter |
---|
localFileDir | File |
deviceFilePath | String |
Melempar |
---|
DeviceNotAvailableException | |
takeBugreport
public Bugreport takeBugreport ()
unencryptDevice
public boolean unencryptDevice ()
Melempar |
---|
DeviceNotAvailableException | |
uninstallPackage
public String uninstallPackage (String packageName)
Parameter |
---|
packageName | String |
Melempar |
---|
DeviceNotAvailableException | |
unlockDevice
public boolean unlockDevice ()
Melempar |
---|
DeviceNotAvailableException | |
waitForBootComplete
public boolean waitForBootComplete (long timeOut)
Melempar |
---|
DeviceNotAvailableException | |
waitForDeviceAvailable
public void waitForDeviceAvailable ()
Melempar |
---|
DeviceNotAvailableException | |
waitForDeviceAvailable
public void waitForDeviceAvailable (long waitTime)
Melempar |
---|
DeviceNotAvailableException | |
waitForDeviceInRecovery
public boolean waitForDeviceInRecovery (long waitTime)
waitForDeviceInSideload
public boolean waitForDeviceInSideload (long waitTime)
waitForDeviceNotAvailable
public boolean waitForDeviceNotAvailable (long waitTime)
waitForDeviceOnline
public void waitForDeviceOnline ()
Melempar |
---|
DeviceNotAvailableException | |
waitForDeviceOnline
public void waitForDeviceOnline (long waitTime)
Melempar |
---|
DeviceNotAvailableException | |
waitForDeviceShell
public boolean waitForDeviceShell (long waitTime)
Metode yang dilindungi
checkApiLevelAgainst
protected void checkApiLevelAgainst (String feature,
int strictMinLevel)
Parameter |
---|
feature | String |
strictMinLevel | int |
doAdbReboot
protected void doAdbReboot (NativeDevice.RebootMode rebootMode,
String reason)
Lakukan reboot adb.
Parameter |
---|
rebootMode | NativeDevice.RebootMode : mode reboot ini. |
reason | String : untuk reboot ini. |
Melempar |
---|
DeviceNotAvailableException | |
memastikanRuntimePermissionSupported
protected void ensureRuntimePermissionSupported ()
metode helper untuk menampilkan pengecualian jika izin waktu proses tidak didukung
Melempar |
---|
DeviceNotAvailableException | |
getBugreportInternal
protected InputStreamSource getBugreportInternal ()
Kembali |
---|
InputStreamSource | |
getBugreportzInternal
protected File getBugreportzInternal ()
Metode Pembantu Internal untuk mendapatkan file zip bugreportz sebagai ERROR(/File)
.
getRunUtil
protected IRunUtil getRunUtil ()
Dapatkan instance RunUtil
untuk digunakan.
internalGetProperty
protected String internalGetProperty (String propName,
String fastbootVar,
String description)
Ambil properti perangkat, dari cache ddmlib secara default, dan kembali ke `adb shell getprop` atau` fastboot getvar` bergantung pada apakah perangkat ada di Fastboot atau tidak.
Parameter |
---|
propName | String : Nama properti perangkat seperti yang dikembalikan oleh `adb shell getprop` |
fastbootVar | String : Nama variabel fastboot yang setara dengan kueri. jika null , kueri fastboot tidak akan dicoba |
description | String : Deskripsi sederhana tentang variabel. Huruf pertama harus menggunakan huruf besar. |
Kembali |
---|
String | Sebuah string, mungkin null atau kosong, berisi nilai properti yang diberikan |
Melempar |
---|
DeviceNotAvailableException | |
isNewer
protected boolean isNewer (File localFile,
IFileEntry entry)
Kembalikan nilai true
jika file lokal lebih baru dari file jarak jauh. IFileEntry
akurat hingga menitnya, jika waktunya sama, file akan dianggap lebih baru.
Parameter |
---|
localFile | File |
entry | IFileEntry |
protected boolean performDeviceAction (String actionDescription,
com.android.tradefed.device.NativeDevice.DeviceAction action,
int retryAttempts)
Melakukan tindakan di perangkat ini. Mencoba memulihkan perangkat dan secara opsional mencoba lagi perintah jika tindakan gagal.
Parameter |
---|
actionDescription | String : deskripsi singkat tentang tindakan yang akan dilakukan. Digunakan untuk tujuan logging saja. |
action | com.android.tradefed.device.NativeDevice.DeviceAction : tindakan yang akan dilakukan |
retryAttempts | int : percobaan ulang mencoba untuk melakukan tindakan jika gagal tetapi pemulihan berhasil |
Kembali |
---|
boolean | true jika tindakan berhasil dilakukan |
Melempar |
---|
DeviceNotAvailableException | jika upaya pemulihan gagal atau upaya maksimal dilakukan tanpa hasil |
postAdbReboot
protected void postAdbReboot ()
Tindakan ekstra yang mungkin dilakukan setelah reboot.
Melempar |
---|
DeviceNotAvailableException | |
prePostBootSetup
protected void prePostBootSetup ()
Izinkan setiap jenis perangkat (AndroidNativeDevice, TestDevice) untuk mengganti metode ini untuk penyiapan pasca boot tertentu.
Melempar |
---|
DeviceNotAvailableException | |
setClock
protected void setClock (Clock clock)
Setel instance Jam untuk digunakan.
setLogStartDelay
protected void setLogStartDelay (int delay)
Menyetel waktu dalam md untuk menunggu sebelum memulai pengambilan logcat untuk perangkat online.
Parameter |
---|
delay | int : penundaan dalam ms |
waitForDeviceNotAvailable
protected void waitForDeviceNotAvailable (String operationDesc,
long time)
Parameter |
---|
operationDesc | String |
time | long |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-09-08 UTC.