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

Unified Diff: telemetry/telemetry/internal/platform/android_platform_backend.py

Issue 2398683006: [telemetry] Install PushAppsToBackground apk (Closed)
Patch Set: add method to test fake Created 4 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 side-by-side diff with in-line comments
Download patch
Index: telemetry/telemetry/internal/platform/android_platform_backend.py
diff --git a/telemetry/telemetry/internal/platform/android_platform_backend.py b/telemetry/telemetry/internal/platform/android_platform_backend.py
index a3f5aa74009fc0dcc7369f0fe0129889f4dd323f..5f5ad3ccfe6504c4406ec5d94dd54cfbccad7788 100644
--- a/telemetry/telemetry/internal/platform/android_platform_backend.py
+++ b/telemetry/telemetry/internal/platform/android_platform_backend.py
@@ -27,6 +27,7 @@ from telemetry.internal.platform.power_monitor import (
android_power_monitor_controller)
from telemetry.internal.platform.power_monitor import sysfs_power_monitor
from telemetry.internal.platform.profiler import android_prebuilt_profiler_helper
+from telemetry.internal.util import binary_manager
from telemetry.internal.util import external_modules
psutil = external_modules.ImportOptionalModule('psutil')
@@ -142,6 +143,9 @@ class AndroidPlatformBackend(
def device(self):
return self._device
+ def Initialize(self):
+ self.EnsureBackgroundApkInstalled()
+
def GetSystemUi(self):
if self._system_ui is None:
self._system_ui = app_ui.AppUi(self.device, 'com.android.systemui')
@@ -238,6 +242,14 @@ class AndroidPlatformBackend(
android_prebuilt_profiler_helper.GetDevicePath('memtrack_helper'),
'-d'], as_root=True, check_return=True)
+ def EnsureBackgroundApkInstalled(self):
+ app = 'push_apps_to_background_apk'
+ arch_name = self._device.GetABI()
+ host_path = binary_manager.FetchPath(app, arch_name, 'android')
+ if not host_path:
+ raise Exception('Error installing PushAppsToBackground.apk.')
+ self.InstallApplication(host_path)
+
def PurgeUnpinnedMemory(self):
"""Purges the unpinned ashmem memory for the whole system.
« no previous file with comments | « telemetry/telemetry/internal/binary_dependencies.json ('k') | telemetry/telemetry/page/shared_page_state.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698