Backporting the change of ag/15629060 to pi-dev am: 95ff59db3b am: e317818b24 am: 8f758cff77 am: 30d1571a99 am: be868a5a7f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15748731

Change-Id: I2cfdd39a6bb5d9ccade58de65ae6834409c9d632