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

Commit ae7e30e4 authored by Fiona Campbell's avatar Fiona Campbell Committed by Android (Google) Code Review
Browse files

Merge "Don't disable autobrightness with key press" into main

parents e0be1637 767a0625
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -3581,18 +3581,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                if (down) {
                    int direction = keyCode == KeyEvent.KEYCODE_BRIGHTNESS_UP ? 1 : -1;

                    // Disable autobrightness if it's on
                    int auto = Settings.System.getIntForUser(
                            mContext.getContentResolver(),
                            Settings.System.SCREEN_BRIGHTNESS_MODE,
                            Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL,
                            UserHandle.USER_CURRENT_OR_SELF);
                    if (auto != 0) {
                        Settings.System.putIntForUser(mContext.getContentResolver(),
                                Settings.System.SCREEN_BRIGHTNESS_MODE,
                                Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL,
                                UserHandle.USER_CURRENT_OR_SELF);
                    }
                    int screenDisplayId = displayId < 0 ? DEFAULT_DISPLAY : displayId;

                    float minLinearBrightness = mPowerManager.getBrightnessConstraint(