Move NSSL to a separate layout file.

This allows devices of different form factors to provide their own
version of NSSL.

Bug: 243819288
Test: make, push, everything is still working
Change-Id: Ie8feafe120eb8c5aaa5d889d4145d4348534ddef
(cherry picked from commit 666354659c87f0ad67b19c83bd443fb473d37d2e)
diff --git a/packages/SystemUI/res/layout/notification_stack_scroll_layout.xml b/packages/SystemUI/res/layout/notification_stack_scroll_layout.xml
new file mode 100644
index 0000000..65cf81e
--- /dev/null
+++ b/packages/SystemUI/res/layout/notification_stack_scroll_layout.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright (C) 2022 The Android Open Source Project
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+-->
+
+<!-- This XML is served to be overridden by other OEMs/device types. -->
+<com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:systemui="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/notification_stack_scroller"
+    android:layout_marginTop="@dimen/notification_panel_margin_top"
+    android:layout_width="0dp"
+    android:layout_height="match_parent"
+    android:layout_marginHorizontal="@dimen/notification_panel_margin_horizontal"
+    android:layout_marginBottom="@dimen/notification_panel_margin_bottom"
+    android:importantForAccessibility="no"
+    systemui:layout_constraintStart_toStartOf="parent"
+    systemui:layout_constraintEnd_toEndOf="parent"
+/>
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index 6423a50..f0e49d5 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -109,17 +109,10 @@
             systemui:layout_constraintGuide_percent="0.5"
             android:orientation="vertical"/>
 
-        <com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout
-            android:id="@+id/notification_stack_scroller"
-            android:layout_marginTop="@dimen/notification_panel_margin_top"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_marginHorizontal="@dimen/notification_panel_margin_horizontal"
-            android:layout_marginBottom="@dimen/notification_panel_margin_bottom"
-            android:importantForAccessibility="no"
-            systemui:layout_constraintStart_toStartOf="parent"
-            systemui:layout_constraintEnd_toEndOf="parent"
-        />
+        <!-- This layout should always include a version of
+             NotificationStackScrollLayout, as it is expected from
+             NotificationPanelViewController. -->
+        <include layout="@layout/notification_stack_scroll_layout" />
 
         <include layout="@layout/photo_preview_overlay" />