Manually cherry-pick  http://review.cyanogenmod.org/#/c/27326/3

Change-Id: I2dd085d1309046bf6dcd5d8dab1d85d1107ee000