Package org.robolectric.shadows
Class ShadowStatsManager
java.lang.Object
org.robolectric.shadows.ShadowStatsManager
@Implements(value=android.app.StatsManager.class,
isInAndroidSdk=false,
minSdk=28)
public class ShadowStatsManager
extends Object
Shadow for
StatsManager
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addConfig
(long configKey, byte[] config) static void
addReportData
(long configKey, byte[] data) Adds metrics data that the shadow should return fromStatsManager#getReports()
.static byte[]
getConfigData
(long configKey) Retrieves the statsd configurations stored in the shadow as a result ofStatsManager#addConfig()
andStatsManager#removeConfig()
.protected byte[]
getReports
(long configKey) protected byte[]
protected void
removeConfig
(long configKey) static void
reset()
static void
setStatsMetadata
(byte[] metadata) Sets the statsd metadata that the shadow should return fromStatsManager.getStatsMetadata()
.
-
Constructor Details
-
ShadowStatsManager
public ShadowStatsManager()
-
-
Method Details
-
reset
-
addReportData
public static void addReportData(long configKey, byte[] data) Adds metrics data that the shadow should return fromStatsManager#getReports()
. -
setStatsMetadata
public static void setStatsMetadata(byte[] metadata) Sets the statsd metadata that the shadow should return fromStatsManager.getStatsMetadata()
. -
getConfigData
public static byte[] getConfigData(long configKey) Retrieves the statsd configurations stored in the shadow as a result ofStatsManager#addConfig()
andStatsManager#removeConfig()
. -
getReports
-
getStatsMetadata
-
addConfig
-
removeConfig
-