manually cherry-pick http://review.cyanogenmod.org/#/c/28077/

Change-Id: Iab68b869a99eab23023e977f8204641dd8b92b88