Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.
Halaman ini diterjemahkan oleh Cloud Translation API.
Switch to English

NativeDevice

public class NativeDevice
extends Object implements IManagedTestDevice

java.lang.Object
com.android.tradefed.device.NativeDevice


Implementasi default dari perangkat ITestDevice non-stack penuh ITestDevice .

Ringkasan

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.

Konstanta

int INVALID_USER_ID

Nilai yang dikembalikan untuk setiap id pengguna yang tidak valid / tidak ditemukan: UserHandle menentukan nilai -10000

long MAX_HOST_DEVICE_TIME_OFFSET

int MAX_RETRY_ATTEMPTS

jumlah default dari percobaan ulang perintah untuk dilakukan

Fields

protected static final String SD_CARD

protected TestDeviceOptions mOptions

protected final IDeviceStateMonitor mStateMonitor

Konstruktor publik

NativeDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

Membuat TestDevice .

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

Kembali
boolean

Melempar
DeviceNotAvailableException

checkConnectivity

public boolean checkConnectivity ()

Kembali
boolean

Melempar
DeviceNotAvailableException

clearErrorDialogs

public boolean clearErrorDialogs ()

Kembali
boolean

Melempar
DeviceNotAvailableException

clearLastConnectedWifiNetwork

public void clearLastConnectedWifiNetwork ()

clearLogcat

public void clearLogcat ()

connectToWifiNetwork

public boolean connectToWifiNetwork (String wifiSsid, 
                String wifiPsk)

Parameter
wifiSsid String

wifiPsk String

Kembali
boolean

Melempar
DeviceNotAvailableException

connectToWifiNetwork

public boolean connectToWifiNetwork (String wifiSsid, 
                String wifiPsk, 
                boolean scanSsid)

Parameter
wifiSsid String

wifiPsk String

scanSsid boolean

Kembali
boolean

Melempar
DeviceNotAvailableException

connectToWifiNetworkIfNeeded

public boolean connectToWifiNetworkIfNeeded (String wifiSsid, 
                String wifiPsk, 
                boolean scanSsid)

Parameter
wifiSsid String

wifiPsk String

scanSsid boolean

Kembali
boolean

Melempar
DeviceNotAvailableException

connectToWifiNetworkIfNeeded

public boolean connectToWifiNetworkIfNeeded (String wifiSsid, 
                String wifiPsk)

Parameter
wifiSsid String

wifiPsk String

Kembali
boolean

Melempar
DeviceNotAvailableException

buat pengguna

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

Parameter
name String

guest boolean

ephemeral boolean

Kembali
int

Melempar
DeviceNotAvailableException

buat pengguna

public int createUser (String name)

Parameter
name String

Kembali
int

Melempar
DeviceNotAvailableException

createUserNoThrow

public int createUserNoThrow (String name)

Parameter
name String

Kembali
int

Melempar
DeviceNotAvailableException

menghapus berkas

public void deleteFile (String deviceFilePath)

Parameter
deviceFilePath String

Melempar
DeviceNotAvailableException

deviceSoftRestarted

public boolean deviceSoftRestarted (ProcessInfo prevSystemServerProcess)

Parameter
prevSystemServerProcess ProcessInfo

Kembali
boolean

Melempar
DeviceNotAvailableException

deviceSoftRestartedSince

public boolean deviceSoftRestartedSince (long utcEpochTime, 
                TimeUnit timeUnit)

Parameter
utcEpochTime long

timeUnit TimeUnit

Kembali
boolean

Melempar
DeviceNotAvailableException

disableAdbRoot

public boolean disableAdbRoot ()

Kembali
boolean

Melempar
DeviceNotAvailableException

disableKeyguard

public void disableKeyguard ()

Melempar
DeviceNotAvailableException

nonaktifkanNetworkMonitor

public boolean disableNetworkMonitor ()

Kembali
boolean

Melempar
DeviceNotAvailableException

disconnectFromWifi

public boolean disconnectFromWifi ()

