Fix HUNs and notification center

HUNs:
* Bring back big app icon after library changes
* Rounded corners

Notification center:
* Fix title bar
* Remove duplicate "clear all" buttons

Bug: 197366255
Bug: 197366276
Test: manual
Change-Id: I910c5310cdaa72183678916e65e8fec55155f8ea
diff --git a/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/layout/message_headsup_notification_template.xml b/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/layout/message_headsup_notification_template.xml
index efa3b57..18f3304 100644
--- a/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/layout/message_headsup_notification_template.xml
+++ b/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/layout/message_headsup_notification_template.xml
@@ -34,21 +34,12 @@
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/car_notification_card_inner_top_margin">
 
-            <ImageView
-                android:id="@+id/notification_body_icon"
-                android:layout_width="@dimen/notification_touch_target_size"
-                android:layout_height="@dimen/notification_touch_target_size"
-                android:layout_alignParentStart="true"
-                android:layout_alignParentTop="true"
-                android:layout_marginStart="@dimen/card_start_margin"/>
-
             <com.android.car.notification.template.CarNotificationHeaderView
                 android:id="@+id/notification_header"
                 android:layout_width="0dp"
                 android:layout_height="0dp"
                 android:layout_alignParentTop="true"
-                android:layout_toEndOf="@id/notification_body_icon"
-                android:layout_alignParentEnd="true"
+                android:layout_alignParentStart="true"
                 app:isHeadsUp="true"/>
 
             <com.android.car.notification.template.CarNotificationBodyView
@@ -57,20 +48,12 @@
                 android:layout_height="wrap_content"
                 android:minHeight="@dimen/notification_touch_target_size"
                 android:gravity="center_vertical"
-                android:layout_toEndOf="@id/notification_body_icon"
                 android:layout_alignParentTop="true"
+                android:layout_alignParentStart="true"
                 android:layout_toStartOf="@id/message_count"
                 android:layout_marginStart="@dimen/card_body_margin_start"
                 app:maxLines="@integer/config_headsUpNotificationMaxBodyLines"
-                app:showBigIcon="false"/>
-
-            <TextView
-                android:id="@+id/message_count"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_above="@id/notification_actions_wrapper"
-                android:layout_alignParentEnd="true"
-                android:layout_marginEnd="@dimen/card_end_margin"/>
+                app:showBigIcon="true"/>
 
             <FrameLayout
                 android:id="@+id/notification_actions_wrapper"
diff --git a/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/layout/notification_center_activity.xml b/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/layout/notification_center_activity.xml
new file mode 100644
index 0000000..83a6525
--- /dev/null
+++ b/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/layout/notification_center_activity.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Copyright (C) 2021 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.
+  -->
+
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <com.android.car.ui.FocusParkingView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"/>
+
+    <com.android.car.ui.FocusArea
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <com.android.car.notification.CarNotificationView
+            android:id="@+id/notification_view"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+
+            <FrameLayout
+                android:id="@+id/exit_button_container"
+                android:layout_width="0dp"
+                android:layout_height="0dp"
+                android:visibility="gone"/>
+
+            <TextView
+                android:id="@+id/empty_notification_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                app:layout_constraintBottom_toTopOf="@id/manage_button"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent"
+                app:layout_constraintVertical_chainStyle="packed"
+                android:text="@string/empty_notification_header"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:visibility="gone"/>
+
+            <Button
+                android:id="@+id/manage_button"
+                style="@style/ManageButton"
+                android:layout_width="wrap_content"
+                android:layout_height="@dimen/manage_button_height"
+                android:layout_marginTop="@dimen/manage_button_top_margin"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@id/empty_notification_text"
+                app:layout_constraintVertical_chainStyle="packed"
+                android:text="@string/manage_text"
+                android:visibility="gone"/>
+
+            <androidx.recyclerview.widget.RecyclerView
+                android:id="@+id/notifications"
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:orientation="vertical"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/notification_center_title"/>
+        </com.android.car.notification.CarNotificationView>
+    </com.android.car.ui.FocusArea>
+</FrameLayout>
diff --git a/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/values/config.xml b/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/values/config.xml
index e6391ee..4862022 100644
--- a/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/values/config.xml
+++ b/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/values/config.xml
@@ -21,4 +21,16 @@
     <string name="config_headsUpNotificationAnimationHelper" translatable="false">
         com.android.car.notification.headsup.animationhelper.CarHeadsUpNotificationBottomAnimationHelper</string>
 
+    <!-- If false, small icon will be used to distinguish the app, large icon will be used
+         in notification body and notification header will be shown.-->
+    <bool name="config_useLauncherIcon">false</bool>
+
+    <!-- Whether to show header for the notifications center -->
+    <bool name="config_showHeaderForNotifications">true</bool>
+
+    <!-- Whether to show footer for the notifications center -->
+    <bool name="config_showFooterForNotifications">false</bool>
+
+    <!-- Whether to show Recents/Older header for notifications list -->
+    <bool name="config_showRecentAndOldHeaders">false</bool>
 </resources>
