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 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 from StatsManager#getReports().
    • setStatsMetadata

      public static void setStatsMetadata(byte[] metadata)
      Sets the statsd metadata that the shadow should return from StatsManager.getStatsMetadata().
    • getConfigData

      public static byte[] getConfigData(long configKey)
      Retrieves the statsd configurations stored in the shadow as a result of StatsManager#addConfig() and StatsManager#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)