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

Unified Diff: telemetry/telemetry/core/android_platform.py

Issue 2995713002: Add GetSharedPrefs to Android platform (Closed)
Patch Set: Address nit Created 3 years, 4 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
« no previous file with comments | « no previous file | telemetry/telemetry/internal/platform/android_platform_backend.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/core/android_platform.py
diff --git a/telemetry/telemetry/core/android_platform.py b/telemetry/telemetry/core/android_platform.py
index 0cede02e5b3e43a651eee1ad2fd56f3db419c996..3d4dae504cd019c0e101a8127ae366914113d971 100644
--- a/telemetry/telemetry/core/android_platform.py
+++ b/telemetry/telemetry/core/android_platform.py
@@ -30,6 +30,24 @@ class AndroidPlatform(platform.Platform):
"""
return self._platform_backend.GetSystemUi()
+ def GetSharedPrefs(self, package, filename):
+ """Retrieves a Devil SharedPrefs instance from the backend.
+
+ See devil.android.sdk.shared_prefs for the documentation of the returned
+ object.
+
+ Args:
+ package: A string containing the package of the app that the SharedPrefs
+ instance will be for.
+ filename: A string containing the specific settings file of the app that
+ the SharedPrefs instance will be for.
+
+ Returns:
+ A reference to a SharedPrefs object for the given package and filename
+ on whatever device this platform object refers to.
+ """
+ return self._platform_backend.GetSharedPrefs(package, filename)
+
def IsSvelte(self):
return self._platform_backend.IsSvelte()
« no previous file with comments | « no previous file | telemetry/telemetry/internal/platform/android_platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698