Class AdbShellCommandsCurrentBase
java.lang.Object
hudson.plugins.android_emulator.sdk.cli.AdbShellCommandsCurrentBase
- All Implemented Interfaces:
AdbShellCommands
- Direct Known Subclasses:
AdbShellCommand04To22
This class holds the implementations for all used commands via
adb shell
on devices running the latest API. As some calls have never changed in history,
it is most likely that this class is used as base for the other version implementations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SdkCliCommand
getAdbShellCommand
(String deviceSerial, boolean waitForDevice, String command) Generic method to generate and 'adb shell' command to run on the given device.protected SdkCliCommand
getAdbShellCommand
(String deviceSerial, String command) Generic method to generate and 'adb shell' command to run on the given device.getClearMainLogCommand
(String deviceSerial) getDismissKeyguardCommand
(String deviceSerial) getListProcessesCommand
(String deviceSerial) getLogMessageCommand
(String deviceSerial, String logMessage) getMonkeyInputCommand
(String deviceSerial, long seedValue, int throttleMs, String extraArgs, int eventCount) getSendBackKeyEventCommand
(String deviceSerial) getSendKeyEventCommand
(String deviceSerial, AndroidKeyEvent keyEvent) getSetLogCatFormatToTimeCommand
(String deviceSerial) getWaitForDeviceStartupCommand
(String deviceSerial)
-
Constructor Details
-
AdbShellCommandsCurrentBase
public AdbShellCommandsCurrentBase()
-
-
Method Details
-
getListProcessesCommand
- Specified by:
getListProcessesCommand
in interfaceAdbShellCommands
-
getWaitForDeviceStartupCommand
- Specified by:
getWaitForDeviceStartupCommand
in interfaceAdbShellCommands
-
getWaitForDeviceStartupExpectedAnswer
- Specified by:
getWaitForDeviceStartupExpectedAnswer
in interfaceAdbShellCommands
-
getClearMainLogCommand
- Specified by:
getClearMainLogCommand
in interfaceAdbShellCommands
-
getSetLogCatFormatToTimeCommand
- Specified by:
getSetLogCatFormatToTimeCommand
in interfaceAdbShellCommands
-
getLogMessageCommand
- Specified by:
getLogMessageCommand
in interfaceAdbShellCommands
-
getSendKeyEventCommand
- Specified by:
getSendKeyEventCommand
in interfaceAdbShellCommands
-
getSendBackKeyEventCommand
- Specified by:
getSendBackKeyEventCommand
in interfaceAdbShellCommands
-
getDismissKeyguardCommand
- Specified by:
getDismissKeyguardCommand
in interfaceAdbShellCommands
-
getMonkeyInputCommand
public SdkCliCommand getMonkeyInputCommand(String deviceSerial, long seedValue, int throttleMs, String extraArgs, int eventCount) - Specified by:
getMonkeyInputCommand
in interfaceAdbShellCommands
-
getAdbShellCommand
protected SdkCliCommand getAdbShellCommand(String deviceSerial, boolean waitForDevice, String command) Generic method to generate and 'adb shell' command to run on the given device.- Parameters:
deviceSerial
- device to run adb command on (add via '-s' option)waitForDevice
- if true the 'wait-for-device' directive is added as adb parametercommand
- the command to run on the device- Returns:
SdkCliCommand
object which holds the ADB-Tool and the generated command
-
getAdbShellCommand
Generic method to generate and 'adb shell' command to run on the given device. Wrapper forgetAdbShellCommand
with assuming waitForDevice is false.- Parameters:
deviceSerial
- device to run adb command on (add via '-s' option)command
- the command to run on the device- Returns:
SdkCliCommand
object which holds the ADB-Tool and the generated command
-