Kembali
boolean

Melempar
DeviceNotAvailableException

doesFileExist

public boolean doesFileExist (String deviceFilePath)

Parameter
deviceFilePath String

Kembali
boolean

Melempar
DeviceNotAvailableException

dumpHeap

public File dumpHeap (String process, 
                String devicePath)

Parameter
process String

devicePath String

Kembali
File

Melempar
DeviceNotAvailableException

enableAdbRoot

public boolean enableAdbRoot ()

Kembali
boolean

Melempar
DeviceNotAvailableException

aktifkanNetworkMonitor

public boolean enableNetworkMonitor ()

Kembali
boolean

Melempar
DeviceNotAvailableException

encryptDevice

086ac E5E5E550

Parameter
inplace boolean

Kembali
boolean

Melempar
DeviceNotAvailableException

eksekusiAdbCommand

public String executeAdbCommand (long timeout, 
                String... cmdArgs)

Parameter
timeout long

cmdArgs String

Kembali
String

Melempar
DeviceNotAvailableException

eksekusiAdbCommand

public String executeAdbCommand (String... cmdArgs)

Parameter
cmdArgs String

Kembali
String

Melempar
DeviceNotAvailableException

eksekusiFastbootCommand

public CommandResult executeFastbootCommand (String... cmdArgs)

Parameter
cmdArgs String

Kembali
CommandResult

Melempar
DeviceNotAvailableException

eksekusiFastbootCommand

public CommandResult executeFastbootCommand (long timeout, 
                String... cmdArgs)

Parameter
timeout long

cmdArgs String

Kembali
CommandResult

Melempar
DeviceNotAvailableException

executeLongFastbootCommand

public CommandResult executeLongFastbootCommand (String... cmdArgs)

Parameter
cmdArgs String

Kembali
CommandResult

Melempar
DeviceNotAvailableException

eksekusiShellCommand

public String executeShellCommand (String command)

Parameter
command String

Kembali
String

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)

Parameter
cmd String

Kembali
CommandResult

Melempar
DeviceNotAvailableException

eksekusiShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                OutputStream pipeToOutput)

Parameter
cmd String

pipeToOutput OutputStream

Kembali
CommandResult

Melempar
DeviceNotAvailableException

eksekusiShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                File pipeAsInput)

Parameter
cmd String

pipeAsInput File

Kembali
CommandResult

Melempar
DeviceNotAvailableException

eksekusiShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                long maxTimeoutForCommand, 
                TimeUnit timeUnit, 
                int retryAttempts)

Parameter
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

retryAttempts int

Kembali
CommandResult

Melempar
DeviceNotAvailableException

eksekusiShellV2Command

public CommandResult executeShellV2Command (String cmd, 
                long maxTimeoutForCommand, 
                TimeUnit timeUnit)

Parameter
cmd String

maxTimeoutForCommand long

timeUnit TimeUnit

Kembali
CommandResult

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

Kembali
CommandResult

Melempar
DeviceNotAvailableException

fastbootWipePartition

public CommandResult fastbootWipePartition (String partition)

Parameter
partition String

Kembali
CommandResult

Melempar
DeviceNotAvailableException

getActiveApexes

public  getActiveApexes ()

Kembali

Melempar
DeviceNotAvailableException

getAllSettings

public  getAllSettings (String namespace)

Parameter
namespace String

Kembali

Melempar
DeviceNotAvailableException

getAllocationState

public DeviceAllocationState getAllocationState ()

Kembali
DeviceAllocationState

getAndroidId

public String getAndroidId (int userId)

Parameter
userId int

Kembali
String

Melempar
DeviceNotAvailableException

getAndroidIds

public  getAndroidIds ()

Kembali

Melempar
DeviceNotAvailableException

getApiLevel

public int getApiLevel ()

Kembali
int

Melempar
DeviceNotAvailableException

getAppPackageInfo

public PackageInfo getAppPackageInfo (String packageName)

Parameter
packageName String

