diff options
Diffstat (limited to 'java')
7 files changed, 35 insertions, 21 deletions
diff --git a/java/com/android/dialer/app/calllog/MissedCallNotifier.java b/java/com/android/dialer/app/calllog/MissedCallNotifier.java index 084713fdc..eb7fab8fc 100644 --- a/java/com/android/dialer/app/calllog/MissedCallNotifier.java +++ b/java/com/android/dialer/app/calllog/MissedCallNotifier.java @@ -49,6 +49,7 @@ import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.DialerExecutor.Worker; import com.android.dialer.compat.android.provider.VoicemailCompat; +import com.android.dialer.enrichedcall.FuzzyPhoneNumberMatcher; import com.android.dialer.notification.DialerNotificationManager; import com.android.dialer.notification.NotificationChannelId; import com.android.dialer.notification.NotificationManagerUtils; @@ -267,7 +268,8 @@ public class MissedCallNotifier implements Worker<Pair<Integer, String>, Void> { List<NewCall> newCalls = callLogNotificationsQueryHelper.getNewMissedCalls(); if (newCalls != null && !newCalls.isEmpty()) { for (NewCall call : newCalls) { - if (call.number.equals(number.replace("tel:", ""))) { + if (FuzzyPhoneNumberMatcher.matches(call.number, number.replace("tel:", ""))) { + LogUtil.i("MissedCallNotifier.insertPostCallNotification", "Notification updated"); // Update the first notification that matches our post call note sender. DialerNotificationManager.notify( context, diff --git a/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java b/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java index a2b82c0fc..63ebd1959 100644 --- a/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java +++ b/java/com/android/dialer/app/voicemail/error/VoicemailTosMessageCreator.java @@ -304,10 +304,12 @@ public class VoicemailTosMessageCreator { return ""; } - String learnMoreText = context.getString(R.string.dialer_terms_and_conditions_learn_more); - return isVvm3() - ? context.getString(R.string.dialer_terms_and_conditions_for_verizon_1_0, learnMoreText) - : context.getString(R.string.dialer_terms_and_conditions_1_0, learnMoreText); + if (isVvm3()) { + return context.getString(R.string.dialer_terms_and_conditions_for_verizon_1_0); + } else { + String learnMoreText = context.getString(R.string.dialer_terms_and_conditions_learn_more); + return context.getString(R.string.dialer_terms_and_conditions_1_0, learnMoreText); + } } private CharSequence getAcceptText() { @@ -359,7 +361,7 @@ public class VoicemailTosMessageCreator { Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); // Add verizon policy link String linkUrl = context.getString(R.string.verizon_terms_and_conditions_policy_url); - addLink(spannableTos, linkUrl, linkUrl); + return addLink(spannableTos, linkUrl, linkUrl); } else { // The TOS for everyone else, there are no details, but change to center alignment. CharSequence tos = @@ -370,12 +372,12 @@ public class VoicemailTosMessageCreator { 0, tos.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); - } - // Add 'Learn more' link for dialer TOS - String learnMore = context.getString(R.string.dialer_terms_and_conditions_learn_more); - String linkUrl = context.getString(R.string.dialer_terms_and_conditions_learn_more_url); - return addLink(spannableTos, learnMore, linkUrl); + // Add 'Learn more' link for dialer TOS + String learnMore = context.getString(R.string.dialer_terms_and_conditions_learn_more); + String linkUrl = context.getString(R.string.dialer_terms_and_conditions_learn_more_url); + return addLink(spannableTos, learnMore, linkUrl); + } } private SpannableString addLink(SpannableString spannable, String linkText, String linkUrl) { diff --git a/java/com/android/dialer/app/voicemail/error/res/values/strings.xml b/java/com/android/dialer/app/voicemail/error/res/values/strings.xml index 3df0e6660..bf5794b0b 100644 --- a/java/com/android/dialer/app/voicemail/error/res/values/strings.xml +++ b/java/com/android/dialer/app/voicemail/error/res/values/strings.xml @@ -137,7 +137,7 @@ <string translatable="false" name="verizon_domestic_customer_support_display_number">(800) 922–0204</string> <string name="verizon_terms_and_conditions_title">Turn on visual voicemail</string> - <string name="verizon_terms_and_conditions_message">%1$s\n\nBy turning on visual voicemail you agree to the Verizon Wireless terms and conditions:\n\n%2$s</string> + <string name="verizon_terms_and_conditions_message">%1$s By turning on visual voicemail you agree to the Verizon Wireless terms and conditions:\n\n%2$s</string> <string name="dialer_terms_and_conditions_title">Turn on visual voicemail</string> <string name="dialer_terms_and_conditions_message">%s</string> @@ -174,10 +174,10 @@ Si no acepta todos estos términos y condiciones, no use el buzón de voz visual </string> <string name="dialer_terms_and_conditions_for_verizon_1.0"> - See and listen to your messages, without having to call voicemail. %s + See and listen to your messages, without having to call voicemail. </string> - <string name="dialer_terms_and_conditions_learn_more">Learn more</string> + <string name="dialer_terms_and_conditions_learn_more">Learn more</string> <!-- TODO(mdooley): STOP SHIP, get real url, b/65734734 --> <string translatable="false" name="dialer_terms_and_conditions_learn_more_url">https://www.google.com</string> diff --git a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java index 47a4ee608..b06f9c3ad 100644 --- a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java +++ b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java @@ -165,6 +165,7 @@ public final class NewSearchFragment extends Fragment @Override public Loader<Cursor> onCreateLoader(int id, Bundle bundle) { + LogUtil.i("NewSearchFragment.onCreateLoader", "loading cursor: " + id); if (id == CONTACTS_LOADER_ID) { return new SearchContactsCursorLoader(getContext(), query); } else if (id == NEARBY_PLACES_LOADER_ID) { @@ -187,6 +188,7 @@ public final class NewSearchFragment extends Fragment @Override public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) { + LogUtil.i("NewSearchFragment.onLoadFinished", "Loader finished: " + loader); if (cursor != null && !(loader instanceof RemoteDirectoriesCursorLoader) && !(cursor instanceof SearchCursor)) { @@ -218,8 +220,14 @@ public final class NewSearchFragment extends Fragment @Override public void onLoaderReset(Loader<Cursor> loader) { - adapter.clear(); - recyclerView.setAdapter(null); + LogUtil.i("NewSearchFragment.onLoaderReset", "Loader reset: " + loader); + if (loader instanceof SearchContactsCursorLoader) { + adapter.setContactsCursor(null); + } else if (loader instanceof NearbyPlacesCursorLoader) { + adapter.setNearbyPlacesCursor(null); + } else if (loader instanceof RemoteContactsCursorLoader) { + adapter.setRemoteContactsCursor(null); + } } public void setQuery(String query, CallInitiationType.Type callInitiationType) { diff --git a/java/com/android/dialer/searchfragment/remote/RemoteContactsCursor.java b/java/com/android/dialer/searchfragment/remote/RemoteContactsCursor.java index 5d80a452c..e9e83c19b 100644 --- a/java/com/android/dialer/searchfragment/remote/RemoteContactsCursor.java +++ b/java/com/android/dialer/searchfragment/remote/RemoteContactsCursor.java @@ -60,7 +60,10 @@ public final class RemoteContactsCursor extends MergeCursor implements SearchCur public static RemoteContactsCursor newInstance( Context context, Cursor[] cursors, List<Directory> directories) { Assert.checkArgument( - cursors.length == directories.size(), "Directories and cursors must be the same size."); + cursors.length == directories.size(), + "Directories (%d) and cursors (%d) must be the same size.", + directories.size(), + cursors.length); Cursor[] cursorsWithHeaders = insertHeaders(context, cursors, directories); if (cursorsWithHeaders.length > 0) { return new RemoteContactsCursor(cursorsWithHeaders); diff --git a/java/com/android/dialer/searchfragment/remote/RemoteContactsCursorLoader.java b/java/com/android/dialer/searchfragment/remote/RemoteContactsCursorLoader.java index 771b7f183..37695be50 100644 --- a/java/com/android/dialer/searchfragment/remote/RemoteContactsCursorLoader.java +++ b/java/com/android/dialer/searchfragment/remote/RemoteContactsCursorLoader.java @@ -28,6 +28,7 @@ import android.support.annotation.VisibleForTesting; import android.text.TextUtils; import com.android.dialer.searchfragment.common.Projections; import com.android.dialer.searchfragment.remote.RemoteDirectoriesCursorLoader.Directory; +import java.util.ArrayList; import java.util.List; /** @@ -58,7 +59,7 @@ public final class RemoteContactsCursorLoader extends CursorLoader { null, Phone.SORT_KEY_PRIMARY); this.query = query; - this.directories = directories; + this.directories = new ArrayList<>(directories); cursors = new Cursor[directories.size()]; } diff --git a/java/com/android/incallui/videotech/lightbringer/LightbringerTech.java b/java/com/android/incallui/videotech/lightbringer/LightbringerTech.java index 3a0ac48d5..784daa85a 100644 --- a/java/com/android/incallui/videotech/lightbringer/LightbringerTech.java +++ b/java/com/android/incallui/videotech/lightbringer/LightbringerTech.java @@ -187,9 +187,7 @@ public class LightbringerTech implements VideoTech, LightbringerListener { } @Override - public void setDeviceOrientation(int rotation) { - throw Assert.createUnsupportedOperationFailException(); - } + public void setDeviceOrientation(int rotation) {} @Override public void onLightbringerStateChanged() { |