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

Commit d0ba6c88 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Avoid adding DesktopWallpaperActivity to show home behind desktop" into main

parents 0d442479 1b0b29b4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7387,6 +7387,9 @@
         screen. -->
    <bool name="config_dragToMaximizeInDesktopMode">false</bool>

    <!-- Whether the home screen should be shown behind freeform tasks in desktop mode. -->
    <bool name="config_showHomeBehindDesktop">false</bool>

    <!-- Frame rate compatibility value for Wallpaper
         FRAME_RATE_COMPATIBILITY_MIN (102) is used by default for lower power consumption -->
    <integer name="config_wallpaperFrameRateCompatibility">102</integer>
+3 −0
Original line number Diff line number Diff line
@@ -5847,6 +5847,9 @@
       screen. -->
  <java-symbol type="bool" name="config_dragToMaximizeInDesktopMode" />

  <!-- Whether the home screen should be shown behind freeform tasks in desktop mode. -->
  <java-symbol type="bool" name="config_showHomeBehindDesktop" />

  <!-- Frame rate compatibility value for Wallpaper -->
  <java-symbol type="integer" name="config_wallpaperFrameRateCompatibility" />

+5 −0
Original line number Diff line number Diff line
@@ -89,6 +89,11 @@ interface DesktopState {
     */
    val isFreeformEnabled: Boolean

    /**
     * Whether the home screen should be shown behind freeform tasks in the desktop.
     */
    val shouldShowHomeBehindDesktop: Boolean

    companion object {
        /** Creates a new [DesktopState] from a context. */
        @JvmStatic
+5 −0
Original line number Diff line number Diff line
@@ -144,6 +144,11 @@ class DesktopStateImpl(context: Context) : DesktopState {
        ) != 0
    override val isFreeformEnabled: Boolean = hasFreeformFeature || hasFreeformDevOption

    override val shouldShowHomeBehindDesktop: Boolean =
        Flags.showHomeBehindDesktop() && context.resources.getBoolean(
            R.bool.config_showHomeBehindDesktop
        )

    companion object {
        @VisibleForTesting
        const val ENFORCE_DEVICE_RESTRICTIONS_SYS_PROP =
+2 −1
Original line number Diff line number Diff line
@@ -1941,7 +1941,8 @@ class DesktopTasksController(
        // Currently, we only handle the desktop on the default display really.
        if (
            (displayId == DEFAULT_DISPLAY || Flags.enablePerDisplayDesktopWallpaperActivity()) &&
                ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY.isTrue()
                ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY.isTrue() &&
                !desktopState.shouldShowHomeBehindDesktop
        ) {
            // Add translucent wallpaper activity to show the wallpaper underneath.
            addWallpaperActivity(displayId, wct)
Loading