summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSai Cheemalapati <saicheems@google.com>2014-08-06 10:30:21 -0700
committerSai Cheemalapati <saicheems@google.com>2014-08-06 11:20:47 -0700
commitbd9e50a0010ad4cfec4446d04b7553905334e49b (patch)
tree23c32b3fc1ff9094374f258902d594cd047bcdc1
parent32b5e3e5dec14f7c4bda5c64600e9b54e3d5fae1 (diff)
downloadandroid_packages_apps_ContactsCommon-bd9e50a0010ad4cfec4446d04b7553905334e49b.tar.gz
android_packages_apps_ContactsCommon-bd9e50a0010ad4cfec4446d04b7553905334e49b.tar.bz2
android_packages_apps_ContactsCommon-bd9e50a0010ad4cfec4446d04b7553905334e49b.zip
Added an analytics dialog fragment.
Added another fragment to analytics scope. ImportExportDialogFragment now reports views. Change-Id: I850e7edd7f20e54b31937c08b48851d557859bb2
-rw-r--r--src/com/android/contacts/common/interactions/ImportExportDialogFragment.java11
-rw-r--r--src/com/android/dialerbind/analytics/AnalyticsDialogFragment.java29
2 files changed, 38 insertions, 2 deletions
diff --git a/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java b/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java
index bcd00df7..8d87714b 100644
--- a/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java
+++ b/src/com/android/contacts/common/interactions/ImportExportDialogFragment.java
@@ -16,9 +16,9 @@
package com.android.contacts.common.interactions;
+import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
-import android.app.DialogFragment;
import android.app.FragmentManager;
import android.content.Context;
import android.content.DialogInterface;
@@ -45,13 +45,14 @@ import com.android.contacts.common.util.AccountSelectionUtil;
import com.android.contacts.common.util.AccountsListAdapter.AccountListFilter;
import com.android.contacts.common.vcard.ExportVCardActivity;
import com.android.contacts.common.vcard.VCardCommonArguments;
+import com.android.dialerbind.analytics.AnalyticsDialogFragment;
import java.util.List;
/**
* An dialog invoked to import/export contacts.
*/
-public class ImportExportDialogFragment extends DialogFragment
+public class ImportExportDialogFragment extends AnalyticsDialogFragment
implements SelectAccountDialogFragment.Listener {
public static final String TAG = "ImportExportDialogFragment";
@@ -74,6 +75,12 @@ public class ImportExportDialogFragment extends DialogFragment
}
@Override
+ public void onAttach(Activity activity) {
+ super.onAttach(activity);
+ sendScreenView();
+ }
+
+ @Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Wrap our context to inflate list items using the correct theme
final Resources res = getActivity().getResources();
diff --git a/src/com/android/dialerbind/analytics/AnalyticsDialogFragment.java b/src/com/android/dialerbind/analytics/AnalyticsDialogFragment.java
new file mode 100644
index 00000000..5253ff99
--- /dev/null
+++ b/src/com/android/dialerbind/analytics/AnalyticsDialogFragment.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2014 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.dialerbind.analytics;
+
+import android.app.DialogFragment;
+
+public abstract class AnalyticsDialogFragment extends DialogFragment implements AnalyticsInterface {
+ @Override
+ public void sendHitEvent(String categoryId, String actionId, String labelId) {
+ }
+
+ @Override
+ public void sendScreenView() {
+ }
+}