summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-10-28 17:47:42 -0700
committerAndrew Lee <anwlee@google.com>2015-10-28 18:37:12 -0700
commit91cd89c9ca486624850cdb0aaec86882a30c18a7 (patch)
treea9aa5cca50fd20a7a7594d830fe75682d07db20e
parent690e1b5cc87003f939f57f80511e473458d17ac2 (diff)
Rename activity for blocked numbers settings.
Manage is more related to a specific screen, new name seems to make more sense based on location in settings menu of application. Bug: 25343277 Change-Id: Ia45c1b7aa91c045078fd1473500f5d474e1c598f
-rw-r--r--AndroidManifest.xml2
-rw-r--r--src/com/android/dialer/filterednumber/BlockedNumbersFragment.java11
-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.java2
-rw-r--r--src/com/android/dialer/list/BlockedListSearchFragment.java4
-rw-r--r--src/com/android/dialer/settings/DialerSettingsActivity.java4
6 files changed, 24 insertions, 14 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 7d6e5053c..6127a5af2 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -148,7 +148,7 @@
android:exported="false">
</activity>
- <activity android:name="com.android.dialer.filterednumber.ManageBlockedNumbersActivity"
+ <activity android:name="com.android.dialer.filterednumber.BlockedNumbersSettingsActivity"
android:label="@string/manage_blocked_numbers_label"
android:parentActivityName="com.android.dialer.settings.DialerSettingsActivity"
android:theme="@style/ManageBlockedNumbersStyle"
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()