summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/DialtactsActivity.java8
-rw-r--r--src/com/android/dialer/calllog/CallLogActivity.java7
-rw-r--r--src/com/android/dialer/list/ListsFragment.java5
-rw-r--r--src/com/android/dialer/logging/ScreenTagConstants.java73
4 files changed, 7 insertions, 86 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index b6cf754b7..b4dd6c9c8 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -82,7 +82,6 @@ import com.android.dialer.list.SearchFragment;
import com.android.dialer.list.SmartDialSearchFragment;
import com.android.dialer.list.SpeedDialFragment;
import com.android.dialer.logging.Logger;
-import com.android.dialer.logging.ScreenTagConstants;
import com.android.dialer.settings.DialerSettingsActivity;
import com.android.dialer.util.DialerUtils;
import com.android.dialer.util.IntentUtil;
@@ -528,8 +527,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
// This is only called when the activity goes from resumed -> paused -> resumed, so it
// will not cause an extra view to be sent out on rotation
if (mIsDialpadShown) {
- Logger.logScreenView(ScreenTagConstants.DIALPAD, this,
- ScreenTagConstants.DIALPAD_DIALER);
+ Logger.logFragmentView(mDialpadFragment);
}
mIsRestarting = false;
}
@@ -684,7 +682,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
ImportExportDialogFragment.show(getFragmentManager(), true,
DialtactsActivity.class, ImportExportDialogFragment.EXPORT_MODE_DEFAULT);
}
- Logger.logScreenView(ScreenTagConstants.IMPORT_EXPORT_CONTACTS, this, null);
return true;
case R.id.menu_clear_frequents:
ClearFrequentsDialog.show(getFragmentManager());
@@ -747,8 +744,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
mDialpadFragment.setAnimate(animate);
// logScreenView is used here explicitly to provide the activity as the DialpadFragment
// might not have been attached yet.
- Logger.logScreenView(ScreenTagConstants.DIALPAD, this,
- ScreenTagConstants.DIALPAD_DIALER);
+ Logger.logScreenView(DialpadFragment.class.getSimpleName(), this, null);
ft.commit();
if (animate) {
diff --git a/src/com/android/dialer/calllog/CallLogActivity.java b/src/com/android/dialer/calllog/CallLogActivity.java
index fb1a4fb0f..f6defcfd9 100644
--- a/src/com/android/dialer/calllog/CallLogActivity.java
+++ b/src/com/android/dialer/calllog/CallLogActivity.java
@@ -41,7 +41,6 @@ import com.android.dialer.DialtactsActivity;
import com.android.dialer.R;
import com.android.dialer.TransactionSafeActivity;
import com.android.dialer.logging.Logger;
-import com.android.dialer.logging.ScreenTagConstants;
import com.android.dialer.util.DialerUtils;
public class CallLogActivity extends TransactionSafeActivity implements ViewPager.OnPageChangeListener {
@@ -224,7 +223,7 @@ public class CallLogActivity extends TransactionSafeActivity implements ViewPage
}
private void sendScreenViewForChildFragment(int position) {
- Logger.logScreenView(ScreenTagConstants.CALL_LOG, this,
+ Logger.logScreenView(CallLogFragment.class.getSimpleName(), this,
getFragmentTagForPosition(position));
}
@@ -235,9 +234,9 @@ public class CallLogActivity extends TransactionSafeActivity implements ViewPage
private String getFragmentTagForPosition(int position) {
switch (position) {
case TAB_INDEX_ALL:
- return ScreenTagConstants.CALL_LOG_ALL;
+ return "All";
case TAB_INDEX_MISSED:
- return ScreenTagConstants.CALL_LOG_MISSED;
+ return "Missed";
}
return null;
}
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java
index c4f4b138b..4735926e8 100644
--- a/src/com/android/dialer/list/ListsFragment.java
+++ b/src/com/android/dialer/list/ListsFragment.java
@@ -38,7 +38,6 @@ import com.android.dialer.R;
import com.android.dialer.calllog.CallLogFragment;
import com.android.dialer.calllog.CallLogQueryHandler;
import com.android.dialer.logging.Logger;
-import com.android.dialer.logging.ScreenTagConstants;
import com.android.dialer.util.DialerUtils;
import com.android.dialer.voicemail.VisualVoicemailEnabledChecker;
import com.android.dialer.voicemail.VoicemailStatusHelper;
@@ -402,14 +401,14 @@ public class ListsFragment extends Fragment
break;
case TAB_INDEX_HISTORY:
fragmentName = CallLogFragment.class.getSimpleName();
- tag = ScreenTagConstants.CALL_LOG_HISTORY;
+ tag = "History";
break;
case TAB_INDEX_ALL_CONTACTS:
fragmentName = AllContactsFragment.class.getSimpleName();
break;
case TAB_INDEX_VOICEMAIL:
fragmentName = CallLogFragment.class.getSimpleName();
- tag = ScreenTagConstants.CALL_LOG_VOICEMAIL;
+ tag = "Voicemail";
default:
return;
}
diff --git a/src/com/android/dialer/logging/ScreenTagConstants.java b/src/com/android/dialer/logging/ScreenTagConstants.java
deleted file mode 100644
index 5175cc56f..000000000
--- a/src/com/android/dialer/logging/ScreenTagConstants.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2015 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.dialer.logging;
-
-import com.google.android.dialer.settings.GoogleDialerSettingsActivity;
-
-import com.android.contacts.common.dialog.ClearFrequentsDialog;
-import com.android.contacts.common.interactions.ImportExportDialogFragment;
-import com.android.dialer.calllog.CallLogFragment;
-import com.android.dialer.dialpad.DialpadFragment;
-import com.android.dialer.list.AllContactsFragment;
-import com.android.dialer.list.RegularSearchFragment;
-import com.android.dialer.list.SmartDialSearchFragment;
-import com.android.dialer.list.SpeedDialFragment;
-import com.android.incallui.AnswerFragment;
-import com.android.incallui.CallCardFragment;
-import com.android.incallui.ConferenceManagerFragment;
-
-/**
- * Central repository of all string constants used to identify screens/fragments/dialogs for
- * logging purposes.
- */
-public class ScreenTagConstants {
- /**
- * Unique identifiers for each screen that is displayed in the Dialer
- */
- public static final String DIALPAD = DialpadFragment.class.getSimpleName();
- public static final String SPEED_DIAL = SpeedDialFragment.class.getSimpleName();
- public static final String CALL_LOG = CallLogFragment.class.getSimpleName();
- public static final String ALL_CONTACTS = AllContactsFragment.class.getSimpleName();
- public static final String REGULAR_SEARCH = RegularSearchFragment.class.getSimpleName();
- public static final String SMART_DIAL_SEARCH = SmartDialSearchFragment.class.getSimpleName();
- public static final String SETTINGS = GoogleDialerSettingsActivity.class.getSimpleName();
- public static final String IMPORT_EXPORT_CONTACTS =
- ImportExportDialogFragment.class.getSimpleName();
- public static final String CLEAR_FREQUENTS = ClearFrequentsDialog.class.getSimpleName();
- public static final String SEND_FEEDBACK = "SendFeedback";
- public static final String INCALL = CallCardFragment.class.getSimpleName();
- public static final String INCOMING_CALL = AnswerFragment.class.getSimpleName();
- public static final String CONFERENCE_MANAGEMENT =
- ConferenceManagerFragment.class.getSimpleName();
-
- /**
- * Additional constants that allow disambiguation between similar fragments in different
- * activities.
- */
- // The dialpad in DialtactsActivity
- public static final String DIALPAD_DIALER = "Dialer";
- // The dialpad in InCallActivity
- public static final String DIALPAD_INCALL = "InCall";
-
- // The HISTORY tab in DialtactsActivity
- public static final String CALL_LOG_HISTORY = "History";
- // The VOICEMAIL tab in DialtactsActivity
- public static final String CALL_LOG_VOICEMAIL = "Voicemail";
- // The ALL tab in CallLogActivity
- public static final String CALL_LOG_ALL = "All";
- // The MISSED tab in CallLogActivity
- public static final String CALL_LOG_MISSED = "Missed";
-}