Bug: 29342399 Bug: 28901867 Change-Id: Ib2049566582aa08783ff588dd25afef4e1c0b5e2 (cherry picked from commit a03dc2b5)