diff options
author | Andrew Lee <anwlee@google.com> | 2015-10-29 01:07:54 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-10-29 01:07:54 +0000 |
commit | b43a4c121fe995353825cb8f36f4c8334e40f971 (patch) | |
tree | 03972971f4cd5e5cbb5242ec588e4277e7aefb95 /src/com | |
parent | 1b609a507a7ae0e6c2b89459c800c4c07565a256 (diff) | |
parent | fcecacedc1837673321f516673c6d68fd82e63ce (diff) |
Merge "Rename FilterNumberDialogFragment." into ub-contactsdialer-a-dev
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/dialer/CallDetailActivity.java | 6 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 4 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogListItemViewHolder.java | 10 | ||||
-rw-r--r-- | src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java (renamed from src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java) | 16 | ||||
-rw-r--r-- | src/com/android/dialer/filterednumber/BlockedNumberAdapter.java | 2 | ||||
-rw-r--r-- | src/com/android/dialer/list/BlockedListSearchFragment.java | 8 |
6 files changed, 25 insertions, 21 deletions
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index 2121e988d..773938cdf 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -55,7 +55,7 @@ import com.android.dialer.calllog.ContactInfoHelper; import com.android.dialer.calllog.PhoneAccountUtils; import com.android.dialer.database.FilteredNumberAsyncQueryHandler.OnCheckBlockedListener; import com.android.dialer.database.FilteredNumberAsyncQueryHandler; -import com.android.dialer.filterednumber.FilterNumberDialogFragment; +import com.android.dialer.filterednumber.BlockNumberDialogFragment; import com.android.dialer.filterednumber.FilteredNumbersUtil; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.IntentUtil.CallIntentBuilder; @@ -71,7 +71,7 @@ import com.android.incallui.Call.LogState; */ public class CallDetailActivity extends AppCompatActivity implements MenuItem.OnMenuItemClickListener, View.OnClickListener, - FilterNumberDialogFragment.Callback { + BlockNumberDialogFragment.Callback { private static final String TAG = CallDetailActivity.class.getSimpleName(); /** A long array extra containing ids of call log entries to display. */ @@ -358,7 +358,7 @@ public class CallDetailActivity extends AppCompatActivity public void onClick(View view) { switch(view.getId()) { case R.id.call_detail_action_block: - FilterNumberDialogFragment.show( + BlockNumberDialogFragment.show( mBlockedNumberId, null /* normalizedNumber */, mNumber, diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 01af982f3..d846c654d 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -50,7 +50,7 @@ import com.android.dialer.contactinfo.ContactInfoCache.OnContactInfoChangedListe import com.android.dialer.contactinfo.NumberWithCountryIso; import com.android.dialer.database.FilteredNumberAsyncQueryHandler; import com.android.dialer.database.FilteredNumberAsyncQueryHandler.OnCheckBlockedListener; -import com.android.dialer.filterednumber.FilterNumberDialogFragment; +import com.android.dialer.filterednumber.BlockNumberDialogFragment; import com.android.dialer.util.PhoneNumberUtil; import com.android.dialer.voicemail.VoicemailPlaybackPresenter; @@ -63,7 +63,7 @@ import java.util.Map; public class CallLogAdapter extends GroupingListAdapter implements CallLogGroupBuilder.GroupCreator, VoicemailPlaybackPresenter.OnVoicemailDeletedListener, - FilterNumberDialogFragment.Callback { + BlockNumberDialogFragment.Callback { /** Interface used to initiate a refresh of the content. */ public interface CallFetcher { diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java index 1bc44108d..d07f05a65 100644 --- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java +++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java @@ -48,7 +48,7 @@ import com.android.contacts.common.util.UriUtils; import com.android.dialer.DialtactsActivity; import com.android.dialer.R; import com.android.dialer.database.FilteredNumberAsyncQueryHandler; -import com.android.dialer.filterednumber.FilterNumberDialogFragment; +import com.android.dialer.filterednumber.BlockNumberDialogFragment; import com.android.dialer.filterednumber.FilteredNumbersUtil; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.PhoneNumberUtil; @@ -184,7 +184,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder private final CallLogListItemHelper mCallLogListItemHelper; private final VoicemailPlaybackPresenter mVoicemailPlaybackPresenter; private final FilteredNumberAsyncQueryHandler mFilteredNumberAsyncQueryHandler; - private final FilterNumberDialogFragment.Callback mFilteredNumberDialogCallback; + private final BlockNumberDialogFragment.Callback mFilteredNumberDialogCallback; private final int mPhotoSize; @@ -198,7 +198,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder CallLogListItemHelper callLogListItemHelper, VoicemailPlaybackPresenter voicemailPlaybackPresenter, FilteredNumberAsyncQueryHandler filteredNumberAsyncQueryHandler, - FilterNumberDialogFragment.Callback filteredNumberDialogCallback, + BlockNumberDialogFragment.Callback filteredNumberDialogCallback, View rootView, QuickContactBadge quickContactView, View primaryActionView, @@ -247,7 +247,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder CallLogListItemHelper callLogListItemHelper, VoicemailPlaybackPresenter voicemailPlaybackPresenter, FilteredNumberAsyncQueryHandler filteredNumberAsyncQueryHandler, - FilterNumberDialogFragment.Callback filteredNumberDialogCallback) { + BlockNumberDialogFragment.Callback filteredNumberDialogCallback) { return new CallLogListItemViewHolder( context, @@ -327,7 +327,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder public boolean onMenuItemClick(MenuItem item) { switch (item.getItemId()) { case R.id.context_menu_block_number: - FilterNumberDialogFragment.show( + BlockNumberDialogFragment.show( blockId, info.normalizedNumber, number, diff --git a/src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java b/src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java index d7608d8f9..fcd74f368 100644 --- a/src/com/android/dialer/filterednumber/FilterNumberDialogFragment.java +++ b/src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java @@ -37,7 +37,11 @@ import com.android.dialer.database.FilteredNumberAsyncQueryHandler; import com.android.dialer.database.FilteredNumberAsyncQueryHandler.OnBlockNumberListener; import com.android.dialer.database.FilteredNumberAsyncQueryHandler.OnUnblockNumberListener; -public class FilterNumberDialogFragment extends DialogFragment { +/** + * Fragment for confirming and enacting blocking/unblocking a number. Also invokes snackbar + * providing undo functionality. + */ +public class BlockNumberDialogFragment extends DialogFragment { /** * Use a callback interface to update UI after success/undo. Favor this approach over other @@ -51,7 +55,7 @@ public class FilterNumberDialogFragment extends DialogFragment { public void onChangeFilteredNumberUndo(); } - private static final String BLOCK_DIALOG_FRAGMENT = "blockUnblockNumberDialog"; + private static final String BLOCK_DIALOG_FRAGMENT = "BlockNumberDialog"; private static final String ARG_BLOCK_ID = "argBlockId"; private static final String ARG_NORMALIZED_NUMBER = "argNormalizedNumber"; @@ -78,21 +82,21 @@ public class FilterNumberDialogFragment extends DialogFragment { Integer parentViewId, FragmentManager fragmentManager, Callback callback) { - final FilterNumberDialogFragment newFragment = FilterNumberDialogFragment.newInstance( + final BlockNumberDialogFragment newFragment = BlockNumberDialogFragment.newInstance( blockId, normalizedNumber, number, countryIso, displayNumber, parentViewId); newFragment.setCallback(callback); - newFragment.show(fragmentManager, FilterNumberDialogFragment.BLOCK_DIALOG_FRAGMENT); + newFragment.show(fragmentManager, BlockNumberDialogFragment.BLOCK_DIALOG_FRAGMENT); } - private static FilterNumberDialogFragment newInstance( + private static BlockNumberDialogFragment newInstance( Integer blockId, String normalizedNumber, String number, String countryIso, String displayNumber, Integer parentViewId) { - final FilterNumberDialogFragment fragment = new FilterNumberDialogFragment(); + final BlockNumberDialogFragment fragment = new BlockNumberDialogFragment(); final Bundle args = new Bundle(); if (blockId != null) { args.putInt(ARG_BLOCK_ID, blockId.intValue()); diff --git a/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java b/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java index 7777aeb71..76fc74320 100644 --- a/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java +++ b/src/com/android/dialer/filterednumber/BlockedNumberAdapter.java @@ -59,7 +59,7 @@ public class BlockedNumberAdapter extends NumberAdapter { deleteButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - FilterNumberDialogFragment.show( + BlockNumberDialogFragment.show( id, normalizedNumber, number, diff --git a/src/com/android/dialer/list/BlockedListSearchFragment.java b/src/com/android/dialer/list/BlockedListSearchFragment.java index 852e7c916..805d969a3 100644 --- a/src/com/android/dialer/list/BlockedListSearchFragment.java +++ b/src/com/android/dialer/list/BlockedListSearchFragment.java @@ -34,12 +34,12 @@ import com.android.contacts.common.list.ContactListItemView; import com.android.dialer.R; import com.android.dialer.database.FilteredNumberAsyncQueryHandler; import com.android.dialer.database.FilteredNumberAsyncQueryHandler.OnCheckBlockedListener; -import com.android.dialer.filterednumber.FilterNumberDialogFragment; +import com.android.dialer.filterednumber.BlockNumberDialogFragment; import com.android.dialer.filterednumber.ManageBlockedNumbersActivity; import com.android.dialer.widget.SearchEditTextLayout; public class BlockedListSearchFragment extends RegularSearchFragment - implements FilterNumberDialogFragment.Callback { + implements BlockNumberDialogFragment.Callback { private static final String TAG = BlockedListSearchFragment.class.getSimpleName(); private static final String KEY_SEARCH_QUERY = "search_query"; @@ -175,7 +175,7 @@ public class BlockedListSearchFragment extends RegularSearchFragment @Override public void onCheckComplete(Integer id) { if (id == null) { - FilterNumberDialogFragment.show( + BlockNumberDialogFragment.show( id, null, number, @@ -224,7 +224,7 @@ public class BlockedListSearchFragment extends RegularSearchFragment return; } - FilterNumberDialogFragment.show( + BlockNumberDialogFragment.show( blockId, null, number, |