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

Commit 4e83d57b authored by Behnam Heydarshahi's avatar Behnam Heydarshahi Committed by Automerger Merge Worker
Browse files

Merge "Fix volume CSD tests not cleanring up" into udc-dev am: 4939d78c am: 44145d6b

parents 871f56ad 44145d6b
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2343,6 +2343,13 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
        }
    }

    @VisibleForTesting
    void clearInternalHandleAfterTest() {
        if (mHandler != null) {
            mHandler.removeCallbacksAndMessages(null);
        }
    }

    private final class CustomDialog extends Dialog implements DialogInterface {
        public CustomDialog(Context context) {
            super(context, R.style.volume_dialog_theme);
+8 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import com.android.systemui.util.DeviceConfigProxyFake;
import com.android.systemui.util.concurrency.FakeExecutor;
import com.android.systemui.util.time.FakeSystemClock;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -370,6 +371,13 @@ public class VolumeDialogImplTest extends SysuiTestCase {
        verify(mCsdWarningDialog).show();
    }

    @After
    public void teardown() {
        if (mDialog != null) {
            mDialog.clearInternalHandleAfterTest();
        }
    }

/*
    @Test
    public void testContentDescriptions() {