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

Unverified Commit f33cffb9 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'android-16.0.0_r4' into staging/lineage-23.2_merge-android-16.0.0_r4

Android 16.0.0 release 4

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCaS5hswAKCRDorT+BmrEO
# eJDNAJ4tjr3j7efo5wGtsV624u4qRpkVsQCfWcveHkaq+zQefb6tMKgmb02LKkM=
# =RJNB
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Dec  2 05:49:07 2025 EET
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [ultimate]

* tag 'android-16.0.0_r4': (107 commits)
  Removing unnecessary icon-tracker from Icon-provider
  MM: Add performance tracing to MotionValueCollection
  MM: Remove MotionBuilderContext from MM Modifier APIs 1/3
  iconloaderlib: Remove extra inset from monochrome layer in themed icons.
  Introducing the FVF model in motion mechanics.
  MM: Improve state and lifecycle in reveal modifiers
  MM: MotionValueCollection in MotionDriver, read from graphicLayer 1/2
  Make MotionValueCollection state driven by animation clock only
  Revert "MM: MotionValueCollection in MotionDriver, read from gra..."
  Tune benchmark tests
  MM: MotionValueCollection in MotionDriver, read from graphicLayer 1/2
  MM: Generalize debugger to use MotionValueState interface
  Add a parameter for eagerly create per display SystemUIDisplaySubcomponent upon adding a display
  Add benchmark tests for MotionValueCollection and Spring implementation
  Fix broken tracinglib-robo-test tests
  Immediately activate / deactivate managed motion values on creation
  Latch input and output of MotionValueCollection on the frame start
  Adding MotionValueCollection
  Refactor monet.Style to ThemeStyle
  Removing IconNormalizer
  ...

 Conflicts:
	iconloaderlib/src/com/android/launcher3/icons/ClockDrawableWrapper.java

Change-Id: I5a00dc9165319dcb12d3ac2dc98c12a34383f7ff
parents f00e19e5 ca0ae237
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -11,7 +11,5 @@ checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPL

ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py --no-verify-format -f ${PREUPLOAD_FILES}

alint_hook =  ${REPO_ROOT}/vendor/google/tools/alint

[Tool Paths]
ktfmt = ${REPO_ROOT}/external/ktfmt/ktfmt.sh
+33 −14
Original line number Diff line number Diff line
@@ -8,20 +8,6 @@ flag {
    bug: "308482106"
}

flag {
    name: "return_animation_framework_library"
    namespace: "systemui"
    description: "Turn on Return functionality in the Animation library"
    bug: "273205603"
}

flag {
    name: "return_animation_framework_long_lived"
    namespace: "systemui"
    description: "Turn on long-lived Return registrations in the Animation library"
    bug: "273205603"
}