Kembali
PackageInfo

Melempar
DeviceNotAvailableException

getAppPackageInfos

public  getAppPackageInfos ()

Kembali

Melempar
DeviceNotAvailableException

getBasebandVersion

public String getBasebandVersion ()

Kembali
String

Melempar
DeviceNotAvailableException

getBattery

public Integer getBattery ()

Kembali
Integer

getBooleanProperty

public boolean getBooleanProperty (String name, 
                boolean defaultValue)

Parameter
name String

defaultValue boolean

Kembali
boolean

Melempar
DeviceNotAvailableException

getBootHistory

public  getBootHistory ()

Kembali

Melempar
DeviceNotAvailableException

getBootHistorySince

public  getBootHistorySince (long utcEpochTime, 
                TimeUnit timeUnit)

Parameter
utcEpochTime long

timeUnit TimeUnit

Kembali

Melempar
DeviceNotAvailableException

getBootloaderVersion

public String getBootloaderVersion ()

Kembali
String

Melempar
DeviceNotAvailableException

getBugreport

public InputStreamSource getBugreport ()
.dll

Kembali
InputStreamSource

getBugreportz

public InputStreamSource getBugreportz ()

Kembali
InputStreamSource

getBuildAlias

public String getBuildAlias ()

Kembali
String

Melempar
DeviceNotAvailableException

getBuildFlavor

public String getBuildFlavor ()

Kembali
String

Melempar
DeviceNotAvailableException

getBuildId

public String getBuildId ()

Kembali
String

Melempar
DeviceNotAvailableException

getBuildSigningKeys

public String getBuildSigningKeys ()

Kembali
String

Melempar
DeviceNotAvailableException

getCachedDeviceDescriptor

public DeviceDescriptor getCachedDeviceDescriptor ()

Kembali
DeviceDescriptor

getChildren

public String[] getChildren (String path)

Parameter
path String

Kembali
String[]

Melempar
DeviceNotAvailableException

getCurrentUser

public int getCurrentUser ()

Kembali
int

Melempar
DeviceNotAvailableException

getDeviceClass

public String getDeviceClass ()

Kembali
String

getDeviceDate

public long getDeviceDate ()

Kembali
long

Melempar
DeviceNotAvailableException

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

Kembali
DeviceDescriptor

getDeviceState

public TestDeviceState getDeviceState ()

Kembali
TestDeviceState

getDeviceTimeOffset

public long getDeviceTimeOffset (Date date)

Parameter
date Date

Kembali
long

Melempar
DeviceNotAvailableException

getEmulatorOutput

public InputStreamSource getEmulatorOutput ()

Kembali
InputStreamSource

getEmulatorProcess

public Process getEmulatorProcess ()

Kembali
Process

getExecuteShellCommandLog

public final File getExecuteShellCommandLog ()

Log yang berisi semua log executeShellCommand(String) .

Kembali
File

getExternalStoreFreeSpace

public long getExternalStoreFreeSpace ()

Kembali
long

Melempar
DeviceNotAvailableException

getFastbootPath

public String getFastbootPath ()

Kembali
String

getFastbootProductType

public String getFastbootProductType ()

Kembali
String

Melempar
DeviceNotAvailableException

getFastbootProductVariant

public String getFastbootProductVariant ()

Kembali
String

Melempar
DeviceNotAvailableException

getFastbootVariable

public String getFastbootVariable (String variableName)

Parameter
variableName String

Kembali
String

Melempar
DeviceNotAvailableException

getFastbootVersion

public String getFastbootVersion ()

Kembali
String

getFileEntry

public IFileEntry getFileEntry (String path)

Parameter
path String

Kembali
IFileEntry

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.

Kembali
IFileEntry FileEntryWrapper mewakili FileEntry.

Melempar
DeviceNotAvailableException

getIDevice

public IDevice getIDevice ()

Kembali
IDevice

getInstalledPackageNames

public  getInstalledPackageNames ()

Kembali

