Marks deprecated StatsManager APIs.
Marking some API's as deprecated, so users avoid getting confused. Test: Test that build works. Bug: 80099023 Change-Id: I4b3d4e4fa1ee3d706e49b8180aa4d0ad0e7d6eeb
This commit is contained in:
@@ -384,16 +384,16 @@ package android.app {
|
||||
|
||||
public final class StatsManager {
|
||||
method public void addConfig(long, byte[]) throws android.app.StatsManager.StatsUnavailableException;
|
||||
method public boolean addConfiguration(long, byte[]);
|
||||
method public byte[] getData(long);
|
||||
method public byte[] getMetadata();
|
||||
method public deprecated boolean addConfiguration(long, byte[]);
|
||||
method public deprecated byte[] getData(long);
|
||||
method public deprecated byte[] getMetadata();
|
||||
method public byte[] getReports(long) throws android.app.StatsManager.StatsUnavailableException;
|
||||
method public byte[] getStatsMetadata() throws android.app.StatsManager.StatsUnavailableException;
|
||||
method public void removeConfig(long) throws android.app.StatsManager.StatsUnavailableException;
|
||||
method public boolean removeConfiguration(long);
|
||||
method public deprecated boolean removeConfiguration(long);
|
||||
method public void setBroadcastSubscriber(android.app.PendingIntent, long, long) throws android.app.StatsManager.StatsUnavailableException;
|
||||
method public boolean setBroadcastSubscriber(long, long, android.app.PendingIntent);
|
||||
method public boolean setDataFetchOperation(long, android.app.PendingIntent);
|
||||
method public deprecated boolean setBroadcastSubscriber(long, long, android.app.PendingIntent);
|
||||
method public deprecated boolean setDataFetchOperation(long, android.app.PendingIntent);
|
||||
method public void setFetchReportsOperation(android.app.PendingIntent, long) throws android.app.StatsManager.StatsUnavailableException;
|
||||
field public static final java.lang.String ACTION_STATSD_STARTED = "android.app.action.STATSD_STARTED";
|
||||
field public static final java.lang.String EXTRA_STATS_BROADCAST_SUBSCRIBER_COOKIES = "android.app.extra.STATS_BROADCAST_SUBSCRIBER_COOKIES";
|
||||
|
||||
@@ -115,8 +115,9 @@ public final class StatsManager {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Temporary for backwards compatibility. Remove.
|
||||
/**
|
||||
* TODO: Temporary for backwards compatibility. Remove.
|
||||
* @deprecated Use {@link #addConfig(long, byte[])}
|
||||
*/
|
||||
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
|
||||
public boolean addConfiguration(long configKey, byte[] config) {
|
||||
@@ -149,8 +150,9 @@ public final class StatsManager {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Temporary for backwards compatibility. Remove.
|
||||
/**
|
||||
* TODO: Temporary for backwards compatibility. Remove.
|
||||
* @deprecated Use {@link #removeConfig(long)}
|
||||
*/
|
||||
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
|
||||
public boolean removeConfiguration(long configKey) {
|
||||
@@ -216,8 +218,9 @@ public final class StatsManager {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Temporary for backwards compatibility. Remove.
|
||||
/**
|
||||
* TODO: Temporary for backwards compatibility. Remove.
|
||||
* @deprecated Use {@link #setBroadcastSubscriber(PendingIntent, long, long)}
|
||||
*/
|
||||
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
|
||||
public boolean setBroadcastSubscriber(
|
||||
@@ -268,8 +271,9 @@ public final class StatsManager {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Temporary for backwards compatibility. Remove.
|
||||
/**
|
||||
* TODO: Temporary for backwards compatibility. Remove.
|
||||
* @deprecated Use {@link #setFetchReportsOperation(PendingIntent, long)}
|
||||
*/
|
||||
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
|
||||
public boolean setDataFetchOperation(long configKey, PendingIntent pendingIntent) {
|
||||
@@ -304,8 +308,9 @@ public final class StatsManager {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Temporary for backwards compatibility. Remove.
|
||||
/**
|
||||
* TODO: Temporary for backwards compatibility. Remove.
|
||||
* @deprecated Use {@link #getReports(long)}
|
||||
*/
|
||||
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
|
||||
public @Nullable byte[] getData(long configKey) {
|
||||
@@ -339,12 +344,9 @@ public final class StatsManager {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Temporary for backwards compatibility. Remove.
|
||||
/**
|
||||
* Clients can request metadata for statsd. Will contain stats across all configurations but not
|
||||
* the actual metrics themselves (metrics must be collected via {@link #getReports(long)}.
|
||||
* This getter is not destructive and will not reset any metrics/counters.
|
||||
*
|
||||
* @return Serialized StatsdStatsReport proto. Returns null on failure (eg, if statsd crashed).
|
||||
* @deprecated Use {@link #getStatsMetadata()}
|
||||
*/
|
||||
@RequiresPermission(allOf = { DUMP, PACKAGE_USAGE_STATS })
|
||||
public @Nullable byte[] getMetadata() {
|
||||
|
||||
Reference in New Issue
Block a user