flag {
    name: "shade_allow_back_gesture"
    namespace: "systemui"
@@ -169,6 +155,23 @@ flag {
    is_fixed_read_only: true
}

flag {
    name: "smartspace_semantic_weather_data"
    namespace: "systemui"
    description: "Support semantic weather data and its rendering in Smartspace"
    bug: "416745891"
}

flag {
    name: "smartspace_aqi_updated_design"
    namespace: "systemui"
    description: "Enable updated design for aqi in Smartspace"
    bug: "435016376"
    metadata {
         purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "enable_lpp_assist_invocation_effect"
    namespace: "systemui"
@@ -189,6 +192,16 @@ flag {
    }
}

flag {
    name: "notification_dot_contrast_border"
    namespace: "launcher"
    description: "Draws a small black or white contrast border around notification dots according to the dot color's luminescence."
    bug: "378990749"
    metadata {
         purpose: PURPOSE_BUGFIX
    }
}

flag {
  name: "extendible_theme_manager"
  namespace: "launcher"
@@ -196,3 +209,9 @@ flag {
  bug: "381897614"
}

flag {
    name: "pan_and_zoom_in_extended_wallpaper_effects"
    namespace: "systemui"
    description: "Support pan & zoom for extended wallpaper effects"
    bug: "417165168"
}
+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package {

java_library {
    name: "displaylib",
    manifest: "AndroidManifest.xml",
    static_libs: [
        "kotlinx_coroutines_android",
        "dagger2",
+58 −3
Original line number Diff line number Diff line
@@ -21,9 +21,15 @@ import android.hardware.display.DisplayManager.DisplayListener
import android.hardware.display.DisplayManager.EVENT_TYPE_DISPLAY_ADDED
import android.hardware.display.DisplayManager.EVENT_TYPE_DISPLAY_CHANGED
import android.hardware.display.DisplayManager.EVENT_TYPE_DISPLAY_REMOVED
import android.hardware.display.DisplayManager.EXTERNAL_DISPLAY_CONNECTION_PREFERENCE_ASK
import android.hardware.display.DisplayManager.EXTERNAL_DISPLAY_CONNECTION_PREFERENCE_DESKTOP
import android.hardware.display.DisplayManager.EXTERNAL_DISPLAY_CONNECTION_PREFERENCE_MIRROR
import android.os.Handler
import android.util.Log
import android.view.Display
import com.android.app.displaylib.ExternalDisplayConnectionType.DESKTOP
import com.android.app.displaylib.ExternalDisplayConnectionType.MIRROR
import com.android.app.displaylib.ExternalDisplayConnectionType.NOT_SPECIFIED
import com.android.app.tracing.FlowTracing.traceEach
import com.android.app.tracing.traceSection
import javax.inject.Inject
@@ -81,7 +87,7 @@ interface DisplayRepository {
    val pendingDisplay: Flow<PendingDisplay?>

    /** Whether the default display is currently off. */
    val defaultDisplayOff: Flow<Boolean>
    val defaultDisplayOff: StateFlow<Boolean>

    /**
     * Given a display ID int, return the corresponding Display object, or null if none exist.
@@ -113,6 +119,20 @@ interface DisplayRepository {
        /** Id of the pending display. */
        val id: Int

        /**
         * The saved connection preference for the display, either desktop, mirroring or show the
         * dialog. Defaults to [ExternalDisplayConnectionType.NOT_SPECIFIED], if no value saved.
         */
        val connectionType: ExternalDisplayConnectionType

        /**
         * Updates the saved connection preference for the display, triggered by the connection
         * dialog's "remember my choice" checkbox
         *
         * @see com.android.systemui.display.ui.viewmodel.ConnectingDisplayViewModel
         */
        suspend fun updateConnectionPreference(connectionType: ExternalDisplayConnectionType)

        /** Enables the display, making it available to the system. */
        suspend fun enable()

@@ -353,8 +373,28 @@ constructor(
        pendingDisplayId
            .map { displayId ->
                val id = displayId ?: return@map null
                val pendingDisplay = getDisplay(id) ?: displayManager.getDisplay(id)
                val uniqueId = pendingDisplay?.uniqueId ?: return@map null
                val connectionPreference =
                    displayManager.getExternalDisplayConnectionPreference(uniqueId)

                object : DisplayRepository.PendingDisplay {
                    override val id = id
                    override val connectionType: ExternalDisplayConnectionType =
                        when (connectionPreference) {
                            EXTERNAL_DISPLAY_CONNECTION_PREFERENCE_DESKTOP -> DESKTOP
                            EXTERNAL_DISPLAY_CONNECTION_PREFERENCE_MIRROR -> MIRROR
                            else -> NOT_SPECIFIED
                        }

                    override suspend fun updateConnectionPreference(
                        connectionType: ExternalDisplayConnectionType
                    ) {
                        displayManager.setExternalDisplayConnectionPreference(
                            uniqueId,
                            connectionType.preference,
                        )
                    }

                    override suspend fun enable() {
                        traceSection("DisplayRepository#enable($id)") {
@@ -386,11 +426,15 @@ constructor(
            }
            .debugLog("pendingDisplay")

    override val defaultDisplayOff: Flow<Boolean> =
    override val defaultDisplayOff: StateFlow<Boolean> =
        displayChangeEvent
            .filter { it == Display.DEFAULT_DISPLAY }
            .map { defaultDisplay.state == Display.STATE_OFF }
            .distinctUntilChanged()
            .stateIn(
                bgApplicationScope,
                SharingStarted.WhileSubscribed(),
                defaultDisplay.state == Display.STATE_OFF,
            )

    override fun getDisplay(displayId: Int): Display? {
        val cachedDisplay = getCachedDisplay(displayId)
@@ -459,6 +503,17 @@ constructor(
    }
}

/**
 * Possible connection types for an external display.
 *
 * @property preference The integer value that represents the connection type in the system.
 */
enum class ExternalDisplayConnectionType(val preference: Int) {
    NOT_SPECIFIED(EXTERNAL_DISPLAY_CONNECTION_PREFERENCE_ASK),
    DESKTOP(EXTERNAL_DISPLAY_CONNECTION_PREFERENCE_DESKTOP),
    MIRROR(EXTERNAL_DISPLAY_CONNECTION_PREFERENCE_MIRROR),
}

/** Used to provide default implementations for all methods. */
private interface DisplayConnectionListener : DisplayListener {

+10 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.content.res.Configuration
import android.graphics.Rect
import android.view.IDisplayWindowListener
import android.view.IWindowManager
import android.window.DesktopExperienceFlags.ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT
import javax.inject.Inject
import javax.inject.Singleton
import kotlinx.coroutines.CoroutineScope
@@ -53,7 +54,13 @@ constructor(
        val callback =
            object : IDisplayWindowListener.Stub() {
                override fun onDisplayAddSystemDecorations(displayId: Int) {
                    if (ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT.isTrue()) {
                        trySend(Event.Add(displayId))
                    } else {
                        if (windowManager.shouldShowSystemDecors(displayId)) {
                            trySend(Event.Add(displayId))
                        }
                    }
                }

                override fun onDisplayRemoveSystemDecorations(displayId: Int) {
@@ -62,6 +69,8 @@ constructor(

                override fun onDesktopModeEligibleChanged(displayId: Int) {}

                override fun onDisplayAnimationsDisabledChanged(displayId: Int, enabled: Boolean) {}

                override fun onDisplayAdded(p0: Int) {}

                override fun onDisplayConfigurationChanged(p0: Int, p1: Configuration?) {}
Loading