Use SDK check for showing permission hub and add RequiresApi(S).

To fix the existing lint warnings. Also fixed an unrecycled TypedArray
and refactored its code a bit.

Bug: 188851870
Test: presubit
Test: manually confirm colors are still correct
Change-Id: Id1afbae28a9b058648f3ed9319b0fd143543732b
9 files changed