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

Commit 8dea5fdc authored by Hoa Xuan's avatar Hoa Xuan Committed by Josh Yang
Browse files

Fix test testZenUpgradeNotification on watch

Commit a485ec65 disabled DND status
change notification on watch. So, assume that the device is not watch
to make the test pass.

Bug: 266833455
Test: atest FrameworksUiServicesTests:com.android.server.\
  notification.ZenModeHelperTest#testZenUpgradeNotification
Change-Id: I94441c7172e55ed20add72b4558407fcc1a11fe6
(cherry picked from commit 6aa3b73ea5422cd057e3d58a61a3a013fd5b7f19)
parent fb7cf099
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -525,6 +525,13 @@ public class ZenModeHelperTest extends UiServiceTestCase {

    @Test
    public void testZenUpgradeNotification() {
        /**
         * Commit a485ec65b5ba947d69158ad90905abf3310655cf disabled DND status change
         * notification on watches. So, assume that the device is not watch.
         */
        when(mContext.getPackageManager()).thenReturn(mPackageManager);
        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WATCH)).thenReturn(false);

        // shows zen upgrade notification if stored settings says to shows,
        // zen has not been updated, boot is completed
        // and we're setting zen mode on