Adapt for API changes.

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

Change-Id: I6fc84edd0e4bb6da0b2a9b2be738c44fe16f3929
Merge "Adapt for API changes." into cm-10.2
Merge branch 'cm-10.2' into martincz