diff options
Diffstat (limited to 'src/com/android/dialer')
5 files changed, 33 insertions, 10 deletions
diff --git a/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java b/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java index 7af1a1339..52ef49ac0 100644 --- a/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java +++ b/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java @@ -158,7 +158,13 @@ public class FilteredNumberAsyncQueryHandler extends AsyncQueryHandler { new Listener() { @Override protected void onQueryComplete(int token, Object cookie, Cursor cursor) { - if (cursor == null || cursor.getCount() != 1) { + /* + * In the frameworking blocking, numbers can be blocked in both e164 format + * and not, resulting in multiple rows being returned for this query. For + * example, both '16502530000' and '6502530000' can exist at the same time + * and will be returned by this query. + */ + if (cursor == null || cursor.getCount() == 0) { listener.onCheckComplete(null); return; } diff --git a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java index 38615cce8..87ba8bef6 100644 --- a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java +++ b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java @@ -127,16 +127,21 @@ public class BlockedNumbersFragment extends ListFragment getListView().findViewById(R.id.add_number_linear_layout).setVisibility(View.GONE); getListView().findViewById(R.id.add_number_linear_layout).setOnClickListener(null); mBlockedNumberListDivider.setVisibility(View.INVISIBLE); - } - FilteredNumbersUtil.checkForSendToVoicemailContact( - getActivity(), new CheckForSendToVoicemailContactListener() { - @Override - public void onComplete(boolean hasSendToVoicemailContact) { - final int visibility = hasSendToVoicemailContact ? View.VISIBLE : View.GONE; - mImportSettings.setVisibility(visibility); - } - }); + mImportSettings.setSystemUiVisibility(View.GONE); + getListView().findViewById(R.id.import_button).setOnClickListener(null); + getListView().findViewById(R.id.view_numbers_button).setOnClickListener(null); + } else { + FilteredNumbersUtil.checkForSendToVoicemailContact( + getActivity(), new CheckForSendToVoicemailContactListener() { + @Override + public void onComplete(boolean hasSendToVoicemailContact) { + final int visibility = + hasSendToVoicemailContact ? View.VISIBLE : View.GONE; + mImportSettings.setVisibility(visibility); + } + }); + } if (FilteredNumbersUtil.hasRecentEmergencyCall(getContext())) { mBlockedNumbersDisabledForEmergency.setVisibility(View.VISIBLE); diff --git a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java index e3870ded9..498b10a45 100644 --- a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java +++ b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java @@ -33,6 +33,7 @@ import android.widget.Toast; import com.android.contacts.common.testing.NeededForTesting; import com.android.dialer.R; +import com.android.dialer.compat.FilteredNumberCompat; import com.android.dialer.database.FilteredNumberAsyncQueryHandler; import com.android.dialer.database.FilteredNumberAsyncQueryHandler.OnHasBlockedNumbersListener; import com.android.dialer.database.FilteredNumberContract.FilteredNumber; @@ -298,6 +299,10 @@ public class FilteredNumbersUtil { } public static void maybeNotifyCallBlockingDisabled(final Context context) { + // The Dialer is not responsible for this notification after migrating + if (FilteredNumberCompat.useNewFiltering()) { + return; + } // Skip if the user has already received a notification for the most recent emergency call. if (PreferenceManager.getDefaultSharedPreferences(context) .getBoolean(NOTIFIED_CALL_BLOCKING_DISABLED_BY_EMERGENCY_CALL_PREF_KEY, false)) { diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java b/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java index d4d294e8d..7d6fe78d1 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackLayout.java @@ -428,6 +428,11 @@ public class VoicemailPlaybackLayout extends LinearLayout } @Override + public void setSuccess() { + mStateText.setText(null); + } + + @Override public void setIsFetchingContent() { disableUiElements(); mStateText.setText(getString(R.string.voicemail_fetching_content)); diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java index 5924fb453..e224ddc2a 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java @@ -84,6 +84,7 @@ public class VoicemailPlaybackPresenter implements MediaPlayer.OnPreparedListene void onPlaybackStopped(); void onSpeakerphoneOn(boolean on); void setClipPosition(int clipPositionInMillis, int clipLengthInMillis); + void setSuccess(); void setFetchContentTimeout(); void setIsFetchingContent(); void onVoicemailArchiveSucceded(Uri voicemailUri); @@ -606,6 +607,7 @@ public class VoicemailPlaybackPresenter implements MediaPlayer.OnPreparedListene Log.d(TAG, "onPrepared: mPosition=" + mPosition); mView.setClipPosition(mPosition, mDuration.get()); mView.enableUiElements(); + mView.setSuccess(); mMediaPlayer.seekTo(mPosition); if (mIsPlaying) { |