Android SDK Version


public class PerformanceGuardian
Avoid process activities which process time exceed threshold. Reboot the process if app version changed.
Nested Class Summary
Modifier and TypeClassDescription
public enumPerformanceGuardian.UseCase
Field Summary
Modifier and TypeFieldDescription
public final static PerformanceGuardianINSTANCE
Method Summary
Modifier and TypeMethodDescription
final static BooleanisBannedActivity(String activityName, PerformanceGuardian.UseCase useCase) Return true when current activity is banned.
final static UnitlimitProcessTime(String activityName, PerformanceGuardian.UseCase useCase, Long startTime, Long endTime) Calculate current activity process time.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Method Detail

isBannedActivity

 final static BooleanisBannedActivity(String activityName, PerformanceGuardian.UseCase useCase)
Return true when current activity is banned. Activities which process time exceed limit multiple times will be added into banned set.

limitProcessTime

 final static UnitlimitProcessTime(String activityName, PerformanceGuardian.UseCase useCase, Long startTime, Long endTime)
Calculate current activity process time. Return without action if current process time is normal. Add current activity to banned activity set if exceed activity process time threshold. Update app version.