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

Commit 2f389bbb authored by Vadym Omelnytskyi's avatar Vadym Omelnytskyi
Browse files

Extend ShadowColorDisplayManager functionality

Add color mode setter/getter that will allow to test color mode using
ShadowColorDisplayManager.

Test: robolectric tests with ShadowCOlorDisplayManager
Flag: EXEMPT testing infrastructure
Bug: 390644464
Change-Id: Icfe10413da388e2c53cdc7045b96d194d506f647
parent 5d664b97
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import org.robolectric.annotation.Implements;
public class ShadowColorDisplayManager extends org.robolectric.shadows.ShadowColorDisplayManager {

    private boolean mIsReduceBrightColorsActivated;
    private int mColorMode;

    @Implementation
    @SystemApi
@@ -43,4 +44,13 @@ public class ShadowColorDisplayManager extends org.robolectric.shadows.ShadowCol
        return mIsReduceBrightColorsActivated;
    }

    @Implementation
    public int getColorMode() {
        return mColorMode;
    }

    @Implementation
    public void setColorMode(int colorMode) {
        mColorMode = colorMode;
    }
}