Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69d11c2e authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed an issue where test had lingering inflations

Because we are overriding the mainLooper and certain tests
had lingering inflations, when those inflation finished,
the main handler had been changed again.
We should really look into if this is 100% necessary in the
future but this should fix the flakey tests.

Fixes: 131413417
Test: atest SystemUITests
Change-Id: I761eace99cbedc2fa57e90016152c6d29b351dc2
parent 85c95160
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ public class NotificationContentInflaterTest extends SysuiTestCase {
        mNotificationInflater.setUsesIncreasedHeadsUpHeight(true);
        Notification.Builder builder = spy(mBuilder);
        mNotificationInflater.inflateNotificationViews(
                false /* inflateSynchronously */,
                true /* inflateSynchronously */,
                FLAG_CONTENT_VIEW_ALL,
                builder,
                mContext);
@@ -113,7 +113,7 @@ public class NotificationContentInflaterTest extends SysuiTestCase {
        mNotificationInflater.setUsesIncreasedHeight(true);
        Notification.Builder builder = spy(mBuilder);
        mNotificationInflater.inflateNotificationViews(
                false /* inflateSynchronously */,
                true /* inflateSynchronously */,
                FLAG_CONTENT_VIEW_ALL,
                builder,
                mContext);
@@ -161,6 +161,7 @@ public class NotificationContentInflaterTest extends SysuiTestCase {
    @Test
    public void testRemovedNotInflated() throws Exception {
        mRow.setRemoved();
        mNotificationInflater.setInflateSynchronously(true);
        mNotificationInflater.inflateNotificationViews();
        Assert.assertNull(mRow.getEntry().getRunningTask());
    }