summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Bookatz <bookatz@google.com> 2018-09-04 13:21:17 -0700
committer Bookatz <bookatz@google.com> 2018-12-04 15:59:44 -0800
commitb47bb25f08af84b8088d188091564e8914ffdae0 (patch)
treeab7b3eed06ebcc8d53a413ada8cfedc08ba74f6e
parentb6005f9ee9eabdad7fdb0d082caee9e92006c92e (diff)
StatsManager: @Deprecated always-deprecated fields
When P shipped, StatsManager had some new (introduced in P) APIs that were already deprecated but had been needed temporarily. No one should ever have used these APIs when P shipped because they already had comments instructing the reader that they were deprecated. They were not marked @Deprecated, however, so this cl does that. Fixes: 113856561 Fixes: 77648233 Test: still compiles Test: make ROBOTEST_FILTER=AnomalyConfigJobServiceTest RunSettingsRoboTests Test: gts-tradefed run gts-dev --module GtsStatsdHostTestCases Change-Id: I7c5cdc616f806b9aa5a5e4ee4229750973f533ed
-rw-r--r--core/java/android/app/StatsManager.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/app/StatsManager.java b/core/java/android/app/StatsManager.java
index 32fc0dcebbc8..9dcd1228522b 100644
--- a/core/java/android/app/StatsManager.java
+++ b/core/java/android/app/StatsManager.java
@@ -119,6 +119,7 @@ public final class StatsManager {
/**
* @deprecated Use {@link #addConfig(long, byte[])}
*/
+ @Deprecated
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
public boolean addConfiguration(long configKey, byte[] config) {
try {
@@ -154,6 +155,7 @@ public final class StatsManager {
/**
* @deprecated Use {@link #removeConfig(long)}
*/
+ @Deprecated
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
public boolean removeConfiguration(long configKey) {
try {
@@ -222,6 +224,7 @@ public final class StatsManager {
/**
* @deprecated Use {@link #setBroadcastSubscriber(PendingIntent, long, long)}
*/
+ @Deprecated
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
public boolean setBroadcastSubscriber(
long configKey, long subscriberId, PendingIntent pendingIntent) {
@@ -275,6 +278,7 @@ public final class StatsManager {
/**
* @deprecated Use {@link #setFetchReportsOperation(PendingIntent, long)}
*/
+ @Deprecated
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
public boolean setDataFetchOperation(long configKey, PendingIntent pendingIntent) {
try {
@@ -312,6 +316,7 @@ public final class StatsManager {
/**
* @deprecated Use {@link #getReports(long)}
*/
+ @Deprecated
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
public @Nullable byte[] getData(long configKey) {
try {
@@ -348,6 +353,7 @@ public final class StatsManager {
/**
* @deprecated Use {@link #getStatsMetadata()}
*/
+ @Deprecated
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
public @Nullable byte[] getMetadata() {
try {