Melempar
DeviceNotAvailableException

getIntProperty

public long getIntProperty (String name, 
                long defaultValue)

Parameter
name String

defaultValue long

Kembali
long

Melempar
DeviceNotAvailableException

getIpAddress

public String getIpAddress ()

Kembali
String

Melempar
DeviceNotAvailableException

getKeyguardState

public KeyguardControllerState getKeyguardState ()

Kembali
KeyguardControllerState

Melempar
DeviceNotAvailableException

getLastExpectedRebootTimeMillis

public long getLastExpectedRebootTimeMillis ()

Kembali
long

getLaunchApiLevel

public int getLaunchApiLevel ()

Kembali
int

Melempar
DeviceNotAvailableException

getLogcat

public InputStreamSource getLogcat ()

Kembali
InputStreamSource

getLogcat

public InputStreamSource getLogcat (int maxBytes)

Parameter
maxBytes int

Kembali
InputStreamSource

getLogcatDump

public InputStreamSource getLogcatDump ()

Kembali
InputStreamSource

getLogcatSince

public InputStreamSource getLogcatSince (long date)

Parameter
date long

Kembali
InputStreamSource

getMacAddress

public String getMacAddress ()

Kembali
String

getMaxNumberOfRunningUsersSupported

public int getMaxNumberOfRunningUsersSupported ()

Kembali
int

Melempar
DeviceNotAvailableException

getMaxNumberOfUsersSupported

public int getMaxNumberOfUsersSupported ()

Kembali
int

Melempar
DeviceNotAvailableException

getMonitor

public IDeviceStateMonitor getMonitor ()

Kembali
IDeviceStateMonitor

getMountPoint

public String getMountPoint (String mountName)

Parameter
mountName String

Kembali
String

getMountPointInfo

public ITestDevice.MountPointInfo getMountPointInfo (String mountpoint)

Parameter
mountpoint String

Kembali
ITestDevice.MountPointInfo

Melempar
DeviceNotAvailableException

getMountPointInfo

public  getMountPointInfo ()

Kembali

Melempar
DeviceNotAvailableException

getOptions

public TestDeviceOptions getOptions ()

Kembali
TestDeviceOptions

getPartitionFreeSpace

public long getPartitionFreeSpace (String partition)

Parameter
partition String

Kembali
long

Melempar
DeviceNotAvailableException

getPrimaryUserId

public Integer getPrimaryUserId ()

Kembali
Integer

Melempar
DeviceNotAvailableException

getProcessByName

public ProcessInfo getProcessByName (String processName)

Parameter
processName String

Kembali
ProcessInfo

Melempar
DeviceNotAvailableException

getProcessPid

public String getProcessPid (String process)

Parameter
process String

Kembali
String

Melempar
DeviceNotAvailableException

getProductType

public String getProductType ()

Kembali
String

Melempar
DeviceNotAvailableException

getProductVariant

public String getProductVariant ()

Kembali
String

Melempar
DeviceNotAvailableException

getProperty

public String getProperty (String name)

Parameter
name String

Kembali
String

Melempar
DeviceNotAvailableException

getRecoveryMode

public ITestDevice.RecoveryMode getRecoveryMode ()

Kembali
ITestDevice.RecoveryMode

getScreenshot

public InputStreamSource getScreenshot (String format)

Parameter
format String

Kembali
InputStreamSource

Melempar
DeviceNotAvailableException

getScreenshot

public InputStreamSource getScreenshot (long displayId)

Parameter
displayId long

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

Kembali
String

getSetting

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

Parameter
userId int

namespace String

key String

Kembali
String

Melempar
DeviceNotAvailableException

getSetting

public String getSetting (String namespace, 
                String key)

Parameter
namespace String

key String

Kembali
String

Melempar
DeviceNotAvailableException

getSimOperator

public String getSimOperator ()

Kembali
String

getSimState

public String getSimState ()

Kembali
String

getTombstones

public  getTombstones ()

Kembali

