Class ShadowSystemHealthManager

java.lang.Object
org.robolectric.shadows.ShadowSystemHealthManager

@Implements(value=android.os.health.SystemHealthManager.class, minSdk=24) public class ShadowSystemHealthManager extends Object
  • Constructor Details

    • ShadowSystemHealthManager

      public ShadowSystemHealthManager()
  • Method Details

    • takeMyUidSnapshot

      @Implementation protected HealthStats takeMyUidSnapshot()
    • takeUidSnapshot

      @Implementation protected HealthStats takeUidSnapshot(int uid)
    • takeUidSnapshots

      @Implementation protected HealthStats[] takeUidSnapshots(int[] uids)
    • addHealthStatsForUid

      public void addHealthStatsForUid(int uid, HealthStats stats)
      Add HealthStats for the given UID. Calling SystemHealthManager.takeUidSnapshot(int) with the given UID will return this HealthStats object.
    • addHealthStats

      public void addHealthStats(HealthStats stats)
      The same as addHealthStatsForUid(android.os.Process.myUid(), stats).