Merge cherrypicks of [7818278, 7817454] into qt-c2f2-release

Change-Id: Ia9acbd24a4988ceb08301568eb3fe99e7d081786