feat: change posture for folding and unfolding #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for changing the posture of mobile devices (e.g., folding and unfolding) in the codebase. It adds a new
PostureStates
type, updates relevant interfaces and classes to include posture-changing functionality, and implements this feature for Android devices while providing a placeholder for unsupported iOS devices.Feature Addition: Device Posture Management
src/robot.ts
: Added a newPostureStates
type ("fold"
|"unfold"
) and updated theRobot
interface to include achangeDevicePosture
method for managing device posture. [1] [2]Android Implementation
src/android.ts
: Implemented thechangeDevicePosture
method in theAndroidRobot
class to handle posture changes using ADB commands ("emu fold"
and"emu unfold"
).iOS Placeholder
src/ios.ts
andsrc/iphone-simulator.ts
: Added thechangeDevicePosture
method to theIosRobot
andSimctl
classes, but threw anActionableError
indicating that posture changes are not supported for iOS devices. [1] [2]Server Integration
src/server.ts
: Added a new server tool command,mobile_change_posture
, to allow users to fold or unfold a device via the server interface. This command validates the posture input and invokes thechangeDevicePosture
method.