Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d153991 authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Start moving DisplayRepository in displaylib

This will make several classes usable also from launcher (or other processes)

Bug: 401305290
Test: DisplayRepositoryTest
Flag: NONE - creating new lib skeleton
Change-Id: I7e5ef82fc9c36a0298abf52a808ca2ebc6190d93
parent 83bdb759
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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",
+2 −8
Original line number Diff line number Diff line
@@ -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>

@@ -73,13 +74,6 @@ interface DisplayRepository {
    /** A [StateFlow] that maintains a set of display IDs that should have system decorations. */
    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.
     *