summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-11-10 10:06:21 -0800
committerYorke Lee <yorkelee@google.com>2015-11-10 11:39:15 -0800
commitf96bb18b904dada96002cb72d862097ae344db57 (patch)
tree819dc9bd68bcfb15ca91d2b03d340eeafcb9b49e
parent91d04a78693c626783f6bb587a8180ab6cfbbc70 (diff)
Log screen events for blocked call fragments
* Add blocked number screen types to Logger * Log screen views for SearchFragments in DialtactsActivity rather than in onStart, to avoid double logging for some fragments (e.g. children of RegularSearchFragment) * Log screen view for call log context menu (where the block number action appears Bug: 25288435 Change-Id: I4ebf1410f93afb37d20be2cc57f933e5d635cfb6
-rw-r--r--src/com/android/dialer/DialtactsActivity.java6
-rw-r--r--src/com/android/dialer/calllog/CallLogListItemViewHolder.java6
-rw-r--r--src/com/android/dialer/filterednumber/BlockedNumbersSettingsActivity.java6
-rw-r--r--src/com/android/dialer/list/RegularSearchFragment.java6
-rw-r--r--src/com/android/dialer/list/SmartDialSearchFragment.java6
-rw-r--r--src/com/android/dialer/logging/ScreenEvent.java18
6 files changed, 34 insertions, 14 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index cc457bd6c..6de1fdc13 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -1053,6 +1053,12 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
mListsFragment.getView().animate().alpha(0).withLayer();
}
mListsFragment.setUserVisibleHint(false);
+
+ if (smartDialSearch) {
+ Logger.logScreenView(ScreenEvent.SMART_DIAL_SEARCH, this);
+ } else {
+ Logger.logScreenView(ScreenEvent.REGULAR_SEARCH, this);
+ }
}
/**
diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
index 89596f2e1..8102a0571 100644
--- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
+++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
@@ -50,6 +50,8 @@ import com.android.dialer.R;
import com.android.dialer.database.FilteredNumberAsyncQueryHandler;
import com.android.dialer.filterednumber.BlockNumberDialogFragment;
import com.android.dialer.filterednumber.FilteredNumbersUtil;
+import com.android.dialer.logging.Logger;
+import com.android.dialer.logging.ScreenEvent;
import com.android.dialer.util.DialerUtils;
import com.android.dialer.util.PhoneNumberUtil;
import com.android.dialer.voicemail.VoicemailPlaybackPresenter;
@@ -321,6 +323,8 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
}
}, number, countryIso);
}
+
+ Logger.logScreenView(ScreenEvent.CALL_LOG_CONTEXT_MENU, (Activity) mContext);
}
@Override
@@ -362,7 +366,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder
public void inflateActionViewStub() {
ViewStub stub = (ViewStub) rootView.findViewById(R.id.call_log_entry_actions_stub);
if (stub != null) {
- actionsView = (ViewGroup) stub.inflate();
+ actionsView = stub.inflate();
voicemailPlaybackView = (VoicemailPlaybackLayout) actionsView
.findViewById(R.id.voicemail_playback_layout);
diff --git a/src/com/android/dialer/filterednumber/BlockedNumbersSettingsActivity.java b/src/com/android/dialer/filterednumber/BlockedNumbersSettingsActivity.java
index 1735ce543..5ce9d21f1 100644
--- a/src/com/android/dialer/filterednumber/BlockedNumbersSettingsActivity.java
+++ b/src/com/android/dialer/filterednumber/BlockedNumbersSettingsActivity.java
@@ -36,6 +36,8 @@ import com.android.dialer.list.BlockedListSearchAdapter;
import com.android.dialer.list.OnListFragmentScrolledListener;
import com.android.dialer.list.BlockedListSearchFragment;
import com.android.dialer.list.SearchFragment;
+import com.android.dialer.logging.Logger;
+import com.android.dialer.logging.ScreenEvent;
public class BlockedNumbersSettingsActivity extends AppCompatActivity
implements SearchFragment.HostInterface {
@@ -69,6 +71,8 @@ public class BlockedNumbersSettingsActivity extends AppCompatActivity
.replace(R.id.blocked_numbers_activity_container, fragment,
TAG_BLOCKED_MANAGEMENT_FRAGMENT)
.commit();
+
+ Logger.logScreenView(ScreenEvent.BLOCKED_NUMBER_MANAGEMENT, this);
}
/**
@@ -89,6 +93,8 @@ public class BlockedNumbersSettingsActivity extends AppCompatActivity
TAG_BLOCKED_SEARCH_FRAGMENT)
.addToBackStack(null)
.commit();
+
+ Logger.logScreenView(ScreenEvent.BLOCKED_NUMBER_ADD_NUMBER, this);
}
/**
diff --git a/src/com/android/dialer/list/RegularSearchFragment.java b/src/com/android/dialer/list/RegularSearchFragment.java
index 3acf967a1..30b01c091 100644
--- a/src/com/android/dialer/list/RegularSearchFragment.java
+++ b/src/com/android/dialer/list/RegularSearchFragment.java
@@ -56,12 +56,6 @@ public class RegularSearchFragment extends SearchFragment
configureDirectorySearch();
}
- @Override
- public void onStart() {
- super.onStart();
- Logger.logScreenView(ScreenEvent.REGULAR_SEARCH, getActivity());
- }
-
public void configureDirectorySearch() {
setDirectorySearchEnabled(true);
setDirectoryResultLimit(SEARCH_DIRECTORY_RESULT_LIMIT);
diff --git a/src/com/android/dialer/list/SmartDialSearchFragment.java b/src/com/android/dialer/list/SmartDialSearchFragment.java
index ee76a1319..a230e6e66 100644
--- a/src/com/android/dialer/list/SmartDialSearchFragment.java
+++ b/src/com/android/dialer/list/SmartDialSearchFragment.java
@@ -45,12 +45,6 @@ public class SmartDialSearchFragment extends SearchFragment
private static final int CALL_PHONE_PERMISSION_REQUEST_CODE = 1;
- @Override
- public void onStart() {
- super.onStart();
- Logger.logScreenView(ScreenEvent.SMART_DIAL_SEARCH, getActivity());
- }
-
/**
* Creates a SmartDialListAdapter to display and operate on search results.
*/
diff --git a/src/com/android/dialer/logging/ScreenEvent.java b/src/com/android/dialer/logging/ScreenEvent.java
index 7af3f6eb8..e0d7b0026 100644
--- a/src/com/android/dialer/logging/ScreenEvent.java
+++ b/src/com/android/dialer/logging/ScreenEvent.java
@@ -21,7 +21,9 @@ 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.filterednumber.BlockedNumbersFragment;
import com.android.dialer.list.AllContactsFragment;
+import com.android.dialer.list.BlockedListSearchFragment;
import com.android.dialer.list.RegularSearchFragment;
import com.android.dialer.list.SmartDialSearchFragment;
import com.android.dialer.list.SpeedDialFragment;
@@ -95,6 +97,16 @@ public class ScreenEvent {
// The dialpad displayed in-call that is used to send dtmf tones.
public static final int INCALL_DIALPAD = 16;
+ // Menu options displayed when long pressing on a call log entry.
+ public static final int CALL_LOG_CONTEXT_MENU = 17;
+
+ // Screen displayed to allow the user to see an overview of all blocked
+ // numbers.
+ public static final int BLOCKED_NUMBER_MANAGEMENT = 18;
+
+ // Screen displayed to allow the user to add a new blocked number.
+ public static final int BLOCKED_NUMBER_ADD_NUMBER = 19;
+
static {
sScreenNameMap.put(ScreenEvent.DIALPAD,
getScreenNameWithTag(DialpadFragment.class.getSimpleName(), "Dialer"));
@@ -123,7 +135,11 @@ public class ScreenEvent {
ConferenceManagerFragment.class.getSimpleName());
sScreenNameMap.put(ScreenEvent.INCALL_DIALPAD,
getScreenNameWithTag(DialpadFragment.class.getSimpleName(), "InCall"));
-
+ sScreenNameMap.put(ScreenEvent.CALL_LOG_CONTEXT_MENU, "CallLogContextMenu");
+ sScreenNameMap.put(ScreenEvent.BLOCKED_NUMBER_MANAGEMENT,
+ BlockedNumbersFragment.class.getSimpleName());
+ sScreenNameMap.put(ScreenEvent.BLOCKED_NUMBER_ADD_NUMBER,
+ BlockedListSearchFragment.class.getSimpleName());
}
/**