diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-06-08 19:54:16 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-06-08 19:54:16 +0000 |
commit | 2c82dcdd421acafd8bd71fa8d42bdf3d06db05e1 (patch) | |
tree | 9f50a65a9708756f1d3c1d37e14990ffbd03ab8b /java/com/android/dialer | |
parent | f003be12e0b56970196b2d665417ce0c35b86b96 (diff) | |
parent | 372267023bb382b050a292b5445d78b8df8b1724 (diff) |
Merge "Moved EXTRA_CLEAR_NEW_VOICEMAILS to MainComponent."
Diffstat (limited to 'java/com/android/dialer')
3 files changed, 5 insertions, 4 deletions
diff --git a/java/com/android/dialer/app/MainComponent.java b/java/com/android/dialer/app/MainComponent.java index ec3fc3fa6..1d3a4ceeb 100644 --- a/java/com/android/dialer/app/MainComponent.java +++ b/java/com/android/dialer/app/MainComponent.java @@ -27,6 +27,8 @@ import android.content.Intent; */ public class MainComponent { + public static final String EXTRA_CLEAR_NEW_VOICEMAILS = "EXTRA_CLEAR_NEW_VOICEMAILS"; + /** * @param context Context of the application package implementing MainActivity class. * @return intent for MainActivity.class @@ -52,6 +54,7 @@ public class MainComponent { intent.setComponent(new ComponentName(context, getComponentName())); intent.setAction("ACTION_SHOW_TAB"); intent.putExtra("EXTRA_SHOW_TAB", 3); + intent.putExtra(EXTRA_CLEAR_NEW_VOICEMAILS, true); return intent; } diff --git a/java/com/android/dialer/app/calllog/VisualVoicemailNotifier.java b/java/com/android/dialer/app/calllog/VisualVoicemailNotifier.java index a29bb62da..7fc104bb2 100644 --- a/java/com/android/dialer/app/calllog/VisualVoicemailNotifier.java +++ b/java/com/android/dialer/app/calllog/VisualVoicemailNotifier.java @@ -33,7 +33,6 @@ import android.telecom.PhoneAccountHandle; import android.telephony.TelephonyManager; import android.text.TextUtils; import com.android.contacts.common.util.ContactDisplayUtils; -import com.android.dialer.app.DialtactsActivity; import com.android.dialer.app.MainComponent; import com.android.dialer.app.R; import com.android.dialer.app.calllog.CallLogNotificationsQueryHelper.NewCall; @@ -273,7 +272,6 @@ final class VisualVoicemailNotifier { if (voicemail != null) { intent.setData(voicemail.voicemailUri); } - intent.putExtra(DialtactsActivity.EXTRA_CLEAR_NEW_VOICEMAILS, true); return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); } diff --git a/java/com/android/dialer/main/impl/OldMainActivityPeer.java b/java/com/android/dialer/main/impl/OldMainActivityPeer.java index 165d1085c..d790c6814 100644 --- a/java/com/android/dialer/main/impl/OldMainActivityPeer.java +++ b/java/com/android/dialer/main/impl/OldMainActivityPeer.java @@ -55,7 +55,7 @@ import android.widget.ImageView; import android.widget.TextView; import com.android.contacts.common.list.OnPhoneNumberPickerActionListener; import com.android.dialer.animation.AnimUtils; -import com.android.dialer.app.DialtactsActivity; +import com.android.dialer.app.MainComponent; import com.android.dialer.app.calllog.CallLogAdapter; import com.android.dialer.app.calllog.CallLogFragment; import com.android.dialer.app.calllog.CallLogFragment.CallLogFragmentListener; @@ -455,7 +455,7 @@ public class OldMainActivityPeer implements MainActivityPeer, FragmentUtilListen Logger.get(activity).logImpression(DialerImpression.Type.MAIN_OPEN_WITH_DIALPAD); } - if (intent.getBooleanExtra(DialtactsActivity.EXTRA_CLEAR_NEW_VOICEMAILS, false)) { + if (intent.getBooleanExtra(MainComponent.EXTRA_CLEAR_NEW_VOICEMAILS, false)) { LogUtil.i("OldMainActivityPeer.onHandleIntent", "clearing all new voicemails"); CallLogNotificationsService.markAllNewVoicemailsAsOld(activity); } |