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

Commit 9b974bf2 authored by Michael Wright's avatar Michael Wright Committed by android-build-merger
Browse files

Merge "Make sure NaturalSurfaceLayout is consistent with SurfaceControl" am: 6fa9c5cd

am: 35bdda10

* commit '35bdda10':
  Animate backlight quickly when display state request to change or power mode changed
  Make sure NaturalSurfaceLayout is consistent with SurfaceControl
parents 7a66ba9d 35bdda10
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -587,7 +587,6 @@ final class ColorFade {
                    Slog.e(TAG, "Unable to create surface.", ex);
                    return false;
                }
            }

                mSurfaceControl.setLayerStack(mDisplayLayerStack);
                mSurfaceControl.setSize(mDisplayWidth, mDisplayHeight);
@@ -597,6 +596,7 @@ final class ColorFade {
                mSurfaceLayout = new NaturalSurfaceLayout(mDisplayManagerInternal,
                        mDisplayId, mSurfaceControl);
                mSurfaceLayout.onDisplayTransaction();
            }
        } finally {
            SurfaceControl.closeTransaction();
        }
+6 −0
Original line number Diff line number Diff line
@@ -673,6 +673,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
                slowChange = false;
            }
            mAppliedDimming = true;
        } else if (mAppliedDimming) {
            slowChange = false;
            mAppliedDimming = false;
        }

        // If low power mode is enabled, cut the brightness level by half
@@ -685,6 +688,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
                slowChange = false;
            }
            mAppliedLowPower = true;
        } else if (mAppliedLowPower) {
            slowChange = false;
            mAppliedLowPower = false;
        }

        // Animate the screen brightness when the screen is on or dozing.