Only build when no media variant is set, and display variant isn't legacy

* Fixes change I4363e0c9163050932a52711d080b0957e1d5925c

Change-Id: Id7e5f5f5019fec5cce169d7ff5fe7d3c707562eb
Merge github.com:CyanogenMod/android_hardware_qcom_media into Domination