OSDN Git Service

android.provider.Setting test utilities
authorJason Monk <jmonk@google.com>
Wed, 9 Nov 2016 13:59:56 +0000 (08:59 -0500)
committerJason Monk <jmonk@google.com>
Fri, 11 Nov 2016 14:52:17 +0000 (09:52 -0500)
commite97892844a5c21c91c7f82b96f82202b18a1a24d
tree47a223cf373fdd71a98b8ef974effa47ca9895ef
parent67387af732f1b5e9b9bc270f03dbb1aedd5632cc
android.provider.Setting test utilities

Add a way to fake values for settings in tests. Since the content
provider is cached in the NameValueCache, there is one static
FakeSettingsProvider that passes through all values to the
real SettingsProvider by default. Values that are required for
the test can be acquired and locked for the duration of the test
easily.

Test: runtest systemui
Change-Id: Ibc31ac8509fb31a22c522358a9c1bae6ec63553b
packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java
packages/SystemUI/tests/src/com/android/keyguard/KeyguardMessageAreaTest.java
packages/SystemUI/tests/src/com/android/systemui/BatteryMeterDrawableTest.java
packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
packages/SystemUI/tests/src/com/android/systemui/power/PowerNotificationWarningsTest.java
packages/SystemUI/tests/src/com/android/systemui/qs/TileLayoutTest.java
packages/SystemUI/tests/src/com/android/systemui/qs/external/TileLifecycleManagerTest.java
packages/SystemUI/tests/src/com/android/systemui/utils/FakeContentResolver.java [new file with mode: 0644]
packages/SystemUI/tests/src/com/android/systemui/utils/FakeSettingsProvider.java [new file with mode: 0644]
packages/SystemUI/tests/src/com/android/systemui/utils/FakeSettingsProviderTest.java [new file with mode: 0644]
packages/SystemUI/tests/src/com/android/systemui/utils/TestableContext.java [new file with mode: 0644]