Loading core/java/com/android/internal/BrightnessSynchronizer.java +2 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.Context; import android.database.ContentObserver; import android.net.Uri; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.os.PowerManager; import android.os.UserHandle; Loading Loading @@ -55,7 +56,7 @@ public class BrightnessSynchronizer { private final Queue<Object> mWriteHistory = new LinkedList<>(); private final Handler mHandler = new Handler() { private final Handler mHandler = new Handler(Looper.getMainLooper()) { @Override public void handleMessage(Message msg) { switch (msg.what) { Loading @@ -72,7 +73,6 @@ public class BrightnessSynchronizer { } }; public BrightnessSynchronizer(Context context) { final BrightnessSyncObserver mBrightnessSyncObserver; mContext = context; Loading services/core/java/com/android/server/display/DisplayManagerService.java +97 −45 Original line number Diff line number Diff line Loading @@ -227,8 +227,35 @@ public final class DisplayManagerService extends SystemService { private final CopyOnWriteArrayList<DisplayTransactionListener> mDisplayTransactionListeners = new CopyOnWriteArrayList<DisplayTransactionListener>(); // Display power controller. private DisplayPowerController mDisplayPowerController; /** All {@link DisplayPowerController}s indexed by {@link LogicalDisplay} ID. */ private final SparseArray<DisplayPowerController> mDisplayPowerControllers = new SparseArray<>(); /** {@link DisplayBlanker} used by all {@link DisplayPowerController}s. */ private final DisplayBlanker mDisplayBlanker = new DisplayBlanker() { @Override public void requestDisplayState(int displayId, int state, float brightness) { // The order of operations is important for legacy reasons. if (state == Display.STATE_OFF) { requestGlobalDisplayStateInternal(state, brightness); } mDisplayPowerCallbacks.onDisplayStateChange(state); if (state != Display.STATE_OFF) { requestGlobalDisplayStateInternal(state, brightness); } } }; /** * Used to inform {@link com.android.server.power.PowerManagerService} of changes to display * state. */ private DisplayManagerInternal.DisplayPowerCallbacks mDisplayPowerCallbacks; /** The {@link Handler} used by all {@link DisplayPowerController}s. */ private Handler mPowerHandler; // The overall display state, independent of changes that might influence one // display or another in particular. Loading Loading @@ -419,14 +446,16 @@ public final class DisplayManagerService extends SystemService { final int newUserId = to.getUserIdentifier(); final int userSerial = getUserManager().getUserSerialNumber(newUserId); synchronized (mSyncRoot) { final DisplayPowerController displayPowerController = mDisplayPowerControllers.get( Display.DEFAULT_DISPLAY); if (mCurrentUserId != newUserId) { mCurrentUserId = newUserId; BrightnessConfiguration config = mPersistentDataStore.getBrightnessConfiguration(userSerial); mDisplayPowerController.setBrightnessConfiguration(config); displayPowerController.setBrightnessConfiguration(config); handleSettingsChange(); } mDisplayPowerController.onSwitchUser(newUserId); displayPowerController.onSwitchUser(newUserId); } } Loading Loading @@ -957,6 +986,7 @@ public final class DisplayManagerService extends SystemService { recordStableDisplayStatsIfNeededLocked(display); recordTopInsetLocked(display); } addDisplayPowerControllerLocked(displayId); DisplayManagerGlobal.invalidateLocalDisplayInfoCaches(); Loading Loading @@ -990,6 +1020,7 @@ public final class DisplayManagerService extends SystemService { private void handleLogicalDisplayRemovedLocked(@NonNull LogicalDisplay display) { final int displayId = display.getDisplayIdLocked(); mDisplayPowerControllers.delete(displayId); DisplayManagerGlobal.invalidateLocalDisplayInfoCaches(); sendDisplayEventLocked(displayId, DisplayManagerGlobal.EVENT_DISPLAY_REMOVED); scheduleTraversalLocked(false); Loading Loading @@ -1111,7 +1142,7 @@ public final class DisplayManagerService extends SystemService { mPersistentDataStore.saveIfNeeded(); } if (userId == mCurrentUserId) { mDisplayPowerController.setBrightnessConfiguration(c); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY).setBrightnessConfiguration(c); } } } Loading Loading @@ -1143,7 +1174,8 @@ public final class DisplayManagerService extends SystemService { final int userSerial = getUserManager().getUserSerialNumber(mCurrentUserId); BrightnessConfiguration config = mPersistentDataStore.getBrightnessConfiguration(userSerial); mDisplayPowerController.setBrightnessConfiguration(config); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY).setBrightnessConfiguration( config); } } Loading Loading @@ -1350,25 +1382,31 @@ public final class DisplayManagerService extends SystemService { } void setAutoBrightnessLoggingEnabled(boolean enabled) { if (mDisplayPowerController != null) { synchronized (mSyncRoot) { mDisplayPowerController.setAutoBrightnessLoggingEnabled(enabled); final DisplayPowerController displayPowerController = mDisplayPowerControllers.get( Display.DEFAULT_DISPLAY); if (displayPowerController != null) { displayPowerController.setAutoBrightnessLoggingEnabled(enabled); } } } void setDisplayWhiteBalanceLoggingEnabled(boolean enabled) { if (mDisplayPowerController != null) { synchronized (mSyncRoot) { mDisplayPowerController.setDisplayWhiteBalanceLoggingEnabled(enabled); final DisplayPowerController displayPowerController = mDisplayPowerControllers.get( Display.DEFAULT_DISPLAY); if (displayPowerController != null) { displayPowerController.setDisplayWhiteBalanceLoggingEnabled(enabled); } } } void setAmbientColorTemperatureOverride(float cct) { if (mDisplayPowerController != null) { synchronized (mSyncRoot) { mDisplayPowerController.setAmbientColorTemperatureOverride(cct); final DisplayPowerController displayPowerController = mDisplayPowerControllers.get( Display.DEFAULT_DISPLAY); if (displayPowerController != null) { displayPowerController.setAmbientColorTemperatureOverride(cct); } } } Loading Loading @@ -1594,8 +1632,11 @@ public final class DisplayManagerService extends SystemService { + ", mWifiDisplayScanRequested=" + callback.mWifiDisplayScanRequested); } if (mDisplayPowerController != null) { mDisplayPowerController.dump(pw); final int displayPowerControllerCount = mDisplayPowerControllers.size(); pw.println(); pw.println("Display Power Controllers: size=" + displayPowerControllerCount); for (int i = 0; i < displayPowerControllerCount; i++) { mDisplayPowerControllers.valueAt(i).dump(pw); } pw.println(); Loading Loading @@ -1668,6 +1709,22 @@ public final class DisplayManagerService extends SystemService { } } private void initializeDisplayPowerControllersLocked() { mLogicalDisplayMapper.forEachLocked((logicalDisplay) -> addDisplayPowerControllerLocked( logicalDisplay.getDisplayIdLocked())); } private void addDisplayPowerControllerLocked(int displayId) { if (mPowerHandler == null) { // initPowerManagement has not yet been called. return; } final DisplayPowerController displayPowerController = new DisplayPowerController( mContext, mDisplayPowerCallbacks, mPowerHandler, mSensorManager, mDisplayBlanker, displayId); mDisplayPowerControllers.append(displayId, displayPowerController); } private final class DisplayManagerHandler extends Handler { public DisplayManagerHandler(Looper looper) { super(looper, null, true /*async*/); Loading Loading @@ -2187,7 +2244,8 @@ public final class DisplayManagerService extends SystemService { final long token = Binder.clearCallingIdentity(); try { synchronized (mSyncRoot) { return mDisplayPowerController.getBrightnessEvents(userId, hasUsageStats); return mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .getBrightnessEvents(userId, hasUsageStats); } } finally { Binder.restoreCallingIdentity(token); Loading @@ -2204,7 +2262,8 @@ public final class DisplayManagerService extends SystemService { final long token = Binder.clearCallingIdentity(); try { synchronized (mSyncRoot) { return mDisplayPowerController.getAmbientBrightnessStats(userId); return mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .getAmbientBrightnessStats(userId); } } finally { Binder.restoreCallingIdentity(token); Loading Loading @@ -2252,7 +2311,8 @@ public final class DisplayManagerService extends SystemService { BrightnessConfiguration config = mPersistentDataStore.getBrightnessConfiguration(userSerial); if (config == null) { config = mDisplayPowerController.getDefaultBrightnessConfiguration(); config = mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .getDefaultBrightnessConfiguration(); } return config; } Loading @@ -2269,7 +2329,8 @@ public final class DisplayManagerService extends SystemService { final long token = Binder.clearCallingIdentity(); try { synchronized (mSyncRoot) { return mDisplayPowerController.getDefaultBrightnessConfiguration(); return mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .getDefaultBrightnessConfiguration(); } } finally { Binder.restoreCallingIdentity(token); Loading @@ -2292,7 +2353,8 @@ public final class DisplayManagerService extends SystemService { final long token = Binder.clearCallingIdentity(); try { synchronized (mSyncRoot) { mDisplayPowerController.setTemporaryBrightness(brightness); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .setTemporaryBrightness(brightness); } } finally { Binder.restoreCallingIdentity(token); Loading @@ -2307,7 +2369,8 @@ public final class DisplayManagerService extends SystemService { final long token = Binder.clearCallingIdentity(); try { synchronized (mSyncRoot) { mDisplayPowerController.setTemporaryAutoBrightnessAdjustment(adjustment); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .setTemporaryAutoBrightnessAdjustment(adjustment); } } finally { Binder.restoreCallingIdentity(token); Loading Loading @@ -2428,25 +2491,10 @@ public final class DisplayManagerService extends SystemService { public void initPowerManagement(final DisplayPowerCallbacks callbacks, Handler handler, SensorManager sensorManager) { synchronized (mSyncRoot) { DisplayBlanker blanker = new DisplayBlanker() { @Override public void requestDisplayState(int displayId, int state, float brightness) { // The order of operations is important for legacy reasons. if (state == Display.STATE_OFF) { requestGlobalDisplayStateInternal(state, brightness); } callbacks.onDisplayStateChange(state); if (state != Display.STATE_OFF) { requestGlobalDisplayStateInternal(state, brightness); } } }; mDisplayPowerController = new DisplayPowerController( mContext, callbacks, handler, sensorManager, blanker, Display.DEFAULT_DISPLAY); mDisplayPowerCallbacks = callbacks; mSensorManager = sensorManager; mPowerHandler = handler; initializeDisplayPowerControllersLocked(); } mHandler.sendEmptyMessage(MSG_LOAD_BRIGHTNESS_CONFIGURATION); Loading @@ -2456,14 +2504,16 @@ public final class DisplayManagerService extends SystemService { public boolean requestPowerState(DisplayPowerRequest request, boolean waitForNegativeProximity) { synchronized (mSyncRoot) { return mDisplayPowerController.requestPowerState(request, waitForNegativeProximity); return mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .requestPowerState(request, waitForNegativeProximity); } } @Override public boolean isProximitySensorAvailable() { synchronized (mSyncRoot) { return mDisplayPowerController.isProximitySensorAvailable(); return mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .isProximitySensorAvailable(); } } Loading Loading @@ -2552,7 +2602,8 @@ public final class DisplayManagerService extends SystemService { @Override public void persistBrightnessTrackerState() { synchronized (mSyncRoot) { mDisplayPowerController.persistBrightnessTrackerState(); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .persistBrightnessTrackerState(); } } Loading Loading @@ -2584,7 +2635,8 @@ public final class DisplayManagerService extends SystemService { @Override public void ignoreProximitySensorUntilChanged() { mDisplayPowerController.ignoreProximitySensorUntilChanged(); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .ignoreProximitySensorUntilChanged(); } } Loading services/core/java/com/android/server/display/DisplayPowerController.java +4 −0 Original line number Diff line number Diff line Loading @@ -1814,6 +1814,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call public void dump(final PrintWriter pw) { synchronized (mLock) { pw.println(); pw.println("Display Power Controller:"); pw.println(" mDisplayId=" + mDisplayId); pw.println(); pw.println("Display Power Controller Locked State:"); pw.println(" mDisplayReadyLocked=" + mDisplayReadyLocked); Loading Loading
core/java/com/android/internal/BrightnessSynchronizer.java +2 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.Context; import android.database.ContentObserver; import android.net.Uri; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.os.PowerManager; import android.os.UserHandle; Loading Loading @@ -55,7 +56,7 @@ public class BrightnessSynchronizer { private final Queue<Object> mWriteHistory = new LinkedList<>(); private final Handler mHandler = new Handler() { private final Handler mHandler = new Handler(Looper.getMainLooper()) { @Override public void handleMessage(Message msg) { switch (msg.what) { Loading @@ -72,7 +73,6 @@ public class BrightnessSynchronizer { } }; public BrightnessSynchronizer(Context context) { final BrightnessSyncObserver mBrightnessSyncObserver; mContext = context; Loading
services/core/java/com/android/server/display/DisplayManagerService.java +97 −45 Original line number Diff line number Diff line Loading @@ -227,8 +227,35 @@ public final class DisplayManagerService extends SystemService { private final CopyOnWriteArrayList<DisplayTransactionListener> mDisplayTransactionListeners = new CopyOnWriteArrayList<DisplayTransactionListener>(); // Display power controller. private DisplayPowerController mDisplayPowerController; /** All {@link DisplayPowerController}s indexed by {@link LogicalDisplay} ID. */ private final SparseArray<DisplayPowerController> mDisplayPowerControllers = new SparseArray<>(); /** {@link DisplayBlanker} used by all {@link DisplayPowerController}s. */ private final DisplayBlanker mDisplayBlanker = new DisplayBlanker() { @Override public void requestDisplayState(int displayId, int state, float brightness) { // The order of operations is important for legacy reasons. if (state == Display.STATE_OFF) { requestGlobalDisplayStateInternal(state, brightness); } mDisplayPowerCallbacks.onDisplayStateChange(state); if (state != Display.STATE_OFF) { requestGlobalDisplayStateInternal(state, brightness); } } }; /** * Used to inform {@link com.android.server.power.PowerManagerService} of changes to display * state. */ private DisplayManagerInternal.DisplayPowerCallbacks mDisplayPowerCallbacks; /** The {@link Handler} used by all {@link DisplayPowerController}s. */ private Handler mPowerHandler; // The overall display state, independent of changes that might influence one // display or another in particular. Loading Loading @@ -419,14 +446,16 @@ public final class DisplayManagerService extends SystemService { final int newUserId = to.getUserIdentifier(); final int userSerial = getUserManager().getUserSerialNumber(newUserId); synchronized (mSyncRoot) { final DisplayPowerController displayPowerController = mDisplayPowerControllers.get( Display.DEFAULT_DISPLAY); if (mCurrentUserId != newUserId) { mCurrentUserId = newUserId; BrightnessConfiguration config = mPersistentDataStore.getBrightnessConfiguration(userSerial); mDisplayPowerController.setBrightnessConfiguration(config); displayPowerController.setBrightnessConfiguration(config); handleSettingsChange(); } mDisplayPowerController.onSwitchUser(newUserId); displayPowerController.onSwitchUser(newUserId); } } Loading Loading @@ -957,6 +986,7 @@ public final class DisplayManagerService extends SystemService { recordStableDisplayStatsIfNeededLocked(display); recordTopInsetLocked(display); } addDisplayPowerControllerLocked(displayId); DisplayManagerGlobal.invalidateLocalDisplayInfoCaches(); Loading Loading @@ -990,6 +1020,7 @@ public final class DisplayManagerService extends SystemService { private void handleLogicalDisplayRemovedLocked(@NonNull LogicalDisplay display) { final int displayId = display.getDisplayIdLocked(); mDisplayPowerControllers.delete(displayId); DisplayManagerGlobal.invalidateLocalDisplayInfoCaches(); sendDisplayEventLocked(displayId, DisplayManagerGlobal.EVENT_DISPLAY_REMOVED); scheduleTraversalLocked(false); Loading Loading @@ -1111,7 +1142,7 @@ public final class DisplayManagerService extends SystemService { mPersistentDataStore.saveIfNeeded(); } if (userId == mCurrentUserId) { mDisplayPowerController.setBrightnessConfiguration(c); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY).setBrightnessConfiguration(c); } } } Loading Loading @@ -1143,7 +1174,8 @@ public final class DisplayManagerService extends SystemService { final int userSerial = getUserManager().getUserSerialNumber(mCurrentUserId); BrightnessConfiguration config = mPersistentDataStore.getBrightnessConfiguration(userSerial); mDisplayPowerController.setBrightnessConfiguration(config); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY).setBrightnessConfiguration( config); } } Loading Loading @@ -1350,25 +1382,31 @@ public final class DisplayManagerService extends SystemService { } void setAutoBrightnessLoggingEnabled(boolean enabled) { if (mDisplayPowerController != null) { synchronized (mSyncRoot) { mDisplayPowerController.setAutoBrightnessLoggingEnabled(enabled); final DisplayPowerController displayPowerController = mDisplayPowerControllers.get( Display.DEFAULT_DISPLAY); if (displayPowerController != null) { displayPowerController.setAutoBrightnessLoggingEnabled(enabled); } } } void setDisplayWhiteBalanceLoggingEnabled(boolean enabled) { if (mDisplayPowerController != null) { synchronized (mSyncRoot) { mDisplayPowerController.setDisplayWhiteBalanceLoggingEnabled(enabled); final DisplayPowerController displayPowerController = mDisplayPowerControllers.get( Display.DEFAULT_DISPLAY); if (displayPowerController != null) { displayPowerController.setDisplayWhiteBalanceLoggingEnabled(enabled); } } } void setAmbientColorTemperatureOverride(float cct) { if (mDisplayPowerController != null) { synchronized (mSyncRoot) { mDisplayPowerController.setAmbientColorTemperatureOverride(cct); final DisplayPowerController displayPowerController = mDisplayPowerControllers.get( Display.DEFAULT_DISPLAY); if (displayPowerController != null) { displayPowerController.setAmbientColorTemperatureOverride(cct); } } } Loading Loading @@ -1594,8 +1632,11 @@ public final class DisplayManagerService extends SystemService { + ", mWifiDisplayScanRequested=" + callback.mWifiDisplayScanRequested); } if (mDisplayPowerController != null) { mDisplayPowerController.dump(pw); final int displayPowerControllerCount = mDisplayPowerControllers.size(); pw.println(); pw.println("Display Power Controllers: size=" + displayPowerControllerCount); for (int i = 0; i < displayPowerControllerCount; i++) { mDisplayPowerControllers.valueAt(i).dump(pw); } pw.println(); Loading Loading @@ -1668,6 +1709,22 @@ public final class DisplayManagerService extends SystemService { } } private void initializeDisplayPowerControllersLocked() { mLogicalDisplayMapper.forEachLocked((logicalDisplay) -> addDisplayPowerControllerLocked( logicalDisplay.getDisplayIdLocked())); } private void addDisplayPowerControllerLocked(int displayId) { if (mPowerHandler == null) { // initPowerManagement has not yet been called. return; } final DisplayPowerController displayPowerController = new DisplayPowerController( mContext, mDisplayPowerCallbacks, mPowerHandler, mSensorManager, mDisplayBlanker, displayId); mDisplayPowerControllers.append(displayId, displayPowerController); } private final class DisplayManagerHandler extends Handler { public DisplayManagerHandler(Looper looper) { super(looper, null, true /*async*/); Loading Loading @@ -2187,7 +2244,8 @@ public final class DisplayManagerService extends SystemService { final long token = Binder.clearCallingIdentity(); try { synchronized (mSyncRoot) { return mDisplayPowerController.getBrightnessEvents(userId, hasUsageStats); return mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .getBrightnessEvents(userId, hasUsageStats); } } finally { Binder.restoreCallingIdentity(token); Loading @@ -2204,7 +2262,8 @@ public final class DisplayManagerService extends SystemService { final long token = Binder.clearCallingIdentity(); try { synchronized (mSyncRoot) { return mDisplayPowerController.getAmbientBrightnessStats(userId); return mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .getAmbientBrightnessStats(userId); } } finally { Binder.restoreCallingIdentity(token); Loading Loading @@ -2252,7 +2311,8 @@ public final class DisplayManagerService extends SystemService { BrightnessConfiguration config = mPersistentDataStore.getBrightnessConfiguration(userSerial); if (config == null) { config = mDisplayPowerController.getDefaultBrightnessConfiguration(); config = mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .getDefaultBrightnessConfiguration(); } return config; } Loading @@ -2269,7 +2329,8 @@ public final class DisplayManagerService extends SystemService { final long token = Binder.clearCallingIdentity(); try { synchronized (mSyncRoot) { return mDisplayPowerController.getDefaultBrightnessConfiguration(); return mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .getDefaultBrightnessConfiguration(); } } finally { Binder.restoreCallingIdentity(token); Loading @@ -2292,7 +2353,8 @@ public final class DisplayManagerService extends SystemService { final long token = Binder.clearCallingIdentity(); try { synchronized (mSyncRoot) { mDisplayPowerController.setTemporaryBrightness(brightness); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .setTemporaryBrightness(brightness); } } finally { Binder.restoreCallingIdentity(token); Loading @@ -2307,7 +2369,8 @@ public final class DisplayManagerService extends SystemService { final long token = Binder.clearCallingIdentity(); try { synchronized (mSyncRoot) { mDisplayPowerController.setTemporaryAutoBrightnessAdjustment(adjustment); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .setTemporaryAutoBrightnessAdjustment(adjustment); } } finally { Binder.restoreCallingIdentity(token); Loading Loading @@ -2428,25 +2491,10 @@ public final class DisplayManagerService extends SystemService { public void initPowerManagement(final DisplayPowerCallbacks callbacks, Handler handler, SensorManager sensorManager) { synchronized (mSyncRoot) { DisplayBlanker blanker = new DisplayBlanker() { @Override public void requestDisplayState(int displayId, int state, float brightness) { // The order of operations is important for legacy reasons. if (state == Display.STATE_OFF) { requestGlobalDisplayStateInternal(state, brightness); } callbacks.onDisplayStateChange(state); if (state != Display.STATE_OFF) { requestGlobalDisplayStateInternal(state, brightness); } } }; mDisplayPowerController = new DisplayPowerController( mContext, callbacks, handler, sensorManager, blanker, Display.DEFAULT_DISPLAY); mDisplayPowerCallbacks = callbacks; mSensorManager = sensorManager; mPowerHandler = handler; initializeDisplayPowerControllersLocked(); } mHandler.sendEmptyMessage(MSG_LOAD_BRIGHTNESS_CONFIGURATION); Loading @@ -2456,14 +2504,16 @@ public final class DisplayManagerService extends SystemService { public boolean requestPowerState(DisplayPowerRequest request, boolean waitForNegativeProximity) { synchronized (mSyncRoot) { return mDisplayPowerController.requestPowerState(request, waitForNegativeProximity); return mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .requestPowerState(request, waitForNegativeProximity); } } @Override public boolean isProximitySensorAvailable() { synchronized (mSyncRoot) { return mDisplayPowerController.isProximitySensorAvailable(); return mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .isProximitySensorAvailable(); } } Loading Loading @@ -2552,7 +2602,8 @@ public final class DisplayManagerService extends SystemService { @Override public void persistBrightnessTrackerState() { synchronized (mSyncRoot) { mDisplayPowerController.persistBrightnessTrackerState(); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .persistBrightnessTrackerState(); } } Loading Loading @@ -2584,7 +2635,8 @@ public final class DisplayManagerService extends SystemService { @Override public void ignoreProximitySensorUntilChanged() { mDisplayPowerController.ignoreProximitySensorUntilChanged(); mDisplayPowerControllers.get(Display.DEFAULT_DISPLAY) .ignoreProximitySensorUntilChanged(); } } Loading
services/core/java/com/android/server/display/DisplayPowerController.java +4 −0 Original line number Diff line number Diff line Loading @@ -1814,6 +1814,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call public void dump(final PrintWriter pw) { synchronized (mLock) { pw.println(); pw.println("Display Power Controller:"); pw.println(" mDisplayId=" + mDisplayId); pw.println(); pw.println("Display Power Controller Locked State:"); pw.println(" mDisplayReadyLocked=" + mDisplayReadyLocked); Loading