Fix history links for conversations

Include the conversation id who the right settings screen
is launched

Test: manual
Bug: 149505730
Change-Id: Idef9d88c9333a83c5c9ce035f7b25bc50c6cfa35
diff --git a/src/com/android/settings/notification/history/NotificationHistoryAdapter.java b/src/com/android/settings/notification/history/NotificationHistoryAdapter.java
index 87804d5..4448dee 100644
--- a/src/com/android/settings/notification/history/NotificationHistoryAdapter.java
+++ b/src/com/android/settings/notification/history/NotificationHistoryAdapter.java
@@ -63,7 +63,8 @@
         holder.setTitle(hn.getTitle());
         holder.setSummary(hn.getText());
         holder.setPostedTime(hn.getPostedTimeMs());
-        holder.addOnClick(hn.getPackage(), hn.getUserId(), hn.getChannelId());
+        holder.addOnClick(hn.getPackage(), hn.getUserId(), hn.getChannelId(),
+                hn.getConversationId());
     }
 
     @Override
diff --git a/src/com/android/settings/notification/history/NotificationHistoryViewHolder.java b/src/com/android/settings/notification/history/NotificationHistoryViewHolder.java
index e7caa6a..d1f47af 100644
--- a/src/com/android/settings/notification/history/NotificationHistoryViewHolder.java
+++ b/src/com/android/settings/notification/history/NotificationHistoryViewHolder.java
@@ -18,6 +18,7 @@
 
 import static android.provider.Settings.EXTRA_APP_PACKAGE;
 import static android.provider.Settings.EXTRA_CHANNEL_ID;
+import static android.provider.Settings.EXTRA_CONVERSATION_ID;
 
 import android.content.Intent;
 import android.os.UserHandle;
@@ -61,11 +62,12 @@
         mTime.setTime(postedTime);
     }
 
-    void addOnClick(String pkg, int userId, String channelId) {
+    void addOnClick(String pkg, int userId, String channelId, String conversationId) {
         itemView.setOnClickListener(v -> {
             Intent intent =  new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS)
                     .putExtra(EXTRA_APP_PACKAGE, pkg)
-                    .putExtra(EXTRA_CHANNEL_ID, channelId);
+                    .putExtra(EXTRA_CHANNEL_ID, channelId)
+                    .putExtra(EXTRA_CONVERSATION_ID, conversationId);
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
             itemView.getContext().startActivityAsUser(intent, UserHandle.of(userId));
         });