summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherApplication.java
diff options
context:
space:
mode:
authorMartin Brabham <optedoblivion@cyngn.com>2015-05-07 10:53:31 -0700
committercretin45 <cretin45@gmail.com>2016-01-04 16:24:03 -0800
commita20b046db71039ee581bb80274cf1fc450b3fd99 (patch)
tree1d3511baec094e8ea28589d5bd57411d4a11a66d /src/com/android/launcher3/LauncherApplication.java
parent2be1306db542d11c4516fb29f2adce08f4c32e7d (diff)
downloadandroid_packages_apps_Trebuchet-a20b046db71039ee581bb80274cf1fc450b3fd99.tar.gz
android_packages_apps_Trebuchet-a20b046db71039ee581bb80274cf1fc450b3fd99.tar.bz2
android_packages_apps_Trebuchet-a20b046db71039ee581bb80274cf1fc450b3fd99.zip
Trebuchet Statistics:
- Add plumbing for sending events. - Add aggregation service that runs on some interval - Hook send events into respective UX interactions Change-Id: I77ba0ab75daf845621d800e0adf3e658096926af Trebuchet: send metrics values as strings - Also refer to the declared intent Change-Id: I3c99cc071aa2f4241ea8d3e6d2e8683f1f748e7d Signed-off-by: Roman Birg <roman@cyngn.com> Stop unnecessary exception posting to logcat. Change-Id: I4f741246dc2ee77b24c3bb94075e12535fcd7ead
Diffstat (limited to 'src/com/android/launcher3/LauncherApplication.java')
-rw-r--r--src/com/android/launcher3/LauncherApplication.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/com/android/launcher3/LauncherApplication.java b/src/com/android/launcher3/LauncherApplication.java
new file mode 100644
index 000000000..0bcc3bc6c
--- /dev/null
+++ b/src/com/android/launcher3/LauncherApplication.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.launcher3;
+
+import android.app.Application;
+
+import com.android.launcher3.stats.LauncherStats;
+import com.android.launcher3.stats.internal.service.AggregationIntentService;
+
+public class LauncherApplication extends Application {
+
+ private static LauncherStats sLauncherStats = null;
+
+ /**
+ * Get the reference handle for LauncherStats commands
+ *
+ * @return {@link LauncherStats}
+ */
+ public static LauncherStats getLauncherStats() {
+ return sLauncherStats;
+ }
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ sLauncherStats = LauncherStats.createInstance(this);
+ AggregationIntentService.scheduleService(this);
+ }
+
+}