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

Commit f0cb13f8 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of [15945985, 15945986, 15945987, 15945988, 15945989,...

Merge cherrypicks of [15945985, 15945986, 15945987, 15945988, 15945989, 15945551, 15945552, 15945168, 15945990, 15945991, 15945575] into sc-d1-release

Change-Id: I6a635a5990039dc3737a5149b9a236ce7160d852
parents 72c29f85 a22bce1f
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -1257,6 +1257,23 @@ public final class DisplayManager {
         */
        String KEY_FIXED_REFRESH_RATE_HIGH_AMBIENT_BRIGHTNESS_THRESHOLDS =
                "fixed_refresh_rate_high_ambient_brightness_thresholds";

        /**
         * Key for refresh rate when the device is in high brightness mode for sunlight visility.
         *
         * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER
         * @see android.R.integer#config_defaultRefreshRateInHbmSunlight
         */
        String KEY_REFRESH_RATE_IN_HBM_SUNLIGHT = "refresh_rate_in_hbm_sunlight";

        /**
         * Key for refresh rate when the device is in high brightness mode for HDR.
         *
         * @see android.provider.DeviceConfig#NAMESPACE_DISPLAY_MANAGER
         * @see android.R.integer#config_defaultRefreshRateInHbmHdr
         */
        String KEY_REFRESH_RATE_IN_HBM_HDR = "refresh_rate_in_hbm_hdr";

        /**
         * Key for default peak refresh rate
         *
+10 −6
Original line number Diff line number Diff line
@@ -2836,8 +2836,13 @@ public final class ViewRootImpl implements ViewParent,
                    }
                }

                final boolean surfaceControlChanged =
                        (relayoutResult & RELAYOUT_RES_SURFACE_CHANGED)
                                == RELAYOUT_RES_SURFACE_CHANGED;

                if (mSurfaceControl.isValid()) {
                    updateOpacity(mWindowAttributes, dragResizing);
                    updateOpacity(mWindowAttributes, dragResizing,
                            surfaceControlChanged /*forceUpdate */);
                }

                if (DEBUG_LAYOUT) Log.v(mTag, "relayout: frame=" + frame.toShortString()
@@ -2872,9 +2877,7 @@ public final class ViewRootImpl implements ViewParent,
                // RELAYOUT_RES_SURFACE_CHANGED since it should indicate that WMS created a new
                // SurfaceControl.
                surfaceReplaced = (surfaceGenerationId != mSurface.getGenerationId()
                        || (relayoutResult & RELAYOUT_RES_SURFACE_CHANGED)
                        == RELAYOUT_RES_SURFACE_CHANGED)
                        && mSurface.isValid();
                        || surfaceControlChanged) && mSurface.isValid();
                if (surfaceReplaced) {
                    mSurfaceSequenceId++;
                }
@@ -7824,7 +7827,8 @@ public final class ViewRootImpl implements ViewParent,
        return relayoutResult;
    }

    private void updateOpacity(WindowManager.LayoutParams params, boolean dragResizing) {
    private void updateOpacity(WindowManager.LayoutParams params, boolean dragResizing,
            boolean forceUpdate) {
        boolean opaque = false;

        if (!PixelFormat.formatHasAlpha(params.format)
@@ -7840,7 +7844,7 @@ public final class ViewRootImpl implements ViewParent,
            opaque = true;
        }

        if (mIsSurfaceOpaque == opaque) {
        if (!forceUpdate && mIsSurfaceOpaque == opaque) {
            return;
        }

+7 −0
Original line number Diff line number Diff line
@@ -4492,6 +4492,13 @@
         If non-positive, then the refresh rate is unchanged even if thresholds are configured. -->
    <integer name="config_fixedRefreshRateInHighZone">0</integer>

    <!-- Default refresh rate while the device has high brightness mode enabled for Sunlight.
         This value overrides values from DisplayDeviceConfig -->
    <integer name="config_defaultRefreshRateInHbmSunlight">0</integer>

    <!-- Default refresh rate while the device has high brightness mode enabled for HDR. -->
    <integer name="config_defaultRefreshRateInHbmHdr">0</integer>

    <!-- The type of the light sensor to be used by the display framework for things like
         auto-brightness. If unset, then it just gets the default sensor of type TYPE_LIGHT. -->
    <string name="config_displayLightSensorType" translatable="false" />
+2 −0
Original line number Diff line number Diff line
@@ -3948,6 +3948,8 @@
  <java-symbol type="integer" name="config_defaultRefreshRateInZone" />
  <java-symbol type="array" name="config_brightnessThresholdsOfPeakRefreshRate" />
  <java-symbol type="array" name="config_ambientThresholdsOfPeakRefreshRate" />
  <java-symbol type="integer" name="config_defaultRefreshRateInHbmSunlight" />
  <java-symbol type="integer" name="config_defaultRefreshRateInHbmHdr" />

  <!-- For fixed refresh rate displays in high brightness-->
  <java-symbol type="integer" name="config_fixedRefreshRateInHighZone" />
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ public class TaskSnapshotWindow {
     * Ideally the delay time will be shorter when receiving
     * {@link StartingSurfaceDrawer#onImeDrawnOnTask(int)}.
     */
    private static final long MAX_DELAY_REMOVAL_TIME_IME_VISIBLE = 450;
    private static final long MAX_DELAY_REMOVAL_TIME_IME_VISIBLE = 600;

    //tmp vars for unused relayout params
    private static final Point TMP_SURFACE_SIZE = new Point();
Loading