Add lint rule to catch incorrect setColor calls

Android has various setColor methods (such as setTextColor) which take
an integer, where it expects RGB values in the bytes. Since this is
an integer, and since color resources are integers, sometimes code
incorrectly passes the color resource id rather than a resolved color
to the setter:

     paint.setColor(R.color.red)

Obviously, the color should be "resolved" first via
getResource().getColor().

This changeset adds a lint detector which catches these kinds of bugs.

Change-Id: I2970e5220d24ad3b844a9f19fbe99b932d9f7fb4
10 files changed