Loading packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettings.java +5 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,11 @@ public class FakeGlobalSettings implements GlobalSettings { public static final Uri CONTENT_URI = Uri.parse("content://settings/fake_global"); /** * @deprecated Please use FakeGlobalSettings(testDispatcher) to provide the same dispatcher used * by main test scope. */ @Deprecated public FakeGlobalSettings() { mDispatcher = StandardTestDispatcher(/* scheduler = */ null, /* name = */ null); } Loading packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettingsKosmos.kt +2 −1 Original line number Diff line number Diff line Loading @@ -18,5 +18,6 @@ package com.android.systemui.util.settings import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.kosmos.testDispatcher val Kosmos.fakeGlobalSettings: FakeGlobalSettings by Fixture { FakeGlobalSettings() } val Kosmos.fakeGlobalSettings: FakeGlobalSettings by Fixture { FakeGlobalSettings(testDispatcher) } packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeSettings.java +5 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,11 @@ public class FakeSettings implements SecureSettings, SystemSettings { @UserIdInt private int mUserId = UserHandle.USER_CURRENT; /** * @deprecated Please use FakeSettings(testDispatcher) to provide the same dispatcher used * by main test scope. */ @Deprecated public FakeSettings() { mDispatcher = StandardTestDispatcher(/* scheduler = */ null, /* name = */ null); mUserTracker = new FakeUserTracker(); Loading packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeSettingsKosmos.kt +3 −1 Original line number Diff line number Diff line Loading @@ -18,5 +18,7 @@ package com.android.systemui.util.settings import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.kosmos.testDispatcher import com.android.systemui.settings.fakeUserTracker val Kosmos.fakeSettings: FakeSettings by Fixture { FakeSettings() } val Kosmos.fakeSettings: FakeSettings by Fixture { FakeSettings(testDispatcher, fakeUserTracker) } Loading
packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettings.java +5 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,11 @@ public class FakeGlobalSettings implements GlobalSettings { public static final Uri CONTENT_URI = Uri.parse("content://settings/fake_global"); /** * @deprecated Please use FakeGlobalSettings(testDispatcher) to provide the same dispatcher used * by main test scope. */ @Deprecated public FakeGlobalSettings() { mDispatcher = StandardTestDispatcher(/* scheduler = */ null, /* name = */ null); } Loading
packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettingsKosmos.kt +2 −1 Original line number Diff line number Diff line Loading @@ -18,5 +18,6 @@ package com.android.systemui.util.settings import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.kosmos.testDispatcher val Kosmos.fakeGlobalSettings: FakeGlobalSettings by Fixture { FakeGlobalSettings() } val Kosmos.fakeGlobalSettings: FakeGlobalSettings by Fixture { FakeGlobalSettings(testDispatcher) }
packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeSettings.java +5 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,11 @@ public class FakeSettings implements SecureSettings, SystemSettings { @UserIdInt private int mUserId = UserHandle.USER_CURRENT; /** * @deprecated Please use FakeSettings(testDispatcher) to provide the same dispatcher used * by main test scope. */ @Deprecated public FakeSettings() { mDispatcher = StandardTestDispatcher(/* scheduler = */ null, /* name = */ null); mUserTracker = new FakeUserTracker(); Loading
packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeSettingsKosmos.kt +3 −1 Original line number Diff line number Diff line Loading @@ -18,5 +18,7 @@ package com.android.systemui.util.settings import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.kosmos.testDispatcher import com.android.systemui.settings.fakeUserTracker val Kosmos.fakeSettings: FakeSettings by Fixture { FakeSettings() } val Kosmos.fakeSettings: FakeSettings by Fixture { FakeSettings(testDispatcher, fakeUserTracker) }