Use Fake context and settings provider to prevent test flakiness
**Root cause**
The ReduceBrightColorsIntensityPreferenceControllerTest would modify the
settings during test. However, since this is a unit test, it shouldn't
trigger modifying the brightness on the attached test device. Otherwise,
the test would be unstable depends on how stable the device is, which
should be tested by the integration test.
Bug: 397762527
Test: abtd
Flag: EXEMPT test only
Change-Id: I0c0d7327d4356482295121c11c3a1e5ed814ffec
diff --git a/tests/unit/Android.bp b/tests/unit/Android.bp
index 07df3c8..2be75ec 100644
--- a/tests/unit/Android.bp
+++ b/tests/unit/Android.bp
@@ -31,6 +31,7 @@
"mockito-target-minus-junit4",
"platform-test-annotations",
"platform-test-rules",
+ "testables",
"truth",
"kotlinx_coroutines_test",
"SettingsLibPreference-testutils",