Melempar
DeviceNotAvailableException

getTotalMemory

public long getTotalMemory ()

Kembali
long

getUninstallablePackageNames

public  getUninstallablePackageNames ()

Kembali

Melempar
DeviceNotAvailableException

getUseFastbootErase

public boolean getUseFastbootErase ()

Kembali
boolean

getUserFlags

public int getUserFlags (int userId)

Parameter
userId int

Kembali
int

Melempar
DeviceNotAvailableException

getUserInfos

public  getUserInfos ()

Kembali

Melempar
DeviceNotAvailableException

getUserSerialNumber

public int getUserSerialNumber (int userId)

Parameter
userId int

Kembali
int

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)

Parameter
feature String

Kembali
boolean

Melempar
DeviceNotAvailableException

installPackage

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

Parameter
packageFile File

reinstall boolean

extraArgs String

Kembali
String

Melempar
DeviceNotAvailableException

installPackage

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

Parameter
packageFile File

reinstall boolean

grantPermissions boolean

extraArgs String

Kembali
String

Melempar
DeviceNotAvailableException

installPackageForUser

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

Parameter
packageFile File

reinstall boolean

userId int

extraArgs String

Kembali
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

Kembali
String

Melempar
DeviceNotAvailableException

isAdbRoot

public boolean isAdbRoot ()

Kembali
boolean

Melempar
DeviceNotAvailableException

isAdbTcp

public boolean isAdbTcp ()

Kembali
boolean

isAppEnumerationSupported

public boolean isAppEnumerationSupported ()

Kembali
boolean

Melempar
DeviceNotAvailableException

isDeviceEncrypted

public boolean isDeviceEncrypted ()

Kembali
boolean

Melempar
DeviceNotAvailableException

isDirectory

public boolean isDirectory (String path)

Parameter
path String

Kembali
boolean

Melempar
DeviceNotAvailableException

isEnableAdbRoot

public boolean isEnableAdbRoot ()

Kembali
boolean true jika adb root harus diaktifkan di perangkat

isEncryptionSupported

public boolean isEncryptionSupported ()

Kembali
boolean

Melempar
DeviceNotAvailableException

isExecutable

public boolean isExecutable (String fullPath)

Parameter
fullPath String

Kembali
boolean

Melempar
DeviceNotAvailableException

isFastbootEnabled

public boolean isFastbootEnabled ()

Kembali
boolean

isHeadless

public boolean isHeadless ()

Kembali
boolean

Melempar
DeviceNotAvailableException

isMultiUserSupported

public boolean isMultiUserSupported ()

Kembali
boolean

Melempar
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName, 
                String userId)

Parameter
packageName String

userId String

Kembali
boolean

Melempar
DeviceNotAvailableException

isPackageInstalled

public boolean isPackageInstalled (String packageName)

Parameter
packageName String

Kembali
boolean

Melempar
DeviceNotAvailableException

isRuntimePermissionSupported

public boolean isRuntimePermissionSupported ()

Kembali
boolean

Melempar
DeviceNotAvailableException

isStateBootloaderOrFastbootd

public boolean isStateBootloaderOrFastbootd ()

Kembali
boolean

isUserRunning

public boolean isUserRunning (int userId)

Parameter
userId int

Kembali
boolean

Melempar
DeviceNotAvailableException

isUserSecondary

public boolean isUserSecondary (int userId)

Parameter
userId int

Kembali
boolean

Melempar
DeviceNotAvailableException

isWifiEnabled

public boolean isWifiEnabled ()

Kembali
boolean

Melempar
DeviceNotAvailableException

listDisplayIds

public  listDisplayIds ()

Kembali

Melempar
DeviceNotAvailableException

listUsers

public  listUsers ()

Kembali

Melempar
DeviceNotAvailableException

logBugreport

public boolean logBugreport (String dataName, 
                ITestLogger listener)

Parameter
dataName String

listener ITestLogger

Kembali
boolean

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

Kembali
boolean