\ No newline at end of file
diff --git a/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/values/strings.xml b/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/values/strings.xml
index dd53e12..981ffdc 100644
--- a/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/values/strings.xml
+++ b/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/values/strings.xml
@@ -18,4 +18,7 @@
 <resources>
     <!-- The assistant action label to read aloud a message notification and optionally prompt user to respond [CHAR_LIMIT=20]-->
     <string name="assist_action_play_label">Play message</string>
+
+    <!-- Notification header text displayed on top of the notification center shade [CHAR_LIMIT=25] -->
+    <string name="notification_header">Notification Center</string>
 </resources>
\ No newline at end of file
diff --git a/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/xml/overlays.xml b/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/xml/overlays.xml
index 9e2ca19..b768ecb 100644
--- a/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/xml/overlays.xml
+++ b/car_product/car_ui_portrait/rro/CarUiPortraitNotificationRRO/res/xml/overlays.xml
@@ -16,11 +16,16 @@
   -->
 
 <overlay>
-    <item target="attr/isHeadsUp" value="@attr/isHeadsUp" />
-    <item target="attr/maxLines" value="@attr/maxLines" />
-    <item target="attr/showBigIcon" value="@attr/showBigIcon" />
+    <item target="attr/cardCornerRadius" value="@attr/cardCornerRadius"/>
+    <item target="attr/isHeadsUp" value="@attr/isHeadsUp"/>
+    <item target="attr/maxLines" value="@attr/maxLines"/>
+    <item target="attr/showBigIcon" value="@attr/showBigIcon"/>
 
     <item target="bool/config_showHeadsUpNotificationOnBottom" value="@bool/config_showHeadsUpNotificationOnBottom" />
+    <item target="bool/config_useLauncherIcon" value="@bool/config_useLauncherIcon"/>
+    <item target="bool/config_showHeaderForNotifications" value="@bool/config_showHeaderForNotifications"/>
+    <item target="bool/config_showFooterForNotifications" value="@bool/config_showFooterForNotifications"/>
+    <item target="bool/config_showRecentAndOldHeaders" value="@bool/config_showRecentAndOldHeaders"/>
 
     <item target="dimen/action_button_height" value="@dimen/action_button_height" />
     <item target="dimen/action_button_radius" value="@dimen/action_button_radius" />
@@ -41,27 +46,31 @@
     <item target="id/card_view" value="@id/card_view" />
     <item target="id/headsup_content" value="@id/headsup_content"/>
     <item target="id/inner_template_view" value="@id/inner_template_view" />
-    <item target="id/message_count" value="@id/message_count"/>
     <item target="id/notification_actions" value="@id/notification_actions" />
     <item target="id/notification_actions_wrapper" value="@id/notification_actions_wrapper" />
     <item target="id/notification_body" value="@id/notification_body"/>
-    <item target="id/notification_body_icon" value="@id/notification_body_icon" />
     <item target="id/notification_header" value="@id/notification_header"/>
     <item target="id/notification_headsup" value="@id/notification_headsup"/>
+    <item target="id/notification_view" value="@id/notification_view"/>
+    <item target="id/notifications" value="@id/notifications"/>
+    <item target="id/manage_button" value="@id/manage_button"/>
+    <item target="id/empty_notification_text" value="@id/empty_notification_text"/>
+    <item target="id/exit_button_container" value="@id/exit_button_container"/>
 
     <item target="layout/car_notification_actions_view" value="@layout/car_notification_actions_view"/>
     <item target="layout/headsup_container_bottom" value="@layout/headsup_container_bottom"/>
     <item target="layout/message_headsup_notification_template" value="@layout/message_headsup_notification_template" />
+    <item target="layout/notification_center_activity" value="@layout/notification_center_activity"/>
 
     <item target="string/assist_action_play_label" value="@string/assist_action_play_label"/>
     <item target="string/config_headsUpNotificationAnimationHelper" value="@string/config_headsUpNotificationAnimationHelper" />
+    <item target="string/notification_header" value="@string/notification_header"/>
 
     <item target="style/NotificationActionButtonBase" value="@style/NotificationActionButtonBase"/>
     <item target="style/NotificationActionViewLayout" value="@style/NotificationActionViewLayout"/>
     <item target="style/NotificationBodContentText" value="@style/NotificationBodyContentText" />
     <item target="style/NotificationBodyTitleText" value="@style/NotificationBodyTitleText" />
 
-
     <item target="dimen/card_min_bottom_padding" value="@dimen/card_min_bottom_padding"/>
     <item target="dimen/card_min_top_padding" value="@dimen/card_min_top_padding"/>
 </overlay>