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

Skip starting logcat service for fastboot devices #874

Closed
wants to merge 1 commit into from

Conversation

SurajH1
Copy link

@SurajH1 SurajH1 commented Mar 13, 2023

This change is Reviewable

Copy link
Collaborator

@xpconanfan xpconanfan left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @SurajH1)


mobly/controllers/android_device.py line 119 at r1 (raw file):

  for serial in list_fastboot_devices():
    try:
      device = get_devices(ads, serial=serial)[0]

You shouldn't do this as it's instantiating some devices twice.
It should be doable by simply checking the serials?

@SurajH1
Copy link
Author

SurajH1 commented Mar 14, 2023

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @SurajH1)

mobly/controllers/android_device.py line 119 at r1 (raw file):

  for serial in list_fastboot_devices():
    try:
      device = get_devices(ads, serial=serial)[0]

You shouldn't do this as it's instantiating some devices twice. It should be doable by simply checking the serials?

Are you referring to get_devices? get_devices is just going through the list of devices and returning which ones have the serial specified by checking the attribute of the device. This would be the same as checking serials.

@xpconanfan
Copy link
Collaborator

I have uploaded a different solution for this
#881

It adds the API needed for other services to check this.

@xpconanfan
Copy link
Collaborator

Closing as this is fixed by #881

@xpconanfan xpconanfan closed this Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants