diff options
author | Brandon Maxwell <maxwelb@google.com> | 2015-11-05 16:27:40 -0800 |
---|---|---|
committer | Brandon Maxwell <maxwelb@google.com> | 2015-11-12 14:31:27 -0800 |
commit | d81cc6c64f3213f571c1f1e7a5c7e59b71491fb0 (patch) | |
tree | ec3ff1d64fa79e7e0728f16dc95be7b113ef3340 /src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java | |
parent | 07c23f071adc133571613766174812bd21b25a79 (diff) |
Adding Logging to call blocking interactions
+ Added Clearcut logging when users block, unblock, undo,
or import blocked numbers. Location of blocking is noted, e.g. CallLog,
CallDetails, ManagementScreen
+ Added class with Constants matching proto definition
Bug: 25288435
Change-Id: I7fbef52d0e31b49c31dadbc0b4d775969d97420a
Diffstat (limited to 'src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java')
-rw-r--r-- | src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java b/src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java index 21746eecc..0f4bd74bd 100644 --- a/src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java +++ b/src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java @@ -36,6 +36,8 @@ import com.android.dialer.database.FilteredNumberAsyncQueryHandler; import com.android.dialer.database.FilteredNumberAsyncQueryHandler.OnBlockNumberListener; import com.android.dialer.database.FilteredNumberAsyncQueryHandler.OnUnblockNumberListener; import com.android.dialer.voicemail.VisualVoicemailEnabledChecker; +import com.android.dialer.logging.InteractionEvent; +import com.android.dialer.logging.Logger; /** * Fragment for confirming and enacting blocking/unblocking a number. Also invokes snackbar @@ -51,8 +53,20 @@ public class BlockNumberDialogFragment extends DialogFragment { * upon rotation instead. */ public interface Callback { - public void onChangeFilteredNumberSuccess(); - public void onChangeFilteredNumberUndo(); + /** + * Called when a number is successfully added to the set of filtered numbers + */ + void onFilterNumberSuccess(); + + /** + * Called when a number is successfully removed from the set of filtered numbers + */ + void onUnfilterNumberSuccess(); + + /** + * Called when the action of filtering or unfiltering a number is undone + */ + void onChangeFilteredNumberUndo(); } private static final String BLOCK_DIALOG_FRAGMENT = "BlockNumberDialog"; @@ -230,6 +244,7 @@ public class BlockNumberDialogFragment extends DialogFragment { @Override public void onClick(View view) { // Delete the newly created row on 'undo'. + Logger.logInteraction(InteractionEvent.UNDO_BLOCK_NUMBER); mHandler.unblock(onUndoListener, uri); } }; @@ -240,7 +255,7 @@ public class BlockNumberDialogFragment extends DialogFragment { .show(); if (callback != null) { - callback.onChangeFilteredNumberSuccess(); + callback.onFilterNumberSuccess(); } if (context != null && FilteredNumbersUtil.hasRecentEmergencyCall(context)) { @@ -278,6 +293,7 @@ public class BlockNumberDialogFragment extends DialogFragment { @Override public void onClick(View view) { // Re-insert the row on 'undo', with a new ID. + Logger.logInteraction(InteractionEvent.UNDO_UNBLOCK_NUMBER); mHandler.blockNumber(onUndoListener, values); } }; @@ -288,7 +304,7 @@ public class BlockNumberDialogFragment extends DialogFragment { .show(); if (callback != null) { - callback.onChangeFilteredNumberSuccess(); + callback.onUnfilterNumberSuccess(); } } }, getArguments().getInt(ARG_BLOCK_ID)); |