SF: Reject hotplugs on invalid or duplicate ports

When a HWC returns an invalid or duplicate port that collides with an
existing active port, the end result is display identification confusion
in higher layers of the stack. This is especially bad when the confusion
is with the internal/primary display and causes it to malfunction.

Reject hotplugs in which the reported port from HWC is already active.

Flag: EXEMPT bugfix
Bug: 383430671
Test: Display{Id | Identification}Test && libsurfaceflinger_unittest
Change-Id: Id3569ef1d973f4ace51d14c7e3cc9aef17630b22
9 files changed