Don't offer snooze for foreground service notifications

Also updates NotificationMenuRow tests to actually check if menu
was created.

Test: Manual, have foreground service, check if snooze is visible
Bug: 37152715
Change-Id: I09cf60598c3e8991f2da731da1ef7e0a718c3435
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 9176f57..677642e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -328,6 +328,9 @@
         mIsColorized = mStatusBarNotification.getNotification().isColorized();
         mShowingPublicInitialized = false;
         updateNotificationColor();
+        if (mMenuRow != null) {
+            mMenuRow.onNotificationUpdated();
+        }
         if (mIsSummaryWithChildren) {
             mChildrenContainer.recreateNotificationHeader(mExpandClickListener);
             mChildrenContainer.onNotificationUpdated();
@@ -760,7 +763,10 @@
         }
         mMenuRow = plugin;
         if (mMenuRow.useDefaultMenuItems()) {
-            mMenuRow.setMenuItems(NotificationMenuRow.getDefaultMenuItems(mContext));
+            ArrayList<MenuItem> items = new ArrayList<>();
+            items.add(NotificationMenuRow.createInfoItem(mContext));
+            items.add(NotificationMenuRow.createSnoozeItem(mContext));
+            mMenuRow.setMenuItems(items);
         }
         if (existed) {
             createMenu();
@@ -787,7 +793,6 @@
         return mMenuRow;
     }
 
-
     public NotificationMenuRowPlugin getProvider() {
         return mMenuRow;
     }