dtmilano / AndroidViewClient

Android ViewServer and ADB client
Apache License 2.0
1.61k stars 344 forks source link

taksSnapshot rotation error on Xiaomi1 #128

Closed codeskyblue closed 9 years ago

codeskyblue commented 9 years ago

the orientation should be 1, but got -1

This code works fine on Xiaomi1

    patten = re.compile('SurfaceOrientation:\s+(\d+)')
    output = self.adbshell('dumpsys', 'input')
    match = patten.search(output)
    if match:
        return int(match.group(1))