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

Change-Id: I24199d4737ff1be86ffbfa7c182a35f736d8b24c