Loading core/java/android/hardware/display/DisplayManagerInternal.java +7 −0 Original line number Diff line number Diff line Loading @@ -371,6 +371,13 @@ public abstract class DisplayManagerInternal { */ public abstract Point getDisplaySurfaceDefaultSize(int displayId); /** * Receives early interactivity changes from power manager. * * @param interactive The interactive state that the device is moving into. */ public abstract void onEarlyInteractivityChange(boolean interactive); /** * Describes the requested power state of the display. * Loading core/java/android/os/PowerManager.java +10 −2 Original line number Diff line number Diff line Loading @@ -440,9 +440,15 @@ public final class PowerManager { public static final int GO_TO_SLEEP_REASON_DISPLAY_GROUPS_TURNED_OFF = 12; /** * Go to sleep reason code: A foldable device has been folded. * @hide */ public static final int GO_TO_SLEEP_REASON_MAX = GO_TO_SLEEP_REASON_DISPLAY_GROUPS_TURNED_OFF; public static final int GO_TO_SLEEP_REASON_DEVICE_FOLD = 13; /** * @hide */ public static final int GO_TO_SLEEP_REASON_MAX = GO_TO_SLEEP_REASON_DEVICE_FOLD; /** * @hide Loading @@ -461,6 +467,7 @@ public final class PowerManager { case GO_TO_SLEEP_REASON_INATTENTIVE: return "inattentive"; case GO_TO_SLEEP_REASON_DISPLAY_GROUP_REMOVED: return "display_group_removed"; case GO_TO_SLEEP_REASON_DISPLAY_GROUPS_TURNED_OFF: return "display_groups_turned_off"; case GO_TO_SLEEP_REASON_DEVICE_FOLD: return "device_folded"; default: return Integer.toString(sleepReason); } } Loading Loading @@ -568,7 +575,8 @@ public final class PowerManager { GO_TO_SLEEP_REASON_ACCESSIBILITY, GO_TO_SLEEP_REASON_FORCE_SUSPEND, GO_TO_SLEEP_REASON_INATTENTIVE, GO_TO_SLEEP_REASON_QUIESCENT GO_TO_SLEEP_REASON_QUIESCENT, GO_TO_SLEEP_REASON_DEVICE_FOLD }) @Retention(RetentionPolicy.SOURCE) public @interface GoToSleepReason{} Loading core/res/res/values/config.xml +17 −4 Original line number Diff line number Diff line Loading @@ -654,10 +654,23 @@ --> </integer-array> <!-- When entering this device state (defined in device_state_configuration.xml), we should wake the device. -1 to disable the feature (do not wake on any device-state transition). --> <integer name="config_deviceStateOnWhichToWakeUp">-1</integer> <!-- When a device enters any of these states, it should be woken up. States are defined in device_state_configuration.xml. --> <integer-array name="config_deviceStatesOnWhichToWakeUp"> <!-- Example: <item>0</item> <item>1</item> --> </integer-array> <!-- When a device enters any of these states, it should go to sleep. States are defined in device_state_configuration.xml. --> <integer-array name="config_deviceStatesOnWhichToSleep"> <!-- Example: <item>0</item> <item>1</item> --> </integer-array> <!-- Indicate the display area rect for foldable devices in folded state. --> <string name="config_foldedArea"></string> Loading core/res/res/values/symbols.xml +2 −1 Original line number Diff line number Diff line Loading @@ -3856,7 +3856,8 @@ <!-- For Foldables --> <java-symbol type="array" name="config_foldedDeviceStates" /> <java-symbol type="integer" name="config_deviceStateOnWhichToWakeUp" /> <java-symbol type="array" name="config_deviceStatesOnWhichToWakeUp" /> <java-symbol type="array" name="config_deviceStatesOnWhichToSleep" /> <java-symbol type="string" name="config_foldedArea" /> <java-symbol type="bool" name="config_supportsConcurrentInternalDisplays" /> <java-symbol type="bool" name="config_unfoldTransitionEnabled" /> Loading services/core/java/com/android/server/display/DisplayManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,7 @@ public final class DisplayManagerService extends SystemService { } } else if (phase == PHASE_BOOT_COMPLETED) { mDisplayModeDirector.onBootCompleted(); mLogicalDisplayMapper.onBootCompleted(); } } Loading Loading @@ -3618,6 +3619,11 @@ public final class DisplayManagerService extends SystemService { } return device.getDisplaySurfaceDefaultSize(); } @Override public void onEarlyInteractivityChange(boolean interactive) { mLogicalDisplayMapper.onEarlyInteractivityChange(interactive); } } class DesiredDisplayModeSpecsObserver Loading Loading
core/java/android/hardware/display/DisplayManagerInternal.java +7 −0 Original line number Diff line number Diff line Loading @@ -371,6 +371,13 @@ public abstract class DisplayManagerInternal { */ public abstract Point getDisplaySurfaceDefaultSize(int displayId); /** * Receives early interactivity changes from power manager. * * @param interactive The interactive state that the device is moving into. */ public abstract void onEarlyInteractivityChange(boolean interactive); /** * Describes the requested power state of the display. * Loading
core/java/android/os/PowerManager.java +10 −2 Original line number Diff line number Diff line Loading @@ -440,9 +440,15 @@ public final class PowerManager { public static final int GO_TO_SLEEP_REASON_DISPLAY_GROUPS_TURNED_OFF = 12; /** * Go to sleep reason code: A foldable device has been folded. * @hide */ public static final int GO_TO_SLEEP_REASON_MAX = GO_TO_SLEEP_REASON_DISPLAY_GROUPS_TURNED_OFF; public static final int GO_TO_SLEEP_REASON_DEVICE_FOLD = 13; /** * @hide */ public static final int GO_TO_SLEEP_REASON_MAX = GO_TO_SLEEP_REASON_DEVICE_FOLD; /** * @hide Loading @@ -461,6 +467,7 @@ public final class PowerManager { case GO_TO_SLEEP_REASON_INATTENTIVE: return "inattentive"; case GO_TO_SLEEP_REASON_DISPLAY_GROUP_REMOVED: return "display_group_removed"; case GO_TO_SLEEP_REASON_DISPLAY_GROUPS_TURNED_OFF: return "display_groups_turned_off"; case GO_TO_SLEEP_REASON_DEVICE_FOLD: return "device_folded"; default: return Integer.toString(sleepReason); } } Loading Loading @@ -568,7 +575,8 @@ public final class PowerManager { GO_TO_SLEEP_REASON_ACCESSIBILITY, GO_TO_SLEEP_REASON_FORCE_SUSPEND, GO_TO_SLEEP_REASON_INATTENTIVE, GO_TO_SLEEP_REASON_QUIESCENT GO_TO_SLEEP_REASON_QUIESCENT, GO_TO_SLEEP_REASON_DEVICE_FOLD }) @Retention(RetentionPolicy.SOURCE) public @interface GoToSleepReason{} Loading
core/res/res/values/config.xml +17 −4 Original line number Diff line number Diff line Loading @@ -654,10 +654,23 @@ --> </integer-array> <!-- When entering this device state (defined in device_state_configuration.xml), we should wake the device. -1 to disable the feature (do not wake on any device-state transition). --> <integer name="config_deviceStateOnWhichToWakeUp">-1</integer> <!-- When a device enters any of these states, it should be woken up. States are defined in device_state_configuration.xml. --> <integer-array name="config_deviceStatesOnWhichToWakeUp"> <!-- Example: <item>0</item> <item>1</item> --> </integer-array> <!-- When a device enters any of these states, it should go to sleep. States are defined in device_state_configuration.xml. --> <integer-array name="config_deviceStatesOnWhichToSleep"> <!-- Example: <item>0</item> <item>1</item> --> </integer-array> <!-- Indicate the display area rect for foldable devices in folded state. --> <string name="config_foldedArea"></string> Loading
core/res/res/values/symbols.xml +2 −1 Original line number Diff line number Diff line Loading @@ -3856,7 +3856,8 @@ <!-- For Foldables --> <java-symbol type="array" name="config_foldedDeviceStates" /> <java-symbol type="integer" name="config_deviceStateOnWhichToWakeUp" /> <java-symbol type="array" name="config_deviceStatesOnWhichToWakeUp" /> <java-symbol type="array" name="config_deviceStatesOnWhichToSleep" /> <java-symbol type="string" name="config_foldedArea" /> <java-symbol type="bool" name="config_supportsConcurrentInternalDisplays" /> <java-symbol type="bool" name="config_unfoldTransitionEnabled" /> Loading
services/core/java/com/android/server/display/DisplayManagerService.java +6 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,7 @@ public final class DisplayManagerService extends SystemService { } } else if (phase == PHASE_BOOT_COMPLETED) { mDisplayModeDirector.onBootCompleted(); mLogicalDisplayMapper.onBootCompleted(); } } Loading Loading @@ -3618,6 +3619,11 @@ public final class DisplayManagerService extends SystemService { } return device.getDisplaySurfaceDefaultSize(); } @Override public void onEarlyInteractivityChange(boolean interactive) { mLogicalDisplayMapper.onEarlyInteractivityChange(interactive); } } class DesiredDisplayModeSpecsObserver Loading