Request power state updates for individual DisplayGroups

Update PowerManagerService to track and update the power state of
DisplayGroups individually.

This allows for different Displays to be on or off instead of needing to
all share the same power state.

Bug: 138328918
Test: atest FrameworksServicesTests:PowerManagerServiceTest
Change-Id: Ia32039415863ba745c7de2fba55bf25e68de4d15
This commit is contained in:
Sean Stout
2021-02-11 04:52:29 -08:00
parent f026ec2dfc
commit 0e9bb71eda
12 changed files with 956 additions and 481 deletions

View File

@@ -66,12 +66,6 @@ public abstract class DisplayManagerInternal {
*/
public abstract boolean isProximitySensorAvailable();
/**
* Returns the id of the {@link com.android.server.display.DisplayGroup} to which the provided
* display belongs.
*/
public abstract int getDisplayGroupId(int displayId);
/**
* Registers a display group listener which will be informed of the addition, removal, or change
* of display groups.
@@ -469,7 +463,7 @@ public abstract class DisplayManagerInternal {
void onStateChanged();
void onProximityPositive();
void onProximityNegative();
void onDisplayStateChange(int state); // one of the Display state constants
void onDisplayStateChange(boolean allInactive, boolean allOff);
void acquireSuspendBlocker();
void releaseSuspendBlocker();