Skip to content

Commit

Permalink
Use the existing property for fastboot mode instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
xpconanfan committed Apr 20, 2023
1 parent e92e594 commit beb2f22
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions mobly/controllers/android_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,10 +874,6 @@ def is_emulator(self):
else:
return False

@property
def is_fastboot(self):
return self.serial in list_fastboot_devices()

def load_config(self, config):
"""Add attributes to the AndroidDevice object based on config.
Expand Down
2 changes: 1 addition & 1 deletion mobly/controllers/android_device_lib/services/logcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def start(self):
The collection runs in a separate subprocess and saves logs in a file.
"""
if self._ad.is_fastboot:
if self._ad.is_bootloader:
self._ad.log.warning(
'Skip starting logcat because the device is in fastboot mode.')
return
Expand Down
2 changes: 1 addition & 1 deletion tests/mobly/controllers/android_device_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ def test_AndroidDevice_is_emulator_when_emulator_serial(
return_value='1')
def test_AndroidDevice_is_fastboot(self, _, MockFastboot, MockAdbProxy):
ad = android_device.AndroidDevice(serial='1')
self.assertTrue(ad.is_fastboot)
self.assertTrue(ad.is_bootloader)

@mock.patch('mobly.controllers.android_device_lib.adb.AdbProxy',
return_value=mock_android_device.MockAdbProxy('1'))
Expand Down

0 comments on commit beb2f22

Please sign in to comment.