diff options
| author | David Chen <dwchen@google.com> | 2018-01-16 16:38:42 -0800 |
|---|---|---|
| committer | David Chen <dwchen@google.com> | 2018-01-16 18:39:05 -0800 |
| commit | 5914fa00027fa963b5b59e809bad772dff3da06d (patch) | |
| tree | 333fec9422d33d351086a31f3f39552465c8ca52 /core/java/android/util/StatsManager.java | |
| parent | fc12cc51d34e3a19a2637e0bf9151ade250c180d (diff) | |
Adds old API to StatsManager (temporary need).
We changed the API to use long-based config keys instead of strings,
but we have some code that depends on the old API. Let's add them
back temporarily. The old API (that does nothing now) will be
deleted next month.
Test: N/A. Just to prevent build failures.
Bug: 69522276
Change-Id: Ibc51622371d4f3ced3e9b2f66a862dea1ac1c63c
Diffstat (limited to 'core/java/android/util/StatsManager.java')
| -rw-r--r-- | core/java/android/util/StatsManager.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/core/java/android/util/StatsManager.java b/core/java/android/util/StatsManager.java index c25b272c11b9..e0d085cfaa66 100644 --- a/core/java/android/util/StatsManager.java +++ b/core/java/android/util/StatsManager.java @@ -42,6 +42,16 @@ public final class StatsManager { } /** + * Temporary to prevent build failures. Will be deleted. + */ + @RequiresPermission(Manifest.permission.DUMP) + public boolean addConfiguration(String configKey, byte[] config, String pkg, String cls) { + // To prevent breakages of dependencies on old API. + + return false; + } + + /** * Clients can send a configuration and simultaneously registers the name of a broadcast * receiver that listens for when it should request data. * @@ -70,6 +80,15 @@ public final class StatsManager { } /** + * Temporary to prevent build failures. Will be deleted. + */ + @RequiresPermission(Manifest.permission.DUMP) + public boolean removeConfiguration(String configKey) { + // To prevent breakages of old dependencies. + return false; + } + + /** * Remove a configuration from logging. * * @param configKey Configuration key to remove. @@ -93,6 +112,16 @@ public final class StatsManager { } /** + * Temporary to prevent build failures. Will be deleted. + */ + @RequiresPermission(Manifest.permission.DUMP) + public byte[] getData(String configKey) { + // TODO: remove this and all other methods with String-based config keys. + // To prevent build breakages of dependencies. + return null; + } + + /** * Clients can request data with a binder call. This getter is destructive and also clears * the retrieved metrics from statsd memory. * |
