(Based on upstream's 42af669ff2754dfbe1dd55a0ab56664f82284dc4) Change-Id: I4d3954fea7471e274c626483a0dfb9d7b3250b74