MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / getProperty

Method getProperty

src/com/dtmilano/android/adb/adbclient.py:772–789  ·  view source on GitHub ↗

Gets the property value for key

(self, key, strip=True)

Source from the content-addressed store, hash-verified

770 return self.getProperty(key, strip)
771
772 def getProperty(self, key, strip=True):
773 ''' Gets the property value for key '''
774
775 self.__checkTransport()
776 import collections
777 MAP_PROPS = collections.OrderedDict([
778 (re.compile('display.width'), self.__getDisplayWidth),
779 (re.compile('display.height'), self.__getDisplayHeight),
780 (re.compile('display.density'), self.__getDisplayDensity),
781 (re.compile('display.orientation'), self.__getDisplayOrientation),
782 (re.compile('.*'), self.__getProp),
783 ])
784 '''Maps properties key values (as regexps) to instance methods to obtain its values.'''
785
786 for kre in list(MAP_PROPS.keys()):
787 if kre.match(key):
788 return MAP_PROPS[kre](key=key, strip=strip)
789 raise ValueError("key='%s' does not match any map entry")
790
791 def getSdkVersion(self):
792 '''

Callers 11

connectToDeviceOrExitMethod · 0.95
__getDisplayDensityMethod · 0.95
getSystemPropertyMethod · 0.95
initDisplayPropertiesMethod · 0.95
__init__Method · 0.45
__init__Method · 0.45
writeImageToFileMethod · 0.45
ViewClientMethod · 0.45
executeMethod · 0.45
isWindowsMethod · 0.45

Calls 1

__checkTransportMethod · 0.95

Tested by

no test coverage detected