Remove missed call notification when going into the History activity

This commit is contained in:
Sylvain Berfini 2019-11-04 16:56:16 +01:00
parent 372e408fbb
commit 5e04f0b86d
2 changed files with 6 additions and 0 deletions

View file

@ -23,6 +23,7 @@ import android.app.Fragment;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import org.linphone.LinphoneContext;
import org.linphone.LinphoneManager; import org.linphone.LinphoneManager;
import org.linphone.R; import org.linphone.R;
import org.linphone.activities.MainActivity; import org.linphone.activities.MainActivity;
@ -71,6 +72,7 @@ public class HistoryActivity extends MainActivity {
mHistorySelected.setVisibility(View.VISIBLE); mHistorySelected.setVisibility(View.VISIBLE);
LinphoneManager.getCore().resetMissedCallsCount(); LinphoneManager.getCore().resetMissedCallsCount();
displayMissedCalls(); displayMissedCalls();
LinphoneContext.instance().getNotificationManager().dismissMissedCallNotification();
} }
@Override @Override

View file

@ -327,6 +327,10 @@ public class NotificationsManager {
} }
} }
public void dismissMissedCallNotification() {
dismissNotification(MISSED_CALLS_NOTIF_ID);
}
public void sendNotification(int id, Notification notif) { public void sendNotification(int id, Notification notif) {
Log.i("[Notifications Manager] Notifying " + id); Log.i("[Notifications Manager] Notifying " + id);
mNM.notify(id, notif); mNM.notify(id, notif);