Restrict permission checks to M devices

Add an ApiHelper check and only call checkSelfPermission if we
are on M and the methods exist.

BUG=22345681

Change-Id: Icda8d40057b5492502858ced731a749a2f66abf8
2 files changed