Add support for HWC < 1.0

Squashed commit taken from CM

Change-Id: Ie79eb74d0b028ac894b44637772eaae9e9d18b60