Melempar
DeviceNotAvailableException

pullFile

public boolean pullFile (String remoteFilePath, 
                File localFile)

Parameter
remoteFilePath String

localFile File

Kembali
boolean

Melempar
DeviceNotAvailableException

pullFile

public File pullFile (String remoteFilePath)

Parameter
remoteFilePath String

Kembali
File

Melempar
DeviceNotAvailableException

pullFileContents

public String pullFileContents (String remoteFilePath)

Parameter
remoteFilePath String

Kembali
String

Melempar
DeviceNotAvailableException

pullFileFromExternal

public File pullFileFromExternal (String remoteFilePath)

Parameter
remoteFilePath String

Kembali
File

Melempar
DeviceNotAvailableException

pushDir

public boolean pushDir (File localFileDir, 
                String deviceFilePath, 
                 excludedDirectories)

Parameter
localFileDir File

deviceFilePath String

excludedDirectories

Kembali
boolean

Melempar
DeviceNotAvailableException

pushDir

public boolean pushDir (File localFileDir, 
                String deviceFilePath)

Parameter
localFileDir File

deviceFilePath String

Kembali
boolean

Melempar
DeviceNotAvailableException

pushFile

public boolean pushFile (File localFile, 
                String remoteFilePath)

Parameter
localFile File

remoteFilePath String

Kembali
boolean

Melempar
DeviceNotAvailableException

pushString

public boolean pushString (String contents, 
                String remoteFilePath)

Parameter
contents String

remoteFilePath String

Kembali
boolean

Melempar
DeviceNotAvailableException

reboot

public void reboot (String reason)

Parameter
reason String

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)

Parameter
reason String

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

Kembali
boolean

Melempar
DeviceNotAvailableException

removeOwners

public void removeOwners ()

Melempar
DeviceNotAvailableException

removeUser

public boolean removeUser (int userId)

Parameter
userId int

Kembali
boolean

Melempar
DeviceNotAvailableException

runInstrumentationTests

public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, 
                ITestLifeCycleReceiver... listeners)

Parameter
runner IRemoteAndroidTestRunner

listeners ITestLifeCycleReceiver

Kembali
boolean

Melempar
DeviceNotAvailableException

runInstrumentationTests

public boolean runInstrumentationTests (IRemoteAndroidTestRunner runner, 
                 listeners)

Parameter
runner IRemoteAndroidTestRunner

listeners

Kembali
boolean

Melempar
DeviceNotAvailableException

runInstrumentationTestsAsUser

public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, 
                int userId, 
                ITestLifeCycleReceiver... listeners)

Parameter
runner IRemoteAndroidTestRunner

userId int

listeners ITestLifeCycleReceiver

Kembali
boolean

Melempar
DeviceNotAvailableException

runInstrumentationTestsAsUser

public boolean runInstrumentationTestsAsUser (IRemoteAndroidTestRunner runner, 
                int userId, 
                 listeners)

Parameter
runner IRemoteAndroidTestRunner

userId int

listeners

Kembali
boolean

Melempar
DeviceNotAvailableException

Atur tanggal

public void setDate (Date date)

Parameter
date Date

Melempar
DeviceNotAvailableException

setDeviceOwner

public boolean setDeviceOwner (String componentName, 
                int userId)

Parameter
componentName String

userId int

Kembali
boolean

Melempar
DeviceNotAvailableException

setDeviceState

public void setDeviceState (TestDeviceState deviceState)

Parameter
deviceState TestDeviceState

setEmulatorOutputStream

public void setEmulatorOutputStream (SizeLimitedOutputStream output)

Untuk emulator, setel SizeLimitedOutputStream ke keluaran log

Parameter
output SizeLimitedOutputStream : untuk mencatat keluaran

setEmulatorProcess

public void setEmulatorProcess (Process p)

Parameter
p Process

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

Kembali
boolean

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)

Parameter
userId int

Kembali
boolean

Melempar
DeviceNotAvailableException

startUser

