diff options
| author | 2025-03-10 13:27:31 -0700 | |
|---|---|---|
| committer | 2025-03-10 13:27:31 -0700 | |
| commit | 1fc12af194c38948831aee8c7f7baef56aaa9ce6 (patch) | |
| tree | fb62f16ba64326a4bc5f323059bbd7eaaf512df0 | |
| parent | 704e829f4620748f16b73a1fa08b6b3dee416ce4 (diff) | |
| parent | 1d153991186de6b3ca85a02bf0c3e6ef9f87d5c4 (diff) | |
Merge "Start moving DisplayRepository in displaylib" into main
| -rw-r--r-- | packages/SystemUI/Android.bp | 3 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt | 10 |
2 files changed, 5 insertions, 8 deletions
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp index 5b48566d92f9..129949fd38b2 100644 --- a/packages/SystemUI/Android.bp +++ b/packages/SystemUI/Android.bp @@ -534,6 +534,7 @@ android_library { "androidx.compose.animation_animation-graphics", "androidx.lifecycle_lifecycle-viewmodel-compose", "kairos", + "displaylib", "aconfig_settings_flags_lib", ], libs: [ @@ -728,6 +729,7 @@ android_library { "Traceur-res", "aconfig_settings_flags_lib", "kairos", + "displaylib", ], } @@ -770,6 +772,7 @@ android_library { "androidx.compose.runtime_runtime", "kairos", "kosmos", + "displaylib", "testables", "androidx.test.rules", "platform-compat-test-rules", diff --git a/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt b/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt index 721d116004f3..101e8cc23f17 100644 --- a/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt @@ -27,6 +27,7 @@ import android.os.Handler import android.util.Log import android.view.Display import android.view.IWindowManager +import com.android.app.displaylib.DisplayRepository as DisplayRepositoryFromLib import com.android.app.tracing.FlowTracing.traceEach import com.android.app.tracing.traceSection import com.android.systemui.dagger.SysUISingleton @@ -60,7 +61,7 @@ import kotlinx.coroutines.flow.scan import kotlinx.coroutines.flow.stateIn /** Repository for providing access to display related information and events. */ -interface DisplayRepository { +interface DisplayRepository : DisplayRepositoryFromLib { /** Display change event indicating a change to the given displayId has occurred. */ val displayChangeEvent: Flow<Int> @@ -74,13 +75,6 @@ interface DisplayRepository { val displayIdsWithSystemDecorations: StateFlow<Set<Int>> /** - * Provides the current set of displays. - * - * Consider using [displayIds] if only the [Display.getDisplayId] is needed. - */ - val displays: StateFlow<Set<Display>> - - /** * Provides the current set of display ids. * * Note that it is preferred to use this instead of [displays] if only the |