summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSai Cheemalapati <saicheems@google.com>2014-07-30 10:53:29 -0700
committerSai Cheemalapati <saicheems@google.com>2014-07-31 16:32:28 +0000
commitf5d6a7cf8f7f9cb80a65ad2d70634f25191c7e95 (patch)
tree73cd00f488c4ec0335f6999f33ae46dfff690ed1
parent4720b8fb7094a11dced301023014e85e4f1731ef (diff)
downloadandroid_packages_apps_ContactsCommon-f5d6a7cf8f7f9cb80a65ad2d70634f25191c7e95.tar.gz
android_packages_apps_ContactsCommon-f5d6a7cf8f7f9cb80a65ad2d70634f25191c7e95.tar.bz2
android_packages_apps_ContactsCommon-f5d6a7cf8f7f9cb80a65ad2d70634f25191c7e95.zip
Moved analytics base files to ContactsCommon.
Allows analytics base files to be shared between GoogleDialer/ GoogleContacts. Change-Id: I35f450b8a6ec1e3feefd4523a07c333c912c7a5e
-rw-r--r--src/com/android/contacts/common/list/ContactEntryListFragment.java3
-rw-r--r--src/com/android/dialerbind/analytics/AnalyticsActivity.java25
-rw-r--r--src/com/android/dialerbind/analytics/AnalyticsFragment.java25
-rw-r--r--src/com/android/dialerbind/analytics/AnalyticsInterface.java21
-rw-r--r--src/com/android/dialerbind/analytics/AnalyticsListFragment.java25
-rw-r--r--src/com/android/dialerbind/analytics/AnalyticsPreferenceActivity.java26
6 files changed, 124 insertions, 1 deletions
diff --git a/src/com/android/contacts/common/list/ContactEntryListFragment.java b/src/com/android/contacts/common/list/ContactEntryListFragment.java
index b1f93c6b..0a60b700 100644
--- a/src/com/android/contacts/common/list/ContactEntryListFragment.java
+++ b/src/com/android/contacts/common/list/ContactEntryListFragment.java
@@ -48,6 +48,7 @@ import com.android.common.widget.CompositeCursorAdapter.Partition;
import com.android.contacts.common.ContactPhotoManager;
import com.android.contacts.common.R;
import com.android.contacts.common.preference.ContactsPreferences;
+import com.android.dialerbind.analytics.AnalyticsFragment;
import java.util.Locale;
@@ -55,7 +56,7 @@ import java.util.Locale;
* Common base class for various contact-related list fragments.
*/
public abstract class ContactEntryListFragment<T extends ContactEntryListAdapter>
- extends Fragment
+ extends AnalyticsFragment
implements OnItemClickListener, OnScrollListener, OnFocusChangeListener, OnTouchListener,
LoaderCallbacks<Cursor> {
private static final String TAG = "ContactEntryListFragment";
diff --git a/src/com/android/dialerbind/analytics/AnalyticsActivity.java b/src/com/android/dialerbind/analytics/AnalyticsActivity.java
new file mode 100644
index 00000000..dece6d3c
--- /dev/null
+++ b/src/com/android/dialerbind/analytics/AnalyticsActivity.java
@@ -0,0 +1,25 @@
+/*
+ * 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.Activity;
+
+public abstract class AnalyticsActivity extends Activity implements AnalyticsInterface {
+ @Override
+ public void sendHitEvent(String categoryId, String actionId, String labelId) {
+ }
+}
diff --git a/src/com/android/dialerbind/analytics/AnalyticsFragment.java b/src/com/android/dialerbind/analytics/AnalyticsFragment.java
new file mode 100644
index 00000000..548f5031
--- /dev/null
+++ b/src/com/android/dialerbind/analytics/AnalyticsFragment.java
@@ -0,0 +1,25 @@
+/*
+ * 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.Fragment;
+
+public abstract class AnalyticsFragment extends Fragment implements AnalyticsInterface {
+ @Override
+ public void sendHitEvent(String categoryId, String actionId, String labelId) {
+ }
+}
diff --git a/src/com/android/dialerbind/analytics/AnalyticsInterface.java b/src/com/android/dialerbind/analytics/AnalyticsInterface.java
new file mode 100644
index 00000000..d5f7b715
--- /dev/null
+++ b/src/com/android/dialerbind/analytics/AnalyticsInterface.java
@@ -0,0 +1,21 @@
+/*
+ * 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;
+
+public interface AnalyticsInterface {
+ void sendHitEvent(String categoryId, String actionId, String labelId);
+}
diff --git a/src/com/android/dialerbind/analytics/AnalyticsListFragment.java b/src/com/android/dialerbind/analytics/AnalyticsListFragment.java
new file mode 100644
index 00000000..a7bee948
--- /dev/null
+++ b/src/com/android/dialerbind/analytics/AnalyticsListFragment.java
@@ -0,0 +1,25 @@
+/*
+ * 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.ListFragment;
+
+public abstract class AnalyticsListFragment extends ListFragment implements AnalyticsInterface {
+ @Override
+ public void sendHitEvent(String categoryId, String actionId, String labelId) {
+ }
+}
diff --git a/src/com/android/dialerbind/analytics/AnalyticsPreferenceActivity.java b/src/com/android/dialerbind/analytics/AnalyticsPreferenceActivity.java
new file mode 100644
index 00000000..afbe879c
--- /dev/null
+++ b/src/com/android/dialerbind/analytics/AnalyticsPreferenceActivity.java
@@ -0,0 +1,26 @@
+/*
+ * 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.preference.PreferenceActivity;
+
+public abstract class AnalyticsPreferenceActivity extends PreferenceActivity
+ implements AnalyticsInterface {
+ @Override
+ public void sendHitEvent(String categoryId, String actionId, String labelId) {
+ }
+}