Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(shorebird_cli): "SYS_KEYS has no physical keys" during preview #2646

Merged
merged 6 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/shorebird_cli/lib/src/executables/adb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
if (deviceId != null) ...['-s', deviceId],
'shell',
'monkey',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm so confused why we're using monkey at all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I guess that's a known way. I'm used to historically sending an intent: https://www.repeato.app/launching-android-applications-via-adb/

// Adjust percentage of "system" key events to 0.
// This is needed to support Android systems with no hardware keys.
'--pct-syskeys 0',

Check warning on line 56 in packages/shorebird_cli/lib/src/executables/adb.dart

View workflow job for this annotation

GitHub Actions / 🔤 Check Spelling / build

Unknown word (syskeys)
'-p $package',
'1',
];
Expand Down
8 changes: 6 additions & 2 deletions packages/shorebird_cli/test/src/executables/adb_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@
completes,
);
verify(
() => process.run(adbPath, 'shell monkey -p $package 1'.split(' ')),
() => process.run(
adbPath,
'shell monkey --pct-syskeys 0 -p $package 1'.split(' '),

Check warning on line 162 in packages/shorebird_cli/test/src/executables/adb_test.dart

View workflow job for this annotation

GitHub Actions / 🔤 Check Spelling / build

Unknown word (syskeys)
),
).called(1);
});

Expand All @@ -172,7 +175,8 @@
verify(
() => process.run(
adbPath,
'-s $deviceId shell monkey -p $package 1'.split(' '),
'-s $deviceId shell monkey --pct-syskeys 0 -p $package 1'

Check warning on line 178 in packages/shorebird_cli/test/src/executables/adb_test.dart

View workflow job for this annotation

GitHub Actions / 🔤 Check Spelling / build

Unknown word (syskeys)
.split(' '),
),
).called(1);
});
Expand Down
Loading