From 5b636ebfd4a8a2ef53a11d0190c59dd0fb9aad75 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Wed, 29 May 2019 01:09:06 -0700 Subject: Optimizing some layouts in taskview > Recycling DigitalWellBeingToast so that the view is not inflated everytime > Simplifying DigitalWellBeingToast to use a single text view > Adding support for footers in taskView without creating additional layout Bug: 122345781 Change-Id: Ia889819b93eb8644532ea95c6767554874d5e2d1 --- .../tests/src/com/android/quickstep/DigitalWellBeingToastTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'quickstep/tests') diff --git a/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java b/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java index 70f9c90da..0c5a6f5b6 100644 --- a/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java +++ b/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java @@ -51,15 +51,15 @@ public class DigitalWellBeingToastTest extends AbstractQuickStepTest { mLauncher.pressHome(); final DigitalWellBeingToast toast = getToast(); - assertTrue("Toast is not visible", toast.isShown()); - assertEquals("Toast text: ", "5 minutes left today", toast.getTextView().getText()); + assertTrue("Toast is not visible", toast.hasLimit()); + assertEquals("Toast text: ", "5 minutes left today", toast.getText()); // Unset time limit for app. runWithShellPermission( () -> usageStatsManager.unregisterAppUsageLimitObserver(observerId)); mLauncher.pressHome(); - assertFalse("Toast is visible", getToast().isShown()); + assertFalse("Toast is visible", getToast().hasLimit()); } finally { runWithShellPermission( () -> usageStatsManager.unregisterAppUsageLimitObserver(observerId)); -- cgit v1.2.3