Index: tools/telemetry/telemetry/internal/platform/android_platform_backend.py |
diff --git a/tools/telemetry/telemetry/internal/platform/android_platform_backend.py b/tools/telemetry/telemetry/internal/platform/android_platform_backend.py |
index a9ddab3759b0a580635fc4348b1c1056d4af730c..124d9b969bdad55c1fdccd82892fbfb03f5ccf25 100644 |
--- a/tools/telemetry/telemetry/internal/platform/android_platform_backend.py |
+++ b/tools/telemetry/telemetry/internal/platform/android_platform_backend.py |
@@ -35,6 +35,8 @@ import adb_install_cert |
import certutils |
import platformsettings |
+from devil.android.sdk import version_codes |
+ |
from pylib import constants |
from pylib import screenshot |
from pylib.device import battery_utils |
@@ -443,10 +445,7 @@ class AndroidPlatformBackend( |
return self._power_monitor.StopMonitoringPower() |
def CanMonitorNetworkData(self): |
- if (self._device.build_version_sdk < |
- constants.ANDROID_SDK_VERSION_CODES.LOLLIPOP): |
- return False |
- return True |
+ return self._device.build_version_sdk >= version_codes.LOLLIPOP |
def GetNetworkData(self, browser): |
return self._battery.GetNetworkData(browser._browser_backend.package) |