Loading packages/SystemUI/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -361,6 +361,7 @@ android_library { "androidx.test.ext.junit", "androidx.test.ext.truth", "kotlin-test", "SystemUICustomizationTestUtils", ], libs: [ "android.test.runner", Loading Loading @@ -439,6 +440,7 @@ android_robolectric_test { "androidx.test.ext.junit", "inline-mockito-robolectric-prebuilt", "platform-parametric-runner-lib", "SystemUICustomizationTestUtils", ], libs: [ "android.test.runner", Loading packages/SystemUI/customization/Android.bp +8 −4 Original line number Diff line number Diff line Loading @@ -34,15 +34,19 @@ android_library { "PluginCoreLib", "SystemUIPluginLib", "SystemUIUnfoldLib", "androidx.dynamicanimation_dynamicanimation", "kotlinx_coroutines", "dagger2", "jsr330", ], libs: [ // Keep android-specific libraries as libs instead of static_libs, so that they don't break // things when included as transitive dependencies in robolectric targets. "androidx.concurrent_concurrent-futures", "androidx.dynamicanimation_dynamicanimation", "androidx.lifecycle_lifecycle-runtime-ktx", "androidx.lifecycle_lifecycle-viewmodel-ktx", "androidx.recyclerview_recyclerview", "kotlinx_coroutines_android", "kotlinx_coroutines", "dagger2", "jsr330", ], resource_dirs: [ "res", Loading packages/SystemUI/tests/utils/src/android/app/KeyguardManagerKosmos.kt 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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 android.app import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock val Kosmos.keyguardManager by Kosmos.Fixture { mock<KeyguardManager>() } packages/SystemUI/tests/utils/src/android/os/HandlerKosmos.kt 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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 android.os import com.android.systemui.concurrency.fakeExecutor import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.concurrency.mockExecutorHandler val Kosmos.fakeExecutorHandler by Kosmos.Fixture { mockExecutorHandler(fakeExecutor) } packages/SystemUI/tests/utils/src/android/service/dream/DreamManagerKosmos.kt 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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 android.service.dream import android.service.dreams.IDreamManager import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock var Kosmos.dreamManager by Kosmos.Fixture { mock<IDreamManager>() } Loading
packages/SystemUI/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -361,6 +361,7 @@ android_library { "androidx.test.ext.junit", "androidx.test.ext.truth", "kotlin-test", "SystemUICustomizationTestUtils", ], libs: [ "android.test.runner", Loading Loading @@ -439,6 +440,7 @@ android_robolectric_test { "androidx.test.ext.junit", "inline-mockito-robolectric-prebuilt", "platform-parametric-runner-lib", "SystemUICustomizationTestUtils", ], libs: [ "android.test.runner", Loading
packages/SystemUI/customization/Android.bp +8 −4 Original line number Diff line number Diff line Loading @@ -34,15 +34,19 @@ android_library { "PluginCoreLib", "SystemUIPluginLib", "SystemUIUnfoldLib", "androidx.dynamicanimation_dynamicanimation", "kotlinx_coroutines", "dagger2", "jsr330", ], libs: [ // Keep android-specific libraries as libs instead of static_libs, so that they don't break // things when included as transitive dependencies in robolectric targets. "androidx.concurrent_concurrent-futures", "androidx.dynamicanimation_dynamicanimation", "androidx.lifecycle_lifecycle-runtime-ktx", "androidx.lifecycle_lifecycle-viewmodel-ktx", "androidx.recyclerview_recyclerview", "kotlinx_coroutines_android", "kotlinx_coroutines", "dagger2", "jsr330", ], resource_dirs: [ "res", Loading
packages/SystemUI/tests/utils/src/android/app/KeyguardManagerKosmos.kt 0 → 100644 +22 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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 android.app import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock val Kosmos.keyguardManager by Kosmos.Fixture { mock<KeyguardManager>() }
packages/SystemUI/tests/utils/src/android/os/HandlerKosmos.kt 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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 android.os import com.android.systemui.concurrency.fakeExecutor import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.concurrency.mockExecutorHandler val Kosmos.fakeExecutorHandler by Kosmos.Fixture { mockExecutorHandler(fakeExecutor) }
packages/SystemUI/tests/utils/src/android/service/dream/DreamManagerKosmos.kt 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 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 android.service.dream import android.service.dreams.IDreamManager import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock var Kosmos.dreamManager by Kosmos.Fixture { mock<IDreamManager>() }