Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: build/android/pylib/device/device_utils.py

Issue 602973004: [Android] Make SetJavaAsserts return True if a restart is required. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Provides a variety of device interactions based on adb. 5 """Provides a variety of device interactions based on adb.
6 6
7 Eventually, this will be based on adb_wrapper. 7 Eventually, this will be based on adb_wrapper.
8 """ 8 """
9 # pylint: disable=W0613 9 # pylint: disable=W0613
10 10
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 @decorators.WithTimeoutAndRetriesFromInstance() 682 @decorators.WithTimeoutAndRetriesFromInstance()
683 def SetJavaAsserts(self, enabled, timeout=None, retries=None): 683 def SetJavaAsserts(self, enabled, timeout=None, retries=None):
684 """Enables or disables Java asserts. 684 """Enables or disables Java asserts.
685 685
686 Args: 686 Args:
687 enabled: A boolean indicating whether Java asserts should be enabled 687 enabled: A boolean indicating whether Java asserts should be enabled
688 or disabled. 688 or disabled.
689 timeout: timeout in seconds 689 timeout: timeout in seconds
690 retries: number of retries 690 retries: number of retries
691 691
692 Returns:
693 True if the device-side property changed and a restart is required as a
694 result, False otherwise.
695
692 Raises: 696 Raises:
693 CommandTimeoutError on timeout. 697 CommandTimeoutError on timeout.
694 """ 698 """
695 self.old_interface.SetJavaAssertsEnabled(enabled) 699 return self.old_interface.SetJavaAssertsEnabled(enabled)
696 700
697 @decorators.WithTimeoutAndRetriesFromInstance() 701 @decorators.WithTimeoutAndRetriesFromInstance()
698 def GetProp(self, property_name, timeout=None, retries=None): 702 def GetProp(self, property_name, timeout=None, retries=None):
699 """Gets a property from the device. 703 """Gets a property from the device.
700 704
701 Args: 705 Args:
702 property_name: A string containing the name of the property to get from 706 property_name: A string containing the name of the property to get from
703 the device. 707 the device.
704 timeout: timeout in seconds 708 timeout: timeout in seconds
705 retries: number of retries 709 retries: number of retries
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 A Parallelizer operating over |devices|. 863 A Parallelizer operating over |devices|.
860 """ 864 """
861 if not devices or len(devices) == 0: 865 if not devices or len(devices) == 0:
862 devices = pylib.android_commands.GetAttachedDevices() 866 devices = pylib.android_commands.GetAttachedDevices()
863 parallelizer_type = (parallelizer.Parallelizer if async 867 parallelizer_type = (parallelizer.Parallelizer if async
864 else parallelizer.SyncParallelizer) 868 else parallelizer.SyncParallelizer)
865 return parallelizer_type([ 869 return parallelizer_type([
866 d if isinstance(d, DeviceUtils) else DeviceUtils(d) 870 d if isinstance(d, DeviceUtils) else DeviceUtils(d)
867 for d in devices]) 871 for d in devices])
868 872
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698