* The preferences constraints system uses reflection to look up fields via strings, we need to ensure they are not optimized out by Proguard. Alternatively we can manually enumerate them, but it's yet another list of constants to maintain. We should have used a proper enumeration to begin with, but so it goes. * The @VisibleForTesting annotation is honored by the platform for ensuring that Proguard doesn't stomp fields. The support library has an @Keep annotation, but it's only supported by Gradle. If it becomes supported by the platform in the future, switch to it instead. * Also add tests for all of this. Change-Id: I9f324e003e2a9de5604085b978d5f95bdd098d32
CM Platform SDK Tests
The tests package contains both functional manual tests as well as unit tests which can be ran utilizing the InstrumentationTestRunner from android.
To run the tests (on a live device):
adb shell am instrument -w org.cyanogenmod.tests/android.support.test.runner.AndroidJUnitRunner