drm_hwcomposer: Added hotplug support of the external display
Unplug of the main display will not work because of
Activity Manager code(ActivityStackSupervisor.java:handleDisplayRemoved).
Only one display can be connected as an external
display (see SurfaceFlinger::determineDisplayType).
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Andrii Chepurnyi <andrii_chepurnyi@epam.com>
diff --git a/resourcemanager.h b/resourcemanager.h
index 463739b..f10af45 100644
--- a/resourcemanager.h
+++ b/resourcemanager.h
@@ -34,6 +34,12 @@
std::shared_ptr<Importer> GetImporter(int display);
const gralloc_module_t *gralloc();
DrmConnector *AvailableWritebackConnector(int display);
+ const std::vector<std::unique_ptr<DrmDevice>> &getDrmDevices() const {
+ return drms_;
+ }
+ int getDisplayCount() const {
+ return num_displays_;
+ }
private:
int AddDrmDevice(std::string path);