Adapt for API changes.

Adapt for changes made in http://review.cyanogenmod.org/#/c/51499/

Change-Id: I0ffde1a0f8fb24df2f4a12cc766d3817fa32be23