Fixing missing movement bounds notification to SystemUI.

- When WM updates from a configuration change, ensure that we update the
  pinned stack controller even if there is currently no pinned stack.
- Also finish the menu activity once an activity is unpinned.

Bug: 36879891
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: I789945c1783693cf4b4e3d6663548c8669784001
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 2f64cd4..058fdae 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -1420,6 +1420,13 @@
                 changedStackList.add(stack.mStackId);
             }
         }
+
+        // If there was no pinned stack, we still need to notify the controller of the display info
+        // update as a result of the config change.  We do this here to consolidate the flow between
+        // changes when there is and is not a stack.
+        if (getStackById(PINNED_STACK_ID) == null) {
+            mPinnedStackControllerLocked.onDisplayInfoChanged();
+        }
     }
 
     @Override