| Index: build/android/pylib/android_commands.py
|
| diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
|
| index 960f2ae96381370eaf49be6c87a4e6589b5c5616..f7264b091a645c48865743102697ffb9da32c9b6 100644
|
| --- a/build/android/pylib/android_commands.py
|
| +++ b/build/android/pylib/android_commands.py
|
| @@ -1357,10 +1357,14 @@ class AndroidCommands(object):
|
| return '\n'.join(iphone_sub)
|
|
|
| def GetBatteryInfo(self):
|
| - """Returns the device battery info (e.g. status, level, etc) as string."""
|
| + """Returns a {str: str} dict of battery info (e.g. status, level, etc)."""
|
| battery = self.RunShellCommand('dumpsys battery')
|
| assert battery
|
| - return '\n'.join(battery)
|
| + battery_info = {}
|
| + for line in battery[1:]:
|
| + k, _, v = line.partition(': ')
|
| + battery_info[k.strip()] = v.strip()
|
| + return battery_info
|
|
|
| def GetSetupWizardStatus(self):
|
| """Returns the status of the device setup wizard (e.g. DISABLED)."""
|
|
|