public boolean startUser (int userId, 
                boolean waitFlag)

Parameter
userId int

waitFlag boolean

Kembali
boolean

Melempar
DeviceNotAvailableException

stopEmulatorOutput

public void stopEmulatorOutput ()

stopLogcat

public void stopLogcat ()

stopUser

public boolean stopUser (int userId)

Parameter
userId int

Kembali
boolean

Melempar
DeviceNotAvailableException

stopUser

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

Parameter
userId int

waitFlag boolean

forceFlag boolean

Kembali
boolean

Melempar
DeviceNotAvailableException

switchToAdbTcp

public String switchToAdbTcp ()

Kembali
String

Melempar
DeviceNotAvailableException

switchToAdbUsb

public boolean switchToAdbUsb ()

Kembali
boolean

Melempar
DeviceNotAvailableException

switchUser

public boolean switchUser (int userId)

Parameter
userId int

Kembali
boolean

Melempar
DeviceNotAvailableException

switchUser

public boolean switchUser (int userId, 
                long timeout)

Parameter
userId int

timeout long

Kembali
boolean

Melempar
DeviceNotAvailableException

syncFiles

public boolean syncFiles (File localFileDir, 
                String deviceFilePath)

Parameter
localFileDir File

deviceFilePath String

Kembali
boolean

Melempar
DeviceNotAvailableException

takeBugreport

public Bugreport takeBugreport ()

Kembali
Bugreport

unencryptDevice

public boolean unencryptDevice ()

Kembali
boolean

Melempar
DeviceNotAvailableException

uninstallPackage

public String uninstallPackage (String packageName)

Parameter
packageName String

Kembali
String

Melempar
DeviceNotAvailableException

unlockDevice

public boolean unlockDevice ()

Kembali
boolean

Melempar
DeviceNotAvailableException

waitForBootComplete

public boolean waitForBootComplete (long timeOut)

Parameter
timeOut long

Kembali
boolean

Melempar
DeviceNotAvailableException

waitForDeviceAvailable

public void waitForDeviceAvailable ()

Melempar
DeviceNotAvailableException

waitForDeviceAvailable

public void waitForDeviceAvailable (long waitTime)

Parameter
waitTime long

Melempar
DeviceNotAvailableException

waitForDeviceInRecovery

public boolean waitForDeviceInRecovery (long waitTime)

Parameter
waitTime long

Kembali
boolean

waitForDeviceInSideload

public boolean waitForDeviceInSideload (long waitTime)

Parameter
waitTime long

Kembali
boolean

waitForDeviceNotAvailable

public boolean waitForDeviceNotAvailable (long waitTime)

Parameter
waitTime long

Kembali
boolean

waitForDeviceOnline

public void waitForDeviceOnline ()

Melempar
DeviceNotAvailableException

waitForDeviceOnline

public void waitForDeviceOnline (long waitTime)

Parameter
waitTime long

Melempar
DeviceNotAvailableException

waitForDeviceShell

public boolean waitForDeviceShell (long waitTime)

Parameter
waitTime long

Kembali
boolean

Metode yang dilindungi

checkApiLevelAgainst

protected void checkApiLevelAgainst (String feature, 
                int strictMinLevel)

Parameter
feature String

strictMinLevel int

createRebootDeviceAction

protected NativeDevice.RebootDeviceAction createRebootDeviceAction (NativeDevice.RebootMode rebootMode, 
                String reason)

Buat RebootDeviceAction untuk digunakan saat melakukan aksi reboot.

Parameter
rebootMode NativeDevice.RebootMode : mode reboot ini.

reason String : untuk reboot ini.

Kembali
NativeDevice.RebootDeviceAction yang dibuat RebootDeviceAction .

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) .

Kembali
File

getRunUtil

protected IRunUtil getRunUtil ()

Dapatkan instance RunUtil untuk digunakan.

Kembali
IRunUtil

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

Kembali
boolean

performDeviceAction

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.

Parameter
clock Clock

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