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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConfig(long configKey, byte[] config) static voidaddReportData(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 voidremoveConfig(long configKey) static voidreset()static voidsetStatsMetadata(byte[] metadata) Sets the statsd metadata that the shadow should return fromStatsManager.getStatsMetadata().
-
Constructor Details
-
ShadowStatsManager
public ShadowStatsManager()
-
-
Method Details
-
reset
@Resetter public static void 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
@Implementation protected byte[] getReports(long configKey) -
getStatsMetadata
@Implementation protected byte[] getStatsMetadata() -
addConfig
@Implementation protected void addConfig(long configKey, byte[] config) -
removeConfig
@Implementation protected void removeConfig(long configKey)
-