Loading services/core/java/com/android/server/display/DisplayManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -2562,10 +2562,10 @@ public final class DisplayManagerService extends SystemService { final BrightnessSetting brightnessSetting = new BrightnessSetting(mPersistentDataStore, display, mSyncRoot); final DisplayPowerController displayPowerController; final DisplayPowerControllerInterface displayPowerController; if (SystemProperties.getInt(PROP_USE_NEW_DISPLAY_POWER_CONTROLLER, 0) == 1) { displayPowerController = new DisplayPowerController( displayPowerController = new DisplayPowerController2( mContext, /* injector= */ null, mDisplayPowerCallbacks, mPowerHandler, mSensorManager, mDisplayBlanker, display, mBrightnessTracker, brightnessSetting, () -> handleBrightnessChange(display)); Loading services/core/java/com/android/server/display/DisplayPowerController.java +4 −3 Original line number Diff line number Diff line Loading @@ -798,8 +798,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call * Notified when the display is changed. We use this to apply any changes that might be needed * when displays get swapped on foldable devices. For example, different brightness properties * of each display need to be properly reflected in AutomaticBrightnessController. * * Make sure DisplayManagerService.mSyncRoot is held when this is called */ @GuardedBy("DisplayManagerService.mSyncRoot") @Override public void onDisplayChanged() { final DisplayDevice device = mLogicalDisplay.getPrimaryDisplayDeviceLocked(); Loading Loading @@ -1896,7 +1897,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call } }, () -> { sendUpdatePowerStateLocked(); sendUpdatePowerState(); postBrightnessChangeRunnable(); // TODO(b/192258832): Switch the HBMChangeCallback to a listener pattern. if (mAutomaticBrightnessController != null) { Loading @@ -1912,7 +1913,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call ddConfig != null ? ddConfig.getBrightnessThrottlingData() : null; return new BrightnessThrottler(mHandler, data, () -> { sendUpdatePowerStateLocked(); sendUpdatePowerState(); postBrightnessChangeRunnable(); }, mUniqueDisplayId); } Loading Loading
services/core/java/com/android/server/display/DisplayManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -2562,10 +2562,10 @@ public final class DisplayManagerService extends SystemService { final BrightnessSetting brightnessSetting = new BrightnessSetting(mPersistentDataStore, display, mSyncRoot); final DisplayPowerController displayPowerController; final DisplayPowerControllerInterface displayPowerController; if (SystemProperties.getInt(PROP_USE_NEW_DISPLAY_POWER_CONTROLLER, 0) == 1) { displayPowerController = new DisplayPowerController( displayPowerController = new DisplayPowerController2( mContext, /* injector= */ null, mDisplayPowerCallbacks, mPowerHandler, mSensorManager, mDisplayBlanker, display, mBrightnessTracker, brightnessSetting, () -> handleBrightnessChange(display)); Loading
services/core/java/com/android/server/display/DisplayPowerController.java +4 −3 Original line number Diff line number Diff line Loading @@ -798,8 +798,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call * Notified when the display is changed. We use this to apply any changes that might be needed * when displays get swapped on foldable devices. For example, different brightness properties * of each display need to be properly reflected in AutomaticBrightnessController. * * Make sure DisplayManagerService.mSyncRoot is held when this is called */ @GuardedBy("DisplayManagerService.mSyncRoot") @Override public void onDisplayChanged() { final DisplayDevice device = mLogicalDisplay.getPrimaryDisplayDeviceLocked(); Loading Loading @@ -1896,7 +1897,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call } }, () -> { sendUpdatePowerStateLocked(); sendUpdatePowerState(); postBrightnessChangeRunnable(); // TODO(b/192258832): Switch the HBMChangeCallback to a listener pattern. if (mAutomaticBrightnessController != null) { Loading @@ -1912,7 +1913,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call ddConfig != null ? ddConfig.getBrightnessThrottlingData() : null; return new BrightnessThrottler(mHandler, data, () -> { sendUpdatePowerStateLocked(); sendUpdatePowerState(); postBrightnessChangeRunnable(); }, mUniqueDisplayId); } Loading