diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/filterednumber/BlockedNumbersFragment.java | 11 | ||||
-rw-r--r-- | src/com/android/dialer/filterednumber/BlockedNumbersSettingsActivity.java (renamed from src/com/android/dialer/filterednumber/ManageBlockedNumbersActivity.java) | 15 | ||||
-rw-r--r-- | src/com/android/dialer/filterednumber/FilteredNumbersUtil.java | 2 | ||||
-rw-r--r-- | src/com/android/dialer/list/BlockedListSearchFragment.java | 4 | ||||
-rw-r--r-- | src/com/android/dialer/settings/DialerSettingsActivity.java | 4 |
5 files changed, 23 insertions, 13 deletions
diff --git a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java index 36978885a..853076c26 100644 --- a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java +++ b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java @@ -176,21 +176,20 @@ public class BlockedNumbersFragment extends ListFragment @Override public void onClick(final View view) { - ManageBlockedNumbersActivity manageBlockedNumbersActivity = - (ManageBlockedNumbersActivity) getActivity(); - if (manageBlockedNumbersActivity == null) { + BlockedNumbersSettingsActivity activity = (BlockedNumbersSettingsActivity) getActivity(); + if (activity == null) { return; } switch (view.getId()) { case R.id.add_number_button: - manageBlockedNumbersActivity.enterSearchUi(); + activity.showSearchUi(); break; case R.id.view_numbers_button: - manageBlockedNumbersActivity.showNumbersToImportPreviewUi(); + activity.showNumbersToImportPreviewUi(); break; case R.id.import_button: - FilteredNumbersUtil.importSendToVoicemailContacts(manageBlockedNumbersActivity, + FilteredNumbersUtil.importSendToVoicemailContacts(activity, new ImportSendToVoicemailContactsListener() { @Override public void onImportComplete() { diff --git a/src/com/android/dialer/filterednumber/ManageBlockedNumbersActivity.java b/src/com/android/dialer/filterednumber/BlockedNumbersSettingsActivity.java index 109fd97b5..1735ce543 100644 --- a/src/com/android/dialer/filterednumber/ManageBlockedNumbersActivity.java +++ b/src/com/android/dialer/filterednumber/BlockedNumbersSettingsActivity.java @@ -37,7 +37,7 @@ import com.android.dialer.list.OnListFragmentScrolledListener; import com.android.dialer.list.BlockedListSearchFragment; import com.android.dialer.list.SearchFragment; -public class ManageBlockedNumbersActivity extends AppCompatActivity +public class BlockedNumbersSettingsActivity extends AppCompatActivity implements SearchFragment.HostInterface { private static final String TAG_BLOCKED_MANAGEMENT_FRAGMENT = "blocked_management"; @@ -55,6 +55,9 @@ public class ManageBlockedNumbersActivity extends AppCompatActivity } } + /** + * Shows fragment with the list of currently blocked numbers and settings related to blocking. + */ public void showManagementUi() { BlockedNumbersFragment fragment = (BlockedNumbersFragment) getFragmentManager() .findFragmentByTag(TAG_BLOCKED_MANAGEMENT_FRAGMENT); @@ -68,7 +71,10 @@ public class ManageBlockedNumbersActivity extends AppCompatActivity .commit(); } - public void enterSearchUi() { + /** + * Shows fragment with search UI for browsing/finding numbers to block. + */ + public void showSearchUi() { BlockedListSearchFragment fragment = (BlockedListSearchFragment) getFragmentManager() .findFragmentByTag(TAG_BLOCKED_SEARCH_FRAGMENT); if (fragment == null) { @@ -85,6 +91,11 @@ public class ManageBlockedNumbersActivity extends AppCompatActivity .commit(); } + /** + * Shows fragment with UI to preview the numbers of contacts currently marked as + * send-to-voicemail in Contacts. These numbers can be imported into Dialer's blocked number + * list. + */ public void showNumbersToImportPreviewUi() { ViewNumbersToImportFragment fragment = (ViewNumbersToImportFragment) getFragmentManager() .findFragmentByTag(TAG_VIEW_NUMBERS_TO_IMPORT_FRAGMENT); diff --git a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java index 4492c51e3..8a0d79233 100644 --- a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java +++ b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java @@ -339,7 +339,7 @@ public class FilteredNumbersUtil { R.string.call_blocking_disabled_notification_text)); final Intent contentIntent = - new Intent(context, ManageBlockedNumbersActivity.class); + new Intent(context, BlockedNumbersSettingsActivity.class); builder.setContentIntent(PendingIntent.getActivity( context, 0, contentIntent, PendingIntent.FLAG_UPDATE_CURRENT)); diff --git a/src/com/android/dialer/list/BlockedListSearchFragment.java b/src/com/android/dialer/list/BlockedListSearchFragment.java index 805d969a3..d740b3d4c 100644 --- a/src/com/android/dialer/list/BlockedListSearchFragment.java +++ b/src/com/android/dialer/list/BlockedListSearchFragment.java @@ -35,7 +35,7 @@ import com.android.dialer.R; import com.android.dialer.database.FilteredNumberAsyncQueryHandler; import com.android.dialer.database.FilteredNumberAsyncQueryHandler.OnCheckBlockedListener; import com.android.dialer.filterednumber.BlockNumberDialogFragment; -import com.android.dialer.filterednumber.ManageBlockedNumbersActivity; +import com.android.dialer.filterednumber.BlockedNumbersSettingsActivity; import com.android.dialer.widget.SearchEditTextLayout; public class BlockedListSearchFragment extends RegularSearchFragment @@ -200,7 +200,7 @@ public class BlockedListSearchFragment extends RegularSearchFragment @Override public void onChangeFilteredNumberSuccess() { - ManageBlockedNumbersActivity activity = (ManageBlockedNumbersActivity) getActivity(); + BlockedNumbersSettingsActivity activity = (BlockedNumbersSettingsActivity) getActivity(); if (activity == null) { return; } diff --git a/src/com/android/dialer/settings/DialerSettingsActivity.java b/src/com/android/dialer/settings/DialerSettingsActivity.java index 6fcd22195..d0bfbc211 100644 --- a/src/com/android/dialer/settings/DialerSettingsActivity.java +++ b/src/com/android/dialer/settings/DialerSettingsActivity.java @@ -28,7 +28,7 @@ import android.view.MenuItem; import android.widget.Toast; import com.android.dialer.R; -import com.android.dialer.filterednumber.ManageBlockedNumbersActivity; +import com.android.dialer.filterednumber.BlockedNumbersSettingsActivity; import java.util.List; @@ -88,7 +88,7 @@ public class DialerSettingsActivity extends AppCompatPreferenceActivity { Header blockedCallsHeader = new Header(); blockedCallsHeader.titleRes = R.string.manage_blocked_numbers_label; - blockedCallsHeader.intent = new Intent(this, ManageBlockedNumbersActivity.class); + blockedCallsHeader.intent = new Intent(this, BlockedNumbersSettingsActivity.class); target.add(blockedCallsHeader); if (telephonyManager.isTtyModeSupported() |