diff options
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); } |