summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/app/calllog/BlockReportSpamListener.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/dialer/app/calllog/BlockReportSpamListener.java')
-rw-r--r--java/com/android/dialer/app/calllog/BlockReportSpamListener.java52
1 files changed, 26 insertions, 26 deletions
diff --git a/java/com/android/dialer/app/calllog/BlockReportSpamListener.java b/java/com/android/dialer/app/calllog/BlockReportSpamListener.java
index 05fb2b345..092c0982e 100644
--- a/java/com/android/dialer/app/calllog/BlockReportSpamListener.java
+++ b/java/com/android/dialer/app/calllog/BlockReportSpamListener.java
@@ -33,10 +33,10 @@ import com.android.dialer.spam.SpamComponent;
/** Listener to show dialogs for block and report spam actions. */
public class BlockReportSpamListener implements CallLogListItemViewHolder.OnClickListener {
- private final Context mContext;
- private final FragmentManager mFragmentManager;
- private final RecyclerView.Adapter mAdapter;
- private final FilteredNumberAsyncQueryHandler mFilteredNumberAsyncQueryHandler;
+ private final Context context;
+ private final FragmentManager fragmentManager;
+ private final RecyclerView.Adapter adapter;
+ private final FilteredNumberAsyncQueryHandler filteredNumberAsyncQueryHandler;
private final Spam spam;
public BlockReportSpamListener(
@@ -44,10 +44,10 @@ public class BlockReportSpamListener implements CallLogListItemViewHolder.OnClic
FragmentManager fragmentManager,
RecyclerView.Adapter adapter,
FilteredNumberAsyncQueryHandler filteredNumberAsyncQueryHandler) {
- mContext = context;
- mFragmentManager = fragmentManager;
- mAdapter = adapter;
- mFilteredNumberAsyncQueryHandler = filteredNumberAsyncQueryHandler;
+ this.context = context;
+ this.fragmentManager = fragmentManager;
+ this.adapter = adapter;
+ this.filteredNumberAsyncQueryHandler = filteredNumberAsyncQueryHandler;
spam = SpamComponent.get(context).spam();
}
@@ -64,7 +64,7 @@ public class BlockReportSpamListener implements CallLogListItemViewHolder.OnClic
isSpamChecked -> {
LogUtil.i("BlockReportSpamListener.onBlockReportSpam", "onClick");
if (isSpamChecked && spam.isSpamEnabled()) {
- Logger.get(mContext)
+ Logger.get(context)
.logImpression(
DialerImpression.Type
.REPORT_CALL_AS_SPAM_VIA_CALL_LOG_BLOCK_REPORT_SPAM_SENT_VIA_BLOCK_NUMBER_DIALOG);
@@ -75,17 +75,17 @@ public class BlockReportSpamListener implements CallLogListItemViewHolder.OnClic
ReportingLocation.Type.CALL_LOG_HISTORY,
contactSourceType);
}
- mFilteredNumberAsyncQueryHandler.blockNumber(
+ filteredNumberAsyncQueryHandler.blockNumber(
uri -> {
- Logger.get(mContext)
+ Logger.get(context)
.logImpression(DialerImpression.Type.USER_ACTION_BLOCKED_NUMBER);
- mAdapter.notifyDataSetChanged();
+ adapter.notifyDataSetChanged();
},
number,
countryIso);
},
null)
- .show(mFragmentManager, BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG);
+ .show(fragmentManager, BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG);
}
@Override
@@ -101,7 +101,7 @@ public class BlockReportSpamListener implements CallLogListItemViewHolder.OnClic
() -> {
LogUtil.i("BlockReportSpamListener.onBlock", "onClick");
if (spam.isSpamEnabled()) {
- Logger.get(mContext)
+ Logger.get(context)
.logImpression(
DialerImpression.Type
.DIALOG_ACTION_CONFIRM_NUMBER_SPAM_INDIRECTLY_VIA_BLOCK_NUMBER);
@@ -112,17 +112,17 @@ public class BlockReportSpamListener implements CallLogListItemViewHolder.OnClic
ReportingLocation.Type.CALL_LOG_HISTORY,
contactSourceType);
}
- mFilteredNumberAsyncQueryHandler.blockNumber(
+ filteredNumberAsyncQueryHandler.blockNumber(
uri -> {
- Logger.get(mContext)
+ Logger.get(context)
.logImpression(DialerImpression.Type.USER_ACTION_BLOCKED_NUMBER);
- mAdapter.notifyDataSetChanged();
+ adapter.notifyDataSetChanged();
},
number,
countryIso);
},
null)
- .show(mFragmentManager, BlockReportSpamDialogs.BLOCK_DIALOG_TAG);
+ .show(fragmentManager, BlockReportSpamDialogs.BLOCK_DIALOG_TAG);
}
@Override
@@ -140,7 +140,7 @@ public class BlockReportSpamListener implements CallLogListItemViewHolder.OnClic
() -> {
LogUtil.i("BlockReportSpamListener.onUnblock", "onClick");
if (isSpam && spam.isSpamEnabled()) {
- Logger.get(mContext)
+ Logger.get(context)
.logImpression(DialerImpression.Type.REPORT_AS_NOT_SPAM_VIA_UNBLOCK_NUMBER);
spam.reportNotSpamFromCallHistory(
number,
@@ -149,16 +149,16 @@ public class BlockReportSpamListener implements CallLogListItemViewHolder.OnClic
ReportingLocation.Type.CALL_LOG_HISTORY,
contactSourceType);
}
- mFilteredNumberAsyncQueryHandler.unblock(
+ filteredNumberAsyncQueryHandler.unblock(
(rows, values) -> {
- Logger.get(mContext)
+ Logger.get(context)
.logImpression(DialerImpression.Type.USER_ACTION_UNBLOCKED_NUMBER);
- mAdapter.notifyDataSetChanged();
+ adapter.notifyDataSetChanged();
},
blockId);
},
null)
- .show(mFragmentManager, BlockReportSpamDialogs.UNBLOCK_DIALOG_TAG);
+ .show(fragmentManager, BlockReportSpamDialogs.UNBLOCK_DIALOG_TAG);
}
@Override
@@ -173,7 +173,7 @@ public class BlockReportSpamListener implements CallLogListItemViewHolder.OnClic
() -> {
LogUtil.i("BlockReportSpamListener.onReportNotSpam", "onClick");
if (spam.isSpamEnabled()) {
- Logger.get(mContext)
+ Logger.get(context)
.logImpression(DialerImpression.Type.DIALOG_ACTION_CONFIRM_NUMBER_NOT_SPAM);
spam.reportNotSpamFromCallHistory(
number,
@@ -182,9 +182,9 @@ public class BlockReportSpamListener implements CallLogListItemViewHolder.OnClic
ReportingLocation.Type.CALL_LOG_HISTORY,
contactSourceType);
}
- mAdapter.notifyDataSetChanged();
+ adapter.notifyDataSetChanged();
},
null)
- .show(mFragmentManager, BlockReportSpamDialogs.NOT_SPAM_DIALOG_TAG);
+ .show(fragmentManager, BlockReportSpamDialogs.NOT_SPAM_DIALOG_TAG);
}
}