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

Change-Id: Idf209cbb3b0675997f43074bf18a544601faeac8