summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/app/filterednumber
diff options
context:
space:
mode:
Diffstat (limited to 'java/com/android/dialer/app/filterednumber')
-rw-r--r--java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java10
-rw-r--r--java/com/android/dialer/app/filterednumber/BlockedNumbersSettingsActivity.java47
2 files changed, 2 insertions, 55 deletions
diff --git a/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java b/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java
index cae35d5b6..270ec6d03 100644
--- a/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java
+++ b/java/com/android/dialer/app/filterednumber/BlockedNumbersFragment.java
@@ -29,7 +29,6 @@ import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.ImageView;
import android.widget.TextView;
import com.android.dialer.app.R;
import com.android.dialer.blocking.BlockedNumbersMigrator;
@@ -73,13 +72,11 @@ public class BlockedNumbersFragment extends ListFragment
getListView().addHeaderView(inflater.inflate(R.layout.blocked_number_header, null));
getListView().addFooterView(inflater.inflate(R.layout.blocked_number_footer, null));
//replace the icon for add number with LetterTileDrawable(), so it will have identical style
- ImageView addNumberIcon = (ImageView) getActivity().findViewById(R.id.add_number_icon);
LetterTileDrawable drawable = new LetterTileDrawable(getResources());
drawable.setLetter(ADD_BLOCKED_NUMBER_ICON_LETTER);
drawable.setColor(
ActivityCompat.getColor(getActivity(), R.color.add_blocked_number_icon_color));
drawable.setIsCircular(true);
- addNumberIcon.setImageDrawable(drawable);
if (adapter == null) {
adapter =
@@ -97,7 +94,6 @@ public class BlockedNumbersFragment extends ListFragment
blockedNumberListDivider = getActivity().findViewById(R.id.blocked_number_list_divider);
getListView().findViewById(R.id.import_button).setOnClickListener(this);
getListView().findViewById(R.id.view_numbers_button).setOnClickListener(this);
- getListView().findViewById(R.id.add_number_linear_layout).setOnClickListener(this);
footerText = (TextView) getActivity().findViewById(R.id.blocked_number_footer_textview);
voicemailEnabledChecker = new VisualVoicemailEnabledChecker(getContext(), this);
@@ -137,8 +133,6 @@ public class BlockedNumbersFragment extends ListFragment
if (FilteredNumberCompat.canUseNewFiltering()) {
migratePromoView.setVisibility(View.VISIBLE);
blockedNumbersText.setVisibility(View.GONE);
- getListView().findViewById(R.id.add_number_linear_layout).setVisibility(View.GONE);
- getListView().findViewById(R.id.add_number_linear_layout).setOnClickListener(null);
blockedNumberListDivider.setVisibility(View.GONE);
importSettings.setVisibility(View.GONE);
getListView().findViewById(R.id.import_button).setOnClickListener(null);
@@ -218,9 +212,7 @@ public class BlockedNumbersFragment extends ListFragment
}
int resId = view.getId();
- if (resId == R.id.add_number_linear_layout) {
- activity.showSearchUi();
- } else if (resId == R.id.view_numbers_button) {
+ if (resId == R.id.view_numbers_button) {
activity.showNumbersToImportPreviewUi();
} else if (resId == R.id.import_button) {
FilteredNumbersUtil.importSendToVoicemailContacts(
diff --git a/java/com/android/dialer/app/filterednumber/BlockedNumbersSettingsActivity.java b/java/com/android/dialer/app/filterednumber/BlockedNumbersSettingsActivity.java
index 858d28355..5475b4ea3 100644
--- a/java/com/android/dialer/app/filterednumber/BlockedNumbersSettingsActivity.java
+++ b/java/com/android/dialer/app/filterednumber/BlockedNumbersSettingsActivity.java
@@ -19,17 +19,13 @@ import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import com.android.dialer.app.R;
-import com.android.dialer.app.list.BlockedListSearchFragment;
-import com.android.dialer.app.list.SearchFragment;
import com.android.dialer.logging.Logger;
import com.android.dialer.logging.ScreenEvent;
/** TODO(calderwoodra): documentation */
-public class BlockedNumbersSettingsActivity extends AppCompatActivity
- implements SearchFragment.HostInterface {
+public class BlockedNumbersSettingsActivity extends AppCompatActivity {
private static final String TAG_BLOCKED_MANAGEMENT_FRAGMENT = "blocked_management";
- private static final String TAG_BLOCKED_SEARCH_FRAGMENT = "blocked_search";
private static final String TAG_VIEW_NUMBERS_TO_IMPORT_FRAGMENT = "view_numbers_to_import";
@Override
@@ -60,27 +56,6 @@ public class BlockedNumbersSettingsActivity extends AppCompatActivity
Logger.get(this).logScreenView(ScreenEvent.Type.BLOCKED_NUMBER_MANAGEMENT, this);
}
- /** 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) {
- fragment = new BlockedListSearchFragment();
- fragment.setHasOptionsMenu(false);
- fragment.setShowEmptyListForNullQuery(true);
- fragment.setDirectorySearchEnabled(false);
- }
-
- getFragmentManager()
- .beginTransaction()
- .replace(R.id.blocked_numbers_activity_container, fragment, TAG_BLOCKED_SEARCH_FRAGMENT)
- .addToBackStack(null)
- .commit();
-
- Logger.get(this).logScreenView(ScreenEvent.Type.BLOCKED_NUMBER_ADD_NUMBER, this);
- }
-
/**
* 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.
@@ -119,24 +94,4 @@ public class BlockedNumbersSettingsActivity extends AppCompatActivity
super.onBackPressed();
}
}
-
- @Override
- public boolean isActionBarShowing() {
- return false;
- }
-
- @Override
- public boolean isDialpadShown() {
- return false;
- }
-
- @Override
- public int getDialpadHeight() {
- return 0;
- }
-
- @Override
- public int getActionBarHeight() {
- return 0;
- }
}