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

Don't attempt shutting down adb on exit if not started #88865

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all 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
2 changes: 1 addition & 1 deletion platform/android/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ void EditorExportPlatformAndroid::_check_for_changes_poll_thread(void *ud) {
}
}

if (EDITOR_GET("export/android/shutdown_adb_on_exit")) {
if (ea->has_runnable_preset.is_set() && EDITOR_GET("export/android/shutdown_adb_on_exit")) {
String adb = get_adb_path();
if (!FileAccess::exists(adb)) {
Copy link
Member

@KoBeWi KoBeWi Feb 26, 2024

Choose a reason for hiding this comment

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

You could add the preset check here, it would be more consistent with the check for device updates above.

EDIT:
I mean this

Suggested change
if (!FileAccess::exists(adb)) {
if (!ea->has_runnable_preset.is_set() || !FileAccess::exists(adb)) {

Copy link
Member Author

@akien-mga akien-mga Feb 26, 2024

Choose a reason for hiding this comment

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

True, but there's no point querying the editor setting or getting the adb path if we'll skip using it.

return; //adb not configured
Expand Down
Loading