Ensure to switch to unprotected context if display is not secure.

Previously we only consider the switch when the display is secure,
however, it is possible that the primary display uses protected context
but virtual display is not secure and hence RenderEngine won't switch
back to unprotected context.  This patch enforce the switch when display
is not secure.

Bug: 169393573
Bug: 172392940
Test: No flashing when recording Youtube DRM
Test: atest libcompositionengine_test
Change-Id: Ieeda99a92e8d78f7418f7a1e0da9938bcd4753d5
(cherry picked from commit 09f910ff0d640c5ecdb5c01a4809eb5d5103a6bf)
3 files changed