Merge "Fix the problem that "forget" does not return to the previous level UI, bugId: b/341040773" into main
diff --git a/Settings/src/com/android/tv/settings/accessories/ConnectedDevicesSliceProvider.java b/Settings/src/com/android/tv/settings/accessories/ConnectedDevicesSliceProvider.java
index b2a9875..60ce6cc 100644
--- a/Settings/src/com/android/tv/settings/accessories/ConnectedDevicesSliceProvider.java
+++ b/Settings/src/com/android/tv/settings/accessories/ConnectedDevicesSliceProvider.java
@@ -29,6 +29,8 @@
 import static com.android.tv.settings.accessories.ConnectedDevicesSliceBroadcastReceiver.EXTRA_TOGGLE_STATE;
 import static com.android.tv.settings.accessories.ConnectedDevicesSliceBroadcastReceiver.EXTRA_TOGGLE_TYPE;
 import static com.android.tv.settings.accessories.ConnectedDevicesSliceUtils.EXTRAS_SLICE_URI;
+import static com.android.tv.settings.accessories.ConnectedDevicesSliceUtils.EXTRAS_DIRECTION;
+import static com.android.tv.settings.accessories.ConnectedDevicesSliceUtils.DIRECTION_BACK;
 import static com.android.tv.settings.accessories.ConnectedDevicesSliceUtils.FIND_MY_REMOTE_PHYSICAL_BUTTON_ENABLED_SETTING;
 import static com.android.tv.settings.accessories.ConnectedDevicesSliceUtils.isFindMyRemoteButtonEnabled;
 
@@ -391,6 +393,7 @@
                 context, 7, i, PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);
         followUpIntent = new Intent(context, ConnectedDevicesSliceBroadcastReceiver.class);
         followUpIntent.putExtra(EXTRAS_SLICE_URI, sliceUri.toString());
+        followUpIntent.putExtra(EXTRAS_DIRECTION, DIRECTION_BACK);
         PendingIntent forgetFollowupIntent = PendingIntent.getBroadcast(
                 context, 8, followUpIntent,
                 PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);