Fix QuickSettingsTest#testQuickSettingCollapse.

The QS shade is dismissed in this test, so the brightness tile should
not be findObject() should return null (assuming the test waits for
the animation to complete).

Change-Id: I9baed94bff33a4a30033205cb1acddebf4efbe5e
Test: on android-gce (master) and an nyc-release bullhead.
diff --git a/tests/functional/settingstests/src/com/android/settings/functional/QuickSettingsTest.java b/tests/functional/settingstests/src/com/android/settings/functional/QuickSettingsTest.java
index 50cd5b9..57ce601 100644
--- a/tests/functional/settingstests/src/com/android/settings/functional/QuickSettingsTest.java
+++ b/tests/functional/settingstests/src/com/android/settings/functional/QuickSettingsTest.java
@@ -104,11 +104,10 @@
 
         // Verify that the brightness slider which is only visible on full expansion
         // isn't visible in the collapsed state
-        UiObject2 quicksettingsExpandedShade = mDevice.wait(
-                Until.findObject(By.descContains(QuickSettingTiles.BRIGHTNESS.getName())),
-                LONG_TIMEOUT);
-        assertNotNull("Quick settings shade did not collapse correctly",
-                quicksettingsExpandedShade);
+        assertTrue("Quick settings shade did not collapse correctly",
+            mDevice.wait(
+                Until.gone(By.descContains(QuickSettingTiles.BRIGHTNESS.getName())),
+                LONG_TIMEOUT));
     }
 
     @MediumTest