Class ShadowUsageStatsManager.UsageSessionObserver

java.lang.Object
org.robolectric.shadows.ShadowUsageStatsManager.UsageSessionObserver
Enclosing class:
ShadowUsageStatsManager

public abstract static class ShadowUsageStatsManager.UsageSessionObserver extends Object
Usage session observer registered via UsageStatsManager#registerUsageSessionObserver(int, String[], long, TimeUnit, long, TimeUnit, PendingIntent, PendingIntent).
  • Constructor Details

    • UsageSessionObserver

      public UsageSessionObserver()
  • Method Details

    • build

      public static ShadowUsageStatsManager.UsageSessionObserver build(int observerId, List<String> packageNames, Duration sessionStepDuration, Duration thresholdDuration, PendingIntent sessionStepTriggeredIntent, PendingIntent sessionEndedIntent)
    • getObserverId

      public abstract int getObserverId()
    • getPackageNames

      public abstract com.google.common.collect.ImmutableList<String> getPackageNames()
    • getSessionStepDuration

      public abstract Duration getSessionStepDuration()
    • getThresholdDuration

      public abstract Duration getThresholdDuration()
    • getSessionStepTriggeredIntent

      public abstract PendingIntent getSessionStepTriggeredIntent()
    • getSessionEndedIntent

      public abstract PendingIntent getSessionEndedIntent()