Migrate DisplayFoldController fold state to be based on device state.

This modifies DisplayFoldController to base it's internal 'fold' state
from being configured directly based on the lid switch (or the proximity
sensor) to be based on the device state.

Bug: 159401801
Test: Manual - fold/unfold and validate fold state

Change-Id: Ib3ecc6326b1d73720d31fa94f33160cfaf1109cd
This commit is contained in:
Darryl L Johnson
2020-12-03 14:10:57 -08:00
parent f64e138124
commit 61c63d5306
5 changed files with 40 additions and 60 deletions

View File

@@ -1281,6 +1281,10 @@ public final class SystemServer implements Dumpable {
inputManager = new InputManagerService(context);
t.traceEnd();
t.traceBegin("DeviceStateManagerService");
mSystemServiceManager.startService(DeviceStateManagerService.class);
t.traceEnd();
if (!disableCameraService) {
t.traceBegin("StartCameraServiceProxy");
mSystemServiceManager.startService(CameraServiceProxy.class);
@@ -1374,10 +1378,6 @@ public final class SystemServer implements Dumpable {
mSystemServiceManager.startService(AppIntegrityManagerService.class);
t.traceEnd();
t.traceBegin("DeviceStateManagerService");
mSystemServiceManager.startService(DeviceStateManagerService.class);
t.traceEnd();
} catch (Throwable e) {
Slog.e("System", "******************************************");
Slog.e("System", "************ Failure starting core service");