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

Change-Id: Ic225933b29e6efd61d6fe6f5494e4140852afc29