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

Commit fdd68f47 authored by Pawan Wagh's avatar Pawan Wagh Committed by Automerger Merge Worker
Browse files

Merge "Fix flaky test for persistent notifications" into main am: b6fc7a6f

parents 7423e21b b6fc7a6f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -134,6 +134,6 @@ public class PageAgnosticNotificationService extends Service {


        // No updates should be allowed in page-agnostic mode
        // No updates should be allowed in page-agnostic mode
        disableAutomaticUpdates();
        disableAutomaticUpdates();
        return Service.START_NOT_STICKY;
        return Service.START_REDELIVER_INTENT;
    }
    }
}
}
+2 −0
Original line number Original line Diff line number Diff line
@@ -76,11 +76,13 @@ public class Enable16KbTest extends BaseHostJUnit4Test {
        installTestApp();
        installTestApp();


        // Enable developer option and switch to 16kb kernel and Check page size
        // Enable developer option and switch to 16kb kernel and Check page size
        getDevice().enableAdbRoot();
        runTestAndWait(SWITCH_TO_16KB);
        runTestAndWait(SWITCH_TO_16KB);
        result = getDevice().executeShellCommand("getconf PAGE_SIZE");
        result = getDevice().executeShellCommand("getconf PAGE_SIZE");
        assertEquals("16384", result.strip());
        assertEquals("16384", result.strip());


        // switch back to 4kb kernel and check page size
        // switch back to 4kb kernel and check page size
        getDevice().enableAdbRoot();
        runTestAndWait(SWITCH_TO_4KB);
        runTestAndWait(SWITCH_TO_4KB);
        result = getDevice().executeShellCommand("getconf PAGE_SIZE");
        result = getDevice().executeShellCommand("getconf PAGE_SIZE");
        assertEquals("4096", result.strip());
        assertEquals("4096", result.strip());
+3 −0
Original line number Original line Diff line number Diff line
@@ -68,6 +68,8 @@ public class Enable16KbDeviceTest {
            throw new RuntimeException("failed to freeze device orientation", e);
            throw new RuntimeException("failed to freeze device orientation", e);
        }
        }


        mDevice.executeShellCommand("am start -a com.android.setupwizard.FOUR_CORNER_EXIT");
        mDevice.waitForWindowUpdate(null, TIMEOUT);
        mDevice.executeShellCommand("input keyevent KEYCODE_WAKEUP");
        mDevice.executeShellCommand("input keyevent KEYCODE_WAKEUP");
        mDevice.executeShellCommand("wm dismiss-keyguard");
        mDevice.executeShellCommand("wm dismiss-keyguard");
    }
    }
@@ -150,6 +152,7 @@ public class Enable16KbDeviceTest {


    private void openPersistentNotification(String title) {
    private void openPersistentNotification(String title) {
        mDevice.openNotification();
        mDevice.openNotification();
        mDevice.waitForWindowUpdate(null, TIMEOUT);
        verifyTextOnScreen(title);
        verifyTextOnScreen(title);
        mDevice.wait(Until.findObject(By.text(title)), TIMEOUT).click();
        mDevice.wait(Until.findObject(By.text(title)), TIMEOUT).click();
        mDevice.waitForWindowUpdate(null, TIMEOUT);
        mDevice.waitForWindowUpdate(null, TIMEOUT);