-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from kaleidot725/develop-v1.4.0
Merge develop v1.4.0
- Loading branch information
Showing
23 changed files
with
550 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
src/jvmMain/kotlin/jp/kaleidot725/adbpad/domain/model/command/DeviceControlCommand.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package jp.kaleidot725.adbpad.domain.model.command | ||
|
||
import com.malinskiy.adam.request.shell.v1.ShellCommandRequest | ||
|
||
interface DeviceControlCommand { | ||
val requests: List<ShellCommandRequest> | ||
|
||
data object Power : DeviceControlCommand { | ||
override val requests: List<ShellCommandRequest> = | ||
listOf( | ||
ShellCommandRequest("input keyevent 26"), | ||
) | ||
} | ||
|
||
data object VolumeUp : DeviceControlCommand { | ||
override val requests: List<ShellCommandRequest> = | ||
listOf( | ||
ShellCommandRequest("input keyevent 24"), | ||
) | ||
} | ||
|
||
data object VolumeDown : DeviceControlCommand { | ||
override val requests: List<ShellCommandRequest> = | ||
listOf( | ||
ShellCommandRequest("input keyevent 25"), | ||
) | ||
} | ||
|
||
data object VolumeMute : DeviceControlCommand { | ||
override val requests: List<ShellCommandRequest> = | ||
listOf( | ||
ShellCommandRequest("input keyevent 164"), | ||
) | ||
} | ||
|
||
data object Back : DeviceControlCommand { | ||
override val requests: List<ShellCommandRequest> = | ||
listOf( | ||
ShellCommandRequest("input keyevent 4"), | ||
) | ||
} | ||
|
||
data object Home : DeviceControlCommand { | ||
override val requests: List<ShellCommandRequest> = | ||
listOf( | ||
ShellCommandRequest("input keyevent 3"), | ||
) | ||
} | ||
|
||
data object Recents : DeviceControlCommand { | ||
override val requests: List<ShellCommandRequest> = | ||
listOf( | ||
ShellCommandRequest("input keyevent 187"), | ||
) | ||
} | ||
} |
Oops, something went wrong.