Update ChangeAppRotation test

Updating the ChangeAppRotationTest test, adding new WM and layers
assertions. Also fixing the command to run this test in the comment at
the beginning.

Test: atest FlickerTests:ChangeAppRotationTest
Bug: b/171049719
Change-Id: I24a4bc74690363036174da1a2683c932ca349ec1
diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt
index 24ca311..0db064a 100644
--- a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt
+++ b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt
@@ -5,7 +5,7 @@
  * 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
+ * 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,
@@ -17,8 +17,8 @@
 package com.android.server.wm.flicker.rotation
 
 import android.platform.test.annotations.Presubmit
-import androidx.test.filters.RequiresDevice
 import android.view.Surface
+import androidx.test.filters.RequiresDevice
 import androidx.test.platform.app.InstrumentationRegistry
 import com.android.server.wm.flicker.Flicker
 import com.android.server.wm.flicker.FlickerTestRunner
@@ -27,8 +27,8 @@
 import com.android.server.wm.flicker.focusDoesNotChange
 import com.android.server.wm.flicker.helpers.StandardAppHelper
 import com.android.server.wm.flicker.helpers.WindowUtils
-import com.android.server.wm.flicker.helpers.setRotation
 import com.android.server.wm.flicker.helpers.buildTestTag
+import com.android.server.wm.flicker.helpers.setRotation
 import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen
 import com.android.server.wm.flicker.navBarLayerIsAlwaysVisible
 import com.android.server.wm.flicker.navBarLayerRotatesAndScales
@@ -36,6 +36,8 @@
 import com.android.server.wm.flicker.noUncoveredRegions
 import com.android.server.wm.flicker.repetitions
 import com.android.server.wm.flicker.startRotation
+import com.android.server.wm.flicker.visibleLayersShownMoreThanOneConsecutiveEntry
+import com.android.server.wm.flicker.visibleWindowsShownMoreThanOneConsecutiveEntry
 import com.android.server.wm.flicker.statusBarLayerIsAlwaysVisible
 import com.android.server.wm.flicker.statusBarLayerRotatesScales
 import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
@@ -46,7 +48,7 @@
 
 /**
  * Cycle through supported app rotations.
- * To run this test: `atest FlickerTest:ChangeAppRotationTest`
+ * To run this test: `atest FlickerTests:ChangeAppRotationTest`
  */
 @Presubmit
 @RequiresDevice
@@ -96,6 +98,7 @@
                         windowManagerTrace {
                             navBarWindowIsAlwaysVisible()
                             statusBarWindowIsAlwaysVisible()
+                            visibleWindowsShownMoreThanOneConsecutiveEntry()
                         }
 
                         layersTrace {
@@ -107,6 +110,7 @@
                                 configuration.endRotation)
                             statusBarLayerRotatesScales(configuration.startRotation,
                                 configuration.endRotation)
+                            visibleLayersShownMoreThanOneConsecutiveEntry(bugId = 140855415)
                         }
 
                         layersTrace {
@@ -128,7 +132,7 @@
                                         .then()
                                         .showsLayer(SCREENSHOT_LAYER)
                                         .then()
-                                showsLayer(testApp.getPackage())
+                                        .showsLayer(testApp.getPackage())
                             }
                         }