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

Commit b73d1296 authored by dshivangi's avatar dshivangi Committed by Shivangi Dubey
Browse files

Rename fold-unfold animation overlay and surface-container

Rename fold-unfold animation overlay and surface-container for better visibility in winscope trace. Currently the container is named as 'LayoutParams' which is incorrect.
This will also help in testing, to tell fold and unfold overlay apart from each other.

Test: atest FoldAnimationVisibleOnLauncher
Bug: 328219437
Flag: com.android.internal.foldables.flags.fold_lock_setting_enabled
Change-Id: I3caafc29496317b51dc478feaf2594b4cc272629
parent 024fcd2f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ constructor(
            controllerFactory.create(
                displaySelector = { minByOrNull { it.naturalWidth } },
                effectFactory = { LinearSideLightRevealEffect(it.isVerticalRotation()) },
                overlayContainerName = SURFACE_CONTAINER_NAME
                overlayContainerName = OVERLAY_TITLE
            )
        controller.init()

@@ -182,7 +182,7 @@ constructor(
    private companion object {
        const val TAG = "FoldLightRevealOverlayAnimation"
        const val WAIT_FOR_ANIMATION_TIMEOUT_MS = 2000L
        const val SURFACE_CONTAINER_NAME = "fold-overlay-container"
        const val OVERLAY_TITLE = "fold-animation-overlay"
        val ANIMATION_DURATION: Long
            get() = SystemProperties.getLong("persist.fold_animation_duration", 200L)
    }
+3 −3
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ constructor(
    @Main private val executor: Executor,
    @Assisted private val displaySelector: List<DisplayInfo>.() -> DisplayInfo?,
    @Assisted private val lightRevealEffectFactory: (rotation: Int) -> LightRevealEffect,
    @Assisted private val overlayContainerName: String
    @Assisted private val overlayTitle: String
) {

    private lateinit var bgExecutor: Executor
@@ -153,7 +153,7 @@ constructor(
        val containerBuilder =
            SurfaceControl.Builder(SurfaceSession())
                .setContainerLayer()
                .setName(overlayContainerName)
                .setName("FoldUnfoldAnimationContainer")

        displayAreaHelper
            .get()
@@ -221,7 +221,7 @@ constructor(
            }
            format = PixelFormat.TRANSLUCENT
            type = WindowManager.LayoutParams.TYPE_DISPLAY_OVERLAY
            title = javaClass.simpleName
            title = overlayTitle
            layoutInDisplayCutoutMode =
                WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
            fitInsetsTypes = 0
+2 −2
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ constructor(
            fullscreenLightRevealAnimationControllerFactory.create(
                displaySelector = { maxByOrNull { it.naturalWidth } },
                effectFactory = { LinearLightRevealEffect(it.isVerticalRotation()) },
                overlayContainerName = SURFACE_CONTAINER_NAME,
                overlayContainerName = OVERLAY_TITLE,
            )
        controller.init()
        bgExecutor = threadFactory.buildDelayableExecutorOnHandler(unfoldProgressHandler)
@@ -194,7 +194,7 @@ constructor(

    private companion object {
        const val TAG = "UnfoldLightRevealOverlayAnimation"
        const val SURFACE_CONTAINER_NAME = "unfold-overlay-container"
        const val OVERLAY_TITLE = "unfold-animation-overlay"
        const val UNFOLD_BLOCK_TOUCHES_UNTIL_PROGRESS = 0.8f
    }
}