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

Commit d6583970 authored by petsjonkin's avatar petsjonkin Committed by Oleg Petšjonkin
Browse files

Adding feature flag to enable new external proximity sensor API

Part of VRR support for DisplayManager

Test: atest SensorObserverTest
Bug: b/310240400
Change-Id: I73f5c63f0e70910fc3332d3fbb47ff435018d3ed
parent d1b76b61
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -86,6 +86,10 @@ public class DisplayManagerFlags {
            Flags.FLAG_BRIGHTNESS_INT_RANGE_USER_PERCEPTION,
            Flags::brightnessIntRangeUserPerception);

    private final FlagState mVsyncProximityVote = new FlagState(
            Flags.FLAG_ENABLE_EXTERNAL_VSYNC_PROXIMITY_VOTE,
            Flags::enableExternalVsyncProximityVote);

    /** Returns whether connected display management is enabled or not. */
    public boolean isConnectedDisplayManagementEnabled() {
        return mConnectedDisplayManagementFlagState.isEnabled();
@@ -170,6 +174,10 @@ public class DisplayManagerFlags {
        return mBrightnessIntRangeUserPerceptionFlagState.isEnabled();
    }

    public boolean isExternalVsyncProximityVoteEnabled() {
        return mVsyncProximityVote.isEnabled();
    }

    /**
     * dumps all flagstates
     * @param pw printWriter
@@ -188,6 +196,7 @@ public class DisplayManagerFlags {
        pw.println(" " + mPowerThrottlingClamperFlagState);
        pw.println(" " + mSmallAreaDetectionFlagState);
        pw.println(" " + mBrightnessIntRangeUserPerceptionFlagState);
        pw.println(" " + mVsyncProximityVote);
    }

    private static class FlagState {
+8 −0
Original line number Diff line number Diff line
@@ -112,3 +112,11 @@ flag {
    bug: "183655602"
    is_fixed_read_only: true
}

flag {
    name: "enable_external_vsync_proximity_vote"
    namespace: "display_manager"
    description: "Feature flag for external vsync proximity vote"
    bug: "284866750"
    is_fixed_read_only: true
}