diff options
author | Yorke Lee <yorkelee@google.com> | 2015-11-11 23:55:20 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-11-11 23:55:20 +0000 |
commit | 03a38606894ffe68e4c71ee09f9136f8c66066fd (patch) | |
tree | cf02ac41023cd8c7ba8588cf98357101d7b5ba60 | |
parent | 613a5a2261f3e40f8ae8ac42af5c996ba4632cc1 (diff) | |
parent | 5358ca6a9128971a046605413358486241f93379 (diff) |
Merge "Log screen events for blocked call fragments" into ub-contactsdialer-a-dev
am: 5358ca6a91
* commit '5358ca6a9128971a046605413358486241f93379':
Log screen events for blocked call fragments
6 files changed, 34 insertions, 14 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 891b62e49..a6fb98ca6 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -1059,6 +1059,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()); } /** |