package com.facebook.appevents.internal;

import com.tencent.matrix.trace.core.AppMethodBeat;
import org.xwalk.core.XWalkFeature;

class ActivityLifecycleTracker$3 implements Runnable {
    final /* synthetic */ String val$activityName;
    final /* synthetic */ long val$currentTime;

    ActivityLifecycleTracker$3(long j, String str) {
        this.val$currentTime = j;
        this.val$activityName = str;
    }

    public final void run() {
        AppMethodBeat.i(72141);
        if (ActivityLifecycleTracker.access$200() == null) {
            ActivityLifecycleTracker.access$202(new SessionInfo(Long.valueOf(this.val$currentTime), null));
            SessionLogger.logActivateApp(this.val$activityName, null, ActivityLifecycleTracker.access$300());
        } else if (ActivityLifecycleTracker.access$200().getSessionLastEventTime() != null) {
            long longValue = this.val$currentTime - ActivityLifecycleTracker.access$200().getSessionLastEventTime().longValue();
            if (longValue > ((long) (ActivityLifecycleTracker.access$400() * XWalkFeature.INTERFACE_GEO_LOCATION_PERMISSION))) {
                SessionLogger.logDeactivateApp(this.val$activityName, ActivityLifecycleTracker.access$200(), ActivityLifecycleTracker.access$300());
                SessionLogger.logActivateApp(this.val$activityName, null, ActivityLifecycleTracker.access$300());
                ActivityLifecycleTracker.access$202(new SessionInfo(Long.valueOf(this.val$currentTime), null));
            } else if (longValue > 1000) {
                ActivityLifecycleTracker.access$200().incrementInterruptionCount();
            }
        }
        ActivityLifecycleTracker.access$200().setSessionLastEventTime(Long.valueOf(this.val$currentTime));
        ActivityLifecycleTracker.access$200().writeSessionToDisk();
        AppMethodBeat.o(72141);
    }
}
