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

Commit 65afe2db authored by Oleg Petšjonkin's avatar Oleg Petšjonkin Committed by Android (Google) Code Review
Browse files

Merge "Moving vrrSupported flag to DisplayDeviceConfig." into main

parents 88ea4a6f ed78f7dc
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -363,6 +363,14 @@ public abstract class DisplayManagerInternal {
     */
    public abstract List<RefreshRateLimitation> getRefreshRateLimitations(int displayId);

    /**
     * Returns if vrr support is enabled for specified display
     *
     * @param displayId The id of the display.
     * @return true if associated display supports dvrr
     */
    public abstract boolean isVrrSupportEnabled(int displayId);

    /**
     * For the given displayId, updates if WindowManager is responsible for mirroring on that
     * display. If {@code false}, then SurfaceFlinger performs no layer mirroring to the
+0 −3
Original line number Diff line number Diff line
@@ -4334,9 +4334,6 @@
    -->
    <bool name="config_wallpaperTopApp">false</bool>

    <!-- True if the device supports dVRR  -->
    <bool name="config_supportsDvrr">false</bool>

    <!-- True if the device supports at least one form of multi-window.
         E.g. freeform, split-screen, picture-in-picture. -->
    <bool name="config_supportsMultiWindow">true</bool>
+0 −1
Original line number Diff line number Diff line
@@ -404,7 +404,6 @@
  <java-symbol type="bool" name="config_supportAudioSourceUnprocessed" />
  <java-symbol type="bool" name="config_freeformWindowManagement" />
  <java-symbol type="bool" name="config_supportsBubble" />
  <java-symbol type="bool" name="config_supportsDvrr" />
  <java-symbol type="bool" name="config_supportsMultiWindow" />
  <java-symbol type="bool" name="config_supportsSplitScreenMultiWindow" />
  <java-symbol type="bool" name="config_supportsMultiDisplay" />
+13 −1
Original line number Diff line number Diff line
@@ -585,7 +585,7 @@ import javax.xml.datatype.DatatypeConfigurationException;
 *              </point>
 *          </luxThresholds>
 *     </idleScreenRefreshRateTimeout>
 *
 *     <supportsVrr>true</supportsVrr>
 *
 *    </displayConfiguration>
 *  }
@@ -872,6 +872,8 @@ public class DisplayDeviceConfig {
     */
    private float mBrightnessCapForWearBedtimeMode;

    private boolean mVrrSupportEnabled;

    private final DisplayManagerFlags mFlags;

    @VisibleForTesting
@@ -1606,6 +1608,13 @@ public class DisplayDeviceConfig {
        return mBrightnessCapForWearBedtimeMode;
    }

    /**
     * @return true if display supports dvrr
     */
    public boolean isVrrSupportEnabled() {
        return mVrrSupportEnabled;
    }

    @Override
    public String toString() {
        return "DisplayDeviceConfig{"
@@ -1705,6 +1714,8 @@ public class DisplayDeviceConfig {
                + "\n"
                + "mEvenDimmerBrightnessData:" + (mEvenDimmerBrightnessData != null
                ? mEvenDimmerBrightnessData.toString() : "null")
                + "\n"
                + "mVrrSupported= " + mVrrSupportEnabled + "\n"
                + "}";
    }

@@ -1779,6 +1790,7 @@ public class DisplayDeviceConfig {
                mHdrBrightnessData = HdrBrightnessData.loadConfig(config);
                loadBrightnessCapForWearBedtimeMode(config);
                loadIdleScreenRefreshRateTimeoutConfigs(config);
                mVrrSupportEnabled = config.getSupportsVrr();
            } else {
                Slog.w(TAG, "DisplayDeviceConfig file is null");
            }
+13 −0
Original line number Diff line number Diff line
@@ -2764,6 +2764,7 @@ public final class DisplayManagerService extends SystemService {
                            + requestedRefreshRate + " on Display: " + displayId);
                }
            }

            mDisplayModeDirector.getAppRequestObserver().setAppRequest(
                    displayId, requestedModeId, requestedMinRefreshRate, requestedMaxRefreshRate);

@@ -4938,6 +4939,18 @@ public final class DisplayManagerService extends SystemService {
            return config.getRefreshRateLimitations();
        }

        @Override
        public boolean isVrrSupportEnabled(int displayId) {
            DisplayDevice device;
            synchronized (mSyncRoot) {
                device = getDeviceForDisplayLocked(displayId);
            }
            if (device == null) {
                return false;
            }
            return device.getDisplayDeviceConfig().isVrrSupportEnabled();
        }

        @Override
        public void setWindowManagerMirroring(int displayId, boolean isMirroring) {
            synchronized (mSyncRoot) {
Loading