do wom: DisplayOffload hook to DisplayManager
Instead of connecting DisplayOffload with PowerManager, we decided to
hook it to DisplayManager. See detailed analysis in comment of ag/23643082.
- Add DisplayOffloadSession that associate a internal display with
a DisplayOffloader. Its registered by DisplayManager and used to
control offloading entry/exit.
- Add a feature flag enable_display_offload. Use following command to
toggle the displayoffload feature and reboot.
```
adb shell device_config put display_manager com.android.server.display.feature.flags.enable_display_offload <true/false>
```
If cmd above doesn't, try following:
```
adb shell setprop
persist.sys.com.android.server.display.feature.flags.enable_display_offload
true
```
- Add tests.
TEST: atest DisplayServiceTests
BUG: 287561002
Change-Id: I7f1d7b70f66cf19a732eed3d96651967d6a21056
16 files changed