mirror of
https://github.com/taigrr/adb.git
synced 2026-04-02 02:58:42 -07:00
Added screen resolution to tapsequence
This commit is contained in:
@@ -154,6 +154,10 @@ func (d Device) ReplayTapSequence(ctx context.Context, t TapSequence) error {
|
|||||||
// time.Sleep(time.Second * 30)
|
// time.Sleep(time.Second * 30)
|
||||||
// cancelFunc()
|
// cancelFunc()
|
||||||
func (d Device) CaptureSequence(ctx context.Context) (t TapSequence, err error) {
|
func (d Device) CaptureSequence(ctx context.Context) (t TapSequence, err error) {
|
||||||
|
t.Resolution, err = d.GetScreenResolution(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
// this command will never finish without ctx expiring. As a result,
|
// this command will never finish without ctx expiring. As a result,
|
||||||
// it will always return error code 130 if successful
|
// it will always return error code 130 if successful
|
||||||
stdout, _, errCode, err := execute(ctx, []string{"shell", "getevent", "-tl"})
|
stdout, _, errCode, err := execute(ctx, []string{"shell", "getevent", "-tl"})
|
||||||
|
|||||||
Reference in New Issue
Block a user