No bubble for low ram devices

Copy of partner CL:
https://partner-android-review.googlesource.com/c/platform/cts/+/1391338

Since it doesn't support bubble for low ram devices,
test should check whether it is low ram device or not.
Test: run cts -m CtsAppTestCases   -t android.app.cts.NotificationManagerTest#testNotificationManagerBubblePolicy_flagForAppForeground
Bug: 135394088

Change-Id: Ibc4e6ed62b0304b588958bc16defe855e3fc999f
diff --git a/tests/app/src/android/app/cts/NotificationManagerTest.java b/tests/app/src/android/app/cts/NotificationManagerTest.java
index 697fe18..6c57c04 100644
--- a/tests/app/src/android/app/cts/NotificationManagerTest.java
+++ b/tests/app/src/android/app/cts/NotificationManagerTest.java
@@ -2626,8 +2626,10 @@
             // Should be foreground now
             a.sendBubble(1);
 
+            boolean shouldBeBubble = !mActivityManager.isLowRamDevice();
+
             if (!checkNotificationExistence(BUBBLE_NOTIF_ID,
-                    true /* shouldExist */, true /* shouldBeBubble */)) {
+                    true /* shouldExist */, shouldBeBubble)) {
                 fail("couldn't find posted notification bubble with id=" + BUBBLE_NOTIF_ID);
             }
 
@@ -2638,8 +2640,6 @@
             // The notif should be allowed to update as a bubble
             a.sendBubble(2);
 
-            boolean shouldBeBubble = !mActivityManager.isLowRamDevice();
-
             if (!checkNotificationExistence(BUBBLE_NOTIF_ID,
                     true /* shouldExist */, shouldBeBubble)) {
                 fail("couldn't find posted notification bubble with id=" + BUBBLE_NOTIF_ID);