summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jernej Virag <jernej@google.com> 2024-08-12 16:30:25 +0200
committer Jernej Virag <jernej@google.com> 2024-08-13 10:49:39 +0200
commit338790f0261d9452f20565352a7fe8afc35a3b81 (patch)
treef82107e0a668358327e53ec80acc0d1fc7d532dc
parent0312c6e94007644fb1a9c3120c53de4d2a2e5eb0 (diff)
Add Kosmos provider for ImageLoader
Allows injection for ImageLoader via Kosmos framework. Bug: 358350077 Test: trivial Flag: TEST_ONLY Change-Id: I7b5b3d147e6046ff8e84f001f7917375b4116a94
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/graphics/ImageLoaderKosmos.kt23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/graphics/ImageLoaderKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/graphics/ImageLoaderKosmos.kt
new file mode 100644
index 000000000000..6b8919dd86fe
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/graphics/ImageLoaderKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.graphics
+
+import android.content.testableContext
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.testDispatcher
+
+var Kosmos.imageLoader by Kosmos.Fixture { ImageLoader(testableContext, testDispatcher) }