security: Add proper checks for Android specific capability checks