ActivityMonitor

This commit is contained in:
Milos Kozak 2019-10-17 21:35:50 +02:00
parent 3a16339516
commit 2365be851f
2 changed files with 5 additions and 5 deletions

View file

@ -51,7 +51,7 @@ import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin;
import info.nightscout.androidaps.plugins.general.persistentNotification.PersistentNotificationPlugin;
import info.nightscout.androidaps.plugins.general.signatureVerifier.SignatureVerifier;
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin;
import info.nightscout.androidaps.plugins.general.timeSpent.TS;
import info.nightscout.androidaps.utils.ActivityMonitor;
import info.nightscout.androidaps.plugins.general.versionChecker.VersionCheckerPlugin;
import info.nightscout.androidaps.plugins.general.wear.WearPlugin;
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatuslinePlugin;
@ -139,7 +139,7 @@ public class MainApp extends Application {
log.error("Error with Fabric init! " + e);
}
registerActivityLifecycleCallbacks(TS.INSTANCE);
registerActivityLifecycleCallbacks(ActivityMonitor.INSTANCE);
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
mFirebaseAnalytics.setAnalyticsCollectionEnabled(!Boolean.getBoolean("disableFirebase"));
@ -441,7 +441,7 @@ public class MainApp extends Application {
if (timeDateOrTZChangeReceiver != null) {
unregisterReceiver(timeDateOrTZChangeReceiver);
}
unregisterActivityLifecycleCallbacks(TS.INSTANCE);
unregisterActivityLifecycleCallbacks(ActivityMonitor.INSTANCE);
}
public static int dpToPx(int dp) {

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.general.timeSpent
package info.nightscout.androidaps.utils
import android.app.Activity
import android.app.Application
@ -6,7 +6,7 @@ import android.os.Bundle
import info.nightscout.androidaps.logging.L
import org.slf4j.LoggerFactory
object TS : Application.ActivityLifecycleCallbacks {
object ActivityMonitor : Application.ActivityLifecycleCallbacks {
private val log = LoggerFactory.getLogger(L.CORE)
override fun onActivityPaused(activity: Activity?) {
log.debug("onActivityPaused " + activity?.localClassName)